13 #ifndef KOBUKI_ACCELERATION_LIMITER_HPP_ 14 #define KOBUKI_ACCELERATION_LIMITER_HPP_ 25 #include <ecl/time.hpp> 57 void init(
bool enable_acceleration_limiter
58 ,
double linear_acceleration_max_= 0.5,
double angular_acceleration_max_= 3.5
59 ,
double linear_deceleration_max_=-0.5*1.2,
double angular_deceleration_max_=-3.5*1.2)
77 std::vector<double>
limit(
const std::vector<double> &command) {
return limit(command[0], command[1]); }
79 std::vector<double>
limit(
const double &vx,
const double &wz)
83 ecl::TimeStamp curr_timestamp;
87 double linear_acceleration = ((double)(vx -
last_vx)) / duration;
88 double angular_acceleration = ((double)(wz -
last_wz)) / duration;
113 last_timestamp = curr_timestamp;
118 std::vector<double> ret_val;
double angular_deceleration_max
double angular_acceleration_max
double linear_acceleration_max
std::vector< double > limit(const std::vector< double > &command)
Limits the input velocity commands if gatekeeper is enabled.
std::vector< double > limit(const double &vx, const double &wz)
double linear_deceleration_max
ecl::TimeStamp last_timestamp
An acceleration limiter for the kobuki.
void init(bool enable_acceleration_limiter, double linear_acceleration_max_=0.5, double angular_acceleration_max_=3.5, double linear_deceleration_max_=-0.5 *1.2, double angular_deceleration_max_=-3.5 *1.2)