GPS message in NMEA format instead of Navfix
Hello everyone,
I have a robot model and I use in it and GPS. For GPS, I'm using "libhector_gazebo_ros_gps" plugin. GPS uses two topics to publishes its data /fix
and /vel
. on /fix it publishes message with type sensor_msgs/NavSatFix
and on /vel message geometry_msgs/Vector3Stamped
. The node: rosrun nmea_navsat_driver nmea_topic_driver
has the information:
Node [/nmea_topic_driver]
Publications:
* /fix [sensor_msgs/NavSatFix]
* /heading [geometry_msgs/QuaternionStamped]
* /rosout [rosgraph_msgs/Log]
* /time_reference [sensor_msgs/TimeReference]
* /vel [geometry_msgs/TwistStamped]
Subscriptions:
* /clock [rosgraph_msgs/Clock]
* /nmea_sentence [unknown type]
Services:
* /nmea_topic_driver/get_loggers
* /nmea_topic_driver/set_logger_level
contacting node http://MyPC:36869/ ...
Pid: 31161
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound (34189 - 127.0.0.1:60256) [10]
* transport: TCPROS
* topic: /clock
* to: /gazebo (http://MyPC:40027/)
* direction: inbound
* transport: TCPROS
What I need is to have the information of GPS in NMEA format. Or in another word, converting the message type sensor_msgs/NavSatFix
to NMEA sentence format?
Thanks in advance.
Why don't you just use a gpsd client to get the nmea? For ROS there is the corresponding node gpsd_client to convert the gpsd nmea messages to sensor_msgs/NavSatFix