62 bool flag_set =
false;
72 else if (velocity > 0.0)
108 std::string resolved_name;
119 ROS_WARN_NAMED(
"OscillationCritic",
"Parameter min_trans_vel is deprecated. " 120 "Please use the name min_speed_xy or x_only_threshold instead.");
132 const nav_2d_msgs::Twist2D& vel,
133 const geometry_msgs::Pose2D& goal,
134 const nav_2d_msgs::Path2D& global_plan)
165 double sq_dist = x_diff * x_diff + y_diff * y_diff;
199 bool flag_set =
false;
bool hasSignFlipped()
Check whether we are currently tracking a flipped sign.
#define ROS_WARN_NAMED(name,...)
bool update(double velocity)
update internal flags based on the commanded velocity
void debrief(const nav_2d_msgs::Twist2D &cmd_vel) override
double oscillation_reset_dist_
Checks to see whether the sign of the commanded velocity flips frequently.
param_t searchAndGetParam(const ros::NodeHandle &nh, const std::string ¶m_name, const param_t &default_value)
double oscillation_reset_dist_sq_
double oscillation_reset_angle_
bool isOscillating(double velocity)
Check to see whether the proposed velocity would be considered oscillating.
ros::NodeHandle critic_nh_
ros::Time prev_reset_time_
double oscillation_reset_time_
bool setOscillationFlags(const nav_2d_msgs::Twist2D &cmd_vel)
Given a command that has been selected, track each component's sign for oscillations.
bool getParam(const std::string &key, std::string &s) const
CommandTrend theta_trend_
geometry_msgs::Pose2D prev_stationary_pose_
bool hasParam(const std::string &key) const
geometry_msgs::Pose2D pose_
bool searchParam(const std::string &key, std::string &result) const
bool resetAvailable()
Return true if the robot has travelled far enough or waited long enough.
double scoreTrajectory(const dwb_msgs::Trajectory2D &traj) override
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
bool prepare(const geometry_msgs::Pose2D &pose, const nav_2d_msgs::Twist2D &vel, const geometry_msgs::Pose2D &goal, const nav_2d_msgs::Path2D &global_plan) override