I have invested a lot of time trying to modify MPK to use SphereColChecker instead of PQP. This part of the work is a nightmare. Most of the classes are under directory /basic which contains about 5500 lines of code. Functions are interrelated and most of them are kind of 'hardwired' with PQP. If I cannot succed in this week I will better try to modify my old planner code. At least I remember better where are the things. And eventhough my code is not as elegant and efficient as MPK, I need to produce results soon.
As for today, the things are as follows:
* fmstudio calls the planner (let's suppose for now that it is sbl). The planner requieres a free milestone, so, it calls the sampler and the checker. This last part in the one tha concerns me now. In order to check one configuration, the planner creates an object of class mpkSimpleSegment. This object calls function iteration_step(). That function uses an object of the class mpkConfigChecker. The object calls function collision(). This function makes a call to mpkCollDistAlgo::Collision().
* The function mpkCollDistAlgo::Collision() first updates the translation/rotation info on the objects to be checked. Then, it makes a call to the actual low level collision checker. This call, of course depends on the collision checker in use. In my case, now, this function is:
SphereColChecker chk;
ColVector3 t1, t2;
ColMatrix3 r1, r2;
// Update the position/orientation of the objects
for(int i=0;i<3;i++){
t1[i]=T1[i];
t2[i]=T2[i];
}
for(int i=0;i<3;i++)
for(int j=0;j<3;j++){
r1[i][j]=R1[i][j];
r2[i][j]=R2[i][j];
}
o1->SetTransform(r1,t1);
o2->SetTransform(r2,t2);
return chk.CheckCollision(*o1,*o2);However, the computer gets stuck in the call to CheckCollision(). Checking the values of the position/rotation information, they seem to be ok. So, the problem is either on the models that I am passing to the SphereCollisionChecker (SCC) or on the library. For obvious reasons, I would go to check first the models.