# How to publish MAXON Encoder in EPOS2 70/10 for building "nav_msgs/Odometry"

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

I am following this Tutorial ' http://wiki.ros.org/navigation/Tutori... ' 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'

edit retag close merge delete

Sort by » oldest newest most voted

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.

more

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

( 2015-09-10 07:31:26 -0600 )edit

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

( 2015-09-10 07:35:08 -0600 )edit

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.

( 2015-09-12 11:07:37 -0600 )edit

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.

( 2015-09-12 11:08:40 -0600 )edit