From: Joschka B. <jos...@am...> - 2008-02-16 09:30:11
|
Hi Sander, thanks for keeping up the work on this! On Feb 16, 2008, at 8:28 AM, Sander van Dijk wrote: > On Sat, Feb 16, 2008 at 12:17 AM, Hedayat Vatankhah > <hed...@ai...> wrote: > Yes, it crashes on my system too. :( > > > :( What version + configure flags of ODE do you use? Weirdly enough, > the three systems we tested it on all have the same version (0.9 + > double precission) and only at one it doesn't work, so was hoping it > was a fluke. The solution I think would be to translate the body to > the center of mass (as also done in the official ODE examples ), Should be the other way round, but I guess that's what you meant ;-) Translate the masses so that the center of the composite mass coincides with the body's origin. One thing I realize is that this seems to be quite a constraint when it comes to realism of the simulation. If you think of an example like a table made up of five bodies: a flat surface on the top, and four legs, e.g. pos_top = (0,0,0)', pos_leg_1 = (-1,-1,-0.5)', pos_leg_2 = (1,-1,-0.5)', pos_leg_3 = (1,1,-0.5)', pos_leg_4 = (-1,1,-0.5)' and mass_top = 0.3, mass_leg_[1,2,3,4] = 0.1 and you assume point masses (which is the default in ODE, IIRC), you calculate the COM as: COM = (pos_top * mass_top + sum_{i=1}^{4} pos_leg_i * mass_leg_i) / (mass_top + sum_{i=1}^{4} mass_leg_i) %%% Latex like notation... Which is the sum of all the positions weighted by their masses divided by the total mass. For this example, you'll get a COM at about (0,0,-0.286), so we need to subtract -0.286 from the z-coordinate of each of the leg masses in order to fulfill the ODE constraint. However, you probably don't want to change the position of the geometries, since then you get a different shape from what you intended. So the collision shape will be correct, but leg masses will be slightly higher than intended. Hopefully, it shouldn't be a big deal, but it's something to keep in mind when thinking about the realism of the robot models. (I hope the example is somewhat understandable... it's much easier to see with a drawing actually...) > but I suspect this messes up joint placement.. It shouldn't be a problem, since you only move the masses, not the body. > I'll have further look into it this weekend. Anyway thanks for > testing! Thanks a lot! Cheers, Joschka |