ros2_control - jazzy
Loading...
Searching...
No Matches
joint_limits::JointSoftLimiter Class Reference
Inheritance diagram for joint_limits::JointSoftLimiter:
Collaboration diagram for joint_limits::JointSoftLimiter:

Public Member Functions

bool on_init () override
 Initialize the limiter's internal states and libraries.
bool on_enforce (const JointControlInterfacesData &actual, JointControlInterfacesData &desired, const rclcpp::Duration &dt) override
 Enforce joint limits for multiple dependent physical quantities.
bool has_soft_position_limits (const joint_limits::SoftJointLimits &soft_joint_limits)
bool has_soft_limits (const joint_limits::SoftJointLimits &soft_joint_limits)
Public Member Functions inherited from joint_limits::JointSaturationLimiter< JointControlInterfacesData >
bool on_enforce (const trajectory_msgs::msg::JointTrajectoryPoint &current_joint_states, trajectory_msgs::msg::JointTrajectoryPoint &desired_joint_states, const rclcpp::Duration &dt)
 JointSaturationLimiter ()
 Constructor.
virtual ~JointSaturationLimiter ()
 Destructor.
bool on_configure (const JointControlInterfacesData &current_joint_states) override
 Configure the limiter's internal states and libraries.
void reset_internals () override
 Reset internal states of the limiter.
Public Member Functions inherited from joint_limits::JointLimiterInterface< JointControlInterfacesData >
virtual bool init (const std::vector< std::string > &joint_names, const rclcpp::node_interfaces::NodeParametersInterface::SharedPtr &param_itf, const rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr &logging_itf, const std::string &robot_description_topic="/robot_description")
 Initialize every JointLimiter.
virtual bool configure (const JointControlInterfacesData &current_joint_states)
virtual bool enforce (const JointControlInterfacesData &current_joint_states, JointControlInterfacesData &desired_joint_states, const rclcpp::Duration &dt)
 Enforce joint limits to desired joint state for multiple physical quantities.

Additional Inherited Members

Protected Member Functions inherited from joint_limits::JointLimiterInterface< JointControlInterfacesData >
bool has_logging_interface () const
 Checks if the logging interface is set.
bool has_parameter_interface () const
 Checks if the parameter interface is set.
Protected Attributes inherited from joint_limits::JointSaturationLimiter< JointControlInterfacesData >
rclcpp::Clock::SharedPtr clock_
JointControlInterfacesData prev_command_
std::mutex mutex_
Protected Attributes inherited from joint_limits::JointLimiterInterface< JointControlInterfacesData >
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_

Member Function Documentation

◆ on_enforce()

bool joint_limits::JointSoftLimiter::on_enforce ( const JointControlInterfacesData & current_joint_states,
JointControlInterfacesData & desired_joint_states,
const rclcpp::Duration & dt )
overridevirtual

Enforce joint limits for multiple dependent physical quantities.

Filter-specific implementation of the joint limits enforce algorithm for multiple dependent physical quantities.

Parameters
[in]current_joint_statescurrent joint states a robot is in.
[in,out]desired_joint_statesjoint state that should be adjusted to obey the limits.
[in]dttime delta to calculate missing integrals and derivation in joint limits.
Returns
true if limits are enforced, otherwise false.
Note
: We use the previous command position to compute the velocity limits here because using the actual position would be too conservative, usually there is a couple of cycles of delay between the command sent to the robot and the robot actually showing that in the state. That effectively limits the velocity with which the joint can be moved which is much lower than the actual velocity limit.

Reimplemented from joint_limits::JointSaturationLimiter< JointControlInterfacesData >.

◆ on_init()

bool joint_limits::JointSoftLimiter::on_init ( )
inlineoverridevirtual

Initialize the limiter's internal states and libraries.

Implementation-specific initialization of limiter's internal states and libraries.

Returns
true if initialization was successful, otherwise false.

Reimplemented from joint_limits::JointSaturationLimiter< JointControlInterfacesData >.


The documentation for this class was generated from the following files: