17#ifndef JOINT_LIMITS__JOINT_LIMITS_HELPERS_HPP_
18#define JOINT_LIMITS__JOINT_LIMITS_HELPERS_HPP_
22#include "joint_limits/data_structures.hpp"
23#include "joint_limits/joint_limits.hpp"
29constexpr double POSITION_BOUNDS_TOLERANCE = 0.002;
31constexpr double OUT_OF_BOUNDS_EXCEPTION_TOLERANCE = 0.0087;
40 const JointControlInterfacesData & desired, JointControlInterfacesData & prev_command);
49bool is_limited(
double value,
double min,
double max);
64 const std::optional<double> & act_vel,
const std::optional<double> & act_pos,
65 const std::optional<double> & prev_command_pos,
double dt);
79 const double & desired_vel,
const std::optional<double> & act_pos,
80 const std::optional<double> & prev_command_vel,
double dt);
94 const std::optional<double> & act_vel,
double );
105 const JointLimits & limits,
double desired_acceleration, std::optional<double> actual_velocity);
Definition data_structures.hpp:38
PositionLimits compute_position_limits(const std::string &joint_name, 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)
Compute the position limits based on the velocity and acceleration limits.
Definition joint_limits_helpers.cpp:106
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)
Compute the velocity limits based on the position and acceleration limits.
Definition joint_limits_helpers.cpp:141
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:202
bool is_limited(double value, double min, double max)
Check if a value is limited by the given limits.
Definition joint_limits_helpers.cpp:104
AccelerationLimits compute_acceleration_limits(const JointLimits &limits, double desired_acceleration, std::optional< double > actual_velocity)
Compute the acceleration limits based on the change in velocity and acceleration and deceleration lim...
Definition joint_limits_helpers.cpp:239
void update_prev_command(const JointControlInterfacesData &desired, JointControlInterfacesData &prev_command)
Update the previous command with the desired command.
Definition joint_limits_helpers.cpp:78
Store joint limits values from YAML definition or URDF <limits> tag.
Definition joint_limits.hpp:36