What are the steps to use diff_drive_controller in a physical robot?
What steps need to be followed to usediff_drive_controller
on a physical robot that is using differential drive (including all packages diff_drive_controller needs)?
I need a bridge between geometry_msgs/Twist
messages and my physical robot.
The code to send messages to my stepper drives is finished (the two robot wheels are turned via stepper motors that are controller by Ethernet stepper drives). All I need is a way to translate geometry_msgs/Twist
to my code that tells the stepper drives how to move (number of steps, accel, decel, velocity, etc....). This will allow me to:
- Test the robot, by publishing to the topic manually (and getting robot motion)
- Convert Navigation stack messages to robot motion.
I am running Ubuntu 16.04 with Kinetic.
Some background on the question: For this robot I did all the mechanical, electrical and coding (both design and implementation) myself. As you can imagine, I am not very strong at any one of those 3 things (I am a very, very persistent generalist). At this point I find myself in programmer territory, and I am getting to a point where the documentation is getting very hard to digest or I can't find any.
I have looked through the diff_drive_controller
source code, and the package overall. I have looked over the diff_drive_wiki (including the so called diff_drive_controller website). I have looked over all 25 FAQs. None of those places have tutorials, or something I can use to get going. What I know is what I learned from the 25 questions and answers for the FAQs for diff_drive_controller:
- I need to create a
hardware_interface
to abstract my hardware for thediff_drive_controller
. I found a sample here: https://github.com/eborghi10/my_ROS_m... - I have to describe my robot using
robot_description
. - I understand that
ros_control
is somehow related toros_controllers
and thatdiff_drive_controller
is part ofros_controllers
. - I now understand that this package is suitable for “real-time”, but I don't need that functionality.
- I understand that
diff_drive_controller
is not a typical node, and I need acontroller_manager
. - the video https://vimeo.com/107507546 provided by Adolfo Rodriguez offered in one of the answers does a great job of explaining interaction between packages (as a high level overview).
The problem is that all those things that I understand do not get me any closer to utilizing these wonderful packages as I have no idea where to start, where to continue, and what the finished code looks like. I am not the first person to build a robot with two drive wheels (as it's the easiest robot to build), who insists to use ROS (thank you so much to all you ROS people, you are beautiful), who has many talents, but is not a programmer. Could you provide a list of steps that people like me can follow to convert geometry_msgs/Twist to low level code our robot understands? Could you please make each step small enough for a beginner to follow?
EDIT #1
The ros_control packages are all ...