ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The short answer is that you should take your "ordinary C++ code" that can already control the robot, and turn it into a ROS node:
cmd_vel
topic. This will use the same message type and fields that turltlebot_sim and the turltesim tutorials use.
cmd_vel
callback, convert the linear and angular velocity into wheel speeds and direction (you probably already have code for this). Then take these speeds and directions and send them out the serial port using your existing code.I'm not aware of a tutorial that walks through the process explicitly, but you should be able to piece it together between the roscpp listener tutorial, and maybe some playing around with the turtlebot simulator or turtlesim.