Connecting to a remote simulated drone within sphinx-server on a headless computer

Hello everyone,

My setup is a running sphinx-server on a remote headless computer. sphinx-server is running perfectly but I have issues in setting up the network settings so that I can connect to the simulated drone. The current status is that I succeed in connecting, from my client with sphinx-client, to the remote sphinx-server but I fail to contact the drone (which has the on the remote computer).

I may be confused by the --interface or stolen_interface or port_forwarding options ?

Here is my setup :

Server : Ubuntu 16.04, ethernet interface enp4s0 with IP
Client : Ubuntu 18.04

on the server, I run :

DISPLAY=:99 sphinx-server --interface=enp4s0 /opt/parrot-sphinx/usr/share/sphinx/worlds/ /opt/parrot-sphinx/usr/share/sphinx/drones/bebop2.drone::stolen_interface=::with_front_cam=true::firmware=/usr/share/firmwared/firmwares/

no issue to ping directly from the server but obviously this IP is not seen from the client.

On the client, I can do the following :

sphinx-client --server-uri=

And I see the running gazebo with the bebop2 in the environment.

But then, I want to contact the drone (with ROS/bebop_autonomy), without going through the sphinx-client and this is where I’m not sure what to do. The following command fails “roslaunch bebop_driver bebop_node.launch ip:=”

Trying stollen_interface

on the server, I define a virtual interface ;

ifconfig enp4s0:1

Then I start the server by giving this interface to the --interface option or this IP to --port-forwarding but in both cases, I still cannot reach the drone from my client by contacting but I suppose this is OK and should use stollen_interface .
But the following fails to start :

DISPLAY=:99 sphinx-server --interface=enp4s0:1 /opt/parrot-sphinx/usr/share/sphinx/worlds/ /opt/parrot-sphinx/usr/share/sphinx/drones/bebop2.drone::stolen_interface=enp4s0:1:eth0:

outputing :
Misformed stolen_interface. Should be:
example: wlan0:eth0:

which I suppose is linked to the fact that my virtual interface is called enp4s0:1 and “:” is the field separator.

… I basically tried several combinations but I’m getting lost and not sure which is the right track.

@ndessart , @espetro maybe you have an hint on this ?


You’re not crazy, the name of the parameters are confusing, sorry. We will try to clarify a few things in the future.

--interface defines interface name for sphinx-server, sphinx-server listen tcp/11345 on this interface waiting for a sphinx-client --server-uri=<sphinx-server-ip-address>
--port-forwarding defines the IP address of the drone controller (i.e. Olympe / SkyController / FreeFlight / … ) that sphinx needs to forward traffic to.

Basically with –port-forwarding controller-ip-address, on the sphinx-server host the following ports (on all interfaces) will be redirected to:

  • the drone ( : tcp/44444, udp/54321, udp/2233
  • the controller (IP address of the drone controller) : udp/43210, udp/9988, udp/55004, udp/55005, udp/5004, udp/5005.

This uses socat to perform the necessary port redirections. (We could have use iptables instead but not without sudo privileges…).

The port forwarding feature of sphinx is really what you are looking for and you shouldn’t use the stolen_interface parameter in this case. It’s only useful to pass a wireless interface name for the simulated drone.

Thank you for your feedback @ndessart

So, to be completely sure I get what you mean, given that in my setup my server running sphinx-server has IP , if I run :

DISPLAY=:99 sphinx-server --port-forwarding= /opt/parrot-sphinx/usr/share/sphinx/worlds/ /opt/parrot-sphinx/usr/share/sphinx/drones/bebop2.drone::stolen_interface=::with_front_cam=true::firmware=/usr/share/firmwared/firmwares/

I should then be able to remotely contact the drone with the ParrotSDK (actually I will be using the bebop_autonomy ROS package) by contacting directly the IP . Is that correct ?


No, here is corrected example:

If the machine were you run sphinx-server has IP address and the machine where you run bebop_autonomy has IP address

Then, sphinx-server --port-forwarding= will forward the drone controller ports to the bebop_autonomy machine. From the bebop_autonomy machine you’ll then be able to connect to your drone at (the sphinx-server host IP address instead of if everything was done locally).

Indeed that works !
Thanks a lot !