Omni Pos-Ctrl: The maximum dfc thrust is defined as a parameter

- The parameter is shared with the manual mode's maximum horizontal thrust (renamed from OMNI_MAX_HOR_THR to OMNI_DFC_MAX_THR) defined in the mc_att_control module
- The definition for the OMNI_ATT_MODE moved from mc_pos_control module to mc_att_control
- The thrustToAttitude function now has additional omni_dfc_max_thrust parameter
- Test modules are fixed to call the new thrustToAttitude function appropriately
- The code is tested in Gazebo for both manual and (semi-)autonomous modes
This commit is contained in:
Azarakhsh Keipour
2020-01-21 18:23:07 -05:00
parent a655425849
commit 81d554ef71
10 changed files with 80 additions and 62 deletions
@@ -169,10 +169,12 @@ public:
* Get the controllers output attitude setpoint
* This attitude setpoint was generated from the resulting acceleration setpoint after position and velocity control.
* It needs to be executed by the attitude controller to achieve velocity and position tracking.
* @param omni_att_mode attitude mode for omnidirectional vehicles: 0-tilted 1-daisy-chain 2-zero-tilt
* @param omni_att_mode attitude mode for omnidirectional vehicles: 0-tilted 1-min-tilt 2-zero-tilt
* @param omni_dfc_max_thrust maximum direct-force (horizontal) scaled thrust for omnidirectional vehicles
* @param attitude_setpoint reference to struct to fill up
*/
void getAttitudeSetpoint(const int omni_att_mode, vehicle_attitude_setpoint_s &attitude_setpoint) const;
void getAttitudeSetpoint(const int omni_att_mode, const float omni_dfc_max_thrust,
vehicle_attitude_setpoint_s &attitude_setpoint) const;
private:
/**