Skip to content

Commit

Permalink
Fix reading joint weights in KDLKinematicsPlugin
Browse files Browse the repository at this point in the history
Signed-off-by: Gaël Écorchard <[email protected]>
  • Loading branch information
galou committed May 6, 2022
1 parent 78574bc commit 58171c1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ void KDLKinematicsPlugin::getJointWeights()
const std::vector<std::string>& active_names = joint_model_group_->getActiveJointModelNames();
std::vector<std::string> names;
std::vector<double> weights;
if (lookupParam(node_, "joint_weights/weights", weights, weights))
if (lookupParam(node_, "joint_weights.weights", weights, weights))
{
if (!lookupParam(node_, "joint_weights/names", names, names) || names.size() != weights.size())
if (!lookupParam(node_, "joint_weights.names", names, names) || (names.size() != weights.size()))
{
RCLCPP_ERROR(LOGGER, "Expecting list parameter joint_weights/names of same size as list joint_weights/weights");
RCLCPP_ERROR(LOGGER, "Expecting list parameter joint_weights.names of same size as list joint_weights.weights");
// fall back to default weights
weights.clear();
}
Expand Down

0 comments on commit 58171c1

Please sign in to comment.