how is angular velocity calculated from odometry?

Hi,

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 close merge delete

Sort by ยป oldest newest most voted

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.

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?

( 2018-07-25 03:35:25 -0500 )edit
1

@Hypomania: so your platform uses Ackermann kinematics?

( 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?

( 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.

( 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

( 2018-07-25 04:06:40 -0500 )edit
2

@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.

( 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.

( 2018-07-25 04:57:44 -0500 )edit
1

Ah, that sounds more like skid-steering then.

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