diff --git a/tesseract_motion_planners/core/src/utils.cpp b/tesseract_motion_planners/core/src/utils.cpp index f8e2da6834a..9705348d93a 100644 --- a/tesseract_motion_planners/core/src/utils.cpp +++ b/tesseract_motion_planners/core/src/utils.cpp @@ -318,7 +318,7 @@ bool contactCheckProgram(std::vector& con // Grab the first waypoint to get the joint names const auto& joint_names = getJointNames(mi.front().get().as().getWaypoint()); traj_contacts = - std::make_unique(joint_names, static_cast(program.size())); + std::make_unique(joint_names, static_cast(mi.size())); } contacts.clear(); @@ -625,7 +625,7 @@ bool contactCheckProgram(std::vector& con // Grab the first waypoint to get the joint names const auto& joint_names = getJointNames(mi.front().get().as().getWaypoint()); traj_contacts = - std::make_unique(joint_names, static_cast(program.size())); + std::make_unique(joint_names, static_cast(mi.size())); } contacts.clear();