18 #ifndef VELOCITY_SMOOTHER_HPP_ 19 #define VELOCITY_SMOOTHER_HPP_ 26 #include <dynamic_reconfigure/server.h> 27 #include <cob_base_velocity_smoother/paramsConfig.h> 28 #include <nav_msgs/Odometry.h> 87 void velocityCB(
const geometry_msgs::Twist::ConstPtr& msg);
88 void robotVelCB(
const geometry_msgs::Twist::ConstPtr& msg);
89 void odometryCB(
const nav_msgs::Odometry::ConstPtr& msg);
91 double sign(
double x) {
return x < 0.0 ? -1.0 : +1.0; };
93 double median(std::vector<double> values) {
95 nth_element(values.begin(), values.begin() + values.size()/2, values.end());
96 return values[values.size()/2];
104 void reconfigCB(cob_base_velocity_smoother::paramsConfig &config, uint32_t unused_level);
ros::Subscriber odometry_sub
void velocityCB(const geometry_msgs::Twist::ConstPtr &msg)
std::vector< double > period_record
enum cob_base_velocity_smoother::VelocitySmoother::RobotFeedbackType robot_feedback
ros::Publisher smooth_vel_pub
ros::Subscriber raw_in_vel_sub
geometry_msgs::Twist last_cmd_vel
dynamic_reconfigure::Server< cob_base_velocity_smoother::paramsConfig >::CallbackType dynamic_reconfigure_callback
geometry_msgs::Twist target_vel
void reconfigCB(cob_base_velocity_smoother::paramsConfig &config, uint32_t unused_level)
dynamic_reconfigure::Server< cob_base_velocity_smoother::paramsConfig > * dynamic_reconfigure_server
geometry_msgs::Twist current_vel
double median(std::vector< double > values)
void robotVelCB(const geometry_msgs::Twist::ConstPtr &msg)
void odometryCB(const nav_msgs::Odometry::ConstPtr &msg)
VelocitySmoother(const std::string &name)
ros::Subscriber current_vel_sub
bool init(ros::NodeHandle &nh)