36 if (!urdf_joint || !urdf_joint->limits)
41 limits.has_position_limits =
42 urdf_joint->type == urdf::Joint::REVOLUTE || urdf_joint->type == urdf::Joint::PRISMATIC;
43 if (limits.has_position_limits)
45 limits.min_position = urdf_joint->limits->lower;
46 limits.max_position = urdf_joint->limits->upper;
49 if (!limits.has_position_limits && urdf_joint->type == urdf::Joint::CONTINUOUS)
51 limits.angle_wraparound =
true;
54 limits.has_velocity_limits =
true;
55 limits.max_velocity = urdf_joint->limits->velocity;
57 limits.has_acceleration_limits =
false;
59 limits.has_effort_limits =
true;
60 limits.max_effort = urdf_joint->limits->effort;
73 if (!urdf_joint || !urdf_joint->safety)
78 soft_limits.min_position = urdf_joint->safety->soft_lower_limit;
79 soft_limits.max_position = urdf_joint->safety->soft_upper_limit;
80 soft_limits.k_position = urdf_joint->safety->k_position;
81 soft_limits.k_velocity = urdf_joint->safety->k_velocity;
bool getJointLimits(const std::string &joint_name, const rclcpp::Node::SharedPtr &node, JointLimits &limits)
Populate a JointLimits instance from the ROS parameter server.
Definition joint_limits_rosparam.hpp:61
bool getSoftJointLimits(const std::string &joint_name, const rclcpp::Node::SharedPtr &node, SoftJointLimits &soft_limits)
Populate a SoftJointLimits instance from the ROS parameter server.
Definition joint_limits_rosparam.hpp:219