#142 Joint one way constraint.

open
nobody
5
2012-09-14
2008-09-16
KxL
No

This patch add new feature to ODE allowing disabling joint constraint forces from being applied to attached bodies. In other words, it is possible to connect two bodies with a joint, but only one will be affected by joint.

Patch adds:
- two new flags for joint:
* dJOINT_NOTCONSTRAINT1
* dJOINT_NOTCONSTRAINT2
- four new joint functions:
* void dJointSetConstraint1 ( dJointID j, int mode )
* void dJointSetConstraint2 ( dJointID j, int mode )
* int dJointGetConstraint1 ( dJointID j )
* int dJointGetConstraint2 ( dJointID j )

An example of usage is chain of rigid bodies, that one of rigid bodies (let say at the top of chain) is disabled from being affected by joints. Disabling for it gravity will result in perfectly pinned body without fixed joint and errors(!). More over, it is possible to move this body in world and chain will follow (see attached example).

Attached you will find patch created on revision 1550 and modified demo_chain1.c that show usage.

Discussion

  • KxL
    KxL
    2008-09-16

    Patch and sample

     
    Attachments
  • KxL
    KxL
    2008-09-16

    small correction to patch

     
    Attachments
  • KxL
    KxL
    2008-09-18

    Added new, more usefull function for setting bodies mode for joints. Naming changes need to be done, but first please, give me some feedback.

     
    Attachments
  • KxL
    KxL
    2008-09-29

    Correction to take into account b2's velocity, when computing b1's velocity and b2 is not constrained.

     
    Attachments