pid_controller.h
Go to the documentation of this file.
1 
9 /*
10  * Copyright 2015 Nuno Marques.
11  *
12  * This file is part of the mavros package and subject to the license terms
13  * in the top-level LICENSE file of the mavros repository.
14  * https://github.com/mavlink/mavros/tree/master/LICENSE.md
15  */
16 
17 #pragma once
18 
19 #include <array>
20 #include <control_toolbox/pid.h>
22 
23 namespace pidcontroller {
25 {
26 public:
27  PIDController();
29 
30  /* *-* PID Setup *-* */
34  void setup_linvel_pid(double p_gain, double i_gain, double d_gain, double i_max, double i_min, const ros::NodeHandle &node);
35 
39  void setup_yawrate_pid(double p_gain, double i_gain, double d_gain, double i_max, double i_min, const ros::NodeHandle &node);
40 
41  /* *-* Effort computation *-* */
45  Eigen::Vector3d compute_linvel_effort(Eigen::Vector3d goal, Eigen::Vector3d current, ros::Time last_time);
46 
50  double compute_yawrate_effort(double goal, double current, ros::Time last_time);
51 
52 private:
53  // Control toolbox PID controllers
58 
59 };
60 }; // namespace pidcontroller
double compute_yawrate_effort(double goal, double current, ros::Time last_time)
Computes the yaw rate effort to apply.
void setup_yawrate_pid(double p_gain, double i_gain, double d_gain, double i_max, double i_min, const ros::NodeHandle &node)
Sets up the PID values for computation of the yaw rate effort.
control_toolbox::Pid pid_linvel_y
void setup_linvel_pid(double p_gain, double i_gain, double d_gain, double i_max, double i_min, const ros::NodeHandle &node)
Sets up the PID values for computation of the linear velocities effort.
control_toolbox::Pid pid_yaw_rate
control_toolbox::Pid pid_linvel_z
float current
Eigen::Vector3d compute_linvel_effort(Eigen::Vector3d goal, Eigen::Vector3d current, ros::Time last_time)
Computes the linear velocity effort to apply to each axis.
control_toolbox::Pid pid_linvel_x


test_mavros
Author(s): Nuno Marques , Vladimir Ermakov
autogenerated on Tue Jun 1 2021 02:36:42