Vectornav VN-200 User Manual Page 14

  • Download
  • Add to my manuals
  • Print
  • Page
    / 23
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 13
2. State c ontrol methods : enable, disable, init, shutdown, reset
VN200 will automatically send data in a specified frequency after configuration. The driver
does not need to keep a connection t o send commands. Therefore, enable, disable, shutdown
and re se t are just empty. The init method only calls vn200
connect in vn200 using the config-
uration read in the constructor.
3. readMsgsFromHardware
Just like other methods, this method also does not involve any manual connection. It only
calls vn 200
getGpsSolution and then does some conversion of the data format.
After changing all of this, what we ne ed to do is jus t type “cmake .”, “make” and then “make
install” in the root directory of the Orca source. Changing the default value to Baud=230400,
Device=/dev/ttyUSB0 and Driver=vn200, we can run “insgps insgps.cfg” to see the coordinates
form the VN200 sensor.
4.3 Motor Encoder Driver Implementation
Similar to the GPS driver, we need to make a new interface in the component directory for
our hardware. However, there is not an encoder module in the original Orca system. In order to
make thi s new component, I first made a copy of the laser2d component for laser scanner, named as
arduino
enc. Changing all the name prefixes laser2d into arduino, I got just the same new component
except for name.
For this new component, I t he n changed its fakedriver into a real driver to read data fr om serial
ports. In fakedriver/fakedriver.cpp, I changed FakeDriver::read into reading only one digit from the
serial port. Also, MainLoop::readData in mainloop.cpp should be changed to adopt to the new data
format.
The work done is quite similar to that for the GPS driver. Since the component is much simpler,
the change in the code is less than that in the insgps c omponent.
12
Page view 13
1 2 ... 9 10 11 12 13 14 15 16 17 18 19 ... 22 23

Comments to this Manuals

No comments