Connecting to the exoskeleton¶
This tutorial will help you set up a wireless connection with the exoskeleton. If you are interested in connecting with an ethernet cable, take a look at Connecting to the exoskeleton with ethercat.
Note
Make sure your workspace is sourced and set-up correctly: Building your workspace.
Preparation before connecting¶
This tutorial is written to establish a connection between your computer and the exoskeleton on the same wifi. So, make sure you are on the same wifi. A public network such as eduroam will probably not work. Normally the MARCH exoskeleton automatically connects with the hotspot: MARCH.
Running commands on the exoskeleton computer (SSH)¶
Secure Shell (SSH) is a network protocol which allows running commands on the exoskeleton.
Connect with the exoskeleton by typing ssh march@march
in a terminal.
Now all commands in this terminal are executed on the MARCH exoskeleton computer.
ROS Master URI¶
To use ros commands you need to setup the right ROS_MASTER_URI in every terminal you use:
export ROS_MASTER_URI=http://<exoskeleton_ip>:11311/
<exoskeleton ip> can be obtained by running the command hostname -I
in a terminal on the exoskeleton computer.
If you’re running remote/headless, it’s probably easier to SSH into the exoskeleton computer.
Instead of running this command in every terminal you open, you can do this automatically for every terminal on a computer by adding this command to your
~/.bashrc
ROS IP¶
To use ros commands you also need to setup the right ROS_IP in every terminal you use:
export ROS_IP=<your_ip>
<your ip> can be obtained by running the command hostname -I
in a terminal on your computer.
Instead of running this command in every terminal you open, you can do this automatically for every terminal on a computer by adding this command to your
~/.bashrc
Add March network to hosts file¶
You need to add the march network with ip to your hosts file:
Type
sudo nano /etc/hosts
in your terminal.add the line
<exoskeleton_ip> march
at the top of the file.Close and save the file with ctrl + x.
Test ROS on multiple devices¶
This is a very simple test to make sure you followed Preparation before connecting correctly.
Run
roscore
in a terminal on the MARCH exoskeleton computer (you can always do this via SSH).Run
rostopic list
in a terminal on your computer. This command should give the output /rosout /rosout_aggRun
rostopic echo /march/test
in a new terminal on the MARCH exoskeleton computer. This command gives a warning.Now publish a message with the command
rostopic pub /march/test std_msgs/String "data: 'Hello World'"
The message is sent and received successful if you received the message in the MARCH exoskeleton computer.