mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-09 11:01:36 +08:00
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:
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user