Ask Your Question
0

Turtlebot Odometry Calculations

asked 2013-10-04 01:58:08 -0500

LogicalUnit gravatar image

updated 2013-11-18 18:51:07 -0500

tfoote gravatar image

Hi, thanks for looking at my question:

I'm writing a class to control a Turtlebot. Within this class, I want to measure how many metres the turtlebot has moved, and how many radians it has turned. To achieve this, I have subscribed to "turtlebot_node/sensor_state" whose callback parameter provides delta values for distance and angle.

There's a problem: this callback parameter provides inconsistent delta values for angle radians at low angular velocities. For example, at 0.1 metres per second around the z-axis (yaw), zero radians are returned. I believe this is because the callback only runs at 10Hz.

What I've done now is subscribe directly to the "odom" topic. My callback function is working, but I don't know how to get from the nav_msgs::Odometry struture to useful delta values.

Can someone please help me with the mathematics here?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-01-15 13:49:04 -0500

tfoote gravatar image

The odometry message is the integrated deltas. If you want to compute any delta, just subtract the two poses. You just need to keep track of the initial pose and the final pose to find the distance traveled and angle changed.

edit flag offensive delete link more

Comments

I have same problems as above. Could you please give the specific example to describe what you say? I also want to calculate the path length. Thanks!

Wentao gravatar image Wentao  ( 2017-10-31 09:12:17 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-10-04 01:58:08 -0500

Seen: 744 times

Last updated: Jan 15 '14