From: Will B. <bos...@mi...> - 2012-05-21 18:32:59
|
Hi Bill, I do not understand your initial assumption not to use joints. Fixed joints are very straightforward to implement, and I believe are stiff to the extent that the global ERP and CFM integrator parameters are stiff. What documentation suggests not to use joints? I'd like to see it. Based on what I know about your problem and ODE, if in your shoes i would stick to a one-to-one mass and body implementation and use fixed joints to sew the complex body together. I am pretty sure that bodies can be rotated with body.setRotation(r), for instance as in http://monsterden.net/software/ragdoll-pyode-tutorial (string search setRotation there). best, Will On Sat, May 19, 2012 at 8:23 PM, Bill Call <we...@pr...> wrote: > Hi : > > I'm trying to build a rigid-body simulation using PyODE/PyOpenGL. Since > I'm just doing rigid-body, it is my understanding that I have no need > for joints; I just need to add masses to my body at the appropriate > translations/rotations. > > I have a number of cylindrical masses in my body. These cylinders have > fixed positions and rotations within the body, but are not necessarily > aligned with the X, Y or Z axis. PyODE does not bind the rotateMass() > function from ODE; it only allows me to specify an X, Y or Z orientation > for cylindrical mass (at creation time). This means that I am unable to > rotate my cylindrical masses to the correct orientation. > > My guess is that this would not be a problem if each of these masses had > their own Body; I could just rotate the body after the mass was bound. > Doing doing it that way might work, but it would mean connecting the > cylinders to the main body via joints, and what little documentation > there is seems to contraindicate the use of joints for rigid-body > simulations. > > My questions are as follows: > > 1) Am I correct in my assumption that I must rotate/translate the mass > tensor to reflect the true location/orientation of my cylindrical masses > within the containing body? It seems (to me) to be intuitively obvious > that I do, but I don't put much stock in my intuition regarding this > subject. > > 2) If the answer to (1) is "yes", then can anybody point me a rotation > implementation? If "no", then would someone be willing to explain why not? > > I have already spent a lot of time Googling about for this information, > but I am not sufficiently grounded in the subject to really understand > the answers I have been able to find on my own; not well enough to write > a function to rotate inertial tensors, anyway. > > Thanks in Advance, > > > Bill Call > > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Pyode-user mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyode-user |