mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 14:53:34 +08:00
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:
+2
-1
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user