The turtlebot already has the ROS packages installed on it. To play with the turtlebot, you actually need to start ROS nodes. You might then decide to start the roscore on the robot or on your computer. We suppose in the following that we start the roscore on your computer. Be aware that BOTH the turtlebot and your computer must be reachable by DNS name ; Both the following should work :
- on your computer : ping myturtlebot.mydomain.fr
- on the turtlebot : ping mycomputer.mydomain.fr
Where the above DNS names should be adapted appropriatly.
Then, you need to :
- On your computer : start roscore
- On the robot : set the environment variable ROS_MASTER_URI so that it points to your computer. If your computer is named (on the DNS) as mycomputer.mydomain.fr, then you set : export ROS_MASTER_URI=http://mycomputer.mydomain.fr:11311
- On the robot : start the ros stack : roslaunch turtlebot_bringup minimal.launch
Important : Using the DNS name (e.g. connection with SSH) : Within the labs, you need to use the full DNS name of the robots or computer, e.g. turtle1.smart.metz.supelec.fr and not only turtle1.smart ;
On your computer, you should then see the turtlebot nodes (rostopic list). You can then move the robot using for example this teleop and published Twist messages on the topic cmd_vel_mux/input/teleop . Be carefull to publish permanently Twist messages (for the demo_teleop package, this means passing the option —persist).