ethz-asl/geodetic_utils

/gps_pose having wrong orientation values

Closed this issue · 4 comments

I am running "gps_to_pose_conversion_node.cpp" to get a pose, but It isn't updating the orientation values on the /gps_pose . As I move the GPS I can see it changing the position values, but when I move the IMU sensor it doesn't change the orientation values.

When I check the /tf message, it shows the rotation values as NAN.

Have anyone had this problem before?

Hi Irthoriata,

Are you providing the IMU topic to the node?
For example, are you remapping your IMU topic to the one subscribed by gps_to_pose_conversion_node? https://github.com/ethz-asl/geodetic_utils/blob/master/src/gps_to_pose_conversion_node.cpp#L241

Hi @marco-tranzatto.

Yes, I am providing the IMU topic to the node.
Here is the launch file I wrote to it:

<launch>

  <node name="nmea_navsat_driver" pkg="nmea_navsat_driver" type="nmea_serial_driver" output="screen">
      <rosparam>
        port: /dev/ttyUSB1
      </rosparam>
    </node>

  <node name="set_gps_reference" pkg="geodetic_utils" type="set_gps_reference_node" output="screen">
        <remap from="gps" to="/fix" />
    </node>

  <node name="xsens_imu" pkg="xsens_driver" type="mtnode.py" output="screen">
    <rosparam>
      device: /dev/ttyUSB0
      baudrate: 9600
    </rosparam>
  </node>

  <node name="gps_to_pose_conversion" pkg="geodetic_utils" type="gps_to_pose_conversion_node" output="screen">
        <remap from="gps" to="/fix" />
        <remap from="imu" to="/imu/data"/>

        <rosparam>
          frame_id: world
          trust_gps: true
          publish_pose: true
        </rosparam>
    </node>

</launch>

@lrthorita I can't see any strange behavior form the code. Are you sure your topic "/imu/data" is actually being published?

@marco-tranzatto Yes, it's publishing messages perfectly.
This is the output of rostopic echo /imu/data:

takeshi@takeshi-K55VM ~ $ rostopic echo /imu/data
header: 
  seq: 30530
  stamp: 
    secs: 1511876028
    nsecs: 148955106
  frame_id: /base_imu
orientation: 
  x: 0.0
  y: 0.0
  z: 0.0
  w: 0.0
orientation_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
angular_velocity: 
  x: 0.000719558492503
  y: -0.00120809301734
  z: -0.00211894512176
angular_velocity_covariance: [0.0004363323129985824, 0.0, 0.0, 0.0, 0.0004363323129985824, 0.0, 0.0, 0.0, 0.0004363323129985824]
linear_acceleration: 
  x: 0.00102016329765
  y: 0.00111168622971
  z: 0.0244359374046
linear_acceleration_covariance: [0.0004, 0.0, 0.0, 0.0, 0.0004, 0.0, 0.0, 0.0, 0.0004]
---
header: 
  seq: 30531
  stamp: 
    secs: 1511876028
    nsecs: 149713039
  frame_id: /base_imu
orientation: 
  x: 0.0
  y: 0.0
  z: 0.0
  w: 0.0
orientation_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
angular_velocity: 
  x: -0.00376797087219
  y: -0.00078467642847
  z: -0.00111683072246
angular_velocity_covariance: [0.0004363323129985824, 0.0, 0.0, 0.0, 0.0004363323129985824, 0.0, 0.0, 0.0, 0.0004363323129985824]
linear_acceleration: 
  x: 0.000989079475403
  y: 0.00110925734043
  z: 0.0244139283895
linear_acceleration_covariance: [0.0004, 0.0, 0.0, 0.0, 0.0004, 0.0, 0.0, 0.0, 0.0004]

But the orientation values keeps in zeros, although the angular_velocity changes when I move the IMU sensor...
Maybe the problem isn't in this package at all. I'll check the package I'm using to get IMU data.