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

how is angular velocity calculated from odometry?

asked 2018-07-25 02:44:51 -0500

Hypomania gravatar image

updated 2018-07-25 05:50:02 -0500

gvdhoorn gravatar image


I have a hall effect sensor on one of my robot wheels (4 wheels in total). I use it to calculate the linear velocity for geometry_msgs/Twist message. How does one calculate angular velocity from just odometry? Are hall sensors even good enough, seeing as everyone else use wheel encoders?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-07-25 03:23:32 -0500

updated 2018-07-25 05:43:08 -0500

You probably have differential kinematics? Am I right? Angular velocity would than be calculated from a speed difference between left and right wheels and distance between them. An example for this you can find in neo_driver package. See function execForwKin. For theory make some Internet search on differential kinematics. There are plenty of presentations from university courses.

EDIT: After clarifying the kinematics which is skid-steering one should look at diff_drive_controller which also enables skid-stearing. For start see this file.

edit flag offensive delete link more


Sadly no, I have a small RC car where the wheels rotate at more or less the same speed, no differential. Is odometry achievable with such vehicle?

Hypomania gravatar image Hypomania  ( 2018-07-25 03:35:25 -0500 )edit

@Hypomania: so your platform uses Ackermann kinematics?

gvdhoorn gravatar image gvdhoorn  ( 2018-07-25 03:40:41 -0500 )edit

I had to look it up, I think that's what it is. Imagine a cheap RC car without any differentials, would you call that Ackermann kinematics?

Hypomania gravatar image Hypomania  ( 2018-07-25 03:49:09 -0500 )edit

If you have 4 wheels of which two are fixed and two are used for "car-like steering", then yes, it would be considered Ackermann.

gvdhoorn gravatar image gvdhoorn  ( 2018-07-25 04:00:07 -0500 )edit

The ackermann kinematics is also well known and there is plenty of stuff in Internet. Unfortunately I do not know any ROS driver for it where you can directly look it up

destogl gravatar image destogl  ( 2018-07-25 04:06:40 -0500 )edit

@Hypomania: you can probably take a look at easymov/ackermann_controller (and the related packages). That could probably save you quite some time and effort. See also wiki/Ackermann Group.

gvdhoorn gravatar image gvdhoorn  ( 2018-07-25 04:09:19 -0500 )edit

@gvdhoorn, okay, I did more research, my RC car is a 4 wheel drive car with a center transfer box and center steer. There is no Ackermann geometry on it, my colleague said it "relies on torque bias and backlash from the drive system" to improve steering efficiency. It can do a perfect circle.

Hypomania gravatar image Hypomania  ( 2018-07-25 04:57:44 -0500 )edit

Ah, that sounds more like skid-steering then.

gvdhoorn gravatar image gvdhoorn  ( 2018-07-25 04:58:30 -0500 )edit

Question Tools

1 follower


Asked: 2018-07-25 02:44:51 -0500

Seen: 1,545 times

Last updated: Jul 25 '18