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

Differential drive node?

asked 2017-04-09 20:39:09 -0600

Cerin gravatar image

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.

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
1

answered 2017-04-10 15:56:16 -0600

Mark Rose gravatar image

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/different... )

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.

edit flag offensive delete link more
0

answered 2021-12-27 22:40:32 -0600

I used the Morpheus chair package. Had to change the pin numbers in the motor driver script and it worked. Attaching the link below.

https://bitbucket.org/theconstructcor...

There's a couple of videos explaining the process. https://youtu.be/TABVZf5vKVA

edit flag offensive delete link more
0

answered 2017-04-10 01:08:13 -0600

I think the best way to do this in order to take advantage of all the goodies ROS has to offer, is to implement an interface for ros_control. You can check the ros_control github wiki for some tutorials. It might seem too much work at first, but once you implement it almost any navigation-related package will be compatible with your robot. Good luck!

edit flag offensive delete link more

Comments

That seems even more complicated than differential_drive_controller, and has features I doubt 'll need. I'm looking for something to implement what ros_control calls the "hardware_interface::RobotHW" node, which ros_control doesn't appear to implement.

Cerin gravatar image Cerin  ( 2017-04-10 08:38:22 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2017-04-09 20:39:09 -0600

Seen: 2,169 times

Last updated: Apr 10 '17