RoverPosControl: Using torque setpoint directly as steering input

- Although the discussion is still ongoing: https://github.com/PX4/PX4-Autopilot/pull/20082#discussion_r962169411
- The original code would cause quick saturation in the steering input,
as it doesn't even have a conecpt of time
- So using direct mapping for now, but we can revert this back and find
the correct solution
This commit is contained in:
Junwoo Hwang
2022-12-12 17:24:19 +01:00
committed by Jaeyoung Lim
parent 1cccfb0ddf
commit d58cad456b
@@ -469,7 +469,10 @@ RoverPositionControl::control_rates(const vehicle_angular_velocity_s &rates, con
const matrix::Vector3f torque = _rate_control.update(vehicle_rates, rates_setpoint, angular_acceleration, dt,
lock_integrator);
_steering_input = math::constrain(_steering_input + torque(2), -1.0f, 1.0f);
// Direct mapping from torque setpoint to steering
_steering_input = math::constrain(torque(2), -1.0f, 1.0f);
// _steering_input = math::constrain(_steering_input + torque(2), -1.0f, 1.0f);
_act_controls.control[actuator_controls_s::INDEX_YAW] = _steering_input;