Skip to content

Commit

Permalink
Fix simple planner enforcing limits on cartesian waypoints that do no…
Browse files Browse the repository at this point in the history
…t have a seed
  • Loading branch information
Levi-Armstrong committed Feb 4, 2024
1 parent 69de947 commit c568056
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tesseract_motion_planners/simple/src/simple_motion_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,13 @@ PlannerResponse SimpleMotionPlanner::solve(const PlannerRequest& request) const
}
else if (mi.getWaypoint().isCartesianWaypoint())
{
Eigen::VectorXd& jp = mi.getWaypoint().as<CartesianWaypointPoly>().getSeed().position;
assert(tesseract_common::satisfiesPositionLimits<double>(jp, joint_limits));
tesseract_common::enforcePositionLimits<double>(jp, joint_limits);
auto& cwp = mi.getWaypoint().as<CartesianWaypointPoly>();
if (cwp.hasSeed())
{
Eigen::VectorXd& jp = cwp.getSeed().position;
assert(tesseract_common::satisfiesPositionLimits<double>(jp, joint_limits));
tesseract_common::enforcePositionLimits<double>(jp, joint_limits);
}
}
else
throw std::runtime_error("Unsupported waypoint type.");
Expand Down

0 comments on commit c568056

Please sign in to comment.