ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi Kirill,
I suggest you write a "driver" node for your robot. It should subscribe to a topic called "cmd_vel" (although you can rename it if you want) of type geometry_msgs/Twist. The Twist messages tell you how fast the robot should move forward (msg.linear.x) and how fast it should turn (msg.angular.z); you can ignore all other fields of the message. You can have a look at the turtlebot_node to get an idea how to calculate individual speeds for the two motors from this info. Then you "only" have to send this speed to the servos. :-)
As a publisher, you can use the keyboard teleop node from the turtlebot_teleop package (don't be confused by the name turtlebot, it works with all robots).