-
Notifications
You must be signed in to change notification settings - Fork 228
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
Get GPS Global origin in telemte #750
Comments
I saw this in docs but I got an error that it was not defined! maybe a mavsdk version problem. I will check that agian. thanks |
You're trying to use |
here is where I tested that but honestly, I didn't try hard with that. I did a walkaround and used mavlink2rest and pymavlink in another part of my code base and shared its value to fix this problem. That's why I think maybe sth was wrong with my syntax or the mavsdk version was onboard that drone. |
Hi,
I'm trying to retrieve the GPS coordinates of the local NED origin that PX4 uses. I'd like to access the latitude, longitude, and altitude (AMSL) of this origin point.
According to the cpp documentation, the Telemetry object should have a gps_global_origin() method to achieve this. However, when I try to use it, I encounter an AttributeError: 'Telemetry' object has no attribute 'gps_global_origin'.
Here's a snippet of the code I'm using:
from mavsdk import System
async def get_gps_global_origin(drone: System):
async for origin in drone.telemetry.gps_global_origin():
print(origin)
break
And here's the traceback I receive:
text
Traceback (most recent call last):
File "/root/mavsdk_drone_show/drone_show.py", line 801, in pre_flight_checks
async for position in drone.telemetry.gps_global_origin():
AttributeError: 'Telemetry' object has no attribute 'gps_global_origin'
I'm wondering if I'm misunderstanding how to access this information or if there might be an issue with the current MAVSDK implementation or this method is not implemnted in python. Could you please provide some guidance on the correct way to obtain the GPS Global Origin using MAVSDK Python?
Any help or insights would be greatly appreciated!
The text was updated successfully, but these errors were encountered: