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

odometry manually

asked 2015-03-25 11:57:33 -0600

maha gravatar image

updated 2015-03-25 11:58:18 -0600

hello, i need to publish the odometry information over ROS with my own robot platform (SuperDroid platform) and i'm using Roboteq SDC21xx microcontroller. the thing is that in this code http://wiki.ros.org/navigation/Tutori... there are three variables that I have to provide which are 16 double vx = 0.1; 17 double vy = -0.1; 18 double vth = 0.1; Now, my question is if i provided the values and computations of the variables manually. which unit measures should I use? inches/s ? radians? how?

thank u

edit retag flag offensive close merge delete

Comments

yea and why do i have to provide the wheels size i dont get it

maha gravatar image maha  ( 2015-03-25 12:01:55 -0600 )edit

Why don't you follow the standard msg type for odom msgs? You can decide what units you want to send them in though as long as the node receiving the msg is aware of that.

2ROS0 gravatar image 2ROS0  ( 2015-03-25 22:25:19 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-03-25 12:32:28 -0600

updated 2015-03-25 12:33:30 -0600

vx, vy, and vz are in meters/sec. vth is in radians/second.

Take a look at this site.

One thing I would add about finding distance travelled and theta:

To get distance, and therefore (x,y) position, you will have to know wheel circumference. Encoder counts gives you how much the motor has turned, but if that motor is attached to a larger wheel, then the distance will obviously be greater.

Example:

If your robot was just riding on the motor shafts and your motor shafts were 0.04 m in circumference. If you rotated your motor one full rotation, you will have traveled 0.04 m.

However, if your motor shaft was fixed to a wheel with a circumference of 0.25 m and you rotated your motor one full revolution, then you will have traveled 0.25m (ignoring friction and drag).

edit flag offensive delete link more

Comments

1

ok thank u

maha gravatar image maha  ( 2015-03-26 05:29:33 -0600 )edit

now that i got the distance traveled for x and y . i'll have to set vx to x and vy to y. correct?

maha gravatar image maha  ( 2015-03-30 07:53:12 -0600 )edit

You will get vx and vy from the encoders as well. The rate they are turning, giving you velocity in the x (usually set as forward) and y (usually set as robot's left) directions.

You usually command the motors to turn using /cmd_vel.

sealguy77 gravatar image sealguy77  ( 2015-04-06 13:32:59 -0600 )edit

I think for the purpose of the tutorial you mentioned, they just set vx and vy as an example to show the base_link moving in the odom frame. You wouldn't actually put that when publishing your odometry message.

But I could be wrong. I haven't had to do that from scratch yet.

sealguy77 gravatar image sealguy77  ( 2015-04-06 13:34:40 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-03-25 11:57:33 -0600

Seen: 519 times

Last updated: Mar 25 '15