Skip to content

Commit 0827a0d

Browse files
mechwizrhaschke
authored andcommitted
JointInterpolationPlanner: Check joint bounds (moveit#505)
1 parent d0a904c commit 0827a0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/solvers/joint_interpolation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ bool JointInterpolationPlanner::plan(const planning_scene::PlanningSceneConstPtr
7575

7676
// add first point
7777
result->addSuffixWayPoint(from->getCurrentState(), 0.0);
78-
if (from->isStateColliding(from_state, jmg->getName()))
78+
if (from->isStateColliding(from_state, jmg->getName()) || !from_state.satisfiesBounds(jmg))
7979
return false;
8080

8181
moveit::core::RobotState waypoint(from_state);
@@ -84,13 +84,13 @@ bool JointInterpolationPlanner::plan(const planning_scene::PlanningSceneConstPtr
8484
from_state.interpolate(to_state, t, waypoint);
8585
result->addSuffixWayPoint(waypoint, t);
8686

87-
if (from->isStateColliding(waypoint, jmg->getName()))
87+
if (from->isStateColliding(waypoint, jmg->getName()) || !waypoint.satisfiesBounds(jmg))
8888
return false;
8989
}
9090

9191
// add goal point
9292
result->addSuffixWayPoint(to_state, 1.0);
93-
if (from->isStateColliding(to_state, jmg->getName()))
93+
if (from->isStateColliding(to_state, jmg->getName()) || !to_state.satisfiesBounds(jmg))
9494
return false;
9595

9696
auto timing = props.get<TimeParameterizationPtr>("time_parameterization");

0 commit comments

Comments
 (0)