[ODE] Patch to add a new joint in ODE

Remi Ricard remi.ricard at simlog.com
Fri Apr 13 08:08:28 MST 2007


Hi Thomas,
> Remi Ricard a écrit :
>> Hi,
>>
>> I'm only posting this here to let the developers with svn access know
>> that there is a new patch.I submitted the patch on the sourceforge 
>> website.
>>
>> The patch add a new joint to ODE.
>>
>> The new joint is like a slider joint but the bodies are free to 
>> rotate in one direction. The axis of rotation is the same as the 
>> slider axis.
>>
>> The patch include all the modification to ..h and .cpp files.
>> A simple demo demo_piston.cpp and finally patch for the premake.
>>
>> This is a patch against the latest trunk code (revision 1173).
>>
>> The patch was produced with:
>> cd openode; svn diff joint_piston.patch
>>
>>   
>
> I'm surprised there's no dJointSetPistonAnchor method in the patch you 
> submitted (there's only a dJointSetAxis one
There is no anchor (like the Slider joint). When you attach the joint to 
bodies and offset is calculated and this is what is needed.
For hinge joints and etc there is an anchor since the rotation is done 
w.r.t. the anchor.



>
> Around wich axis ( a point and 3 vects) is computed the rotation? How 
> is it possible to modify this point location?

You can set the axis for the slider part of the joint and this axis is 
the axis of rotation.

You can modify the location by setting your two bodies and then you 
attach and set the axis.

Ex 1)
Set position of body 1 and body 2
Body 1
                        Body2
Attach and set axis
Body1  --------> axis   direction 1,0,0 
                        Body2
body 2 will move w.r.t body1
Body1 --------- ..........................>
                                                    Body2

Ex 2)
Body1
         
                
                      Body2
Attach and set axis
Body1
          \
              \    Axis direction1,-1,0
                 \
                     Body2
Body 2 will move w.r.t body1
Body1
          \
              \
                 \
                    .
                      .
                        .
                           Body2
 

Hope this help


Remi


More information about the ODE mailing list