Parameters
Basic Parameters
-
bool enabled[not required]
- Default
False
- Brief
Initial state of the controller
-
double controller_frequency[not required]
- Default
10.0
- Brief
Frequency of the controller
-
string tf_prefix[not required]
- Default
‘’
- Brief
Transform Tree prefix
-
string odometry_source
- Default
odometry
- Brief
Odometry topic name
-
string world_link[not required]
- Default
world
- Brief
Transform tree worl link name
-
string cg_link[not required]
- Defeault
cg_link
- Brief
Center of gavity transform tree link name
Control Allocation Parameters
-
string generator_type
- Brief
Defines the control allocation matrix generation method.
Depending on the parameter, it is either auto generated or user defined
- Option
tf
Control allocaiton matrix generated using Transform Tree. If this option is selected, user must define actuator links in the thruster_ids parameter.|- Option
user
User provides the control allocation matrix
-
complex control_allocation_matrix
- Brief
User defined control allocation matrix.
User defines the control allocation matrix as vectors per actuator. Those vectors are so-called contribution vectors.
-
vector<double> [anonymous]
- Brief
Contribution vector for given actuator
\texttt{<actuator\_name>} \leftarrow [\phi, \theta, \psi, u, v, w]
control_allocation_matrix: main: [0.0, 0.0, 0.0, 1.0, 0.0, 0.0] horizontal: [0.0, 0.0, 0.48, 0.0, 1.0, 0.0] vertical: [0.0, 0.39, 0.0, 0.0, 0.0, -1.0]
-
complex control_tf
- Brief
Transform tree link names for actuators
If generator_type parameter is set to tf, the mvp_control will look for actuator links in the transform tree. Transform tree link names is required to generate the control allocaiton matrix.
-
string [anonymous]
- Brief
Trasform tree link name for the actuator
control_tf: main: main_thruster_link horizontal: horizontal_thruster_link vertical: vertical_thruster_link
Actuator Parameters
-
vector<string> thruster_ids
- Brief
Arbitrary names for actuators
The user must declare arbitrary id for actuators. Each thruster has its unique ID. These unique IDs will be used for configuring them. In the rest of the configuration file, those IDs must match.
thruster_ids: - main - horizontal - vertical
-
complex thruster_command_topics
- Brief
Control command topics for each actuator.
Control command for the actuator will be published under the topic defined with this parameter. The topic will publish the control command in std_msgs/Float64 format.
-
string [anonymous]
- Brief
Control commad topic for an actuator
thruster_command_topics: main: control/thruster/main horizontal: control/thruster/horizontal vertical: control/thruster/vertical
-
complex thruster_force_topics
- Brief
Topic for controller force output for each actuator.
This topic will publish requested force from each actuator in Newtons. The topic will publish the control command in std_msgs/Float64 format.
-
string [anonymous]
- Brief
Force topic for an actuator
thruster_force_topics: main: control/force/main horizontal: control/force/horizontal vertical: control/force/vertical
-
complex thruster_polynomials
- Brief
Thrust curve for each thruster
Control allocation computes the demanded force from each actuator. Thrust curves help converting force into control command. This could be a [1100,1900] PWM value or simple [-1.0,1.0] value.
-
vector<float> [anonymous]
- Brief
Thrust curve for thruster defined
For given thrust curve, f(x), thrust polynomial is set as follows.
f(x) = a_n x^n + a_{n-1} x^{n-1} + ... + a_1 x + a_0 \\ \text{Thruster Polynomial} \leftarrow [a_0, a_1, ... ,a_{n-1}, a_n]
thruster_polynomials: main: [0.06165, 20.32, 9.632, 93.05, -2.856, -74.1] horizontal: [0.06165, 20.32, 9.632, 93.05, -2.856, -74.1] vertical: [0.06165, 20.32, 9.632, 93.05, -2.856, -74.1]
thruster_polynomials: {{ Thruster ID }}: [{{a0}, {{a1}}}, ...,{{an}}] {{ Thruster ID }}: [{{a0}, {{a1}}}, ...,{{an}}] ...
-
complex thruster_limits
- Brief
Force limits for each thruster
-
complex [anonymous]
- Brief
Maximum and minimum limits for given thruster
-
float max
- Brief
maximum limit for the given thruster
-
float min
- Brief
minimum limit for the given thruster
thruster_limits: main: max: 40 min: -30 horizontal: max: 20 min: -20 vertical: max: 20 min: -20
Control Law Parameters
-
complex control_modes
- Brief
Control modes with PID gains
-
complex [anonymous]
- Brief
Control mode
Control mode name is given with this parameter. Target degree of freedoms and PID gains described under each control mode. MVP Controller can be configured with more than one control mode.
-
complex [anonymous]
- Brief
Target degree of freedoms and their PID gains
Target degree of freedoms of a control mode with its PID gains. This complex object can only have members that are described in the table below. Each ‘member’ of this complex object contains PID gains.
Target DOFs
Keyword
SNAME Symbol
Position in X axis
x
x
Position in Y axis
y
y
Position in Z axis
z
z
Orientation around X axis
roll
\phi
Orientation around Y axis
pitch
\theta
Orientation around Z axis
yaw
\psi
Linear speed on X axis
surge
u
Linear speed on Y axis
sway
v
Linear speed on Z axis
heave
w
Angular speed around X
roll_rate
\dot{\phi}
Angular speed around Y
pitch_rate
\dot{\theta}
Angular speed around Z
yaw_rate
\dot{\psi}
-
float p
P gain for PID controller
-
float i
I gain for PID controller
-
float d
D gain for PID controller
-
float i_max
Maximum integral value
-
float i_min
Minimum interal value
Example configuration is given in the code snippet below. In the code snippet three control modes are configured. The first control mode is
flight
mode that controls pitch, yaw and surge. Second control mode ishold
that controls x and y. The third and the last contol mode iskill
. This is a special setting that allows user to create control modes that doesn’t control any degree of freedoms. It is particularly useful when creating safety behaviors.Simply put, first indentation after
control_modes
directive starts to create a new control mode. And then the next indentation is to describe target degree of freedoms.control_modes: flight: pitch: {p: 5.0, i: 1.0, d: 2.0, i_max: 10, i_min: -10} yaw: {p: 5.0, i: 0.5, d: 30.0, i_max: 20, i_min: -20} surge: {p: 10.0, i: 3.0, d: 5.0, i_max: 10, i_min: -10} hold: x: {p: 2.0, i: 0.5, d: 1.0, i_max: 10, i_min: -10} y: {p: 2.0, i: 0.5 , d: 1.0, i_max: 10, i_min: -10} kill: false