We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24174a4 commit 4f5d48dCopy full SHA for 4f5d48d
kinematics_interface_kdl/src/kinematics_interface_kdl.cpp
@@ -45,7 +45,19 @@ bool KinematicsInterfaceKDL::initialize(
45
// create kinematic chain
46
KDL::Tree robot_tree;
47
kdl_parser::treeFromString(robot_description, robot_tree);
48
- root_name_ = robot_tree.getRootSegment()->first;
+
49
+ // get root name
50
+ auto base_param = rclcpp::Parameter();
51
+ if (parameters_interface->has_parameter("base"))
52
+ {
53
+ parameters_interface->get_parameter("base", base_param);
54
+ root_name_ = base_param.as_string();
55
+ }
56
+ else
57
58
+ root_name_ = robot_tree.getRootSegment()->first;
59
60
61
if (!robot_tree.getChain(root_name_, end_effector_name, chain_))
62
{
63
RCLCPP_ERROR(
0 commit comments