Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: what frame is mass_frame in rigid_body?

  1. #1
    Member
    Join Date
    Mar 2009
    Location
    Tokyo, Japan
    Posts
    88

    what frame is mass_frame in rigid_body?

    i've gone over the spec many times, and no where does it say in what coordinate system the mass_frame and velocities are defined in rigid_body and instance_rigid_shape.

    There is a small vague comment on instance_rigid_body:

    Defines the center and orientation of mass of the rigid-body relative to the local origin of the “root” shape.
    What is the "root" shape?!?
    What is the coordinate system of a rigid body?!


    The COLLADA book on page 159 says this:

    The 'parent' is a reference to a <node> in the <visual_scene>, using its id. This allows a physics model to be instantiated under a specific transform node, which will dictate its initial position and orientation......
    So does that mean that all the 'target' attributes in <instance_rigid_body> do not set the initial position and orientation of the rigid_body? do all rigid_body instances start with the identity transformation?!

    any help would be most appreciated, since we don't want to get this wrong
    Rosen Diankov
    Department of Mechano-Informatics, University of Tokyo
    http://openrave.org

  2. #2
    Member
    Join Date
    Mar 2009
    Location
    Tokyo, Japan
    Posts
    88

    Re: what frame is mass_frame in rigid_body?

    hi guys,

    any ideas?

    thanks
    Rosen Diankov
    Department of Mechano-Informatics, University of Tokyo
    http://openrave.org

  3. #3
    Member
    Join Date
    Mar 2009
    Location
    Tokyo, Japan
    Posts
    88

    Re: what frame is mass_frame in rigid_body?

    sorry for being persistent, but it would be really great if we can clear this issue.

    thank you
    rosen,
    Rosen Diankov
    Department of Mechano-Informatics, University of Tokyo
    http://openrave.org

  4. #4
    Member
    Join Date
    Mar 2009
    Location
    Tokyo, Japan
    Posts
    88

    Re: what frame is mass_frame in rigid_body?

    another ping about the mass frame's issue

    thanks
    Rosen Diankov
    Department of Mechano-Informatics, University of Tokyo
    http://openrave.org

  5. #5
    Junior Member
    Join Date
    Sep 2006
    Posts
    16

    Re: what frame is mass_frame in rigid_body?

    I'm not expert on this part. You should read:
    http://en.wikipedia.org/wiki/Center_of_mass
    http://en.wikipedia.org/wiki/Center_of_mass_frame
    And the physics API documentation that they choose to use.

    For the accurate answer read the above pages. For the short answer:
    * The local space where the center of mass of the object is at the origin.
    * Momentum calculations are done in this space so picking axes and scaling or skewing them can effects how external force and torque is applied to the rigid body.

    >>> What is the "root" shape?!?
    >>> What is the coordinate system of a rigid body?

    I think that the physics scene description is like an overlay onto the normal scene hierarchy where the graphics is. So when you define your stuff it is always either relative to what you are attaching to in that other scene, or relative to the parenting container you are in. When you attach to something in the other scene you gain their world space and you define your matrices(frames) relative to those, just like in graphics each animation node is defined in local space relative to their parent's world space (and where world space is computed by the series of local spaces). So the mass frame is relative to the world space of the nearest parent container....just like graphics. It is done this way so that you can move an ancestor's local space and affect your world space and all child world spaces without having to touch tons and tons of objects.

    I'm afraid if that isn't enough you'll want to read a book like Real-Time Rendering. http://www.realtimerendering.com/ or research more on scene graphs and scene hierarchy.

  6. #6
    Member
    Join Date
    Mar 2009
    Location
    Tokyo, Japan
    Posts
    88

    Re: what frame is mass_frame in rigid_body?

    unfortunately it is still unclear what the parent frame is. it could be one of:

    1. instance_rigid_body
    2. instance_rigid_body's node target
    3. physics_model's node parent

    my guess is #3, and all the rigid_body shapes are defined in a flat hierarchy with all sharing the same parent frame. which is opposite of how the node hierarchy works...

    if there was an official example in collada using a complex physics scene, it would help sort these issues out

    what is the "root" shape?
    Rosen Diankov
    Department of Mechano-Informatics, University of Tokyo
    http://openrave.org

  7. #7
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: what frame is mass_frame in rigid_body?

    Quote Originally Posted by rdiankov
    i've gone over the spec many times, and no where does it say in what coordinate system the mass_frame and velocities are defined in rigid_body and instance_rigid_shape.
    I think you mean instance_rigid_body above.

    COLLADA declares most everything in local object coordinate systems so that they are flexible and resuable. In the case of mass_frame, it's in the local origin of its rigid_body, as stated on pdf page 234 of the 1.5 spec..

    Quote Originally Posted by rdiankov
    There is a small vague comment on instance_rigid_body:
    Defines the center and orientation of mass of the rigid-body relative to the local origin of the “root” shape.
    This statement is phrased differently then that for rigid_body (unfortunately), however it is meant to convey the same meaning. The child elements that instance_rigid_body shares with rigid_body are overrides. This is stated on pdf page 214 in general terms.

    Quote Originally Posted by rdiankov
    What is the "root" shape?!?
    The root shape is the union (total volume) of all the shapes of the rigid_body. Since the shapes are in the rigid_body's local coordinate system, the local origin is that coordinate system.

    Quote Originally Posted by rdiankov
    What is the coordinate system of a rigid body?!
    This is defined by the instance_physics_model in which the rigid_body is ultimately instantiated, as you surmise later in this thread. The physics_model by itself has a local coordinate system that through any defaulted instantiation is the visual scene's (world) coordinate system. The parent attribute provides the means to place the physics_model in a node's coordinate system. Please reread the rules for this on pdf page 211.

    Quote Originally Posted by rdiankov
    So does that mean that all the 'target' attributes in <instance_rigid_body> do not set the initial position and orientation of the rigid_body? do all rigid_body instances start with the identity transformation?!
    No, these targets are unidirectional from physics to visuals.

  8. #8
    Member
    Join Date
    Mar 2009
    Location
    Tokyo, Japan
    Posts
    88

    Re: what frame is mass_frame in rigid_body?

    hi mark,

    thanks for the answers. in that case, are we understand that:

    all instance_rigid_body objects of the same instance_physics_model will share the same coordinate system? however with the visual node hierarchy, child nodes have their own coordinate system different from their parent node.

    in that case assume that we have a node1->node2 relationship where node1 is at the origin and node2 is at (0,0,10) in node1's coordinate system. then we also have two rigid bodies: 'body1', 'body2'. 'body1' targets 'node1' and 'body2' targets 'node2'. Both body1 and body2 belong to a instance_physics_model whose parent node is node1. Therefore, body1 and body2 start with node1's coordinate system. And once the physics simulation starts, body2 will set the visual node2 to (0,0,0)?
    Rosen Diankov
    Department of Mechano-Informatics, University of Tokyo
    http://openrave.org

  9. #9
    Member
    Join Date
    Mar 2009
    Location
    Tokyo, Japan
    Posts
    88

    Re: what frame is mass_frame in rigid_body?

    my following question would be:

    How do we make the instance_rigid_body objects start with the same coordinate system as the nodes they are targetting?!

    thanks
    Rosen Diankov
    Department of Mechano-Informatics, University of Tokyo
    http://openrave.org

  10. #10
    Member
    Join Date
    Mar 2009
    Location
    Tokyo, Japan
    Posts
    88

    Re: what frame is mass_frame in rigid_body?

    is there any complete, official collada files of visual scenes with multi-body physics models?
    Rosen Diankov
    Department of Mechano-Informatics, University of Tokyo
    http://openrave.org

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •