leggedrobotics / raisimLib

RAISIM, A PHYSICS ENGINE FOR ROBOTICS AND AI RESEARCH
http://www.raisim.com
327 stars 50 forks source link

unable to use getCollisionObj() #5

Closed floodsung closed 5 years ago

floodsung commented 5 years ago

hi, I tried getCollisionObj() but compiled error:

error: ‘raisim::CollisionSet& raisim::ArticulatedSystem::getCollisionObj()’ is protected within this context

how to deal with this problem? Thx

jhwangbo commented 5 years ago

getCollisionBodies() is the public method (doing the same thing). Your IDE should hide the other one. How did you find about that method??

floodsung commented 5 years ago

I found this method in your science paper code. I am trying to obtain the foot contact position. is it possible in current version?

jhwangbo commented 5 years ago

The API changed. SR version is very old and the API was not very stable then. I don't guarantee that my old code runs here. But of course no functionalities are lost and you can do the same with the new API. The collision bodies should give you a non-const list of collision bodies. You can do whatever you want to do with it. If you are trying to reproduce the work and modifying the mass, don't forget to call updateMassInfo() which will keep necessary internal variables up to date.

floodsung commented 5 years ago

Thank you very much.

One more question: what is the functionality of getVisColProps() in your old code? is it the same with the new API: getVisColOb() or getVisColObPose()? thx

jhwangbo commented 5 years ago

it should be the same as getVisColOb()

floodsung commented 5 years ago

Ok, Thank you so much