Connect to a Wireless, Ethernet, or Cellular network using the Network Manager (upper right corner of desktop).
![]()
Using the hostname command in Linux, we are able to dynamically load the IP of the computer that will be on the Turtlebot so that less configuration is needed.
hostname -I
echo export ROS_MASTER_URI=http://\$\(hostname -I\):11311 >> ~/.bashrc
echo export ROS_IP=\$\(hostname -I\) >> ~/.bashrc
echo export ROS_HOSTNAME=\$\(hostname -I\) >> ~/.bashrc
echo export ROS_HOME=\~/.ros >> ~/.bashrc
(The backwards slash \ is an escape character in a Linux terminal shell)
IP_OF_TURTLEBOT with the ip found in step 1)
echo export ROS_MASTER_URI=http://IP_OF_TURTLEBOT:11311 >> ~/.bashrc
echo export ROS_IP=\$\(hostname -I\) >> ~/.bashrc
echo export ROS_HOSTNAME=\$\(hostname -I\) >> ~/.bashrc
echo export ROS_HOME=\~/.ros >> ~/.bashrc
gedit ~/.bashrc
source ~/.bashrc
echo export ROS_MASTER_URI=http://\$\(hostname -I\):11311 >> ~/.bashrc
echo is a Linux command that prints text to a designated output (default is the terminal)
export is a Linux shell command that handles variables in the shell environment
ROS_MASTER_URI is the network address for a ROS instance to contact a ROS Master Server
http://\$\(hostname -I\):11311 sets the designated network address using the current IP found by the hostname command, and the \ are escape characters to prevent the hostname command from being run in the terminal
>> ~/.bashrc tells the echo command to send the output to the file ~/.bashrc
echo export ROS_IP=\$\(hostname -I\) >> ~/.bashrc
echo is a Linux command that prints text to a designated output (default is the terminal)
export is a Linux shell command that handles variables in the shell environment
ROS_IP is the network address for a ROS instance to contact a ROS Master Server
\$\(hostname -I\) sets the designated network address using the current IP found by the hostname command, and the \ are escape characters to prevent the hostname command from being run in the terminal
>> ~/.bashrc tells the echo command to send the output to the file ~/.bashrc
echo export ROS_HOSTNAME=\$\(hostname -I\) >> ~/.bashrc
echo is a Linux command that prints text to a designated output (default is the terminal)
export is a Linux shell command that handles variables in the shell environment
ROS_HOSTNAME is the name of the computer on a network, used for communication on a local network
\$\(hostname -I\) sets the designated network name using the current hostname found by the hostname command, and the \ are escape characters to prevent the hostname command from being run in the terminal
>> ~/.bashrc tells the echo command to send the output to the file ~/.bashrc
echo export ROS_HOME=\~/.ros >> ~/.bashrc
echo is a Linux command that prints text to a designated output (default is the terminal)
export is a Linux shell command that handles variables in the shell environment
ROS_HOME is the environment variable for the location of the ROS home folder
\~/.ros is the directory in Linux for the location of the ROS home folder
ROS requires completely free network connectivity between the Turtlebot and the Master computer.
ping IP_OF_TURTLEBOTPING IP_OF_TURTLEBOT (IP_OF_TURTLEBOT) 56(84) bytes of data.
64 bytes from IP_OF_TURTLEBOT: icmp_seq=1 ttl=64 time=66.8 ms
roscorerostopic list/rosout
/rosout_agg
If your laptop cannot connect to the network, ensure that you installed the proprietary drivers.
If you continue to have issues, check out the ROS Network Setup Page