Sphinx 2.8 simulation runs very unreliable

Well, where to start?

OK, having here a Gigabyte G5 https://www.amazon.de/-/en/Gigabyte-G5-GeForce-Display-KD-52DE123SD/dp/B09QFHPJXY/ref=sr_1_3?crid=T65LN1YAOEO1&keywords=laptop+3060&qid=1655223132&refinements=p_n_feature_twenty-four_browse-bin%3A27399048031%2Cp_n_feature_seven_browse-bin%3A15664227031&rnid=8321966031&s=computers&sprefix=laptop+%2Caps%2C176&sr=1-3

I was hoping this device would match the requirements. GeForce RTX 3060, 16 GB RAM, i5 6-core etc…

=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     NVIDIA Corporation
    GL_RENDERER:   NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2
    GL_VERSION:    4.6.0 NVIDIA 510.73.05

Ubuntu 20.04 btw. GLMARK2 score 12011

I was following the installation procedure System requirements - 2.14.1 and got 2.8.2 installed as well as the Parrot Olympe SDK.

I then started to follow the first simple examples from your website: System requirements - 2.14.1 “Create simulated drone”

It came to the first takeoff/land example, and this worked out of the box… Once. Already the second start showed errors…

[2022.06.19-13.41.31:288][109]LogGzUE4: Error: Waited too long to get tick request

Hmm…

I then took the “maxtilt” example and ran into timeouts. In the end I couldn’t even connect anymore to the virtual drone and the previous “takeoff” sample failed again.

I tried to follow the “Reset simulation” step after each simulation, but other than printing out “true” it doesn’t have to seem any effect on the simulation.

The preview window of the animation showed a continuously up and down going camera, it looked into the sky and came back, as if an old simulation was still running (the maxtilt)

Not even the restart of “firmwared” or restart of sphinx or restart of “parrot-ue-empty” did help.

Only a “sudo reboot”, but … really?

I could - with a lot of patience - stop the simulation in the sphinx window, but I can’t see a clear repeatable reproducible behaviour. And this is only a simple simulation.

Q: What do I have to do in order to achieve a clean start of a simulation after one run? What can be done to stabilize the results?

EDIT: Also observed: Rotors start, this error message appears:

2022-06-19 16:13:57,294 [INFO] 	olympe.drone.ANAFI Ai 000000 - _link_quality_cb - Link quality: tx=66, rx=100, rx_useful=76
2022-06-19 16:13:58,288 [ERROR] 	olympe.drone.ANAFI Ai 000000 - connect - '10.202.0.1 connection timed out
2022-06-19 16:13:58,288 [WARNING] 	olympe.drone.ANAFI Ai 000000 - async_disconnect - Cannot disconnect while a connection is in progress
2022-06-19 16:13:58,289 [ERROR] 	olympe.drone.ANAFI Ai 000000 - disconnect - Cannot disconnect prope

… and the simulation goes into kind of “time lap” mode: Some slow progress, then all stops. The entire system gets sluggish.

EDIT2: Situation now after several reboots: The simulation “takeoff” ends up with a front_camera starring into the sky and a red light shining after start of everything. The takeoff script doesn’t takeoff, it just ends up in a

2022-06-19 16:38:13,755 [ERROR] 	olympe.drone.ANAFI Ai 000000 - connect - '10.202.0.1 connection timed out

I consider this to not being working properly :slight_smile:

Update: I was tricked by the documentation, which states “Sphinx will not start with ‘secure boot’ enabled” or so. In fact it starts, but it definitely runs more stable and reproducible after disabled secure boot.

However, after the fourth start of “takeofff” and with an additional video consumer (GStreamer), the rea-time-factor fell down from 99.99 to 60 and 19 and finally 9 and didn’t recover from that.

No idea what this means.

EDIT: The general problems with stability I have are not solved. A bit better, but not good enough

As a side question: The documentation mentions this way to launch the sphinx:

sphinx "/opt/parrot-sphinx/usr/share/sphinx/drones/anafi_ai.drone"::firmware="ftp://<login>:<pass>@ftp2.parrot.biz/versions/anafi2/pc/%23latest/images/anafi2-pc.ext2.zip"

For an Anafi drone (not Anafi_ai): Is the link to the firmware the same?

EDIT: To be more specific: If I launch the sphinx script with “anafi.drone” the error is:

[Wrn] [Firmware.cc:70] cannot find hardware 'anafi4k' among: anafi2, 
[Err] [AutomatonPrepFw.cc:128] Firmware doesn't support requested hardware anafi4k

For anafi, the command line is:

sphinx "/opt/parrot-sphinx/usr/share/sphinx/drones/anafi.drone"::firmware="ftp://<login>:<pass>@ftp2.parrot.biz/versions/anafi/pc/%23latest/images/anafi-pc.ext2.zip"

What gstreamer command line do you use to create your video client ? By default, gst-launch-1.0 starts multiple streams simultaneously but displays the vertical camera only (which is probably why you see gray frames before the drone takes off).

In sphinx, you can select Window > Camera Connections to display the list of clients per camera. When you start gstreamer, you will see that multiple cameras are started simultaneously, which greatly reduces the real-time factor.

Alternatively, you can use sphinx-cli to only display the camera of your choice:

sphinx-cli camera front_streaming

Sorry, I forgot to report this first. Same error.

sphinx "/opt/parrot-sphinx/usr/share/sphinx/drones/anafi.drone"::firmware="ftp://xxxxx@ftp2.parrot.biz/versions/anafi2/pc/%23latest/images/anafi2-pc.ext2.zip" & parrot-ue4-sphx-tests
2022.06.20-07.33.57:749][ 44]LogGzUE4: Display: Client got connected
[Msg] World params for 'default':
[Msg] 	spawn_points:
[Msg] 		- name: default
[Msg] 		  pose: 0 0 0.2 0 -0 0
[Msg] connected to firmwared
[Msg] Preparation of firmware ftp://airsdk_external:***********@ftp2.parrot.biz/versions/anafi2/pc/%23latest/images/anafi2-pc.ext2.zip
[2022.06.20-07.33.57:881][ 52]LogAMS: Display: Client connected
[Msg] firmware /usr/share/firmwared/firmwares//anafi2-pc.ext2.zip.84f64f7e-1fdc-4b00-9a00-ed688a2bb04c.firmware supported hardwares: 
[Msg] 	anafi2
[Wrn] [Firmware.cc:70] cannot find hardware 'anafi4k' among: anafi2, 
[Err] [AutomatonPrepFw.cc:128] Firmware doesn't support requested hardware anafi4k
[2022.06.20-07.33.59:731][163]LogGzUE4: Display: Client got disconnected
[2022.06.20-07.33.59:765][164]LogGzUE4: Display: Waiting for Sphinx...
[Msg] Firmware anafi[d03c9042571d73cb3f8db85ec200b23370519ef5] unprepared.

The GStreamer pipeline is this

gst-launch-1.0 rtspsrc location=rtsp://10.202.0.1/live is-live=true connection-speed=3000 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! autovideosink

and it works somehow, it just shows me the ground camera.

Will try your sphinx cli command

ubuntu@simulator:~$ sphinx-cli camera front_streaming
[E][2022-06-20 09:41:21][pysphinx.cameras.VideoIpcCamera] No frame received after 3 secs
Failed to read frame

What gstreamer command line do you use to create your video client ? By default, gst-launch-1.0 starts multiple streams simultaneously but displays the vertical camera only (which is probably why you see gray frames before the drone takes off).

Is there any chance to change that? I would like to stream the same camera I get with the real drone. Confusing, somehow…

Would it be possible to review the error message appearing with any other drone type than anafi_ai?

Your url to the anafi firmware is incorrect:

sphinx "/opt/parrot-sphinx/usr/share/sphinx/drones/anafi.drone"::firmware="ftp://xxxxx@ftp2.parrot.biz/versions/anafi2/pc/%23latest/images/anafi2-pc.ext2.zip" & parrot-ue4-sphx-tests

It should be this:

[I’m moving this post from the Olympe category to the “ANAFI Ai / Sphinx” Category]

Thanks

Sh…t… The “2”. Have overseen this… Sorry, that’s nasty :slight_smile: How should I know? Is that documented somehwere?

Confirming. That works, even though the world looks pretty different at the first glance

Thanks :slight_smile:

So far things are running not too bad from the PI using the remote simulator.

Just one thing, maybe you have a comment:

2022-06-21 12:35:13,734 [WARNING] 	olympe.media - _get_all_media - HTTP 541: http://192.168.188.118:80/api/v1/media/medias b'Media Not Yet Indexed'
2022-06-21 12:35:16,812 [ERROR] 	olympe.media - _get_all_media - The webserver is unavailable
2022-06-21 12:35:16,814 [WARNING] 	olympe.media - aconnect - Media are not yet indexed

How can I solve this and what does it mean?

And I’m still catching these two warnings after the start of my controller script:

2022-06-21 19:11:34,888 [WARNING]       olympe.drone.ANAFI-0000000 - _recv_cmd_cb - Unknown message id 0xa2000005
2022-06-21 19:11:34,888 [WARNING]       olympe.drone.ANAFI-0000000 - _recv_cmd_cb - Unknown message id 0xa2000004

This topic was automatically closed after 30 days. New replies are no longer allowed.