GPS message in NMEA format instead of Navfix

asked 2020-08-07 04:21:35 -0500

adel gravatar image

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.

edit retag flag offensive close merge delete

Comments

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

Humpelstilzchen gravatar image Humpelstilzchen  ( 2020-08-08 02:23:09 -0500 )edit