Skip to content
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

goto_location() unsupported error #666

Open
l0ad-pri0r opened this issue Mar 13, 2024 · 3 comments
Open

goto_location() unsupported error #666

l0ad-pri0r opened this issue Mar 13, 2024 · 3 comments

Comments

@l0ad-pri0r
Copy link

Hello everyone!

I developed a script that was tested in a SITL environment. Everything was working as expected but when I tried to test it in a real drone I receive the UNSUPPORTED error on the goto_location.
I'am using it just to change the drone altitude. So firstly I get the current drone position and use it on the first two parameters. For the altitude make some simple math, and for the yaw I use 'float(nan)':

await drone.action.goto_location(current_pos['latitude'], current_pos['longitude'], (current_pos['abs_altitude'] - (current_pos['altitude'] - altitude)), float('nan'))

This instruction returns the error before mentioned. So I tried to pass direct values casted to the especified type, and still the same error... No errors are shown on QGC console. And again, in a simulation environment it works as excpected.

What can cause his behaviour? Thanks in advance! 🙂

@julianoes
Copy link
Collaborator

Ok, is this PX4 or ArduPilot?

@l0ad-pri0r
Copy link
Author

PX4, using the latest stable firmware version

@julianoes
Copy link
Collaborator

When you try SITL, I assume that's not latest stable/v1.14?

My guess is you land right here:
https://github.com/PX4/PX4-Autopilot/blob/release/1.14/src/modules/commander/Commander.cpp#L703-L704

It wants two things:

  1. mode switch set, which we have, see https://github.com/mavlink/MAVSDK/blob/main/src/mavsdk/plugins/action/action_impl.cpp#L459.
  2. no unsupported bits set, which we don't do.

That leaves me confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants