57 if (traj->
cost_ >= 0) {
71 double x_diff = pos[0] - prev[0];
72 double y_diff = pos[1] - prev[1];
73 double sq_dist = x_diff * x_diff + y_diff * y_diff;
75 double th_diff = pos[2] - prev[2];
102 bool flag_set =
false;
122 if (fabs(t->
xv_) <= min_vel_trans) {
void resetOscillationFlags()
Reset the oscillation flags for the local planner.
virtual ~OscillationCostFunction()
double cost_
The cost/score of the trajectory.
double oscillation_reset_dist_
double scoreTrajectory(Trajectory &traj)
OscillationCostFunction()
Eigen::Vector3f prev_stationary_pos_
bool setOscillationFlags(base_local_planner::Trajectory *t, double min_vel_trans)
Given a trajectory that's selected, set flags if needed to prevent the robot from oscillating...
double oscillation_reset_angle_
double thetav_
The x, y, and theta velocities of the trajectory.
void resetOscillationFlagsIfPossible(const Eigen::Vector3f &pos, const Eigen::Vector3f &prev)
Holds a trajectory generated by considering an x, y, and theta velocity.
void updateOscillationFlags(Eigen::Vector3f pos, base_local_planner::Trajectory *traj, double min_vel_trans)
void setOscillationResetDist(double dist, double angle)