-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
PX4 in SITL mode is saying MAV_CMD_NAV_GUIDED_ENABLE is MAV_RESULT_UNSUPPORTED ? #17276
Comments
I removed this in d0c9a5f#diff-72c9e73ba02675201cb800fd25efcb3b3e52e2fb00d22b191ac16f6d886b7c2b because I couldn't find any existing usage, but apparently I didn't search hard enough. The "normal" usage of OFFBOARD is that you start streaming your offboard setpoints then switch the mode. I can restore |
I see well I'll try changing AirSim to the new way then, would be nice if there were better docs on this. I assume that means sending MAVLINK_MSG_ID_SET_MODE with custom_mode.main_mode set to PX4_CUSTOM_MAIN_MODE_OFFBOARD ? And I assume all the other parameters (base_mode, sub_mode) are copied from the previous heartbeat status fields? |
Yes that sounds right. Roughly what are you using OFFBOARD for? The usage is really geared towards people doing some kind of control via MAVROS and wanting to send setpoints straight into one of the controllers (rate, attitude, velocity, local position). That's why you need to be in OFFBOARD mode then send a continuous stream of setpoints. If all you want to do is simply move a vehicle around I'd suggest taking a look at MAV_CMD_DO_REPOSITION instead. |
AirSim uses offboard for advanced flight control programmed by python scripts mostly using MavLinkSetPositionTargetLocalNed. The python scripts can do fun things like flying in a perfect spiral pattern, etc. |
I got it working now, thanks. See https://youtu.be/DiqgsWIOoW4. So I'm closing the issue. |
Great, thanks for sharing. The other thing to note with Let me know if there's anything we can expand on to improve your use case. I aspire to one day have a workstation fast enough to start using AirSim. 😏 |
Describe the bug
AirSim uses MAV_CMD_NAV_GUIDED_ENABLE to request offboard mode, latest master bits are returning the MAV_RESULT::MAV_RESULT_UNSUPPORTED ? So how does one get the PX4 into offboard mode?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should succeed.
Log Files and Screenshots
https://logs.px4.io/plot_app?log=cd71c873-321e-4514-8c3c-a3aaca0f459f
Additional context
Use this version of AirSim if you are so inclined:
microsoft/AirSim#3546
The text was updated successfully, but these errors were encountered: