Skip to content

Commit

Permalink
Fixes bug that grabbed body is not checked for collision if grabbing …
Browse files Browse the repository at this point in the history
…link is disabled
  • Loading branch information
Puttichai committed Dec 14, 2023
1 parent 85fe60b commit 7119430
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/libopenrave/robotmanipulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -912,9 +912,11 @@ bool RobotBase::Manipulator::CheckEndEffectorCollision(CollisionReportPtr report

FOREACHC(itlink, probot->GetLinks()) {
int ilink = (*itlink)->GetIndex();
if( !(*itlink)->IsEnabled() ) {
continue;
}
// Do not skip the iteration even if the link is not enabled since the link can be grabbing stuff that is
// enabled. CheckLinkCollision will take care if the fact that this link is not enabled.
// if( !(*itlink)->IsEnabled() ) {
// continue;
// }
// gripper needs to be affected by all joints
bool bGripperLink = true;
FOREACHC(itarmdof,__varmdofindices) {
Expand Down Expand Up @@ -972,9 +974,11 @@ bool RobotBase::Manipulator::_CheckEndEffectorCollision(const Transform& tEE, Ki

FOREACHC(itlink, probot->GetLinks()) {
int ilink = (*itlink)->GetIndex();
if( !(*itlink)->IsEnabled() ) {
continue;
}
// Do not skip the iteration even if the link is not enabled since the link can be grabbing stuff that is
// enabled. CheckLinkCollision will take care if the fact that this link is not enabled.
// if( !(*itlink)->IsEnabled() ) {
// continue;
// }
// gripper needs to be affected by all joints
bool bGripperLink = true;
FOREACHC(itarmdof,__varmdofindices) {
Expand Down

0 comments on commit 7119430

Please sign in to comment.