ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

You can follow the python publisher tutorial here, this will show you how to publish a simple string message. You should be able to put your raw GPS data into these strings to be able to see how publishers work.

However sending the raw sensor data around the ROS system is not the approach we recommend, there is a message type for this specific type of data, sensor_msgs/NavSatFix. This message type contains a sensor independent structured representation of a GPS fix measurement so that other nodes in ROS can work with any type of GPS sensor. If you can parse the string data from your GPS sensor and create NavSatFix messages then your GPS sensor will be properly connected to ROS.

Before you do that though I would check to see if any of the existing ROS GPS drivers would work for you, then you wouldn't have to re-invent the wheel. Unless you're just doing this just to learn how this works.

nmea_navsat_driver

novatel_gps_driver

... More that you can find on google.

Hope this helps.