[Robotics] Linked group and rigid body constraints - problem.

Benoit Bolsee benoit.bolsee at online.be
Sat Mar 13 22:48:58 CET 2010


The wrong position of the center of mass is indeed a problem of the
compound object, but you should be able to work around that. You can
define an empty object that will get the total mass of the L shape
object and will be at the center of mass. Give this object a rigid body
property and a sphere shape of small size, enough to be completely
hidden in the L shape.  Make this object compound and attach to it the
two box object forming the parts of the L shape. The fact that various
parts of this object interpenetrate shouldn't be a problem

The result should be an object with approximately the correct physical
behavior. The approximation is in the inertia that is computed from the
Aabb size (the maximum rectangular extend) and not the actual shape.

Btw, did you try simply to use mesh shape? I made a simple demo showing
the compound construction and the mesh shape object, both behave
properly (blender 2.5!): http://www.pasteall.org/blend/2149

Mesh shape tend to be less stable than simple box shape. I don't know if
they will behave properly when there are many of them.

/benoit

> -----Original Message-----
> From: robotics-bounces at blender.org 
> [mailto:robotics-bounces at blender.org] On Behalf Of Morten Lind
> Sent: mercredi 10 mars 2010 22:28
> To: Blender and Robotics
> Subject: Re: [Robotics] Linked group and rigid body 
> constraints - problem.
> 
> 
> Thanks for replying, Benoit. 
> 
> Yes, I did experiment with the compounding. One immediate 
> issue with it is 
> that of the center of mass. One of the arms of the L-shape 
> must be the rigid 
> body, and the center of mass will be at that rigid body's center. 
> 
> If the center of mass is placed inside one of the arms, the 
> motion will be 
> weird and un-realistic. This will be apparent if letting a 
> bunch of Ls fall 
> into a box.
> 
> If trying to place the center of the rigid body between the 
> arms, where the 
> real physical center of mass is, and then trying to stack the 
> Ls side by side, 
> there will be a collision of the center of mass with one of 
> the arms of the L 
> lying "inside" it.
> 
> However, it seems that, otherwise, the collision and such works ...
> 
> Best,
> Morten Lind.
> 
> On Wednesday 10 March 2010 21:04:50 Benoit Bolsee wrote:
> > Did you try compound shape instead of constraint?
> > 
> > Compound is easy to setup and allows to create a complex rigid body 
> > made of several simpler elements based on parent-child relationship.
> > 
> > Starting from the two objects that form the L-shape, you make one 
> > parent of the other, select rigid body for the parent, 
> static for the 
> > child, choose an appropriate collision shape for each and enable 
> > compound on both. The parent will combine the shape of 
> child and you 
> > should get the same effect as with the constraint. As far 
> as I know, 
> > this setup should work with linked library.
> > 
> > /Benoit
> > 
> > > -----Original Message-----
> > > From: robotics-bounces at blender.org 
> > > [mailto:robotics-bounces at blender.org] On Behalf Of Morten Lind
> > > Sent: vendredi 26 février 2010 8:48
> > > To: Blender and Robotics
> > > Subject: [Robotics] Linked group and rigid body constraints - 
> > > problem.
> > >
> > >
> > > Hi all
> > >
> > >  Background: In a manufacturing simulation I use a lot of work 
> > > pieces which are handled by robots an transported by 
> AGVs, as well 
> > > as hung on conveyor
> > > carriers for painting. A very simple workpiece is an
> > > L-shaped, square cross
> > > section aluminium tube; a part of an office chair.
> > >
> > >  Having many such workpieces, like 100s, it is practical 
> to make it 
> > > in a group and then link all others, possibly from an external
> > > .blend-"library". Due to
> > > the non-convex nature of the L-shape, and the fact that this
> > > non-convexity is
> > > exploited in stacking the workpieces, I wish to model it as
> > > two box-shaped
> > > rigid bodies, each bounded by "box". These rigid bodies are
> > > invisible, and one
> > > should be doubly hinged to the other. To one of these, all
> > > other geometric
> > > parts are attached, notably a non-colliding object
> > > representing the actual
> > > geometric shape of the workpiece, and a small invisible cube
> > > for a gripper
> > > tool to sense contact with.
> > >
> > >  The method and the structure of the L-shaped compound works 
> > > splendid, so that I get a very fine and realistic scenario if the 
> > > work piece is dropped into a
> > > box with other parts or dropped on top of an AGV. This can be
> > > verified when
> > > douplicating the group directly, creating a couple of workpieces.
> > >
> > >  However, when linking the group to make linked 
> duplicates, it seems 
> > > that the constraints disappear, and the two rigid bodies just
> > > separates. Trying out
> > > another method where everything is parented to the "master"
> > > rigid body does
> > > not work, since the other rigid body will then have a parent
> > > and not move;
> > > dynamics for a rigid body with a parent seems to totally
> > > disable dynamics for
> > > that body. Trying to mend this parenting-problem by
> > > un-parenting and replacing
> > > by a couple of hinge-constraints on start-up does not alter
> > > the immobility of
> > > the rigid body that was born with a parent.
> > >
> > >  I have been trying various ways to solve the problem for 
> some days 
> > > now. I have searched a lot on Blender Artists, as well as 
> generally
> > > with Google, and
> > > I have read a lot of docs and examples. Nothing seems to even
> > > hint on the
> > > existence of this problem. If anyone has any suggestions on
> > > how to solve it,
> > > it would be received warm-heartedly by me! Alternatively, but
> > > not preferably,
> > > if anyone could inform me that this is un-acheivable with
> > > Blender 2.49b and
> > > it's game engine, I would be grateful for that information,
> > > and settle with
> > > what I can get then.
> > >
> > >  Best regards,
> > >  Morten Lind. _______________________________________________
> > > Robotics mailing list
> > > Robotics at blender.org
> > > http://lists.blender.org/mailman/listinfo/robo> tics
> > 
> > _______________________________________________
> > Robotics mailing list
> > Robotics at blender.org 
> > http://lists.blender.org/mailman/listinfo/robotics
> > 
> _______________________________________________
> Robotics mailing list
> Robotics at blender.org 
> http://lists.blender.org/mailman/listinfo/robo> tics
> 



More information about the Robotics mailing list