ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Odom tf drifts

asked 2019-07-22 02:24:58 -0500

S.Yildiz gravatar image

updated 2019-07-22 02:25:36 -0500

When I start the cartographer everything is correct: image description

But the longer I driver around the more the odom tf is drifting away from the origin:

image description

And later I have this:

image description

I get this odom tf even when I restart the cartographer. I have to reboot to set the odom back to the origin.

This is the odom echo, in the correct state:

header: 
  seq: 561
  stamp: 
    secs: 1563778846
    nsecs: 831010670
  frame_id: "odom"
child_frame_id: "base_link"
pose: 
  pose: 
    position: 
      x: 0.0
          y: 0.0
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: 0.0
      w: 1.0
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
twist: 
  twist: 
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 0.0
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---

And this is the wrong odom:

header: 
  seq: 8272
  stamp: 
    secs: 1563779388
    nsecs: 873725520
  frame_id: "odom"

    child_frame_id: "base_link"
    pose: 
  pose: 
    position: 
      x: 1.58052347778
      y: 0.194375425096
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: -0.171363574733
      w: -0.985207858908
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

twist: 
  twist: 
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 0.0
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---

Do you know how to correct this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2019-07-22 09:14:36 -0500

ChuiV gravatar image

This is for a couple reasons:

  1. Your odom frame doesn't have feedback going into it. All odom does is integrate your velocities to compute a pose relative to where you started from. I'm not super familiar with cartographer, but I suspect that it uses the map and laser scan data to feedback into your odom pose. Ie, odom provides a rough guess as to where the robot is, and cartographer refines that guess.
  2. Sensors are complex (citation needed).They have biases, random walks, scale factors, alignment issues, not to mention that all those change depending on temperature. When you integrate a linear velocity for example, you're also going to be integrating the error of your sensor.

Bottom line is that your odom frame drifting is quite expected. If your robot position is accurate enough for you, then you shouldn't have any issues with odom. If you're concerned about it drifting, then you'll need to do some more advanced filtering of your sensor data or get better sensors.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-07-22 02:24:58 -0500

Seen: 672 times

Last updated: Jul 22 '19