74 left = std::min(1.0, left);
75 left = std::max(-1.0, left);
76 forwards = std::min(1.0, forwards);
77 forwards = std::max(-1.0, forwards);
124 double new_velocity = velocity;
130 return (new_velocity += acc_stop * factor * delta_time) > -
EPSILON_VELO ? 0 : new_velocity;
133 return new_velocity + acc_pos * factor * delta_time;
137 return (new_velocity += acc_stop * factor * delta_time) <
EPSILON_VELO ? 0 : new_velocity;
140 return new_velocity + acc_pos * factor * delta_time;
146 return (new_velocity += -acc_neg * delta_time) <
EPSILON_VELO ? 0 : new_velocity;
147 else if(velocity < 0)
148 return (new_velocity += acc_neg * delta_time) > -
EPSILON_VELO ? 0 : new_velocity;
double adaptVelocity(double time_delta, double velocity, double factor, double acc_stop, double acc_neg, double acc_pos)
double update_velocity_rate
void publish(const boost::shared_ptr< M > &message) const
void updateInputs(const ros::TimerEvent &t_event)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
Timer createTimer(Rate r, Handler h, Obj o, bool oneshot=false, bool autostart=true) const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
double update_inputs_rate
geometry_msgs::Twist vel_cmd
void updateVelocity(const ros::TimerEvent &t_event)