publish /gps/fix topic by libhector_gazebo_ros_gps

asked 2017-06-05 06:57:45 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I want to publish the robot's pose by gps. i used the hector_gazebo_plugins. i use plugin tag in the urdf model:

    <robot> 
     ...
     ...
       <gazebo>
         <plugin name="hector_gps" filename="libhector_gazebo_ros_gps.so">
           <robotNamespace>/sos1</robotNamespace>
           <updateRate>50.0</updateRate>
           <bodyName>base_link</bodyName>
           <frameId>map</frameId>
           <topicName>gps/fix</topicName>
           <velocityTopicName>gps/fix_velocity</velocityTopicName>
         </plugin>
       </gazebo>
    </robot>

the topics are publishing but the latitude and longitude are fixed although the robot is moving.

and here is the frames of the robot: image description

my question is, for publishing the valid latitude and longitude, my plugin tag is enough? and if yes, so whats the problem?

some of published data in /sos1/gps/fix topic:

header: seq: 1468 stamp: secs: 5603 nsecs: 700000000 frame_id: map status: status: 0 service: 0 latitude: 49.8999358331 longitude: 8.90010757962 altitude: 0.0500032459217 position_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] position_covariance_type: 2

header: seq: 1469 stamp: secs: 5603 nsecs: 720000000 frame_id: map status: status: 0 service: 0 latitude: 49.8999358331 longitude: 8.90010757961 altitude: 0.050003245824 position_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] position_covariance_type: 2

edit retag flag offensive close merge delete