0
$\begingroup$

Rosanswers logo

Hi, I'm learning ROS for graduating undergraduate course.

I am following this Tutorial ' http://wiki.ros.org/navigation/Tutorials/RobotSetup ' to make mobile robot.

I already made teleoperation pkg , '/cmd_vel ', which spend the message to ' rosserial_arduino ' and

control motor with key_board button. And next step, I want to build navigation. So I heard I have to make

odometry and tf msg , which need a published 'Encoder data' .

I have two MAXON motor ; the two controllers are EPOS2 70/10 .

I have been googling how to publish encoder for using ' nav_msgs/Odometry ' but, I don't have idea .....

How to publish encoder data over ROS and subscribe it on using 'nav_msgs/Odometry'


Originally posted by Ros_junior on ROS Answers with karma: 1 on 2015-09-10

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I have the feeling that you misunderstood, what odometry means.

Check out the Wikipedia article.

You don't publish the encoder data to nav_msgs/Odometry. You need to compute the current cartesian velocity (and also the current position estimate based on the velocity) based on the encoder readings. For this, you'll need to create a model of your robot that let's you compute this. Typical odometry models (corresponding to the kinematics) are differential, omni-directional, tricycle.

In ROS, there exist different base_controllers or base_drivers, that actually do this. Search a bit around to see how this is done therein. Also, have a look at this Tutorial.


Originally posted by mgruhler with karma: 12390 on 2015-09-10

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Ros_junior on 2015-09-10:
Thanks for your answer. actually , I have not known about odometry well just except the way to check position. For now.... I wonder how to get my encoder's ticks from epos2 to compute the velocity.... I also search this pkg ' http://wiki.ros.org/epos_hardware ' but, I don't know how to use

Comment by Ros_junior on 2015-09-10:
what is 'motor_name' and how to know it etc..... I have tried many times . But, I couldn't find the way to use . Can you give me an advice how to get encoder ticks from epos2

Comment by mgruhler on 2015-09-12:
motor_name is just a namespace, where you load the respective parameters for the different motors as described further down, it seems. So you have to load for each motor the respective set of parameters to the ROS parameter server and can then run the node to get information.

Comment by mgruhler on 2015-09-12:
Other than that, I cannot help as I have never used epos controllers myself. Either ask a new question or check out the ROS wiki pages on Parameter Server etc.

$\endgroup$

Your Answer

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