23 std::array<double, 3> linvel_pid = { {p_gain, i_gain, d_gain} };
26 double linvel_imin = i_min;
27 double linvel_imax = i_max;
29 #ifdef CONTROL_TOOLBOX_PRE_1_14 30 pid_linvel_x.
initPid(linvel_pid[0], linvel_pid[1], linvel_pid[2], linvel_imax, linvel_imin, node);
31 pid_linvel_y.
initPid(linvel_pid[0], linvel_pid[1], linvel_pid[2], linvel_imax, linvel_imin, node);
32 pid_linvel_z.
initPid(linvel_pid[0], linvel_pid[1], linvel_pid[2], linvel_imax, linvel_imin, node);
34 pid_linvel_x.
initPid(linvel_pid[0], linvel_pid[1], linvel_pid[2], linvel_imax, linvel_imin,
false, node);
35 pid_linvel_y.
initPid(linvel_pid[0], linvel_pid[1], linvel_pid[2], linvel_imax, linvel_imin,
false, node);
36 pid_linvel_z.
initPid(linvel_pid[0], linvel_pid[1], linvel_pid[2], linvel_imax, linvel_imin,
false, node);
42 std::array<double, 3> yawrate_pid = { {p_gain, i_gain, d_gain} };
45 double yawrate_imin = i_min;
46 double yawrate_imax = i_max;
48 #ifdef CONTROL_TOOLBOX_PRE_1_14 49 pid_yaw_rate.
initPid(yawrate_pid[0], yawrate_pid[1], yawrate_pid[2], yawrate_imax, yawrate_imin, node);
51 pid_yaw_rate.
initPid(yawrate_pid[0], yawrate_pid[1], yawrate_pid[2], yawrate_imax, yawrate_imin,
false, node);
60 return Eigen::Vector3d(lin_vel_x, lin_vel_y, lin_vel_z);
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
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