17#ifndef JOINT_LIMITS__JOINT_SATURATION_LIMITER_HPP_
18#define JOINT_LIMITS__JOINT_SATURATION_LIMITER_HPP_
23#include "joint_limits/data_structures.hpp"
24#include "joint_limits/joint_limiter_interface.hpp"
25#include "rclcpp/clock.hpp"
26#include "rclcpp/duration.hpp"
38template <
typename Jo
intLimitsStateDataType>
50 bool on_configure(
const JointLimitsStateDataType & current_joint_states)
override
52 prev_command_ = current_joint_states;
75 const JointLimitsStateDataType & current_joint_states,
76 JointLimitsStateDataType & desired_joint_states,
const rclcpp::Duration & dt)
override;
86 std::lock_guard<std::mutex> lock(mutex_);
87 prev_command_ = JointLimitsStateDataType();
91 rclcpp::Clock::SharedPtr clock_;
92 JointLimitsStateDataType prev_command_;
96template <
typename Jo
intLimitsStateDataType>
100 clock_ = std::make_shared<rclcpp::Clock>(rclcpp::Clock(RCL_ROS_TIME));
103template <
typename Jo
intLimitsStateDataType>
108template <
typename Jo
intLimitsStateDataType>
Definition joint_limiter_interface.hpp:35
Limit joints' position, velocity and acceleration by clamping to their allowed ranges.
Definition joint_saturation_limiter.hpp:40
JointSaturationLimiter()
Constructor.
Definition joint_saturation_limiter.hpp:97
bool on_enforce(const JointLimitsStateDataType ¤t_joint_states, JointLimitsStateDataType &desired_joint_states, const rclcpp::Duration &dt) override
Enforce joint limits to desired position, velocity and acceleration using clamping.
virtual ~JointSaturationLimiter()
Destructor.
Definition joint_saturation_limiter.hpp:104
bool on_init() override
Initialize the limiter's internal states and libraries.
Definition joint_saturation_limiter.hpp:109
void reset_internals() override
Reset internal states of the limiter.
Definition joint_saturation_limiter.hpp:84
bool on_configure(const JointLimitsStateDataType ¤t_joint_states) override
Configure the limiter's internal states and libraries.
Definition joint_saturation_limiter.hpp:50
Definition data_structures.hpp:39