I’m sorry I have to continue my little series about “What am I doing wrong with Sphinx” (E01 here Sphinx 2.8 simulation runs very unreliable - #3 by Neil , E02 here Sphinx 2.8.2 - no video from simulated drone - #2 by Neil). Don’t be discouraged or upset: Since this is “work in progress” I do neither hesitate to admit own errors nor sharing my results. But it would be awesome, if you could assist me with some helpful comments.
OK, two machines in the same wired local network:
- Ubuntu 20.04, Gigabyte G5, Sphinx simulator 2.8.2 installed, Parrot Olympe SDK 7.2 installed from source, IP 192.168.188.118
- Raspberry PI 4, Parrot Olympe SDK 7.2 installed from source, IP 192.168.188.78
The test script:
import olympe import os import time from olympe.messages.ardrone3.Piloting import TakeOff, Landing # On simulator DRONE_IP = os.environ.get("DRONE_IP", "10.201.0.1") # On RPI4 DRONE_IP = os.environ.get("DRONE_IP", "192.168.188.118") def test_takeoff(): drone = olympe.Drone(DRONE_IP) drone.connect() assert drone(TakeOff()).wait().success() time.sleep(20) assert drone(Landing()).wait().success() drone.disconnect() if __name__ == "__main__": test_takeoff()
While on the simulator the script runs more or less OK, even over several runs (except the strange unreliabilities mentioned in E01), it does not fully run on RPI4. In fact, even the log is different. The symptom is, that the drone on the PI never meets the assertion
It fails here. I see the drone starting and hovering, but it doesn’t land due to the failing assertion.
Besides this the log is full of “unknown message” warnings, which might explain the failing assertion.
Needless to say, that the script works fine on the PI with a real drone, but I also there noted the “unknown message” warnings, at least during the startup
Log from the simulator:
takeoff-log-simulator.doc (46.0 KB)
Log from the PI (actually a text file):
takeoff-log-pi.doc (41.1 KB)
Both logs are plain text files. I had to change the extension to overcome a limit in the board here.
If I omit the assertions the drone starts and lands fine from the PI. Wondering, why I have that “unknown messages” here.