MAVSDK Python Example Hanging
-
Hello! I tried the MAVSDK python example this afternoon and it looks like it's hanging while waiting for global position estimate:
root@apq8096:/home# python3 takeoff_and_land2.py Waiting for mavsdk_server to be ready... Connected to mavsdk_server! Waiting for drone to connect... Drone discovered with UUID: 3762846593019032885 Waiting for drone to have a global position estimate...Suggestions for debugging?
-
Hey Kip,
I'm guessing you have GPS lock right? You can see this if you have QGC connected, there's a little satellite icon on the top bar.
To be honest I think it could be commented out, this was a copy/pasta from the MAVSDK examples.
For your use case we discussed, here's another example that should be in the container as well, showing how to set the "waypoints" using VIO:
offboard_position_ned2.py · master · voxl / VOXL Docker Images / voxl-docker-mavsdk-python · GitLab
Example of how to use MAVSDK Python in a Docker container running on target.
GitLab (gitlab.com)
Here's the video for that one as reference (NOTE: the April Tag in the video isn't being used. BUT, this is a good example of how you could configure april tags on the ground and program their locations. Then during this flight, the m500 could do a course correction if needed for higher accuracy). https://www.youtube.com/watch?v=V3vVs8fEOZs
-
QGC says "No GPS Lock for Vehicle" and gps status is set to 0.
I'm having another strange problem that might be related... when trying to run voxl-vision-px4 the system is crashing entirely.
~ # voxl-vision-px4 --debug_fixed_frame loading config file ================================================================= Parameters as loaded from config file: qgc_ip: 192.168.0.218 en_localhost_mavlink_udp 1 en_secondary_qgc: 0 secondary_qgc_ip: 192.168.1.214 en_vio: 1 en_voa: 0 en_send_vio_to_qgc: 0 en_send_voa_to_qgc: 0 en_adsb: 0 adsb_uart_bus: 7 adsb_uart_baudrate: 57600 px4_uart_bus: 5 px4_uart_baudrate: 921600 offboard_mode: off R_imu_to_body: 0.0000 1.0000 0.0000 1.0000 0.0000 0.0000 0.0000 0.0000 -1.0000 T_imu_wrt_body: 0.0680 -0.0150 -0.0080 height_body_above_ground_m: 0.050 land_on_tag_id: 0 follow_tag_id: 0 en_apriltag_fixed_frame: 1 en_transform_mavlink_pos_setpoints_from_fixed_frame:1 n_fixed_apriltags: 1 Fixed apriltag #0: tag id: 0 R_tag_to_fixed: 0.0000 -1.0000 0.0000 1.0000 0.0000 0.0000 0.0000 0.0000 1.0000 T_tag_wrt_fixed: 0.0000 0.0000 0.0000 T_stereo_wrt_body: 0.1000 -0.0400 0.0000 en_fixed_frame_pipe: 0 fixed_frame_filter_len: 5 ================================================================= WARNING, exising instance of voxl-vision-px4 found, attempting to stop it starting geometry module starting uart mavlink -
The flight computer doesn't seem to be getting any positional data for some reason. Is this normal? (see the last line below)
~ # systemctl restart voxl-vision-px4 ~ # ~ # ~ # systemctl status voxl-vision-px4 ● voxl-vision-px4.service - voxl-vision-px4 Loaded: loaded (/usr/bin/voxl-vision-px4; enabled; vendor preset: enabled) Active: active (running) since Sat 2021-04-03 00:11:47 UTC; 5s ago Main PID: 4007 (voxl-vision-px4) CGroup: /system.slice/voxl-vision-px4.service └─4007 /usr/bin/voxl-vision-px4 Apr 03 00:11:47 apq8096 voxl-vision-px4[4007]: LNX_8074 supported? 1 Apr 03 00:11:47 apq8096 voxl-vision-px4[4007]: LNX_8096 supported? 1 Apr 03 00:11:47 apq8096 voxl-vision-px4[4007]: LNX_IA64 supported? 1 Apr 03 00:11:47 apq8096 voxl-vision-px4[4007]: WINDOWS supported? 0 Apr 03 00:11:47 apq8096 voxl-vision-px4[4007]: FASTCV: fcvAvailableHardware Linux Apr 03 00:11:47 apq8096 voxl-vision-px4[4007]: FASTCV: fcvAvailableHardware Linux Apr 03 00:11:47 apq8096 voxl-vision-px4[4007]: [146.135049] SNAV INFO: CameraManager is finished initializing. Apr 03 00:11:47 apq8096 voxl-vision-px4[4007]: [146.135099] SNAV INFO: Starting camera image streaming... Apr 03 00:11:47 apq8096 voxl-vision-px4[4007]: [146.146347] SNAV ERROR: Error starting camera streaming. Exiting. Apr 03 00:11:47 apq8096 voxl-vision-px4[4007]: ERROR: failed to start modalai vision lib -
Hey @kiprock ,
Checking in with ya, we had a side email going and I believe getting the camera configuration setup got voxl-vision-px4 going.
Were you able to get a GPS signal going? Depending on the reception, we sometimes need to move outside of our building to pickup satellites.
Thanks!
-
I was able to resolve. I had been following the ModalAI Vision Lib documentation and selected the wrong camera configuration, which causes failures and problems with the core voxl-vision software. The default is #1, but the m500 is #3 (hires + stereo + tracking). Problem solved. Thanks!
-
Good news. We will get that updated to be a little more clear.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login