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

manual control selection and cleanup #17404

Merged
merged 90 commits into from
Nov 9, 2021
Merged

Conversation

julianoes
Copy link
Contributor

This adds a new module called manual_control which handles as much as possible of RC and MAVLink manual_control input outside of commander.

@julianoes julianoes requested review from dagar and MaEtUgR April 15, 2021 14:04
@julianoes julianoes force-pushed the pr-manual_control_selector branch 2 times, most recently from 9f2d21c to ccf5da6 Compare April 21, 2021 13:53
@julianoes julianoes force-pushed the pr-manual_control_selector branch 2 times, most recently from 4ec1a44 to 24fb580 Compare May 11, 2021 06:44
@julianoes julianoes changed the title [WIP] manual control selection and cleanup. manual control selection and cleanup May 11, 2021
@julianoes julianoes marked this pull request as ready for review May 11, 2021 06:45
@julianoes
Copy link
Contributor Author

Note to self: I should go through commander and clean up some of the now redundant RC loss checking.

@julianoes
Copy link
Contributor Author

Don't bother reviewing just yet. This needs more cleanup work on the commander side.

@julianoes
Copy link
Contributor Author

Ok, now it's in a somewhat reviewable state, I hope.

@julianoes julianoes force-pushed the pr-manual_control_selector branch from d37bbf1 to 9fb6266 Compare May 17, 2021 08:52
@julianoes julianoes force-pushed the pr-manual_control_selector branch 2 times, most recently from 6b5d266 to 033a0b9 Compare May 19, 2021 05:18
@julianoes
Copy link
Contributor Author

@MaEtUgR @dagar I think now is a good time to review this. Then we can try to merge it once the release is in.

@julianoes julianoes closed this May 19, 2021
@julianoes julianoes reopened this May 19, 2021
@julianoes
Copy link
Contributor Author

Bump, please review.

@julianoes julianoes force-pushed the pr-manual_control_selector branch from 4a6f736 to 3aaa101 Compare May 31, 2021 06:38
Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

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

I'm on it but it's a bigger junk to review 🚚

boards/px4/fmu-v2/default.cmake Outdated Show resolved Hide resolved
boards/px4/fmu-v2/init/rc.board_mavlink Outdated Show resolved Hide resolved
Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

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

Some more comments, I'm not through yet 🐌

msg/manual_control_input.msg Outdated Show resolved Hide resolved
msg/manual_control_input.msg Outdated Show resolved Hide resolved
msg/manual_control_input.msg Outdated Show resolved Hide resolved
ROMFS/px4fmu_common/init.d/rcS Outdated Show resolved Hide resolved
src/modules/commander/Commander.cpp Outdated Show resolved Hide resolved
src/modules/commander/Commander.cpp Outdated Show resolved Hide resolved
src/modules/commander/Commander.cpp Outdated Show resolved Hide resolved
src/modules/commander/Commander.cpp Outdated Show resolved Hide resolved
src/modules/commander/Commander.cpp Outdated Show resolved Hide resolved
Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

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

I studied some more. Still not completely through sorry 🏃

src/modules/commander/Commander.cpp Outdated Show resolved Hide resolved
src/modules/commander/Commander.cpp Outdated Show resolved Hide resolved
src/modules/manual_control/ManualControl.hpp Outdated Show resolved Hide resolved
src/modules/manual_control/ManualControl.hpp Outdated Show resolved Hide resolved
src/modules/manual_control/ManualControl.hpp Outdated Show resolved Hide resolved
src/modules/manual_control/ManualControl.cpp Outdated Show resolved Hide resolved
src/modules/manual_control/ManualControl.hpp Outdated Show resolved Hide resolved
src/modules/manual_control/ManualControl.cpp Outdated Show resolved Hide resolved
@julianoes julianoes force-pushed the pr-manual_control_selector branch from 3aaa101 to 4d5a711 Compare June 10, 2021 10:04
@julianoes
Copy link
Contributor Author

@MaEtUgR thanks a lot for the in-depth review.

I think I have addressed most points, except:

  • Adding enums to the uORB message. I don't love the uORB enums because they are not type safe, so it's a trade-off.
  • Checking the IO override stuff. I believe this is either broken already or will be broken with the IO lobotomy. 😕

I've rebased the branch and force pushed, so to review the changes, best just check the recent commits.

Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

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

Just adding this now already in the hope it's what prohibits me from answering in the existing conversations.
EDIT: It worked I just couldn't respond because there was a pending review 🤦

src/modules/manual_control/ManualControlSelector.cpp Outdated Show resolved Hide resolved
Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

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

Now I'm completely through 😅 I hope the feedback helps. I'm happy to cooperate e.g. on the arm button logic. I added two commits for the unit test I came up with that fails and to remove the commented-out lines.
My main concerns are:

  • arming button "broken"
  • gear switch doesn't cover all cases
  • MAVLink command target IDs

src/modules/manual_control/ManualControl.cpp Outdated Show resolved Hide resolved
src/modules/manual_control/ManualControl.cpp Outdated Show resolved Hide resolved
src/modules/manual_control/ManualControl.cpp Outdated Show resolved Hide resolved
src/modules/manual_control/ManualControl.cpp Outdated Show resolved Hide resolved
src/modules/mc_rate_control/MulticopterRateControl.cpp Outdated Show resolved Hide resolved
src/modules/mavlink/mavlink_receiver.cpp Outdated Show resolved Hide resolved
src/modules/mavlink/mavlink_receiver.cpp Outdated Show resolved Hide resolved
src/modules/mavlink/mavlink_receiver.cpp Outdated Show resolved Hide resolved
src/modules/mavlink/mavlink_receiver.cpp Outdated Show resolved Hide resolved
@julianoes
Copy link
Contributor Author

@MaEtUgR I think I've answered to most of your points and fixed most of them. I'm also rebasing this on latest master, so to see if my fixes make sense, you can just check the latest commits.

@julianoes julianoes force-pushed the pr-manual_control_selector branch from 59115a6 to 9e3f4a2 Compare June 16, 2021 09:00
@MaEtUgR MaEtUgR force-pushed the pr-manual_control_selector branch from f9f5842 to 39ec0d0 Compare November 8, 2021 12:52
@MaEtUgR
Copy link
Member

MaEtUgR commented Nov 8, 2021

Final (?) rebase on px4/master because of a simple conflict with https://github.com/PX4/PX4-Autopilot/pull/17547/files#diff-32ce7fd2aab8a5ba5092fe880ac2055b0a153914e38b40aad6cadffb811fd7d0R73

Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

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

Jenkins fails on src/drivers/uavcan/libuavcan and the targets build for me locally.
I'm done with my testing.
@julianoes @dagar Merge?

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.

5 participants