-
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
base: main
Are you sure you want to change the base?
Conversation
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 1176 byte (0.06 %)]
px4_fmu-v6x [Total VM Diff: 1280 byte (0.06 %)]
Updated: 2025-02-03T14:47:37 |
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
a9ab69a
to
929d713
Compare
Thanks for the review @sfuhrer , I updated the PR accordingly. I'll talk in person about freeing up some flash. |
dd6a228
to
f8cd789
Compare
…cations with queue length 1
f8cd789
to
babea4b
Compare
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.
The feature is ready to merge, but waiting with merging until we have freed up enough flash (850bytes on v6x).
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 and in flight 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:
![Screenshot from 2025-01-31 11-42-26](https://private-user-images.githubusercontent.com/60040461/408533408-9b7af389-cd37-4f18-8fb9-08fe9f4e95d8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MjkyMDAsIm5iZiI6MTczODgyODkwMCwicGF0aCI6Ii82MDA0MDQ2MS80MDg1MzM0MDgtOWI3YWYzODktY2QzNy00ZjE4LThmYjktMDhmZTlmNGU5NWQ4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDA4MDE0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE4ODc4YzJiMDVmMWFmYTA1YTljZmJjYTAyNmM2Nzk2YmY5Y2Q1NDljMDdjNDRmN2QwNWM3YjgxMDVmNTZjZDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1PGxRDb6hn38bVITLeQvbejVvh517bh7JnesXvHFKbI)
Moving the Yawstick changes the gimbals absolute yaw, and the vehicle follows:
![Screenshot from 2025-01-31 11-50-16](https://private-user-images.githubusercontent.com/60040461/408534860-168e5f23-5bfe-4465-be07-f00b81fb2231.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MjkyMDAsIm5iZiI6MTczODgyODkwMCwicGF0aCI6Ii82MDA0MDQ2MS80MDg1MzQ4NjAtMTY4ZTVmMjMtNWJmZS00NDY1LWJlMDctZjAwYjgxZmIyMjMxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDA4MDE0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJjOTA2MzNiZDkxNjViOWUyOTRiZWY5YWNlMmM0MzkzYTBiZTlhMDMwZDUxMmI2ZDUwYzAwNmMyOTAwYzYyZDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.PycbVD0r4NbLw59Kz8uexm43-WOIw5veL75P__HL0r4)
Moving the pitch stick changes the gimbals absolute pitch using parameter to map RC_MAP_AUX4 and MC_SLOW_MAP_PTCH:
![Screenshot from 2025-01-31 11-49-03](https://private-user-images.githubusercontent.com/60040461/408535583-249625c8-e16c-44f4-a8de-b0f65f001ac7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MjkyMDAsIm5iZiI6MTczODgyODkwMCwicGF0aCI6Ii82MDA0MDQ2MS80MDg1MzU1ODMtMjQ5NjI1YzgtZTE2Yy00NGY0LWE4ZGUtYjBmNjVmMDAxYWM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDA4MDE0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUxYWU2YmZhNTJkYzc2ZTNhMGEzZDM3YTY0OTkwMTFkMDBjMTExOWI3MTM3MDNiZmFjOTBiODFiZjZjMDczOTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-6Y3QhtepF4m6RGyrDw1UadaBVm0tHNM-TLdzztU-Z4)
Finally switching back to position mode and the gimbal device reports flags PITCH|ROLL Lock and the vehicle remain its attitude:
![Screenshot from 2025-01-31 11-50-41](https://private-user-images.githubusercontent.com/60040461/408535931-146bd0d6-695e-4764-916e-8a5ea311c667.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MjkyMDAsIm5iZiI6MTczODgyODkwMCwicGF0aCI6Ii82MDA0MDQ2MS80MDg1MzU5MzEtMTQ2YmQwZDYtNjk1ZS00NzY0LTkxNmUtOGE1ZWEzMTFjNjY3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDA4MDE0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkxNTFjNTQ5ODUxNDZmYTdlMGRiMjUwZWExOTEyMjQxZjExYjI2YjZmZmIxMTM3NzdjOThhNThiYTE5MDMyNjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1vRoutxKHQZUKFkowx6nu6bT_U3Eb8mCAywWsK_3Caw)