Skip to main content

Personal Device Setup

Connecting to the OARBOt Wi-Fi Network

ROS2 Nodes communicate over a local network and are not visible on the internet. Therefore, any device that wishes to communicate with the OARBots needs to connect to the local Wi-Fi network. Look for the network SSID: CII8218-oarbots. The password should be on a piece of paper next to the router, which is at the back of the room on a shelf near the desk. If you cannot find it or the paper is gone, message someone for the password.

Installing ROS2 Jazzy

The OARBot system runs on ROS2 Jazzy. Official support is provided for the following operating systems:

  • Ubuntu Linux (amd64 / aarch64) - Noble Numbat (24.04)
  • Red Hat Enterprise Linux 9 (amd64)
  • Windows 10 (amd64)
warning

It is highly recommended to either use Ubuntu 24.04 (either standalone or as a dual-boot) or to use Windows Subsystem for Linux, which provides Ubuntu 24.04 inside a virtual machine on Windows. Instructions for setting up WSL can be found here. For the most reliable setup, use Ubuntu 24.04 without a virtual machine.

Follow the installation guide on the ROS2 Jazzy website. It is highly recommended to install ROS development tools and to install the desktop version.

Sourcing ROS2 (Ubuntu Only)

To access ROS2 commands, you must run

source /opt/ros/jazzy/setup.bash

in each terminal in which you use ROS2. It is recommended to add this line to your .bashrc file (found at ~/.bashrc) to automatically source the ROS2 files when launching a new terminal. To do so, edit the file manually or run

echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc

followed by

source ~/.bashrc

to reload the Bash configuration file in the current terminal.

Switching DDS Provider

note

These instructions are for Ubuntu only. It is still necessary to use CycloneDDS if you are not using Ubuntu, but setup instructions are not provided in this documentation. Consider looking here.

ROS2 nodes communicate over the local internet using Data Distribution Service as its middleware. The default DDS provider is eProsima Fast DDS, but the OARBot system uses Eclipse Cyclone DDS. DDS providers are not inter-compatible. Therefore, the DDS provider on your device must be switched.

Download CycloneDDS

To download, run

sudo apt install ros-jazzy-rmw-cyclonedds-cpp
note

If you are using a computer in the robotics lab, CycloneDDS is likely already installed. To verify, run

dpkg -l | grep ros-jazzy-rmw-cyclonedds-cpp

and you should see the package listed.

Set CycloneDDS as ROS2 Middleware

To tell ROS2 to use CycloneDDS, run

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

This sets the RMW_IMPLEMENTATION environment variable, which only lasts for the current terminal session. To use setup using CycloneDDS without running the above command for every terminal window, add export the RMW_IMPLEMENTATION varaible in your .bashrc file by running

echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> ~/.bashrc

followed by

source ~/.bashrc

Modify Firewall Settings (WSL Only)

danger

These instructions are only for WSL setups. If you are not using WSL, continue to the next section.

By default, all WSL internet traffic flows through the Windows Hyper-V Firewall before reaching the WSL instance. In this configuration, ROS2 running in WSL is unable to send or receive any data from external nodes.

Edit .wslconfig

Edit %UserProfile%\.wslconfig in Windows to include the following lines:

.wslconfig
[wsl2]
networkingMode=Mirrored
firewall=false

This will enable the mirrored networking mode and partially disable the Windows Hyper-V Firewall for WSL traffic.

Disable Firewall for Incoming Traffic

Even after setting firewall=false in the above section, WSL does not allow some incoming traffic without going through the Windows Hyper-V Firewall. As disabling the firewall entirely is not reasonable, we will allow incoming traffic to WSL instances to bypass the firewall. To do so, open a PowerShell terminal as Administrator and run

Set-NetFirewallHyperVVMSetting -Name '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}' -DefaultInboundAction Allow

Additionally, because virtual machines tend to have complex network setups, you will likely need to perform the instructions in Common Issue: Switching Networks & Multi-Network Setups.

Verify Connection to OARBots

If the OARBots are up and your device is connected to the CII8218-oarbots network, run

ros2 topic list

Many lines of output should appear, with many containing the prefix /oarbot_blue and /oarbot_silver. If may take more than one Congratulations, you have connected to the OARBots using ROS2!

Issue: No Connection to the OARBots

If instead you see the following output:

$ ros2 topic list
/parameter_events
/rosout

then ROS2 is not detecting the OARBot topics over the network. The two topics listed are internal to the command being run. First, verify you are able to access the OARBot machines py pinging one---or several---of them:

ping <address> -c 5

You can find the static IP addresses of the OARBot devices in Device Credentials. If you are not receiving messages, verify your device is connected to CII8218-oarbots and that the device you are attempting to ping is online. If your device is connected to multiple Wi-Fi networks or you had to switch networks (this is likely the case for the servers in the robotics lab), see Common Issue: Switching Networks & Multi-Network Setups. Additionally, you can try SSH'ing into one of the OARBot devices and running ros2 topic list to check if that device detects any nodes.

Common Issue: Switching Networks & Multi-Network Setups

ROS2 has trouble when your device switches networks or when a device is connected to multiple networks at once (for example, one connection via ethernet, another via Wi-Fi). If you only see the following output:

$ ros2 topic list
/parameter_events
/rosout

then ROS2 is not picking up the OARBot topics. Try restating your computer. If you need to be connected to multiple networks at once, consider adding a configuration profile to tell CycloneDDS to use a specific network. Run

ip -br addr

You might see:

lo UNKNOWN 127.0.0.1/8
enp3s0 UP 192.168.10.42/24
wlan0 UP 192.168.10.55/24

Wireless network interfaces typically begin with a "w", and wired interfaces typically begin with an "e". Copy the following file to ~/.ros/cyclonedds.xml, making sure to set <YOUR NETWORK INTERFACE HERE> to the name of the interface you want ROS2 to use.

cyclonedds.xml
<?xml version="1.0" encoding="UTF-8" ?>
<CycloneDDS xmlns="https://cdds.io/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/master/etc/cyclonedds.xsd">
<Domain Id="any">
<General>
<Interfaces>
<NetworkInterface autodetermine="false" name="<YOUR NETWORK INTERFACE HERE>" />
</Interfaces>
</General>
</Domain>
</CycloneDDS>

To tell CycloneDDS to use this configuration file, either run

export CYCLONEDDS_URI=file://$HOME/.ros/cyclonedds.xml

for each terminal session or run

echo "export CYCLONEDDS_URI=file://$HOME/.ros/cyclonedds.xml" >> ~/.bashrc

to set the CYCLONEDDS_URI environment variable automatically, followed by

source ~/.bashrc

to load the configuration in your current terminal.