[ODE] Arbitrarily positioning bodies connected by joints

Ignacio García Fernández ignacio.garcia at uv.es
Tue Jul 24 03:02:02 MST 2007


I have done something similar. Here's what I would do:

1. Detach all joints by dJointAttach(jointID,0,0);
2. Move all bodies to an ideal position, where the joints are perfectly 
satisfied, and close to the new position;
3. Attach again all joints;
4. Place all bodies in the new position, and also adapt velocities (rotating 
them).

The tricky point is (2) as a position 'close to the new position' has many 
possibilities, and each election can give different results. Here it comes 
your knowledge about the problem.

I've used this for situations where velocities were low. If you succeed, I'll 
be happy to know about it.

Best regards.

Ignacio

El Saturday 21 July 2007 00:01:45 Shamyl Zakariya escribió:
> Have I asked the question poorly?
>
> I can't imagine that nobody here has ever tried to *move* a
> collection of bodies connected by joints.
>
> In the past, I've just assembled things on the fly at the position
> and orientation I want them to start at, but it seems very useful to
> me to be able to build something at one place, and then arbitrarily
> transform it later.
>
> shamyl at zakariya.net
>      "obviously, you're not a golfer"
>          -- the Dude
>
> On Jul 17, 2007, at 10:44 AM, Shamyl Zakariya wrote:
> > I'm interested in being able to move a set of bodies connected by
> > arbitrary joints. That is to say, I want to be able to assemble them
> > at, for example the origin, and then move the whole thing to some
> > arbitrary position and orientation later. For example I might
> > assemble a "car" and then move it to where I want it to go.
> >
> > I'm able to move all the bodies retaining their positions in relation
> > to one another. But, unfortunately, the joints go bonkers to varying
> > degrees. The best behaved is the ball joint, which ( I guess )
> > considers its position to be relative to the parent. But other
> > joints, such as hinge and slider seem to freak out a little.
> >
> > Just to clarify, when I move the bodies I zero out all forces on
> > them. I've verified that if I move a bunch of bodies that aren't
> > connected by any joints they *do* retain their relative positions
> > correctly. So the issue is that the joints don't seem to enjoy being
> > suddenly moved/oriented.
> >
> > My current approach is simply to not do anything to the joints, and
> > assume (hope) that ode considers their attachment points in the
> > coordinate systems of the bodies they connect. But as I've described,
> > this doesn't really work. I've considered destroying the joints,
> > performing the move, and the re-creating them, but this may change
> > their zero-points since a connected system ( two bodies connected by
> > a "servo", for example ) may have moved before I positioned it.
> >
> > Any suggestions for me?
> >
> > Shamyl Zakariya
> > 	- hobo-raconteur
> >
> >
> >
> > _______________________________________________
> > ODE mailing list
> > ODE at ode.org
> > http://ode.org/mailman/listinfo/ode
>
> _______________________________________________
> ODE mailing list
> ODE at ode.org
> http://ode.org/mailman/listinfo/ode



-- 
May the source be with you                                     
---------------------------------------------------------------
Ignacio García Fernández                  Instituto de Robótica
ignacio.garcia_at_uv.es                 Universidad de Valencia
http://robotica.uv.es/~ignacio/                Tlf. 96 354 3671



More information about the ODE mailing list