Function joint_limits::getJointLimits(const std::string&, const rclcpp::Node::SharedPtr&, const std::string&, JointLimits&)
Defined in File joint_limits_rosparam.hpp
Function Documentation
-
inline bool joint_limits::getJointLimits(const std::string &joint_name, const rclcpp::Node::SharedPtr &node, const std::string ¶m_ns, JointLimits &limits)
Populate a JointLimits instance from the ROS parameter server.
It is assumed that the following parameter structure is followed on the provided NodeHandle. Unspecified parameters are simply not added to the joint limits specification.
joint_limits: foo_joint: has_position_limits: true min_position: 0.0 max_position: 1.0 has_velocity_limits: true max_velocity: 2.0 has_acceleration_limits: true max_acceleration: 5.0 has_jerk_limits: true max_jerk: 100.0 has_effort_limits: true max_effort: 20.0 bar_joint: has_position_limits: false # Continuous joint has_velocity_limits: true max_velocity: 4.0
This specification is similar to the one used by MoveIt!, but additionally supports jerk and effort limits.
- Parameters:
joint_name – [in] Name of joint whose limits are to be fetched.
node – [in] NodeHandle where the joint limits are specified.
limits – [out] Where joint limit data gets written into. Limits specified in the parameter server will overwrite existing values. Values in
limits
not specified in the parameter server remain unchanged.
- Returns:
True if a limits specification is found (ie. the
joint_limits/joint_name
parameter exists innode
), false otherwise.