0
$\begingroup$

Rosanswers logo

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?


Originally posted by badrobit on ROS Answers with karma: 61 on 2016-04-11

Post score: 0


Original comments

Comment by Icehawk101 on 2016-04-11:
How does the motor know what RPM the wheels are rotating at without encoders?

Comment by badrobit on 2016-04-11:
it has a hall sensor internally we just don't have access to it directly we get the value out as RPM

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Icehawk101 with karma: 955 on 2016-04-11

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

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


Originally posted by John Hoare with karma: 765 on 2016-04-11

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by badrobit on 2016-04-11:
would you suggest just performing this as a 1:1 treating RPM as the same thing as encoder ticks just with much less resolution?

Comment by Icehawk101 on 2016-04-11:
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

Comment by badrobit on 2016-04-12:
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?

Comment by Icehawk101 on 2016-04-13:
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.

Comment by badrobit on 2016-04-13:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.