[ODE] Getting bodies to follow a path

Russell Bartley russellbartley at kromestudios.com
Wed Aug 8 17:10:49 MST 2007


Hi,
   I'm trying to get a body to follow a path, then if a collision happens let go, and let the body move freely again.

   I've tried setting the position and rotation of the body (bodyA) explicitly (which I think is a bad thing because of the inertias being screwed with). This seems to move the body, but any other body (bodyB) resting on the one I move slides off the object because bodyA thinks it has no inertia because its position was explicitly set.
    I tried setting the linear velocity explicitly, but it didnt seem to work very well, as the bodies resting on bodyA were still  sliding.

    I tried removing the body, and setting the geoms position and rotation, which works ok, but the bodies resting on it think the geoms that I am moving are static (rightly so, since they have no body) and hence do not move with the geoms.

    My latest attempt has been to attach the bodyA to the world via a universal joint, and set the constraints of the 2 axes to zero so the joint doesnt bend. I then move the joint, which does work the best so far. I am having problems convincing the universal joint that it has rotated, and hence sending forces through the joint to the attached body which would rotate it to the desired orientation. This could have problems, as the weight of the bodies resting on the bodyA increases, which would make the universal joint wobble as it attempts to correct the downward force of the objects on it.

    I considered creating a phantom body on the other end of the universal joint, and moved the phantom body around to achieve the rotations I am after, but was worried that the setting of the position and rotation of the phantom body would have the same problem as moving the bodyA in the first place.

    Has anyone else done something like this, and what sort of approach did you use.

    Does anyone have any advice on getting the joint to rotate correctly for me? I've looked at the axis1, axis2, and qrel values, and don't fully understand what they represent in the joint, especially when the joint is used to attach the body to the world. Do I have to have 2 bodies to accuratley rotate the joint?

    Thanks

    Russ



This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ode.org/pipermail/ode/attachments/20070809/ad6eb058/attachment.htm


More information about the ODE mailing list