263 Commits

Author SHA1 Message Date
Matthias Grob
a8f5b6dc1b FlightTaskOrbit: also use HeadingSmoothing to avoid steps during the approach 2025-05-21 13:25:46 +02:00
Matthias Grob
70ad2e6fe5 FlightTaskAuto: Smooth yaw follow-up, bring back necessary previous yaw setpoint and reset smoothing when yaw is not locked 2025-05-21 13:25:46 +02:00
Dawid Rudy
508dc030b8 Smooth yaw by limiting acceleration 2025-05-21 13:25:46 +02:00
Matthias Grob
5f34474ecb FlightTaskAuto: clean up parameter description and internal variable naming 2025-04-25 15:32:47 +02:00
Matthias Grob
174147208e Move StickYaw class into a globally available library 2025-04-22 15:35:26 +02:00
Marco Hauswirth
283a69dedf enable terrain_hold when not moving vertically 2025-03-24 09:08:18 +01:00
Mathieu Bresciani
0ab3e45c13
MC auto: improve behavior of RC help during landing
Letting the autopilot set the heading during landing while the pilot is
nudging the vehile leads to a weird UX as the vehicle would make a turn
instead of translating.
With this modification, the initial land heading is immediately overridden when the pilot
begins to adjust the drone's position, providing the sensation of full control.
2025-03-05 16:37:26 +01:00
bresch
c09c63171c MC auto: fix land nudging
Revert removal of isTargetModified as this is required when the target
is changed by "RC help" (nudging) during landing.
2025-02-25 09:11:23 +01:00
Perre
412d4390a6
MC Slowmode: Yawstick for gimbal control, vehicle yaw follows gimbal (#24242)
* Yawsticks on gimbal, vehicle follows gimbal in slowmode, once vehicle has taken off

* Increase queue length to avoid automatically unadvertise queued publications with queue length 1

* Improve readability

---------

Co-authored-by: Pernilla <pernilla@auterion.com>
2025-02-18 14:38:11 +01:00
Silvan
04cd247c90 FlightTaskAuto: remove isTargetModified()
As it is no longer needed w/o avoidance.

Signed-off-by: Silvan <silvan@auterion.com>
2025-02-18 14:33:16 +01:00
Silvan
b7b6d45e18 lib: remove bezier
Signed-off-by: Silvan <silvan@auterion.com>
2025-02-18 14:33:16 +01:00
Silvan
1f2dba68d2 remove avoidance library and logic
Signed-off-by: Silvan <silvan@auterion.com>
2025-02-18 14:33:16 +01:00
Marco Hauswirth
61d595dc64 reset dist_to_ground_lock if dist_to_bottom is not valid. this avoids a reset to a previous dist_to_ground after a switch back to a valid measurement 2025-02-14 17:10:14 +01:00
bresch
8d296a50f9 FlightTask: properly initialize EKF reset counters
This fixes a race condition when switching from a flight mode that is
not a flight task (e.g.: stabilized). In this case, the reset counters
were initialized to 0 and deltas were applied to the first setpoints if
the EKF had any of its reset counters different from 0.
2025-02-05 13:21:32 -05:00
Matthias Grob
af062c85eb Revert "FLightTaskAuto: limit nudging speed based on distance sensor"
This reverts commit 97cb933cff6d837e59dd55123804cd78abdca22a.
2025-01-21 09:59:47 +01:00
Marco Hauswirth
4a5aa1e947
Fix max-hagl restriction to position/altitude control (#23667)
* fix max-hagl restriction to position/altitude control

* max hagl vel restriction in ManAcc position mode

* use interpolate func, change naming

* simplyfied vertical vel limitation

* move velocity-constraint adjustment to StickAccelXY
2025-01-20 15:50:21 +01:00
Matthias Grob
1239f0aaed FlightTaskTransition: Comment why using invalid horizontal velocity works 2024-12-19 16:00:21 +01:00
Matthias Grob
34bcc277a5 FlightTaskTransition: keep high decelration when overshooting the transition target 2024-12-19 16:00:21 +01:00
Matthias Grob
11d7dd41fd FlightTaskTransition: clean up and simplify 2024-12-19 16:00:21 +01:00
bresch
fa5a781e20 AlphaFilter: set time constant instead of alpha
Then the update function can set the dt at every iteration if needed
2024-12-18 14:11:08 +01:00
Matthias Grob
2ef2911c36 Remove FlightTaskManualPositionSmoothVel
The default implementation for multicopter Position mode is FlightTaskManualAcceleration.
The last missing piece was support for CollisionPrevention in this implementation.
2024-11-21 11:36:03 +01:00
Matthias Grob
079f3ca67c StickAccelerationXY: Simplify collision prevention call 2024-11-21 11:36:03 +01:00
Claudio Chies
0cd6a553b9 CollisionPrevention: rewrite for Acceleration based manual flight mode 2024-11-21 11:36:03 +01:00
Alvaro Fernandez
079b756f1b
VTOL: Added position feedback to backward transition braking controller(#23731)
Instead of tracking a fixed deceleration setpoint during the backtransition we added here position feedback,
such that the vehicle comes to a stop latest at the current position setpoint. This reduces the risk of 
overshooting the landing point.
If no position feedback/position setpoint is present the old logic still applies.
It further moves the braking controller to the FlightTaskTransition instad of doing it in
the VTOL attitude mode.

* vtol_type: added position feedback to backward transition

* FlgithTaskTransition: refactored backtransition deceleration/pitch setpoint computation

* FlightTaskTransition: minor improvements

* FlightTaskTransition: use .dot() consistently and remove unnecessary comments

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2024-11-11 11:53:28 +01:00
Matthias Grob
cac0133901 FlightTaskDescned: fix horizontal acceleration overriding vertical one
Also descend with more acceleration again to avoid the risk of ascending instead of descending because of a wrong hover thrust estimate.
2024-10-25 14:06:00 +02:00
Matthias Grob
fd04ece6d4 geo: remove dependency on drv_hrt time driver 2024-10-07 14:24:18 +02:00
Daniel Agar
ad28c5893b flight_mode_manager: invalidate dist to bottom/ground on terrain reset
- this allows the terrain hold to simply reset on the next valid update
   rather than trying to adjust the setpoints
2024-10-04 11:28:03 -04:00
BazookaJoe1900
4d83badba1
fix files tags on the header comments (#23564) 2024-09-19 09:25:18 +03:00
Claudio Chies
4ba4b340cc Reduce the orbit jerk by using a slew rate 2024-09-13 10:28:42 +02:00
Claudio Chies
e29a36adb4
Landing horizontal velocity compensation / unsteady landing (#23546)
* initial working

* implemented feedback
2024-08-19 08:01:43 +02:00
Matthias Grob
0381e14822 FlightTaskOrbit: Avoid sending NAN altitude in status telemetry while it's changed by stick 2024-08-08 10:53:18 -04:00
Claudio Chies
28a0de63c5
Orbit Yaw Vehicle Parameter (#23358) 2024-08-07 11:12:52 +02:00
Daniel Agar
e03aef616c
ekf2: add terrain/dist_bottom reset deltas (vehicle_local_position/vehicle_global_position) 2024-07-15 10:25:42 -04:00
Claudio Chies
33be5d8356
Survey - fix of survey tracking problem on steep slopes (#23371)
* initial working

* incoperated review
2024-07-11 14:54:22 +02:00
Daniel Agar
78fd9a15f8 flight_mode_manager: delete unused avoidance waypoint 2024-06-27 01:08:16 -04:00
murata,katsutoshi
ba448fb549
MC Auto: add fixed yaw mode 2024-04-25 13:53:05 +02:00
Matthias Grob
51fe4351c6 StickTiltXY: Fix too high maximum tilt problem
And add unit tests.
2024-02-20 14:27:49 +01:00
muramura
f636414ca7 tuning_tools: Change 1G to a more accurate value 2024-02-09 10:26:57 -05:00
muramura
00a9e4c76b Auto: Change 1G to a more accurate value 2024-02-09 10:26:57 -05:00
Matthias Grob
97cb933cff FLightTaskAuto: limit nudging speed based on distance sensor 2024-02-07 11:23:55 +01:00
Silvan Fuhrer
7e22b47b85
Navigator/FlightTaskAuto yaw handling improvements/simplifications (#22532)
* PositionSetpoint: remove yaw_valid field

* Navigator: set yaw setpoint to NAN for Takeoff

Don't set a yaw setpoint for takeoff, as Navigator doesn't handle the yaw reset.
The yaw setpoint generation is handled by FlightTaskAuto.

* PositionSetpoint.msg: remove disable_weather_vane and instead only use the yaw field

Strictly follow the concept that if the position_setpoint.yaw is set, then
follow it the controller, and otherwise let the controller set it as it
thinks it's best.

* Navigator: remove logic that sets yaw to be accepted in TAKEOFF

No longer needed as during Takeoff we anyway don't set a yaw setpoint.

* PositionSetpoint.msg: remove yawspeed_valid

* PositionSetpoint.msg: remove yawspeed

* Navigator: set yaw setpoint to NAN instead of current

In set_takeoff and set_land_item, as well as for VTOL transition.
The flight tasks then set the yaw corresponding to the current yaw.

* Navigator: change get_yaw_acceptance into a bool

* PositionSetpoint.msg: improve comment for yaw

* MissionBlock: remove unnecessary code from set_vtol_transition_item

* Navigator: clean up calculate_breaking_stop(), set yaw to NAN

* Navigator: set yaw to NAN in variouls places where not specifc setpoint is desired

* Navigator: set yaw to NAN in reset_position_setpoint()

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2023-12-21 16:50:13 +01:00
Matthias Grob
ebae9ae3d7 FlightTaskManualAccelerationSlow: MC_ prefix for parameter names
As discussed in the maintainer call we should adhere to the
parameter naming scheme that makes it clear what vehicle type the
configuration is good for.
2023-12-08 21:17:59 +01:00
Matthias Grob
da24811ce1 SickAccelerationXY: fix comment typo brak{e}ing 2023-12-08 21:17:59 +01:00
Matthias Grob
54ce9813c8 FlightModeManager: Add task for position slow mode 2023-12-08 21:17:59 +01:00
Matthias Grob
dbbf585adb StickYaw: yaw rate limit interface 2023-12-08 21:17:59 +01:00
Matthias Grob
84220407ea FlightTaskManualAltitude: vertical velocity limit interface 2023-12-08 21:17:59 +01:00
Matthias Grob
bb617f6c4d FlightTaskManualAcceleration: horizontal velocity limit interface 2023-12-08 21:17:59 +01:00
Matthias Grob
77c06a9f9e Sticks: Provide auxiliary analog values from manual_control_setpoint 2023-12-08 21:17:59 +01:00
Matthias Grob
df41bc3d26 StickAccelerationXY: make sure speeds below 1m/s are exactly reached
by only applying the sqrt linear drag when brakeing.
It was originally not done this way to avoid discontinuities and
the exact speed bewlo 1m/s didn't matter. With the position slow mode
the exact slow speeds now matter. And the discontinuities are avoided by
reusing the brake boost filter.
2023-12-08 21:17:59 +01:00
Matthias Grob
8bb20db7da GotoControl: Save flash 2023-11-30 17:16:02 +01:00