I am developing high-level control algorithms for the Anafi, and as a failsafe to avoid crashing I would like to be able to take over control of the drone using the SkyController. Ideally, I would like the exact same setup with physical experiments and simulations in Sphinx.
I have understood that in order to do this with a physical drone you just connect the SkyController to the PC, and then connect to it in Olympe using the IP address (192.168.53.1) before the calling setPilotingSource(source=“Controller”). Then Olympe commands will be relayed to the drone and you can anytime call setPilotingSource(source=“SkyController”) to resume control using the SkyController.
I am also aware that the SkyController can be used to pilot the drone in Sphinx, but can I also use it as a relay for Olympe commands as described above for the physical drone? If so, does anyone know how I have to set this up?
Edit: Btw, I do not need FreeFlight or any other software than Olympe connected to the drone.
I am also aware that the SkyController can be used to pilot the drone in Sphinx, but can I also use it as a relay for Olympe commands as described above for the physical drone? If so, does anyone know how I have to set this up?
The SkyController 3 is only capable of connecting to a drone Wifi access point. You have to follow the Sphinx documentation to create a Wifi access point for your simulated drone. Then you may either use FreeFlight to perform the SkyController/Simulated drone pairing or use Olympe to perform the pairing (see the skyctrl_drone_pairing.py example in the Olympe repo). The pairing is a one time operation. The next time your SkyController sees your simulated drone Wifi access point it will automatically connect to it.
@martinf ,
In the event you need to wrest control of the drone from Olympe, you can simply disconnect the SkyController from the PC and then begin manually controlling it. We have done this at the end of our Olympe scripts to do a controlled descent and landing or on the occasion that our script fails in some way.
Because the SkyController has both a USB-A and a USB-C port, you can have the a phone running connected to the SkyController and also connect it to a PC. You can then open FreeFlight after disconnecting from the PC and view the cameras etc. Just an warning, you don’t want FreeFlight to be open while you are running an Olympe script because it will interfere with its execution.
We have used the Olympe via the SkyController in Olympe 3.0 as well as 7.0. Whether you connect directly to the drone’s WiFi hotspot, to the SkyController or to the simulated drone, it is really just a matter of which IP address you pass when doing drone.connect()