Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

selfCollision test #19

#1

Hi Prof. Hauser,

I am currently using void GetSelfCollisionPairs(Array2D & collision) and virtual bool SelfCollision(Real distance=0) to detect selfCollision for a given robot model in c++ environment. However, it seems to me that the results given to me from these two functions are not correct. For example, I have the robot's configuration set to be CollisionConfig.JPG
Obviously, self-collision should not be reported. However, virtual bool SelfCollision(Real distance=0) indicates the robot is in self-collision and from the collision list provided from void GetSelfCollisionPairs(Array2D & collision) , links not in collision are said to be in collision for example, these two links are said to be in collision.

6.JPG 11.JPG

So are there some prerequiste functions that should be called in advance to properly enable self-collision detection?

  • replies 1
  • views 2.2K
  • likes 0
#2

GetSelfCollisionPairs returns a matrix of which pairs of links have collisions enabled.

To get the pairs actually colliding, you want to call:
vector<pair<int,int> > pairs;
robot.SelfCollisions(pairs)