![]() |
ros2_control - rolling
|
Limit joints' position, velocity and acceleration by clamping to their allowed ranges. More...
#include <joint_saturation_limiter.hpp>


Public Member Functions | |
| JointSaturationLimiter () | |
| Constructor. | |
| virtual | ~JointSaturationLimiter () |
| Destructor. | |
| bool | on_init () override |
| Initialize the limiter's internal states and libraries. | |
| bool | on_configure (const JointLimitsStateDataType ¤t_joint_states) override |
| Configure the limiter's internal states and libraries. | |
| 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. | |
| void | reset_internals () override |
| Reset internal states of the limiter. | |
| bool | on_init () |
| Initialize the limiter's internal states and libraries. | |
| bool | on_init () |
| Initialize the limiter's internal states and libraries. | |
| bool | on_enforce (const JointControlInterfacesData &actual, JointControlInterfacesData &desired, const rclcpp::Duration &dt) |
| bool | on_enforce (const trajectory_msgs::msg::JointTrajectoryPoint ¤t_joint_states, trajectory_msgs::msg::JointTrajectoryPoint &desired_joint_states, const rclcpp::Duration &dt) |
Public Member Functions inherited from joint_limits::JointLimiterInterface< JointLimitsStateDataType > | |
| virtual bool | init (const std::vector< std::string > &joint_names, const rclcpp::node_interfaces::NodeParametersInterface::SharedPtr ¶m_itf, const rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr &logging_itf, const std::string &robot_description_topic="/robot_description") |
| Initialize every JointLimiter. | |
| virtual bool | init (const std::vector< std::string > &joint_names, const std::vector< joint_limits::JointLimits > &joint_limits, const std::vector< joint_limits::SoftJointLimits > &soft_joint_limits, const rclcpp::node_interfaces::NodeParametersInterface::SharedPtr ¶m_itf, const rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr &logging_itf) |
| Initialize joints from directly provided names and limits. | |
| virtual bool | init (const std::vector< std::string > &joint_names, const rclcpp::Node::SharedPtr &node, const std::string &robot_description_topic="/robot_description") |
| Initialize joints using a Node pointer. | |
| virtual bool | init (const std::vector< std::string > &joint_names, const rclcpp_lifecycle::LifecycleNode::SharedPtr &lifecycle_node, const std::string &robot_description_topic="/robot_description") |
| Initialize joints using a LifecycleNode pointer. | |
| virtual bool | configure (const JointLimitsStateDataType ¤t_joint_states) |
| virtual bool | enforce (const JointLimitsStateDataType ¤t_joint_states, JointLimitsStateDataType &desired_joint_states, const rclcpp::Duration &dt) |
| Enforce joint limits to desired joint state for multiple physical quantities. | |
Protected Attributes | |
| rclcpp::Clock::SharedPtr | clock_ |
| JointLimitsStateDataType | prev_command_ |
| std::mutex | mutex_ |
Protected Attributes inherited from joint_limits::JointLimiterInterface< JointLimitsStateDataType > | |
| size_t | number_of_joints_ |
| std::vector< std::string > | joint_names_ |
| std::vector< joint_limits::JointLimits > | joint_limits_ |
| std::vector< joint_limits::SoftJointLimits > | soft_joint_limits_ |
| rclcpp::node_interfaces::NodeParametersInterface::SharedPtr | node_param_itf_ |
| rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr | node_logging_itf_ |
Additional Inherited Members | |
Protected Member Functions inherited from joint_limits::JointLimiterInterface< JointLimitsStateDataType > | |
| bool | has_logging_interface () const |
| Checks if the logging interface is set. | |
| bool | has_parameter_interface () const |
| Checks if the parameter interface is set. | |
Limit joints' position, velocity and acceleration by clamping to their allowed ranges.
Since the position, velocity and accelerations are variables in physical relation, it might be that some values are limited lower than specified limit. For example, if a joint is close to its position limit, velocity and acceleration will be reduced accordingly.
|
inlineoverridevirtual |
Configure the limiter's internal states and libraries.
Implementation-specific configuration of limiter's internal states and libraries.
Implements joint_limits::JointLimiterInterface< JointLimitsStateDataType >.
|
overridevirtual |
Enforce joint limits to desired position, velocity and acceleration using clamping.
Class implements this method accepting following data types:
Implementation of saturation approach for joints with position, velocity or acceleration limits and values. First, position limits are checked to adjust desired velocity accordingly, then velocity and finally acceleration. The method supports partial existence of limits, e.g., missing position limits for continuous joints.
| [in] | current_joint_states | current joint states a robot is in. |
| [in,out] | desired_joint_states | joint state that should be adjusted to obey the limits. |
| [in] | dt | time delta to calculate missing integrals and derivation in joint limits. |
| std::runtime_error | if the actual position is out of bounds if commanding position |
Implements joint_limits::JointLimiterInterface< JointLimitsStateDataType >.
|
virtual |
Initialize the limiter's internal states and libraries.
Implementation-specific initialization of limiter's internal states and libraries.
Implements joint_limits::JointLimiterInterface< JointLimitsStateDataType >.
Reimplemented in joint_limits::JointSoftLimiter.
|
virtual |
Initialize the limiter's internal states and libraries.
Implementation-specific initialization of limiter's internal states and libraries.
Implements joint_limits::JointLimiterInterface< JointLimitsStateDataType >.
Reimplemented in joint_limits::JointSoftLimiter.
|
overridevirtual |
Initialize the limiter's internal states and libraries.
Implementation-specific initialization of limiter's internal states and libraries.
Implements joint_limits::JointLimiterInterface< JointLimitsStateDataType >.
Reimplemented in joint_limits::JointSoftLimiter.
|
inlineoverridevirtual |
Reset internal states of the limiter.
This method is called when the controller is stopped or when the controller is reconfigured. It should reset all internal states of the limiter.
Implements joint_limits::JointLimiterInterface< JointLimitsStateDataType >.