Files
PX4-Autopilot/src/modules/uuv_pos_control/uuv_pos_control_params.c
T
Tim 540e4f9464 Uuv position control extension (#16688)
* Commit for the Integration of a position controller for the a Underwater vehicle.
This module is an extension of the uuv_att_control to control an Underwater vehicle to any position, given by the SET_POSITION_TARGET_LOCAL_NED which includes x y z yaw.
Since the position control is designed for a 6DOF Robot, the roll and pitch angle are controlled to be 0.
Additionally there is a stabilization control, which holds the robot at a defined depth, and not move in any direction.

In general the idea is to have this position module to control the position of the uuv. The position module reseives the desired position of the uuv and sends appropriate attitude setpoints to the uuv_attitude_control module.

Additionally the mixer file is adapted, to include the 6 different inputs(x y z roll pitch yaw).

* Commit for the Integration of a position controller for the a Underwater vehicle.
This module is an extension of the uuv_att_control to control an Underwater vehicle to any position, given by the SET_POSITION_TARGET_LOCAL_NED which includes x y z yaw.
Since the position control is designed for a 6DOF Robot, the roll and pitch angle are controlled to be 0.
Additionally there is a stabilization control, which holds the robot at a defined depth, and not move in any direction.

In general the idea is to have this position module to control the position of the uuv. The position module receives the desired position of the uuv and sends appropriate attitude setpoints to the uuv_attitude_control module.

Additionally the mixer file is adapted, to include the 6 different inputs(x y z roll pitch yaw).

Currently not solved/missing:
 - Problem with gazebo model(propeller moving chaotically).
 - Mixer correct gazebo vs real life (has to be tested in the future)
 - correct integration in uuv.apps (when choose which module)
 - very basic controller chosen (could be improved a lot in the future)

* Remove error caused by unused variables and a different build error

* added better description of the parameter. Additionally the group is changed.

* added better description of the parameter. Additionally the group is changed.
Fixed bug about parameter

* Added EOF to the files.

* Removed parameter for direct position control for safety reasons.

* small bugfix
2021-02-15 18:40:28 +01:00

98 lines
3.1 KiB
C

/****************************************************************************
*
* Copyright (c) 2013-2020 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file uuv_pos_control_params.c
*
* Parameters defined by the position control task for unmanned underwater vehicles (UUVs)
*
* This is a modification of the fixed wing/ground rover params and it is designed for ground rovers.
* It has been developed starting from the fw module, simplified and improved with dedicated items.
*
* All the ackowledgments and credits for the fw wing/rover app are reported in those files.
*
* @author Tim Hansen <t.hansen@jacobs-university.de>
* @author Daniel Duecker <daniel.duecker@tuhh.de>
*/
/*
* Controller parameters, accessible via MAVLink
*
*/
/**
* Gain of P controller X
*
* @group UUV Position Control
*/
PARAM_DEFINE_FLOAT(UUV_GAIN_X_P, 1.0f);
/**
* Gain of P controller Y
*
* @group UUV Position Control
*/
PARAM_DEFINE_FLOAT(UUV_GAIN_Y_P, 1.0f);
/**
* Gain of P controller Z
*
* @group UUV Position Control
*/
PARAM_DEFINE_FLOAT(UUV_GAIN_Z_P, 1.0f);
/**
* Gain of D controller X
*
* @group UUV Position Control
*/
PARAM_DEFINE_FLOAT(UUV_GAIN_X_D, 0.2f);
/**
* Gain of D controller Y
*
* @group UUV Position Control
*/
PARAM_DEFINE_FLOAT(UUV_GAIN_Y_D, 0.2f);
/**
* Gain of D controller Z
*
* @group UUV Position Control
*/
PARAM_DEFINE_FLOAT(UUV_GAIN_Z_D, 0.2f);
/**
* Stabilization mode(1) or Position Control(0)
*
* @value 0 Position Control
* @value 1 Stabilization Mode
* @group UUV Position Control
*/
PARAM_DEFINE_INT32(UUV_STAB_MODE, 1);