52 std::string decel_param =
"decel_lim_" + dimension;
53 if (nh.
hasParam(decel_param))
return;
55 std::string accel_param =
"acc_lim_" + dimension;
56 if (!nh.
hasParam(accel_param))
return;
64 min_vel_x_(0.0), min_vel_y_(0.0), max_vel_x_(0.0), max_vel_y_(0.0), max_vel_theta_(0.0),
65 min_speed_xy_(0.0), max_speed_xy_(0.0), min_speed_theta_(0.0),
66 acc_lim_x_(0.0), acc_lim_y_(0.0), acc_lim_theta_(0.0),
67 decel_lim_x_(0.0), decel_lim_y_(0.0), decel_lim_theta_(0.0),
68 min_speed_xy_sq_(0.0), max_speed_xy_sq_(0.0),
76 moveDeprecatedParameter<double>(nh,
"max_vel_theta",
"max_rot_vel");
77 moveDeprecatedParameter<double>(nh,
"min_speed_xy",
"min_trans_vel");
78 moveDeprecatedParameter<double>(nh,
"max_speed_xy",
"max_trans_vel");
79 moveDeprecatedParameter<double>(nh,
"min_speed_theta",
"min_rot_vel");
87 dsrv_ = std::make_shared<dynamic_reconfigure::Server<KinematicParamsConfig> >(nh);
88 dynamic_reconfigure::Server<KinematicParamsConfig>::CallbackType cb =
90 dsrv_->setCallback(cb);
117 double vmag_sq = x * x + y * y;
121 if (vmag_sq == 0.0 && theta == 0.0)
return false;
void moveDeprecatedParameter(const ros::NodeHandle &nh, const std::string current_name, const std::string old_name)
void reconfigureCB(KinematicParamsConfig &config, uint32_t level)
std::shared_ptr< dynamic_reconfigure::Server< KinematicParamsConfig > > dsrv_
void initialize(const ros::NodeHandle &nh)
bool getParam(const std::string &key, std::string &s) const
bool hasParam(const std::string &key) const
bool isValidSpeed(double x, double y, double theta)
Check to see whether the combined x/y/theta velocities are valid.
void setParam(const std::string &key, const XmlRpc::XmlRpcValue &v) const
void setDecelerationAsNeeded(const ros::NodeHandle &nh, const std::string dimension)
Helper function to set the deceleration to the negative acceleration if it was not already set...