How to Connect the Turtlebot to a remote PC

  • Run this command line to check the IP address (it is usually inet addr in the wlan#, i.e. wlan0, section)

ifconfig

  • Install an ssh server on Turtlebot

sudo apt-get install openssh-server

**Make Sure the turtlebot and the remote laptop are on the same wifi**

  • Confirm that you can ssh to Turtlebot from the remote PC. Replace turtle in the command above with the username you created when installing the turtlebot software, and replace <TURTLEBOT_IP> with the hostname or IP address of Turtlebot.

ssh turtle@<TURTLEBOTP_IP>

  • Run these commands on Turtlebot

echo export ROS_MASTER_URI=http://IP_OF_TURTLEBOT:11311 >> ~/.bashrc

echo export ROS_HOSTNAME=IP_OF_TURTLEBOT >> ~/.bashrc

  • Then, source the .bashrc file and run roscore on Turtlebot:

source .bashrc

roscore

*NOTE: Source the .bashrc in each terminal, before you try to run any launch file. Always run “roscore” on the turtlebot laptop.

  • Then launch the turtlebot (on/off button) and relaunch if it is already launched:

roslaunch turtlebot_bringup minimal.launch

  • Run these two commands on the remote PC

echo export ROS_MASTER_URI=http://IP_OF_TURTLEBOT:11311 >> ~/.bashrc

echo export ROS_HOSTNAME=IP_OF_PC >> ~/.bashrc

  • Then, launch the keyboard control on the remote PC:

roslaunch turtlebot_teleop keyboard_teleop.launch

  • Press the keys listed in the terminal and move the turtlebot around.

Note: Most of the commands run successfully in the remote PC/laptop after ssh-ing into the Turtlebot. However, Rviz should be run in a different terminal (not in the ssh-ed terminal).