Introducing Parrot Simulator - SPHINX

Introducing Sphinx

Sphinx is a free simulation tool initially thought to cover the needs of Parrot engineers developing drone software. It provides a software-in-the-loop (SITL) simulation where the drone and its environment are completely virtualized.

The system is built on the open-source Gazebo multi-robot simulator to simulate the physical and virtual surroundings of the drone. The Parrot drone firmware is run in an isolated environment well separated from the host system.

Supported drones

Sphinx currently supports the following drones:

#Features

Modify drone’s behaviour and the physics of the environment at runtime

An important feature of Sphinx is the control of the behaviour of simulated drone’s hardware/physical components like the drone sensors and physical phenomena such as atmospheric conditions or wind velocity.
For example, if you need to test your application with a drone that has no GPS signal, you just need to deactivate the GPS component for the desired duration.

Two interfaces are available to control the components:

  • Web interface: The most convenient in case of manual tests
  • Command line: More appropriate to automatize sequences

Connect to any kind of controller

You can connect a smartphone running FreeFlight Pro (Android/iOS) or FreeFlight Mini (Android/iOS), or a Parrot Skycontroller 2 to directly interact with the simulation environment.

Video sensor and streaming

For drones equipped with a camera, Sphinx may retransmit its flow, in streaming, to your smartphone’s screen.

Visualize flight data in real-time via your Web browser

Sphinx offers several ways to observe flight data while (or after) a simulation is running. Depending on your needs, you can monitor the drone behaviour at runtime, or investigate a problem more thoroughly with post-mortem flight data.

Build your own scenes

Thanks to Gazebo, it is super easy to create a world by inserting simple shapes or objects from the model database either programmatically or through the GUI.

Gazebo also supports Digital Elevation Model (DEM) to simulate realistic terrains. Rescue or agriculture applications might be interested in testing their drone behaviours using a simulated terrain that matches the real world.

Run remotely

Sphinx can be started as a centralized server, with multiple clients running the same scene. This lets you have a powerful server that delivers the GPU power needed to simulate wide angle cameras in real-time to any user, anywhere.

Prerequisites

For running Sphinx, you will need a 64-bit Linux distribution. See the documentation for a list of compatible Linux distributions.

Need Help?

Learn more about Sphinx in the User Manual.

For developement questions, feel free to ask the Parrot developer community.

3 Likes

Any plans for OS X support?

No.
But you can use virtualization.

I fired up an Ubuntu 16.04 LTS VM under Parallels, got firmwared and sphinx installed and have run into a couple issues.

When trying to create an AP using pass thru for my “Wi-Pi” USB adapter, I see the network getting created, i can connect to it, but ARDiscovery never finds anything… even though through sphinx and iwconfig I see everything configured correctly (drone is 192.168.42.1, client is 192.168.42.44)

Here’s what I get in my client log when I try to manually connect using the sphinx AP:

06-02 21:47:04.106 5176-5176/com.shellware.arpro3.debug D/DroneDataService: Service Intent com.shellware.arpro3.action.MANUAL_CONNECT received
06-02 21:47:04.107 5176-5176/com.shellware.arpro3.debug D/DroneDataService: ip=192.168.42.1 port=44444 type=Bebop drone 2.0 product name=ARDISCOVERY_PRODUCT_BEBOP_2
06-02 21:47:04.109 5176-5176/com.shellware.arpro3.debug D/DiscoveryActivity: onDroneConnecting
06-02 21:47:04.154 5176-7939/com.shellware.arpro3.debug E/ARDISCOVERY_Connection: 21:47:04:154 | ARDISCOVERY_Connection_ControllerInitSocket:669 - connect() SO_ERROR: 111 Connection refused
06-02 21:47:04.154 5176-7939/com.shellware.arpro3.debug E/ARDISCOVERY_Device: 21:47:04:154 | ARDISCOVERY_Device_NewARNetworkAL:243 - error: Socket access permission denied
06-02 21:47:04.154 5176-7939/com.shellware.arpro3.debug E/ARCONTROLLER_Network: 21:47:04:154 | ARCONTROLLER_Network_New:355 - error: Error during the getting of the ARNETWORKAL_Manager from the device
06-02 21:47:04.157 5176-7939/com.shellware.arpro3.debug D/DiscoveryActivity: onDroneDisconnecting
06-02 21:47:04.158 5176-7939/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 21:47:04:158 | ARCONTROLLER_Device_StopNetwork:5822 - Error occured durring unregistering ARCommands to the feature ARCONTROLLER_DICTIONARY_KEY_GENERIC; error :Bad parameters
06-02 21:47:04.158 5176-7939/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 21:47:04:158 | ARCONTROLLER_Device_StopNetwork:5831 - Error occured durring unregistering ARCommands to the feature ARCONTROLLER_DICTIONARY_KEY_ARDRONE3; error :Bad parameters
06-02 21:47:04.158 5176-7939/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 21:47:04:158 | ARCONTROLLER_Device_StopNetwork:5840 - Error occured durring unregistering ARCommands to the feature ARCONTROLLER_DICTIONARY_KEY_COMMON; error :Bad parameters
06-02 21:47:04.158 5176-7939/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 21:47:04:158 | ARCONTROLLER_Device_StopNetwork:5849 - Error occured durring unregistering ARCommands to the feature ARCONTROLLER_DICTIONARY_KEY_CONTROLLER_INFO; error :Bad parameters
06-02 21:47:04.158 5176-7939/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 21:47:04:158 | ARCONTROLLER_Device_StopNetwork:5876 - Error occured durring unregistering ARCommands to the feature ARCONTROLLER_DICTIONARY_KEY_FOLLOW_ME; error :Bad parameters
06-02 21:47:04.158 5176-7939/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 21:47:04:158 | ARCONTROLLER_Device_StopRun:5166 - StopNetwork failed with error :Bad parameters
06-02 21:47:04.160 5176-7939/com.shellware.arpro3.debug D/DiscoveryActivity: onDroneDisconnected
06-02 21:47:04.161 5176-7939/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 21:47:04:161 | ARCONTROLLER_Device_StartRun:5131 - Start fail error :Error during the getting of the ARNETWORKAL_Manager from the device

Using Virtiualized ethernet I see my VMWare interface getting taken over by sphinx, I’m setting --port-forwarding to the IP address of my client (android tablet on the same network) but whenever I try to manually connect to the ip address of my VM’s sphinx adapter I get the same chain log events provided previously.

Further experimentation with Virtual Ethernet I was able to get beyond connection refused. I can now toggle between connection timed out and no route to host depending on the state of sphinx… but still stuck:

06-02 23:28:48.154 5138-5138/com.shellware.arpro3.debug D/DroneDataService: Service Intent null action received
06-02 23:28:48.157 5138-5138/com.shellware.arpro3.debug D/DroneDataService: Service Intent com.shellware.arpro3.action.MANUAL_CONNECT received
06-02 23:28:48.158 5138-5138/com.shellware.arpro3.debug D/DroneDataService: ip=192.168.1.39 port=44444 type=Bebop drone 2.0 product name=ARDISCOVERY_PRODUCT_BEBOP_2
06-02 23:28:48.160 5138-5138/com.shellware.arpro3.debug D/DiscoveryActivity: onDroneConnecting
06-02 23:28:53.176 5138-15710/com.shellware.arpro3.debug E/ARDISCOVERY_Device: 23:28:53:175 | ARDISCOVERY_Device_NewARNetworkAL:243 - error: timeout error
06-02 23:28:53.176 5138-15710/com.shellware.arpro3.debug E/ARCONTROLLER_Network: 23:28:53:176 | ARCONTROLLER_Network_New:355 - error: Error during the getting of the ARNETWORKAL_Manager from the device
06-02 23:28:53.187 5138-15710/com.shellware.arpro3.debug D/DiscoveryActivity: onDroneDisconnecting
06-02 23:28:53.187 5138-15710/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 23:28:53:187 | ARCONTROLLER_Device_StopNetwork:5822 - Error occured durring unregistering ARCommands to the feature ARCONTROLLER_DICTIONARY_KEY_GENERIC; error :Bad parameters
06-02 23:28:53.187 5138-15710/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 23:28:53:187 | ARCONTROLLER_Device_StopNetwork:5831 - Error occured durring unregistering ARCommands to the feature ARCONTROLLER_DICTIONARY_KEY_ARDRONE3; error :Bad parameters
06-02 23:28:53.188 5138-15710/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 23:28:53:187 | ARCONTROLLER_Device_StopNetwork:5840 - Error occured durring unregistering ARCommands to the feature ARCONTROLLER_DICTIONARY_KEY_COMMON; error :Bad parameters
06-02 23:28:53.188 5138-15710/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 23:28:53:188 | ARCONTROLLER_Device_StopNetwork:5849 - Error occured durring unregistering ARCommands to the feature ARCONTROLLER_DICTIONARY_KEY_CONTROLLER_INFO; error :Bad parameters
06-02 23:28:53.188 5138-15710/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 23:28:53:188 | ARCONTROLLER_Device_StopNetwork:5876 - Error occured durring unregistering ARCommands to the feature ARCONTROLLER_DICTIONARY_KEY_FOLLOW_ME; error :Bad parameters
06-02 23:28:53.188 5138-15710/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 23:28:53:188 | ARCONTROLLER_Device_StopRun:5166 - StopNetwork failed with error :Bad parameters
06-02 23:28:53.208 5138-15710/com.shellware.arpro3.debug D/DiscoveryActivity: onDroneDisconnected
06-02 23:28:53.218 5138-15710/com.shellware.arpro3.debug E/ARCONTROLLER_Device: 23:28:53:217 | ARCONTROLLER_Device_StartRun:5131 - Start fail error :Error during the getting of the ARNETWORKAL_Manager from the device
06-02 23:29:00.250 5138-5138/com.shellware.arpro3.debug D/DroneDataService: Service Intent null action received

Not sure what to try next. I also see fd_veth0 exactly as described in the documentation.

Hi synman,
Are you able to test with a client inside your VM?
Just to see if the problem is related to routing between the host and the VM.
Thanks

The short answer is no.

Hi,

It seems Sphynx cannot be installed on Ubuntu 18
I obtain this error message when installing the parrot-sphinx package

The following packages have unmet dependencies:
parrot-sphinx : Depends: ulogger-dkms but it is not installable

Steps to reproduce (I use here vagrant for reproducibility purpose, but I have also checked on a non-VM setup) :

$ vagrant init pristine/ubuntu-budgie-18-x64
$ vagrant up
$ vagrant ssh
$ echo "deb http://plf.parrot.com/sphinx/binary `lsb_release -cs`/" | sudo tee /etc/apt/sources.list.d/sphinx.list > /dev/null
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 508B1AE5
$ sudo apt-get update
$ sudo apt-get install parrot-sphinx

Thank you for reporting this issue, which is specific to ubuntu 18.04.
It will be fixed in the next sphinx release.
Some workarounds seem possible using the current version:

1 Like

Thank you for the proposed workaround, but now my system remains with a broken package (parrot-sphinx), which is very annoying to install other packages.

I wonder whether the following error is related to this ad-hoc installation.

Is the sphinx repo down ? I am in Massachusetts , USA. It’s raining like hell so I figured it would be a great time to test some Disco flight landing parameters in Sphinx. I am running Ubuntu Artful Ardvark, updates my apt sources list, added the keys and file to connect during the apt update.

I get permission denied.

Hi,

Ubuntu Artful (17.10) is not supported by Sphinx which supports the following distributions :

  • Ubuntu 16.04 (xenial)
  • Ubuntu 18.04 (bionic)
  • Debian 8 (jessie)
  • Debian 9 (stretch)

Sphinx 0.29.1 has been released 3 days ago and it supports for Ubuntu Bionic (18.04).
Actually, it fixes the installation on Ubuntu Bionic that was initially broken in the Sphinx 0.28 release :
http://developer.parrot.com/docs/sphinx/releasenotes.html

I don’t know why exactly but I’m quite sure the permission denied (HTTP 403) you get on Ubuntu Artful mean “HTTP 404 Not found” in this case.

If you ever upgrade to Bionic, please let us know if you encounter any issue with Sphinx.

Regards