Skip to content

Commit

Permalink
Fix: Set number of joints in ROS based on YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-mayr committed Oct 31, 2023
1 parent 2b0495c commit 18e2a3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cartesian_impedance_controller_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace cartesian_impedance_controller
std::vector<std::string> joint_names;
if (!nh.getParam("joints", joint_names))
{
ROS_ERROR("Invalid or no joint_names parameters provided, aborting controller init!");
ROS_ERROR("Invalid or no 'joints' parameter provided, aborting controller init!");
return false;
}
for (size_t i = 0; i < joint_names.size(); ++i)
Expand All @@ -70,6 +70,7 @@ namespace cartesian_impedance_controller
}
}
ROS_INFO_STREAM("Number of joints specified in parameters: " << joint_names.size());
this->setNumberOfJoints(joint_names.size());
return true;
}

Expand Down

0 comments on commit 18e2a3f

Please sign in to comment.