Swift Navigation RTK GPS - olinrobotics/gravl GitHub Wiki
- Overview
- Initial System Setup
- Using the System
- Other Notes
The RTK GPS is a system of radios, circuit boards, and multiple receivers that are able to collectively localize position on the globe to a much more exact degree than single receiver systems are able to determine.The piksi multi board and reciever pair on Kubo can operate as a single unit, providing an accuracy equal to that of standard GPS/GNSS systems. When the rover unit operates in coordination with a surveyed base station, it gets significantly more accurate. Typically, the the rover GPS is connected to Kubo's onboard computer, and the base station GPS will be connected to the base station computer (i.e. your laptop)
- Swift Navigation: Understanding GPS/GNSS RTK Technology
- Wikipedia: Real-time kinematic
The GPS unit has a custom communication protocol. The Swift binary protocol (SBP) library has to be installed before installing the ROS driver. Both the ROS driver and SBP library need to be set up on the onboard computer (NUC) as well as on the computer
The following instructions are based on this page (reference)
- If you still have the deprecated
swiftnav_ros
package installed (link), make sure to delete it first - Navigate to catkin workspace source directory (e.g.
cd ~/catkin_ws/src
) -
git clone https://github.com/olinrobotics/ethz_piksi_ros.git
Note: we made a fork because the original is continuously updating and sometimes doesn't build properly cd ethz_piksi_ros/piksi_multi_rtk_ros
source install/install_piksi_multi.sh
- Build the package and source the workspace (e.g. cd ~/catkin_ws/ && catkin_make && source devel/setup.bash)
Make sure the GPS units are outdoors. This source has good tips for best results (reference)
- Plug in the GPS to power
- Screw in the antenna
- Plug in the USB cable to the base station laptop
- Run
roslaunch piksi_multi_rtk_ros piksi_multi_base_station.launch
- If you run
rostopic echo /piksi_multi_base_station/enu_pose_best_fix
in another terminal, you should see the position of the base station print at a regular frequency.
To get a good survey of the base station's location, run the command (reference)
roslaunch piksi_multi_rtk_ros geodetic_survey.launch number_of_desired_fixes:=3000
Note: Don't run this while piksi_multi_base_station.launch is active
- Power on the tractor and follow these instructions to ssh into the NUC and change the ROS_IP and ROS_MASTER_URI environment variables on your computer (reference)
roslaunch piksi_multi_rtk_ros piksi_multi_rover.launch
- If you run
rostopic echo /piksi/baseline_ned
you should see the relative position of the rover's GPS position
If you get a serial port error, try modifying the default serial port setting in ethz_piksi_ros/piksi_multi_rtk_ros/cfg/piksi_multi_driver_settings.yaml
(e.g. change serial_port: '/dev/ttyUSB0' to serial_port: '/dev/ttyACM0’)
The GPS units and radios can be reconfigured, though this shouldn't need to be completed often. Below is some useful configuration documentation
The setup process for the radios is here The base station radio Network ID is 849 (the last 3 digits on the base station radio module)
To setup the system for a base station and a rover, see Swift Navigation's documentation.(link)
The setup for using the Piksi Multi with drones is here
Sometimes, source install/install_piksi_multi.sh
will throw the error:
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
ImportError: cannot import name 'main'
Alternate method of installing libsbp:
python -m pip install --user sbp
python3 -m pip install --user sbp
Sometimes, the launch files will result in the error Swift receiver not found on serial port '/dev/ttyUSB0'
To fix this, in ethz_piksi_ros/piksi_multi_rtk_ros/cfg edit the serial port value.
- Power up the tractor
- Plug the GPS USB connector into your computer
- Run
roscore
- In a separate terminal, run
roslaunch swiftnav_ros swiftnav_ros.launch
- In a separate terminal, run
rostopic echo /diagnostics
- Drive the tractor around outside until you get a satellite fix and the GPS starts publishing data
- Set up base station following the instructions at the page below: Swift Navigation: GNSS Antenna Placement Guides
- See Piksi Multi Setup above