Running sphinx remotely

This tutorial explains how to start a simulation using a centralized server, with multiple clients running the same scene. It explains the use of the environment variable GAZEBO_MASTER_URI to configure multiple clients to connect to a single master.

Say we want to run a server / client simulation across two machines with IP addresses and Before proceeding to the next step, you must make sure that sphinx is installed on both machines. Check the Installation procedure page.

Start the server

You need to select one machine to run the the server; we’ll go with ssh into the machine and start the server:

$ DISPLAY=:0 sphinx-server /opt/parrot-sphinx/usr/share/sphinx/worlds/

Note that you must be logged into the machine with a local display to connect to the X server.

In case you get the following error:

xauth: (argv):1:  unable to open display ":0".

It may be because the display name is incorrect. To determine the correct value, enter the following command:

$ ls /tmp/.X11-unix | tr 'X' ':'.

Start the Gazebo’s graphical user interface

Now you can start a client on, configuring GAZEBO_MASTER_URI to the IP and port where the server was just started:

$ GAZEBO_MASTER_URI= sphinx-client

If the port is missing in master URI, like in the example above, it defaults to 11345.

Start Sphinx’s Web client

To visualize the navdata and interact with the simulation, open a Web browser and navigate to the server’s URL:

Control the drone remotely

In case the drone controller is located on the remote PC, it is possible to tie the controller to the simulated drone by starting Sphinx in port forwarding mode.

Check the section virtual ethernet for more information.