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