0
$\begingroup$

Rosanswers logo

I have a two-wheeled platform controlled by an Arduino that reports motor encoder counts. So I don't reinvent the wheel, I'm looking for a pre-existing ROS node that can convert those counts into standard odometry and tf messages. Is there a standard ROS package that implements this?

I found this differential_drive project, but it appears to be dead and doesn't have a Kinetic package available.

I also found this differential_drive_controller project, but it appears to be more high-level and doesn't support listening to motor encoders directly. I'd still need to implement a custom node to convert my motor encoder messages to joint messages, so if I need to overcome that overhead, it would make more sense to just implement the odometry reporting myself instead of running two separate nodes in memory.


Originally posted by Cerin on ROS Answers with karma: 940 on 2017-04-09

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I've used differential_drive in Indigo and Jade. You cannot install via rpm but can get the source from GitHub and add to your catkin_src. The original code was for Groovy, but the author has incorporated some changes I supplied to make the package more ROS-up-to-date and remove compile warnings for Hydro and above. (https://github.com/jfstepha/differential-drive)

That said, I no longer use differential_drive for these reasons:

  • I intended to use differential_drive together with rosserial_python to talk to an Arduino-based robot controller. However, rosserial proved unreliable on Arduino-class devices with only 2kb RAM, so I had to abandon that approach.

  • I shifted to using ros_arduino_bridge, which incorporates the functionality that differential_drive supplies, so I no longer needed it.

If you decide to use differential_drive, a few observations:

  • differential_drive incorporates a PID controller in Python to send motor controls via ROS messages. However, the author of differential_drive doesn't recommend that method any more. (From email communication.) He recommends instead putting the PID controller closer to the motor control hardware.

  • differential_drive mixes units at times. For example, motor commands sent by the node are in m/s, while odometry returned from the motor control system is in encoder ticks per second.


Originally posted by Mark Rose with karma: 1563 on 2017-04-10

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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