Hardware
A solution for outdoor localization and basic navigation is an Arduino board, such as the Adafruit Feather nRF52840 Sense with a GPS shield, such as the Adafruit Ultimate GPS FeatherWing. TheSense provides a micro controller, Bluetooth, a 6DoF IMU, and a magnetometer (a LIS3MDL). The FeatherWing provides a GPS.
Assembly
Solder theFeatherWing to the Sense. Add support for the nRF52 to the Arduino IDE. Then, add the board - it’s the Adafruit nRF52840 Sense. The Arduino IDE will probably need to also install the nRF core library (adafruit:nrf52@1.6.1). You should now be able to connect to the board.
Software
Add the following libraries to the Arduino IDE:Adafruit GPS libraryAdafruit LIS3MDLAdafruit_LSM6DS
/system_hw_test/gps_mag. It yields all the data for tilt compensated magnetic heading, a full AHRS solution (yaw, tilt, roll) and a GPS location, as well as altitude and velocity.
WARNING The direction and AHRS data will be entirely incorrect unless you calibrate your magnetometer, gyro, and accelerometer.
Calibration
In the/system_hw_test/gps_mag.ino, see:
gap_mag.ino:
Usage
Once your Sense/FeatherWing is streaming data on the serial line, it can be fed into OM1. Seesrc/inputs/plugins/serial_reader for an example of how to do that.
Finding the Arduino on Linux
When connecting to the Arduino via USB, you should see the Arduino serial port appear as/dev/ttyACM0 (sometimes the number can be different, for example /dev/ttyACM1). Run:
sudo dmesg and looks for entries with “Arduino” in it. This way you will easily spot the serial device name of your Arduino. You can read the data with:
/dev/ttyUSB0. The TurtleBot4 assumes that the RPLIDAR is accessible at /dev/ttyUSB0. If you change which USB port the LIDAR is plugged into, the LIDAR will fail.
Finding the Arduino GPS Feather on Mac
Determine the serial port the sensor is using:/dev/cu.usbmodem8401. Even on a mac, you can use screen to see the data: screen /dev/cu.usbmodem21201 115200
Testing
RTCM / RTK Precision GPS
An RTK GPS system can provide centimeter accuracy localization. In a typical setup, an RTK-compatible GPS receiver (such as the u-blox ZED-F9P/simpleRTK2B acceptsRTCM messages over XBee or the internet, and uses those data to correct (and greatly improve) its location estimate. The simpleRTK2B has two usb ports, one labeled power + GPS and the other power + XBee. The first port provides a full set of NEMA and UBX messages, including GPGGA, GNRMC, GNGLL, and UBX(NAV-PVT). The power + XBee port provides direct access to received RTK correction messages, such as 1005 and 1074. In standard usage, a rover would use the NEMA messages to track its location whilst monitoring the status, mode, and quality fields.
- 1 autonomous (standard accuracy) solution
- 2 code-differential (DGNSS, SBAS) solution
- 4 fixed RTK
- 5 float RTK
A) using RTK mode with fixed integers (posMode=R)
RTK Data Plotting
The best software to use ispygpsclient: