O'Reilly logo

Robot Operating System Cookbook by Kumar Bipin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it…

  1.  Install the NMEA GPS driver package by using the following command:
$ sudo apt-get install ros-kinetic-nmea-gps-driver
$ rosstack profile & rospack profile
  1. Download the package from the repository and build the package from the source:
$ cd ~/catkin_ws/src
$ git clone git https://github.com/ros-drivers/nmea_navsat_driver.git
$ cd ..
$ catkin_make
  1. To execute the GPS driver, we will run the nmea_gpst_driver.py script, which requires two arguments: the port name that is connected to the GPS, and the baud-rate.
It is important to find the correct port name and supported baud-rate.
$ sudo chmod 666 /dev/ttyUSB0
$ rosrun nmea_gps_driver nmea_gps_driver.py _port:=/dev/ttyUSB0 _baud:=9600

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required