#169 Fix for dMassSetTrimesh which uses wrong triangle transform

None
closed
nobody
Bug Fix (53)
5
2014-02-04
2010-11-05
wITTus
No

The moment of inertia for a geom should be calculated on the basis of its local center of reference and not of the center of the world. dMassSetTrimesh brought us weird simulation behaviour when simply adding and removing Geoms of a Body while at different world positions (which was the only difference between those geoms) when calculating the moment of inertia. I believe the reason is that dMassSetTrimesh uses FetchTriangleCount which calls dGeomGetPosition and dGeomGetRotation which means that world transform is used because the position of its attached body gets added to the result. I was able to fix the wrong behaviour by using dGeomGetOffsetPosition and dGeomGetOffsetRotation in FetchTriangleCount.

Discussion

  • wITTus

    wITTus - 2010-11-05
     
  • Daniel K. O.

    Daniel K. O. - 2014-02-04
    • status: open --> closed
    • Group: --> None
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks