-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CheckLinkSelfCollision and CheckEndEffectorCollision #1443
Open
snozawa
wants to merge
23
commits into
production
Choose a base branch
from
fixGrabbedSelfCollisionCheckInOtherAPIs
base: production
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ed variables. 2) remove unused kinbodysaver from the first overload function. 3) remove linksaver, since it will not be necessary when _CheckGrabbedBodiesSelfCollision will be used.
…fCollsionCheck overload. In addition, keep the plink transform for grabbed bodies checking.
…ion checking context. So far, we supply vindependentlinks. Although we can do that by both inclusive links and exclusive links, introduce inclusive links here because we can just use vindependent links in CheckEndEffectorSelfCollisionCheck function
…ing ilinkindex. - Issue - In the previous implementation, Manipulator::CheckEndEffectorCollision with bIgnoreManipulatorLinks does not properly consider the conditions which CheckStandaloneSelfCollision covers. - For example, isSelfCollisionIgnored or adjacent links is not considered at all. - In addition, the code itself looks duplicated. - Resolution. - CheckLinkSelfCollision with specifying ilinkindex supports vector of included links. if empty, consider all possible pairs. if not empty, check links only in included links. - In the collisionchecker.h, there are both excluded links and included links. In this particular case, Manipulator::CheckEndEffectorCollision computes included links as vindependentinks and using it is convenient.
snozawa
force-pushed
the
fixGrabbedSelfCollisionCheckInOtherAPIs
branch
from
January 5, 2025 14:52
cd89346
to
3850b85
Compare
…ollisionCheckInOtherAPIs
…nts of vector is already different according to bIgnoreManipulatorLinks
snozawa
changed the title
WIP: Fix grabbed self collision check in other APIs
Fix CheckLinkSelfCollision and CheckEndEffectorCollision
Jan 6, 2025
…ollisionCheckInOtherAPIs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
KinBody::CheckLinkSelfCollision
andManipulator::CheckEndEffectorCollision
, which are mostly used from IK related code path.Bug fix 1
KinBody::CheckLinkSelfCollision
functions have a code trying to handle grabbed bodies.CheckCollision(KinBody, KinBody)
, and it ignores the collision checking between two bodies attached each other.openrave/src/libopenrave/kinbodycollision.cpp
Line 464 in d1b75e6
CheckSelfCollision
.CheckSelfCollision
andCheckLinkSelfCollision
.CheckLinkSelfCollision
use cases:openrave/src/libopenrave/kinbodycollision.cpp
Line 454 in d1b75e6
openrave/src/libopenrave/kinbodycollision.cpp
Line 463 in d1b75e6
Bug fix 2
bIgnoreManipulatorLinks=true
is specified :openrave/src/libopenrave/robotmanipulator.cpp
Lines 1147 to 1155 in d1b75e6
CheckLinkSelfCollision
as other code path.Bug fix 3
Manipulator::CheckEndEffectorSelfCollision
is implemented hand-made link-link collision checking ifbIgnoreManipulatorLinks=true
is specified :openrave/src/libopenrave/robotmanipulator.cpp
Lines 1147 to 1155 in d1b75e6
isSelfCollisionIgnored
and adjacent links.vIncludedLinks
arguments to one of theCollisionCheckerBase::CheckStandaloneSelfCollision
overload, which takesplink
from the argument. Accordingly, add the same argument toKinBody::CheckLinkSelfCollision
as well.CheckEndEffectorSelfCollision
side. But, it's hard to maintain. So, better to support included links inKinBody::CheckLinkSelfCollision
.CollisionCheckerBase
. In these two, I used included links in this PR, since the included link in this situation can be easily computed fromGetIndependentLinks
of manipulator.Misc improvements
CheckEndEffectorSelfCollision
andCheckLinkSelfCollision
have duplicated codes. Reduce it by introducing common functions.