-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Yawsticks on gimbal, vehicle follows gimbal in slowmode #24242
Open
Perrrewi
wants to merge
6
commits into
main
Choose a base branch
from
pernilla/vehicle-follow-gimbal-in-slow-mode
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+289
−17
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 1184 byte (0.06 %)]
px4_fmu-v6x [Total VM Diff: 1296 byte (0.06 %)]
Updated: 2025-01-31T09:15:13 |
sfuhrer
reviewed
Jan 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just have a couple of high-level comments so far:
- there is a failed CI check (clang tidy)
- v6x is out of flash - we may need to free up some flash before bringing this in
...ules/flight_mode_manager/tasks/ManualAccelerationSlow/flight_task_acceleration_slow_params.c
Outdated
Show resolved
Hide resolved
...odules/flight_mode_manager/tasks/ManualAccelerationSlow/FlightTaskManualAccelerationSlow.cpp
Outdated
Show resolved
Hide resolved
Perrrewi
force-pushed
the
pernilla/vehicle-follow-gimbal-in-slow-mode
branch
from
January 22, 2025 17:23
a9ab69a
to
929d713
Compare
Thanks for the review @sfuhrer , I updated the PR accordingly. I'll talk in person about freeing up some flash. |
…cations with queue length 1
FlightTaskManualAccelerationSlow: avoid misalignment of gimbal and vehicle before takeoff
Perrrewi
force-pushed
the
pernilla/vehicle-follow-gimbal-in-slow-mode
branch
from
January 31, 2025 09:09
dd6a228
to
f8cd789
Compare
Perrrewi
changed the title
DRAFT: Yawsticks on gimbal, vehicle follows gimbal in slowmode
Yawsticks on gimbal, vehicle follows gimbal in slowmode
Jan 31, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solved Problem
The goal is to reduce latency in the position slow mode between the joystick input and what the user see. The idea is to add the yawstick on the gimbal setpoint and let the vehicle follow the gimbal attitude.
Originally after moving and releasing the joystick there was a residual motion in the image frame. With this solution, the residual motion is no longer present.
Test coverage
It has been tested in SIH with AMC (1.34.9), AOS (3.7.7) and in flight tests AMC (1.34.12) on a multicopter using different camera lenses to see that the joystick inputs changes with the focal length.
Context
Switching into position slow mode with the vehicles yaw setpoint follows the gimbal ones the device attitude status reports ROLL|PITCH|YAW LOCK. Then the feedback signal from vehicle yaw follow the new reference:
Moving the Yawstick changes the gimbals absolute yaw, and the vehicle follows:
Moving the pitch stick changes the gimbals absolute pitch using parameter to map RC_MAP_AUX4 and MC_SLOW_MAP_PTCH:
Finally switching back to position mode and the gimbal device reports flags PITCH|ROLL Lock and the vehicle remain its attitude: