|Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.|
Network SetupDescription: Configuration for network communication between Robot and Remote PC
Tutorial Level: BEGINNER
First interaction with Ethernet cable
For the first time, you can access the onboard computer by connecting Ethernet cable between your computer and the Ethernet port on the user panel. To be able to establish network connection to robot, you need to set static IP address on your computer. You can choose any IP address on 192.168.2.x IP block other than 192.168.2.1 which is the address of the onboard computer. After cable is connected, you can log in to onboard computer using SSH with command;
$ ssh firstname.lastname@example.org
The default password for MRP2 robot is temppwd.
If you want to access MRP2 wireless, you can configure it to join your local wireless network. You need to configure once, after that robot will join wireless network automatically when powered up.
First step is to connect to robot via cable and SSH into it (described in above). Now you need to edit network interfaces settings. Run;
$ vim /etc/network/interfaces
For static IP application, add these lines to the bottom of the file, save and exit.
auto wlan0 iface wlan0 inet static address <Static_IP_for_MRP2> netmask <Your_Netmask> gateway <Your_Gateway_Addr> wpa-ssid <Your_SSID> wpa-psk <Your_WiFi_Password> dns-nameservers <Your_DNS>
auto wlan0 iface wlan0 inet static address 192.168.1.5 netmask 255.255.255.0 gateway 192.168.1.1 wpa-ssid MyHomeWifiNetwork wpa-psk 123456secret123456 dns-nameservers 184.108.40.206 220.127.116.11
For DHCP application, add these lines to the bottom of the file, save and exit.
auto wlan0 iface wlan0 inet dhcp wpa-ssid <Your_SSID> wpa-psk <Your_WiFi_Password>
For changes to take effect, run this command;
$ sudo ifdown wlan0 && sudo ifup wlan0
Now the robot should be connected to your wireless network. You can unplug the cable and login again using SSH over your wireless network.
If you need to install a package from online repositories, then you will need to connect the robot to the internet. If your wireless network does not provide internet connection, then you can change the network configuration to connect another network with internet connection.
After this operation, you should change the default network adapter configuration in robot upstart. To do this, run these commands;
$ rosrun robot_upstart uninstall mrp2 $ rosrun robot_upstart install mrp2_bringup/launch/base.launch --setup '/etc/mrp2/setup.bash
If you are new in ROS and didn't navigate robot, we recommend to starting with Simulation Tutorials.