Introducing Parrot Simulator - SPHINX


#1

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.


Drone Simulator
#2

#3

#4

#5

Any plans for OS X support?


#6

No.
But you can use virtualization.


#7

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.


#8

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


#9

The short answer is no.