ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

# Using RPM as a form of Wheel Odometry

I am currently working on trying to create some form of wheel odometry to be used in our system to help determine the pose of our robot. There are no encoders on the wheels but the motor that is used to drive the wheels does report its RPM. I am wondering if there is anyway to use this as an input to the robot_localization node?

edit retag close merge delete

1

How does the motor know what RPM the wheels are rotating at without encoders?

it has a hall sensor internally we just don't have access to it directly we get the value out as RPM

Sort by » oldest newest most voted Yes, you can do this. The odometry message is basically the total translation and rotation of the robot as well as its current instantaneous velocities both linearly and rotationally.

You know the speed the wheels are rotating at, and I assume you either know or can determine the size of the wheels. Using this data and the kinematic equations of your robot setup you can calculate the robot's current velocities. You find the overall displacement by multiplying the current velocity by the time step and adding that to the total. Check out this tutorial on how to setup a basic odom publisher.

more Sure, you would need to write a node which converts the wheel RPMs into a nav_msgs/Odometry message which robot_localization would consume.

more

would you suggest just performing this as a 1:1 treating RPM as the same thing as encoder ticks just with much less resolution?

1

You would use Speed = (RPM (diameter * PI) / 60) to find the velocity of each wheel, then put that into the kinematic equations of the robot to determine the robot's overall velocities along the x and y axis and about the z axis

I am not that familiar with using the kinematic part of the system we have TF2 setup does this just refer to changing the reference frame for the two velocities?

1

The transform is the change in reference between odom frame and the world frame. The kinematic equations are used to determine what effect the individual wheel velocities have on the robot as a whole.

I guess I am not sure how exactly I would go about doing that. I have the values like you said and I have a rover model loaded through URDF which has all of the required frames listed I am just not sure how to put the speeds into the system in a way that would output the desired result.