154 Commits

Author SHA1 Message Date
Matthias Grob
1c4325db6d RpmControl: split into cpp source file fixing includes 2025-01-14 14:55:34 +01:00
Matthias Grob
2772ae7e0e RpmControl: maximum rpm outliers are now caught by RpmCapture 2025-01-14 14:55:34 +01:00
Matthias Grob
ddd410e9d8 RpmControl: remove status message because it by now only contains redundant information 2025-01-14 14:55:34 +01:00
Matthias Grob
4050cedfaf RpmControl: call local message instance after message name following the convention 2025-01-14 14:55:34 +01:00
Matthias Grob
cd0e04f8b0 RpmControl: name current timestamp now following the convention 2025-01-14 14:55:34 +01:00
oravla5
ee67e4bb28 RpmControl: class clean up 2025-01-14 14:55:34 +01:00
Matthias Grob
940fe45ba7 ControlAllocator: introduce helicopter rotor rpm controller 2025-01-14 14:55:34 +01:00
Jaeyoung-Lim
f5c05f6d01 Take 2: Cleanup circular dependencies ActuatorEffectiveness 2025-01-13 09:29:42 +01:00
Jaeyoung Lim
208d37e703
Remove circular dependency if control allocation (#24195)
... and actuator effectiveness
2025-01-10 16:58:15 +01:00
somebody-once-told-me
3943025f32
Centralize yaw margin (#23982) 2024-11-20 09:52:36 +01:00
chfriedrich98
0e65679c9e
Mecanum rover: add dedicated module for mecanum rovers (#23708) 2024-09-25 09:35:41 +02:00
BazookaJoe1900
4d83badba1
fix files tags on the header comments (#23564) 2024-09-19 09:25:18 +03:00
chfriedrich98
33d99a13e8
differential: restructure and update module (#23430)
* differential: rename module

* differential: restructure and update module
2024-08-07 09:53:37 +02:00
Matthias Grob
f2bca92221 Fix duplicate newlines at the end of files 2024-07-19 14:33:36 +02:00
Matteo Del Seppia
a8617cf681
Fix float and uint64_t comparison (#23199)
fix: ControlAllocator float and int comparison bug

There was an incorrect comparison between a float variable `dt` and a `uint64_t` value representing 5 milliseconds (`5_ms`). As a result, `do_update` could never become true even if the last torque setpoint was received more than 5 milliseconds before.

To solve this, the `5_ms` value has been converted to seconds (0.005f) for the comparison with `dt`.
2024-06-03 17:48:38 -08:00
somebody-once-told-me
f40ede6087
Control Allocation Sequential Desaturation unit tests (#22612)
* [control_allocation] add unit tests for ControlAllocationSequentialDesaturation

* complete first 2 unit tests

* add yaw test

* add more unit tests

* improve comments

* format

* address review comments

* submodule update

* Update src/modules/control_allocator/ControlAllocation/ControlAllocationSequentialDesaturationTest.cpp

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

* Update src/modules/control_allocator/ControlAllocation/ControlAllocationSequentialDesaturationTest.cpp

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

* Update src/modules/control_allocator/ControlAllocation/ControlAllocationSequentialDesaturationTest.cpp

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

* remove float suffix for logical integers, add missing float suffixes for logical float zeros, and make YAW_MOTORS an int

---------

Co-authored-by: Master Chief <master-chief@the-void.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2024-01-26 15:17:54 +01:00
somebody-once-told-me
3d5c2ef6c4
[control_allocation] small function comment typo fix (#22607)
Co-authored-by: Master Chief <master-chief@the-void.com>
2024-01-08 11:12:06 +01:00
Matthias Grob
3de5c609a4 Differential Rover: PR fixes 2023-12-21 16:27:53 +01:00
PerFrivik
3df71d1837 Differential Rover: Differential drive module & library 2023-12-21 16:27:53 +01:00
Matthias Grob
14c4257a59 ActuatorEffectivenessRotors: Use modern parameter interface for rotor count
This lead to a compiler warning with arm-none-eabi-gcc 12+
about the variable count potentially being a dangling pointer.
2023-12-05 12:06:56 -05:00
PerFrivik
de9074558b Roboclaw: Updated Airframe and fixed left and right mapping error 2023-11-28 16:30:17 +01:00
Matthias Grob
8ea04b0f8f ActuatorEffectivenessHelicopterCoaxial: fix copy paste error in saturation logic 2023-09-28 08:55:06 +02:00
Matthias Grob
8a2d2fb1cd HelicopterCoaxial: only publish unallocated thrust in the saturation case 2023-09-28 08:55:06 +02:00
Matthias Grob
169a0f580d HelicopterCoaxial: correct constraining for minimum 2 swash plate servos 2023-09-28 08:55:06 +02:00
Matthias Grob
20f2df4410 HelicopterCoaxial: handle yaw saturation
This had to be done for the integrators to work at all.
2023-09-28 08:55:06 +02:00
Matthias Grob
cf40d95ef0 HelicopterCoaxial: adjust for coaxial allocation 2023-09-28 08:55:06 +02:00
Matthias Grob
b3b373e074 control_allocator: add coaxial helicopter effectiveness
It's now just a copy of the helicopter such that changes get well
visible in the history.
2023-09-28 08:55:06 +02:00
Matthias Grob
b56e7a036c control_allocator: allow for only 2 swash plate servos
This is required to support fixed pitch propeller helicopters that have
no collective but only cyclic pitch with two degrees of freedom and
hence only two servos.

The amount of thrust in the body z axis is then controlled using the
motor speed which makes particularly sense on coaxial helicopters
that need to control yaw with changing motor speeds already.
2023-09-28 08:55:06 +02:00
Matthias Grob
35b32e8cb0 ActuatorEffectivenessHelicopter: spacing 2023-09-28 08:55:06 +02:00
Matthias Grob
2be687a84c Helicopter: add collective pitch offset to Actuator UI parameters 2023-09-28 08:55:06 +02:00
Matthias Grob
99e2acf89c ActuatorEffectivenessHelicopter: explicitly handle unsaturated case
This became necessary otherwise
the allocation reports saturation all
the time and the rate integrator doesn't work.
2023-09-28 08:53:35 +02:00
Julian Oes
fb30b4d288 control_allocator: Clarify position description
I'm assuming that the rotor positions are given relative to the center
of gravity (CG).

Signed-off-by: Julian Oes <julian@oes.ch>
2023-09-04 08:02:15 +02:00
Silvan Fuhrer
f1b5b4f524
TiltrotorEffectiveness: limit thrust axis tilt to z effectiveness scaling (#21990)
During transition to FF, only allow update thrust axis up to 45° as with a high tilt angle
the effectiveness of the thrust axis in z is apporaching 0, and by that is increasing
the motor output to max.
Transition to HF: disable thrust axis tilting, and assume motors are vertical. This is to avoid
a thrust spike when the transition is initiated (as then the tilt is fully forward).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-08-25 14:45:14 +02:00
Silvan Fuhrer
410206aa5d
Control Allocation: fixes in yaw saturation detection for vehicles with tilt-for-yaw (#21994)
* ActuatorEffectiveness: base yaw saturation on tilt actuator limits (VTOL Tiltrotor)

* ActuatorEffectiveness: add custom yaw saturation for MC Tilt


---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-08-24 13:58:58 +02:00
Silvan Fuhrer
0eb276f273
Tiltrotor: move spin up tilt to control allocation (#21991)
EffectivenessTiltrotor: link time when to tilt motors to MC position to COM_SPOOLUP_TIME
- remove VT_TILT_SPINUP and special spin up tilt handling form the VTOL module
- now handle the spoolup in the allocation, directly linked to COM_SPOOLUP_TIME
- leave tilts at disarmed value during spoolup

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-08-24 13:57:24 +02:00
Beat Küng
03365658d5 VehicleControlMode: add flag_control_allocation_enabled
Allows (external) modes to directly publish actuator_{motors,servos}.
2023-08-21 20:53:51 -04:00
Silvan Fuhrer
eaad11bb74 ActuatorEffectiveness: add comment for 2% magic number to stop motors
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-08-17 13:28:09 +02:00
Matthias Grob
e776aca9ef UUV: stop motors when commanding zero speed 2023-07-10 18:58:37 +02:00
Matthias Grob
6b7aed3d44 Boats: stop motors when commanding zero speed 2023-07-10 18:58:37 +02:00
Matthias Grob
95a35c972d Rovers: stop motors when commanding zero speed 2023-07-10 18:58:37 +02:00
Matthias Grob
0be6069b83 TiltrotorVTOL: allow stopping front tilted motors in fast forward flight 2023-07-10 18:58:37 +02:00
Matthias Grob
66b451e61f TailsitterVTOL: allow explicitly stop forward motor with zero thrust 2023-07-10 18:58:37 +02:00
Matthias Grob
5568afbb12 StandardVTOL: explicitly stop forward motor with zero thrust 2023-07-10 18:58:37 +02:00
Matthias Grob
6b7b34a71a FixedWing: explicitly stop forward motor with zero thrust
This allows PWM and all other output methods to configure
stopped, idling and full thrust points and use them consistently.
The fact that a fixed wing motor can be stopped when zero thrust
is demanded is explicit and could in principle even be disabled.
The mechanism is the same as for a standard VTOL stopping the
multicopter motors in the fixed wing flight phase.
2023-07-10 18:58:37 +02:00
Matthias Grob
2a077181d9 ActuatorEffectiveness: add function to delectively stop motors with zero thrust 2023-07-10 18:58:37 +02:00
Matthias Grob
a36c922fc0 ActuatorEffectivenessHelicopterTest: adapt to new constructor 2023-07-03 16:21:27 +02:00
Beat Küng
77d6c722a7 helicopter: add tail servo support
as a separate CA_AIRFRAME, as the UI cannot switch between servo/motor.
2023-07-03 16:21:27 +02:00
Beat Küng
989d9243b7 fix control_allocator: correct PRINT_MODULE_USAGE_NAME 2023-04-13 07:46:09 +02:00
Matthias Grob
937d27f8ee Helicopter: add offset for yaw compensation based on collective pitch 2023-03-24 07:16:36 +01:00
Silvan Fuhrer
b16f16598b VTOL: remove virtual actuator_controls and instead use virtual torque/thrust topics
MC/FW rate controller and auto tuner: remove actuator_controls

AirshipAttControl: remove actuator_controls

MulticopterLandDetector: remove actuator_controls

mavlink streams vfr_hud and high_latency2: remove actuator_controls

RoverPositionController: remove actuator_controls

UUVAttitudeController: remove actuator_controls

battery: use length of thrust_setpoint for throttle compensation

VehicleMagnetometer: use length of thrust_setpoint for throttle compensation

Signed-off-by: Silvan Fuhrer
2023-03-16 11:55:45 +01:00