17#ifndef JOINT_LIMITS__JOINT_LIMITS_HELPERS_HPP_
18#define JOINT_LIMITS__JOINT_LIMITS_HELPERS_HPP_
23#include "joint_limits/data_structures.hpp"
24#include "joint_limits/joint_limits.hpp"
30constexpr double POSITION_BOUNDS_TOLERANCE = 0.002;
40bool is_limited(
double value,
double min,
double max);
52 const std::optional<double> & act_pos,
const std::optional<double> & prev_command_pos,
double dt);
65 const double & desired_vel,
const std::optional<double> & act_pos,
66 const std::optional<double> & prev_command_vel,
double dt);
78 const std::optional<double> & act_vel,
double );
89 const JointLimits & limits,
double desired_acceleration, std::optional<double> actual_velocity);
Definition data_structures.hpp:37
VelocityLimits compute_velocity_limits(const std::string &joint_name, const joint_limits::JointLimits &limits, const double &desired_vel, const std::optional< double > &act_pos, const std::optional< double > &prev_command_vel, double dt)
Computes the velocity limits based on the position and acceleration limits.
Definition joint_limits_helpers.cpp:62
EffortLimits compute_effort_limits(const joint_limits::JointLimits &limits, const std::optional< double > &act_pos, const std::optional< double > &act_vel, double)
Computes the effort limits based on the position and velocity limits.
Definition joint_limits_helpers.cpp:120
bool is_limited(double value, double min, double max)
Checks if a value is limited by the given limits.
Definition joint_limits_helpers.cpp:38
AccelerationLimits compute_acceleration_limits(const JointLimits &limits, double desired_acceleration, std::optional< double > actual_velocity)
Computes the acceleration limits based on the change in velocity and acceleration and deceleration li...
Definition joint_limits_helpers.cpp:153
PositionLimits compute_position_limits(const joint_limits::JointLimits &limits, const std::optional< double > &act_vel, const std::optional< double > &act_pos, const std::optional< double > &prev_command_pos, double dt)
Computes the position limits based on the velocity and acceleration limits.
Definition joint_limits_helpers.cpp:40
Definition joint_limits.hpp:35