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

odometry on arduino vs on ROS

asked 2014-12-06 12:29:33 -0500

HassanNadeem gravatar image

I have got an arduino connected to my robot that reads the encoder and controls the motors.

What would be better, calculating odometry on arduino and publishing the odometry message to ROS on my Laptop?

Or publishing the encoder ticks to ROS and publishing the odometry messages after processing from Laptop?

edit retag flag offensive close merge delete


I want to do the same thing too. Could you please share the arduino and python code (ros code) about this topic.

Mekateng gravatar image Mekateng  ( 2020-02-24 14:55:03 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-12-07 02:00:54 -0500

tfoote gravatar image

In most cases it's better to count the ticks on the arduino and sending the integrated values over ROS topics.

Counting encoder ticks is something which microcontrollers are quite good at.

edit flag offensive delete link more

answered 2015-01-10 16:10:57 -0500

chrisalbertson gravatar image

At maximum wheel speed how many encoder ticks do to expect per second? I suspect that you have no choice but to process them in the Arduino because you can't send ROS messages that fast.

edit flag offensive delete link more


The first answer above mentions integrating the ticks. A good solution is to periodically send collected ticks in a message such as number of ticks for left and right wheel in the last 100ms. Taking small number of ticks out of order will not significantly effect your overall odometry.

nburn42 gravatar image nburn42  ( 2017-01-18 18:49:10 -0500 )edit

Question Tools

1 follower


Asked: 2014-12-06 12:28:17 -0500

Seen: 1,199 times

Last updated: Dec 07 '14