Robotics StackExchange | Archived questions

Hector GPS fix status not setting

Working with http://wiki.ros.org/hector_gazebo_plugins?distro=kinetic#GazeboRosGps.

Everything is working fine except for the fix status, and I can't make heads or tails of it. I have the plugin configured as so

<plugin name="gazebo_gnss" filename="libhector_gazebo_ros_gps.so">
  <updateRate>50</updateRate>
  <bodyName>base_link</bodyName>
  <topicName>fix</topicName>
  <velocityTopicName>vel</velocityTopicName>
  <referenceLatitude>REMOVED</referenceLatitude>
  <referenceLongitude>REMOVED</referenceLongitude>
  <referenceAltitude>REMOVED</referenceAltitude>
  <status>2</status>
  <service>8</service>
</plugin>

With these settings I'm getting an msg of

header: 
  seq: 7633
  stamp: 
    secs: 152
    nsecs: 780000000
  frame_id: /world
status: 
  status: 50
  service: 8
latitude: 
longitude: 
altitude: 
position_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
position_covariance_type: 2

I don't know how the 50 came about. What is odd is if I set the config to <status>1</status> I get a different output

---
header: 
  seq: 212
  stamp: 
    secs: 4
    nsecs: 560000000
  frame_id: /world
status: 
  status: 49
  service: 8
latitude: 
longitude: 
altitude: 
position_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

Thinking it was some type of casting I set <status>2.0</status> and I get a status: 0.

I have looked over the source and found the param set, https://github.com/tu-darmstadt-ros-pkg/hector_gazebo/blob/indigo-devel/hector_gazebo_plugins/src/gazebo_ros_gps.cpp#L127. Also found some other operations but finding nothing that would offset by 48.

Asked by mr337 on 2016-10-12 12:29:32 UTC

Comments

Answers

I finally figured it out, there are fix status settings via reconfigure, and this is a combination of which type of fixes via GLONASS, GPD, GALILEO etc.

Update:

I take that back, there looks to be an error when hector GPS starts up. I start up gazebo with these settings

  <status>2</status>
  <service>1</service>

I start up gazebo and rqt_reconfigure. Here is the status I get from echo'ing the topic

  <status>50</status>
  <service>1</service>

Via rqt_reconfigure if I toggle any of the settings in fix->status, it fixes itself. image description

  <status>2</status>
  <service>1</service>

So looks to be an issue with how hector_gps is starting up and reading params. If I get time I'll dig into the gazebo plugin.

Asked by mr337 on 2017-04-21 14:27:57 UTC

Comments