57inline bool getJointLimits(
const std::string& joint_name,
const std::string& param_ns,
69 const std::string param_base_name = (param_ns.empty() ?
"" : param_ns +
".") +
"joint_limits." + joint_name;
70 if (node->has_parameter(param_base_name +
".has_deceleration_limits"))
80 if (node->has_parameter(param_base_name +
".max_deceleration"))
82 limits.
max_deceleration = node->get_parameter(param_base_name +
".max_deceleration").as_double();
87 node->declare_parameter(param_base_name +
".max_deceleration", std::numeric_limits<double>::quiet_NaN());
91 catch (
const std::exception& ex)
93 RCLCPP_WARN_STREAM(node->get_logger(),
"Failed loading deceleration limits");
bool 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.