-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
health.is_global_position_ok with Ardupilot #668
Comments
Try printing what is the response of health from telemetry: It checks for your Home position is set or not with GPS health. |
If I don't break from the for loop, I don't see anything printing. I can only do once or I try to do a counter. |
Actually you should be getting some response printing cuz everytime you ask for response telemetry it gives you something.. if condition only is for checking if it's ok or not. |
If it hangs there, it may mean that it never receives the message it expects. Is there a different MAVLink message between PX4 and Ardupilot here? |
From this doc, it expects a boolean, my guess is all are false always.
Not sure, Copter Mission Command List. |
is the is_global_position_ok that failed it. But is_home_position_ok is okay, and is_armable: False, interesting.
|
Yeah !! |
GPS already re-calibrated.
Okay, will take a look at the code. |
likely found the problem, not working, no printing. I think similar something to this is missing. print_position CancelledError
|
subscribe to these, now we have the info. the problem is clear.
also
[edit] RawGps info: RawGps: [timestamp_us: 219937000, latitude_deg: 1.XXXXXX, longitude_deg: 103.YYYYYY, absolute_altitude_m: 26.32000160217285, hdop: 0.8700000047683716, vdop: 1.5499999523162842, velocity_m_s: 0.009999999776482582, cog_deg: 0.0, altitude_ellipsoid_m: 32.749000549316406, horizontal_uncertainty_m: 1.3920000791549683, vertical_uncertainty_m: 2.513000011444092, velocity_uncertainty_m_s: 0.33000001311302185, heading_uncertainty_deg: 0.0, yaw_deg: 0.0] When the drone is indoors, wonder where RawGps gets the latitude and longitude. Position info: Position: [latitude_deg: 0.0, longitude_deg: 0.0, absolute_altitude_m: 0.0, relative_altitude_m: 2.5890002250671387] |
You might wanna try downgrading your Ardupilot Firmware Stable Version. 4.1 or less. |
the latest stable version is 4.4.4, and 4.5.0 is in the last stage of beta testing before release. There are many bug fixes and performance improvements. Moving back to 4.1 meaning the users have to forgo the fixes and improvements. |
No it doesn't mean that you're permanently shifting to 4.1. It helps us find out the bug and we might be able to fix it in further releases. Some version upgrades changes the parameters inside the firmware, If the code is running on older version and not new, we can update the code with newer parameters according to Firmware Version. |
I am seeing the same issue on the following: I always get
|
@ilamanov what's the setup where you test this? SITL, or real copter (outside) with GPS signal? Just so I know how to reproduce this. |
@julianoes It's a real copter outside with ~17 sats |
Not sure if this is related but I do get a few telemetry methods hanging with ardupilot:
Anytime I attempt to print them, it just hangs. Till I manually break out of the loop or shut the program down. Health works well for me though |
Try again with
are you saying you can get both two conditions true in your test? |
this line of code does not work with Ardupilot. It never comes out from the for loop. MissionPlanner reports GPS is healthy, and Ardupilot acquired a home position.
if health.is_global_position_ok and health.is_home_position_ok:
telemetry.Health
Pi4B Ubuntu 22.04 64-bit
Arducopter v4.2.3
Name: mavsdk
Version: 2.1.0
Summary: Python wrapper for MAVSDK
Home-page: https://github.com/mavlink/MAVSDK-Python
Author:
Author-email:
License: UNKNOWN
Location: /home/pi/.local/lib/python3.10/site-packages
Requires: aiogrpc, grpcio, protobuf
Required-by:
$
The text was updated successfully, but these errors were encountered: