-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
Replace offboard control setpoint topic with simple offboard control mode topic, remove setpoint data from topic #1786
Conversation
looks like this still uses the same mavlink messages, so the c_uart_example should be unaffected |
@aerialhedgehog yes the change is Firmware internal only. Thanks for checking the c_uart_example |
This looks great and like a really neat simplification! |
I just realised that this does not work in the current state if the sender uses an asynchronous pattern to send the data. Mavros uses exactly this pattern. Maybe I need to add a mode enum again. However it will be simplified compared to the old version. |
@thomasgubler This is something we want to resolve in mavros itself. |
@mhkabir I pushed an quick attempt for a fix. I will have to recheck tomorrow if I got the logic right. |
020728f
to
230b9ed
Compare
I rebased and improved the attitude logic |
1996a32
to
7093e3c
Compare
by @aerialhedgehog in #1810
I updated the todo list in the top comment to reflect this. |
@aerialhedgehog Would you have time to look at the velocity control bits? |
I'm currently working on adding functionality to accept actuator control mavlink messages in the mavlink_receiver and to be able to set raw actuator controls while in offboard mode. The work in this branch will change how my code is working. I wonder the work should be combined? My fork is here: https://github.com/mcsauder/Pixhawk-Firmware/tree/actuatorControlOffboardMode I've already merged the offboardmode code into my repo. Since my work is dependent on the offboard mode, should I submit a pull request for this to the offboardmode branch or simply to master? |
@matt-beall Thomas will be able to provide more feedback. In general sending the PR against the offboardmode branch might make sense because it will make your changes more obvious. As it will go into master as well I don't see it delaying your work going into master. |
@matt-beall cool, looking forward to it! If this PR is still open once you are ready for a PR then you should do your PR against this branch. Otherwise against master. I would recommend that you frequently rebase your branch against this one while you are working on the feature. |
@aerialhedgehog What kind of setpoint did you send in your velocity setpoint test? How/by which tool was the setpoint generated? Was it a pure velocity setpoint or a combination of velocity and position? |
@LorenzMeier will do. which makes a call to this function for velocity command This is where the bit masks are defined |
I glanced over the code again, but I could not immediately see whats wrong with velocity setpoints. |
Replace offboard_control_setpoint with offboard_control_mode Remove all setpoint data from the topic as it's not used anymore (setpoint data is directly routed into position/attitude setpoint topics for some time now) Remove mode enum and replace with ignore booleans which map better to the mavlink message Mavlink: Rework parsing of offboard setpoints Commander: in offboard mode set control flags based on ignore flags instead of enum
if attitude/rates haven been used previously do not set the ignore flags even if the message asks us to do so to keep the controllers running
…ehicle control mode to disable controls in att_control apps
18de217
to
0f51907
Compare
@thomasgubler Makes sense. We want to keep moving ;-). |
Replace offboard control setpoint topic with simple offboard control mode topic, remove setpoint data from topic
- mavlink in PX4/Firmware (9ee5b35): mavlink/mavlink@3d80920 - mavlink current upstream: mavlink/mavlink@f5694b2 - Changes: mavlink/mavlink@3d80920...f5694b2 f5694b29 2022-01-19 Julian Oes - component_info: re-use protocol capabilities (#1786)
- mavlink in PX4/Firmware (9f790af): mavlink/mavlink@3d80920 - mavlink current upstream: mavlink/mavlink@f5694b2 - Changes: mavlink/mavlink@3d80920...f5694b2 f5694b29 2022-01-19 Julian Oes - component_info: re-use protocol capabilities (#1786)
- mavlink in PX4/Firmware (b25df88): mavlink/mavlink@3d80920 - mavlink current upstream: mavlink/mavlink@f5694b2 - Changes: mavlink/mavlink@3d80920...f5694b2 f5694b29 2022-01-19 Julian Oes - component_info: re-use protocol capabilities (#1786)
- mavlink in PX4/Firmware (057e0bc): mavlink/mavlink@3d80920 - mavlink current upstream: mavlink/mavlink@f5694b2 - Changes: mavlink/mavlink@3d80920...f5694b2 f5694b29 2022-01-19 Julian Oes - component_info: re-use protocol capabilities (#1786)
- mavlink in PX4/Firmware (b6efbd0): mavlink/mavlink@3d80920 - mavlink current upstream: mavlink/mavlink@51abf3c - Changes: mavlink/mavlink@3d80920...51abf3c 51abf3c8 2022-01-21 Julian Oes - Component information: add note (#1785) f5694b29 2022-01-19 Julian Oes - component_info: re-use protocol capabilities (#1786)
- mavlink in PX4/Firmware (a16a8dc): mavlink/mavlink@3d80920 - mavlink current upstream: mavlink/mavlink@51abf3c - Changes: mavlink/mavlink@3d80920...51abf3c 51abf3c8 2022-01-21 Julian Oes - Component information: add note (#1785) f5694b29 2022-01-19 Julian Oes - component_info: re-use protocol capabilities (#1786)
- mavlink in PX4/Firmware (a16a8dc): mavlink/mavlink@3d80920 - mavlink current upstream: mavlink/mavlink@51abf3c - Changes: mavlink/mavlink@3d80920...51abf3c 51abf3c8 2022-01-21 Julian Oes - Component information: add note (#1785) f5694b29 2022-01-19 Julian Oes - component_info: re-use protocol capabilities (#1786)
This is a cleanup/rework of how mavlink offboard setpoints are handled. Because I plan to add offboard control support to ros sitl (in the mavlink dummy node) this was an important first step.
@mhkabir @sjwilks please have a look
Overview of Changes
(setpoint data is directly routed into position/attitude setpoint topics
for some time now)
the mavlink message
instead of enum
TODO