mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
generate grasp pose: store colliding states as infeasible solutions
This way there is no need to do collision checking for this solution again
This commit is contained in:
parent
c3c6d899cb
commit
f247901623
@ -74,7 +74,12 @@ namespace {
|
|||||||
|
|
||||||
state->setJointGroupPositions(jmg, joint_positions);
|
state->setJointGroupPositions(jmg, joint_positions);
|
||||||
state->update();
|
state->update();
|
||||||
return scene->isStateColliding(*state, jmg->getName());
|
if( scene->isStateColliding(*state, jmg->getName()) ){
|
||||||
|
old_solutions->emplace_back();
|
||||||
|
state->copyJointGroupPositions(jmg, old_solutions->back());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user