How to use ros_control and diff_drive_controller using python?
Hello!
I am beggining to learn ROS and I am trying to use ros_control with a diff_drive_controller. I have read many tutorial and searched on google but I have found only C++ code examples. Could anybody tell me or provide a example code for a real robot using python, please?
Best regards.
What do you actually want to do? Command a diff drive mobile base to a certain position? Something else?
I am trying to move a two wheeled Lego EV3 robot using ROS on a laptop and sending commands to the motors through MQTT message protocol. I already know how to make a base_controller that convert ROS twist messages to left and right motors commands but I want to learn how to use ros_control and ros_diff_controller and I didn't know that the only way is using C++.
This may be due to a misunderstanding of how you'd interface with the
diff_drive_controller
: as you can read here it acceptsgeometry_msgs/Twist
inputs that then get converted to individual wheel velocities. You don't typically "use it from C++" (if that means: directly calling methods on/in it).First of all thanks for your comments. I know that diff_drive_controller takes a geometry_msgs/Twist as an input but what I don't know is how it is converted to each wheel velocity. - Where can I get the individual wheel velocities? - How can I send these velocity values to a python script?
Regards.