11 double orient_thres,
double dist_eps,
double orient_eps,
12 double orientation_gain,
double k_1,
double k_2,
double beta,
13 double lambda,
double v_min,
double v_min_movement,
14 double w_min_movement)
44 r_ = distance_to_goal;
104 double atan2_k1_theta = std::atan2(-
k_1_*
theta_, 1.0);
139 return std::min(std::max(value, min), max);
double v_min_movement_
minimum linear base velocity at which we still move [m/s]
virtual void getControlOutput(double &v, double &w)
Get controller result / output after spinning.
double wrapAngle(double a)
double delta_
current heading of the base [rad]
double r_
distance to pose goal [m]
virtual void controlPose()
double dist_eps_
Error in distance above which pose is considered different.
bool verbose_
Enable or disable ros messages.
double k_2_
constant factor applied to the heading error feedback
virtual double enforceMinMax(double &value, double min, double max)
Enforce value to be between min and max.
virtual void controlOrientation(double angle_difference)
double orient_eps_
Error in orientation above which pose is considered different.
double w_
angular base velocity [rad/s]
double w_min_
(current) minimum angular base velocity [rad/s]
double cur_
path to goal curvature
double orientation_gain_
p gain for angle controller
bool pose_reached_
True, if pose has been reached (v == 0, w == 0)
virtual void onGoalReached()
Gets executed when goal is reached, use in child class.
double theta_
direction of the pose goal [rad]
double v_max_
maximum linear base velocity [m/s]
virtual void setInput(double distance_to_goal, double delta, double theta)
Set input of controller. Should be called before each spinOnce.
double w_min_movement_
minimum angular base velocity at which we still move [rad/s]
double v_min_
(current) minimum linear base velocity [m/s]
virtual void calculateControls()
Calculates the controls with the set variables (speed, goal etc.)
void setCurrentLimits(double v_min, double w_min, double v_max, double w_max)
DiffDrivePoseController(std::string name, double v_max, double w_max, double dist_thres=0.01, double orient_thres=0.02, double dist_eps=0.01 *0.2, double orient_eps=0.02 *0.2, double orientation_gain=0.3, double k_1=1.0, double k_2=3.0, double beta=0.4, double lambda=2.0, double v_min=0.01, double v_min_movement=0.01, double w_min_movement=0.01)
#define ROS_INFO_STREAM(args)
double orient_thres_
lower bound for the orientation (w = 0)
double v_
linear base velocity [m/s]
double w_max_
maximum angular base velocity [rad/s]
double dist_thres_
lower bound for the distance (v = 0)
double k_1_
constant factor determining the ratio of the rate of change in theta to the rate of change in r ...
virtual double enforceMinVelocity(double value, double min)
Enforce the minimum velocity.
virtual bool step()
Execute one controller step.