17#ifndef JOINT_LIMITS__JOINT_SOFT_LIMITER_HPP_
18#define JOINT_LIMITS__JOINT_SOFT_LIMITER_HPP_
21#include "joint_limits/data_structures.hpp"
22#include "joint_limits/joint_limits_helpers.hpp"
23#include "joint_limits/joint_saturation_limiter.hpp"
25constexpr double VALUE_CONSIDERED_ZERO = 1e-10;
37 const bool result = (number_of_joints_ == 1);
41 node_logging_itf_->get_logger(),
42 "JointInterfacesSaturationLimiter: Expects the number of joints to be 1, but given : "
52 const rclcpp::Duration & dt)
override;
56 return std::isfinite(soft_joint_limits.min_position) &&
57 std::isfinite(soft_joint_limits.max_position) &&
58 (soft_joint_limits.max_position - soft_joint_limits.min_position) >
59 VALUE_CONSIDERED_ZERO;
64 return has_soft_position_limits(soft_joint_limits) &&
65 std::isfinite(soft_joint_limits.k_position) &&
66 std::abs(soft_joint_limits.k_position) > VALUE_CONSIDERED_ZERO;
bool has_logging_interface() const
Checks if the logging interface is set.
Definition joint_limiter_interface.hpp:248
Definition joint_saturation_limiter.hpp:38
Definition joint_soft_limiter.hpp:31
bool on_enforce(const JointControlInterfacesData &actual, JointControlInterfacesData &desired, const rclcpp::Duration &dt) override
Definition joint_soft_limiter.cpp:22
bool on_init() override
Method is realized by an implementation.
Definition joint_soft_limiter.hpp:35
Definition data_structures.hpp:39
Definition data_structures.hpp:47
Definition joint_limits.hpp:113