-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Offboard trajectory_setpoint conflict when in auto modes #18306
Comments
This type of potential conflict needs to be prevented more fundamentally. Are you using Mavlink or ROS2/FastRTPS? In the mavlink case this should already be prevented until the system is actually in OFFBOARD mode. PX4-Autopilot/src/modules/mavlink/mavlink_receiver.cpp Lines 1004 to 1008 in 03bd5e0
|
I'm using ROS2/FastRTPS |
The quickest fix is to respect the nav_state before publishing (like mavlink). The better fix would be to publish the offboard setpoint on a different topic (same msg) and the consumer (the position controller) can decide which to respect based on the system state. |
I'm working on a fix, and got multicopter position controller working, but for the rover, why is there 2 updates for trajectory_setpoint_sub?
and
|
I don't think it's intentional, it's probably a result of how things evolved to this point with OFFBOARD setpoints previously getting to the controllers through a different topic. |
Closing since mavlink handles this issue and using ROS2 is experimental and assumes the offboard computer must stop sending setpoints if a pilot takes over. |
Describe the bug
Offboard trajectory_setpoint sent while in an auto mode conflict with flight_tasks sending trajectory_setpoint since they both publish to the same topic. It appears everything is working correctly when sending trajectory_setpoints at the 10hz recommended by the offboard tutorial and in an auto mode, however this is because flight_tasks publishes at 50hz and is fast enough to essentially "override" the setpoints sent by the 10hz offboard publisher. When publishing at 100hz to trajectory_setpoint from offboard, the auto mode is essentially ignored and the offboard setpoint overrides the internal flight_tasks module.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There needs a way for trajectory_setpoint to be distinguished if it's coming from offboard or flight_tasks. When in offboard mode, flight_tasks no longer send trajectory_setpoints, but if in any auto mode, a conflict is possible if offboard setpoints are sent faster than the flight_task
The text was updated successfully, but these errors were encountered: