first working draft

- produce upward thrust setpoint in vtol_att_control/standard
 - enable spinning motors by never having allocator stop motors

TODO
 - find if this makes it also use the rotors to allocate torques...
     - no, only exactly the thrust of 0.1 makes it to all motor outputs
 - make controllable by param
 - check logs to find good thrust value
This commit is contained in:
Balduin
2026-01-21 17:08:50 +01:00
parent dca9e6e96b
commit 8dd988c733
2 changed files with 12 additions and 1 deletions
@@ -102,7 +102,8 @@ void ActuatorEffectivenessStandardVTOL::setFlightPhase(const FlightPhase &flight
// update stopped motors
switch (flight_phase) {
case FlightPhase::FORWARD_FLIGHT:
_stopped_motors_mask |= _upwards_motors_mask;
// _stopped_motors_mask |= _upwards_motors_mask;
_stopped_motors_mask = 0;
break;
case FlightPhase::HOVER_FLIGHT:
+10
View File
@@ -361,7 +361,17 @@ void Standard::fill_actuator_outputs()
_torque_setpoint_1->xyz[2] = _vehicle_torque_setpoint_virtual_fw->xyz[2];
_thrust_setpoint_0->xyz[0] = _vehicle_thrust_setpoint_virtual_fw->xyz[0];
// simulate toggling some param on and off just to test
const int period_sec = 10;
const int on_sec = 5;
if ((now / 1_s) % period_sec < on_sec) {
_thrust_setpoint_0->xyz[2] = -0.1;
}
// TODO bypass the off motors mask or whatever in the allocator
// OR do it straight from the allocator?
// ActuatorEffectivenessStandardVTOL::setFlightPhase
break;
}