ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How can I track distance traveled and Velocity of the robot?

asked 2012-07-30 09:40:22 -0600

IFLORbot gravatar image

I want to use the distance traveled and the avg velocity for a fitness evaluation for my robot. I can't find that information anywhere, though. Does anybody know of a package that publishes this information? I was hoping it was going to be part of move_base

edit retag flag offensive close merge delete


What kinda robot are we talking about here?

David Lu gravatar image David Lu  ( 2012-07-30 09:49:19 -0600 )edit

The Turtlebot.

IFLORbot gravatar image IFLORbot  ( 2012-07-30 10:13:21 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-07-30 09:50:44 -0600

David Lu gravatar image

That information is both in the transforms and odometry (

edit flag offensive delete link more


Yeah, that's what I thought. I was really hoping for something where I wouldn't have to keep track of position and twist, but if I must, I must. Linear twist is going to correspond to velocity, right?

IFLORbot gravatar image IFLORbot  ( 2012-07-30 10:15:21 -0600 )edit

The current forward velocity is twist.twist.linear.x.To get distance you can integrate that over time, or sum the Euclidean distance from each previous position.

joq gravatar image joq  ( 2012-07-31 14:34:23 -0600 )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


Asked: 2012-07-30 09:40:22 -0600

Seen: 2,019 times

Last updated: Jul 30 '12