|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.|
Setting up VoltaDescription: Setting up Volta for the first time
Tutorial Level: BEGINNER
- Connect a keyboard, mouse and monitor to the on-board PC.
- The default username and password for the robot will be provided in the user manual that comes with your customized Volta.
- The system will boot into the Ubuntu interface.
- Connect the Volta on-board PC to a Wi-Fi network. It is recommended that you connect it to the same network as your workstation.
- Find the Volta’s IP address by firing up a terminal and typing in:
$ hostname –I
- If you have your workstation connected to the same Wi-Fi network as Volta, they should be able to ping each other. On your workstation:
$ ping <VOLTA_IP>on Volta on-board pc:
$ ping <WORKSTATION_IP>
- Knowing the IP of the Volta on-board pc, it is now possible to remotely access Volta from your workstation through ssh:
$ ssh <USER_NAME>@<VOLTA_IP> (This is the user name that will be provided to you in the Volta user manual)
- Since ROS requires both systems to have complete bi-directional connectivity on all ports, it is necessary to ensure that communication is possible via all the ports. We can run the following steps to check the connection. On the remote terminal, run the following:
$ netcat –I 1234On the workstation terminal, run the following:
$ netcat <Volta_IP> 1234If the connection is successful, you should be able to type messages back and forth between the two terminals. We can now disconnect the mouse, keyboard and monitor from Volta and control Volta remotely from your workstation.
- Display features are not available in ssh, so instead we can run graphical visualisation tools like RViz from your workstation by setting up the ROS master environment on both the Volta PC and your workstation PC.
In Volta PC or the ssh remote access terminal, enter the following:
$ export ROS_IP=<VOLTA_IP> $ export ROS_MASTER_URI=http://<VOLTA_IP>:11311Fire up another terminal in your workstation and determine the IP address by running:
$ hostname –IOn your workstation terminal, enter the following:
$ export ROS_IP=<WORKSTATION_IP> $ export ROS_MASTER_URI=http://<VOLTA_IP>:11311This will configure Volta as the ROS Master and the ROS IP of the respective devices will be setup as well. The following test can be used to ensure that the systems are properly configured. On Volta PC or the remote access terminal, run:
$ roscoreOn the workstation terminal, run:
$ rostopic listYou should be able to see the list of topics running from the roscore in Volta.
- We can include the ROS MASTER and ROS IP setup command in step 9 at the bottom of the .bashrc file to be executed in every new terminal.
- For RViz to function properly, Volta will need to be able to resolve your workstation hostname and vice versa and we can do that by editing the /etc/hosts file on both devices. To find out the hostname of your workstation or Volta:
$ hostnameKnowing the hostname for both devices, we can now edit the /etc/hosts file. Fire up your favorite text editor on your workstation with sudo privilege and make the following edits:
xxx.xx.xx.xxx localhost xxx.xx.xx.xxx workstation_hostname <Volta_IP> Volta_hostname #add this line into the file # The following lines are desirable for IPv6 capable hosts (DO NOT make any changes here) ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
Similarly, fire up a text editor with sudo privilege on the remote access terminal or on Volta's on-board PC and include your <Workstation_IP> and workstation_hostname into the /etc/hosts file.
- Alternatively, from step 9 onwards, we can replace ROS IP with ROS HOSTNAME and use the Volta's hostname insead of IP for ROS MASTER URI. We will need to resolve both hostnames in /etc/hosts manually. For example, on your workstation terminal:
$ export ROS_HOSTNAME=<WORKSTATION_HOSTNAME> $ export ROS_MASTER_URI=http://<VOLTA_HOSTNAME>:11311Then, on your workstation fire up your text editor with sudo privilege to edit the /etc/hosts file like this:
xxx.xx.xx.xxx localhost #xxx.xx.xx.xxx workstation_hostname <Volta_IP> Volta_hostname #add these lines into the file <WORKSTATION_IP> workstation_hostname #add these lines into the file # The following lines are desirable for IPv6 capable hosts (DO NOT make any changes here) ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
Note: Remember to comment out the original device hostname settings with '#' and leave only one instance of configuration for one device. Then, on the remote access terminal or on Volta on-board PC:
$ export ROS_HOSTNAME=<VOLTA_HOSTNAME> $ export ROS_MASTER_URI=http://<VOLTA_HOSTNAME>:11311Then, make the same changes on the /etc/hosts file on the Volta on-board PC. The ROS Master configuration here can also be included into your .bashrc for both devices as mentioned in step 10.