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

Request mode change for action MAV_CMD_DO_REPOSITION #2170

Merged
merged 3 commits into from
Nov 2, 2023

Conversation

Jaeyoung-Lim
Copy link
Contributor

@Jaeyoung-Lim Jaeyoung-Lim commented Nov 2, 2023

Problem Description
The goto action in the examples of MAVSDK-Python is currently broken with PX4 main (reported in mavlink/MAVSDK-Python#633)

PX4 returns an unsupported error, as the following.

Traceback (most recent call last):
  File "goto.py", line 47, in <module>
    asyncio.run(run())
  File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "goto.py", line 38, in run
    await drone.action.goto_location(47.397606, 8.543060, flying_alt, 0)
  File "/home/yunpeng/.local/lib/python3.8/site-packages/mavsdk/action.py", line 548, in goto_location
    raise ActionError(result, "goto_location()", latitude_deg, longitude_deg, absolute_altitude_m, yaw_deg)
mavsdk.action.ActionError: UNSUPPORTED: 'Unsupported'; origin: goto_location(); params: (47.397606, 8.54306, 508.1050109863281, 0)

It seems that this is a regression from PX4/PX4-Autopilot#22078, where PX4 requires a mode switch request to be set

Testing
Was not able to test it yet, given that the problem is in MAVDK python.

@Jaeyoung-Lim Jaeyoung-Lim marked this pull request as ready for review November 2, 2023 03:01
Copy link
Collaborator

@julianoes julianoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Jaeyoung-Lim

src/mavsdk/plugins/action/action_impl.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@julianoes julianoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect.

@julianoes julianoes merged commit b545332 into mavlink:main Nov 2, 2023
27 checks passed
@Jaeyoung-Lim Jaeyoung-Lim deleted the pr-fix-do-reposition branch November 2, 2023 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants