Go to the documentation of this file.00001
00009
00010
00011
00012
00013
00014
00015
00016
00017 #pragma once
00018
00019 #include <array>
00020 #include <control_toolbox/pid.h>
00021 #include <eigen_conversions/eigen_msg.h>
00022
00023 namespace pidcontroller {
00024 class PIDController
00025 {
00026 public:
00027 PIDController();
00028 ~PIDController() {};
00029
00030
00034 void setup_linvel_pid(double p_gain, double i_gain, double d_gain, double i_max, double i_min, const ros::NodeHandle &node);
00035
00039 void setup_yawrate_pid(double p_gain, double i_gain, double d_gain, double i_max, double i_min, const ros::NodeHandle &node);
00040
00041
00045 Eigen::Vector3d compute_linvel_effort(Eigen::Vector3d goal, Eigen::Vector3d current, ros::Time last_time);
00046
00050 double compute_yawrate_effort(double goal, double current, ros::Time last_time);
00051
00052 private:
00053
00054 control_toolbox::Pid pid_linvel_x;
00055 control_toolbox::Pid pid_linvel_y;
00056 control_toolbox::Pid pid_linvel_z;
00057 control_toolbox::Pid pid_yaw_rate;
00058
00059 };
00060 };