Case 1: Communication with Parrot SLAM Dunk

Consider the following setup

alternate text
  • the SLAM DUNK module is connected to ODROID XU4 using Ethernet over USB cable. The SLAM module has the IP
  • The SLAM module runs roscore and ROS_MASTER_URI=
  • ODROID (Ubuntu 16/ROS Kinetic) detects new interface as usb0 and get an assigned IP from SLAM module.
  • ODROID also connects to a WiFi router through an interface wlan0 with a static IP e.g.
  • The usb0 and the wlan0 interfaces are independent
  • There is a ground station PC that is connected to the WiFi router and has a static IP e.g.

Summary of network devices setup


  • IP:
  • gateway:
  • netmask:


  • IP (usb0):
  • IP (wlan0):
  • Edit /etc/hosts, and add SLAM DUNK host name ( slamdunk-00316.local)


  • IP:
  • gateway:, wifi router’s IP
  • netmask:

IP routing

We need to route between two networks on the ODROID

  • Enable ip forward on ODROID:
  • in /etc/sysctl.conf, uncomment (or add) net.ipv4.ip_forward=1
  • add static route on sLAM DUNK module
sudo route add -net netmask gw
  • Add static route on PC
sudo route add -net netmask gw
  • (Optional): On ODROID, you can modify iptables as follows (they will re-set after reboot)
sudo iptables -A FORWARD --in-interface usb0 -j ACCEPT
sudo iptables --table nat -A POSTROUTING --out-interface wlan0 -j MASQUERADE

Check if you can ping all devices to each other. Also, check if you can rostopic list and rostopic echo on all three devices.

To make the routing persistent

  1. create a script file in the /etc/init.d/ folder.
  2. add your route definitions to this file and change it to an executable file (chmod +x /path/to/file).
  3. run the update-rc.d <filename> defaults command to make the script executable at boot time.
  4. reboot the system and check whether the system adds the routes at startup(netstat -rn).