Module ode
[show private | hide private]
[frames | no frames]

Module ode

Python Open Dynamics Engine (ODE) wrapper.

This module contains classes and functions that wrap the functionality of the Open Dynamics Engine (ODE) which can be found at http://opende.sourceforge.net.

There are the following classes and functions: Joint classes: Geom classes: Functions:
Classes
AMotor AMotor joint.
BallJoint Ball joint.
Body The rigid body class encapsulating the ODE body.
Contact This class represents a contact between two bodies in one point.
ContactJoint Contact joint.
FixedJoint Fixed joint.
GeomBox Box geometry.
GeomCapsule Capped cylinder geometry.
GeomCCylinder Capped cylinder geometry.
GeomCylinder Plain cylinder geometry.
GeomObject This is the abstract base class for all geom objects.
GeomPlane Plane geometry.
GeomRay Ray object.
GeomSphere Sphere geometry.
GeomTransform GeomTransform.
GeomTriMesh TriMesh object.
HashSpace Multi-resolution hash table space.
Hinge2Joint Hinge2 joint.
HingeJoint Hinge joint.
Joint Base class for all joint classes.
JointGroup Joint group.
LMotor LMotor joint.
Mass Mass parameters of a rigid body.
Plane2DJoint Plane-2D Joint.
QuadTreeSpace Quadtree space.
SimpleSpace Simple space.
SliderJoint Slider joint.
SpaceBase Space class (container for geometry objects).
TriMeshData This class stores the mesh data.
UniversalJoint Universal joint.
World Dynamics world.
_SpaceIterator Iterates over the geoms inside a Space.

Function Summary
bool areConnected(body1, body2)
Return True if the two bodies are connected together by a joint, otherwise return False.
  CloseODE()
Deallocate some extra memory used by ODE that can not be deallocated using the normal destroy functions.
contacts collide(geom1, geom2)
Generate contact information for two objects.
  collide2(geom1, geom2, arg, callback)
Calls the callback for all potentially intersecting pairs that contain one geom from geom1 and one geom from geom2.
  Space(...)
Space factory function.

Variable Summary
int AMotorEuler = 1                                                                     
int AMotorUser = 0                                                                     
int ContactApprox0 = 0                                                                     
int ContactApprox1 = 12288                                                                 
int ContactApprox1_1 = 4096                                                                  
int ContactApprox1_2 = 8192                                                                  
int ContactBounce = 4                                                                     
int ContactFDir1 = 2                                                                     
int ContactMotion1 = 32                                                                    
int ContactMotion2 = 64                                                                    
int ContactMu2 = 1                                                                     
int ContactSlip1 = 128                                                                   
int ContactSlip2 = 256                                                                   
int ContactSoftCFM = 16                                                                    
int ContactSoftERP = 8                                                                     
NoneType environment = None                                                                  
float Infinity = 1.7976931348623157e+308                                               
int paramBounce = 5                                                                     
int ParamBounce = 5                                                                     
int ParamBounce2 = 261                                                                   
int ParamBounce3 = 517                                                                   
int ParamCFM = 6                                                                     
int paramCFM = 6                                                                     
int ParamCFM2 = 262                                                                   
int ParamCFM3 = 518                                                                   
int ParamFMax = 3                                                                     
int paramFMax = 3                                                                     
int ParamFMax2 = 259                                                                   
int ParamFMax3 = 515                                                                   
int ParamFudgeFactor = 4                                                                     
int paramFudgeFactor = 4                                                                     
int ParamFudgeFactor2 = 260                                                                   
int ParamFudgeFactor3 = 516                                                                   
int ParamGroup = 256                                                                   
int ParamHiStop = 1                                                                     
int paramHiStop = 1                                                                     
int ParamHiStop2 = 257                                                                   
int ParamHiStop3 = 513                                                                   
int paramLoStop = 0                                                                     
int ParamLoStop = 0                                                                     
int ParamLoStop2 = 256                                                                   
int ParamLoStop3 = 512                                                                   
int paramStopCFM = 8                                                                     
int ParamStopCFM = 8                                                                     
int ParamStopCFM2 = 264                                                                   
int ParamStopCFM3 = 520                                                                   
int ParamStopERP = 7                                                                     
int paramStopERP = 7                                                                     
int ParamStopERP2 = 263                                                                   
int ParamStopERP3 = 519                                                                   
int paramSuspensionCFM = 10                                                                    
int ParamSuspensionCFM = 10                                                                    
int ParamSuspensionCFM2 = 266                                                                   
int ParamSuspensionCFM3 = 522                                                                   
int ParamSuspensionERP = 9                                                                     
int paramSuspensionERP = 9                                                                     
int ParamSuspensionERP2 = 265                                                                   
int ParamSuspensionERP3 = 521                                                                   
int paramVel = 2                                                                     
int ParamVel = 2                                                                     
int ParamVel2 = 258                                                                   
int ParamVel3 = 514                                                                   
dict _geom_c2py_lut = {}

Function Details

areConnected(body1, body2)

Return True if the two bodies are connected together by a joint, otherwise return False.
Parameters:
body1 - First body
           (type=Body)
body2 - Second body
           (type=Body)
Returns:
True if the bodies are connected
           (type=bool)

CloseODE()

Deallocate some extra memory used by ODE that can not be deallocated using the normal destroy functions.

collide(geom1, geom2)

Generate contact information for two objects.

Given two geometry objects that potentially touch (geom1 and geom2), generate contact information for them. Internally, this just calls the correct class-specific collision functions for geom1 and geom2.

[flags specifies how contacts should be generated if the objects touch. Currently the lower 16 bits of flags specifies the maximum number of contact points to generate. If this number is zero, this function just pretends that it is one - in other words you can not ask for zero contacts. All other bits in flags must be zero. In the future the other bits may be used to select other contact generation strategies.]

If the objects touch, this returns a list of Contact objects, otherwise it returns an empty list.
Parameters:
geom1 - First Geom
           (type=GeomObject)
geom2 - Second Geom
           (type=GeomObject)
Returns:
Returns a list of Contact objects.
           (type=contacts)

collide2(geom1, geom2, arg, callback)

Calls the callback for all potentially intersecting pairs that contain one geom from geom1 and one geom from geom2.
Parameters:
geom1 - First Geom
           (type=GeomObject)
geom2 - Second Geom
           (type=GeomObject)
arg - A user argument that is passed to the callback function
callback - Callback function
           (type=callable)

Space(...)

Space factory function.

Depending on the type argument this function either returns a SimpleSpace (type=0) or a HashSpace (type=1).

This function is provided to remain compatible with previous versions of PyODE where there was only one Space class.
>>> space = Space(type=0)   # Create a SimpleSpace
>>> space = Space(type=1)   # Create a HashSpace

Variable Details

AMotorEuler

Type:
int
Value:
1                                                                     

AMotorUser

Type:
int
Value:
0                                                                     

ContactApprox0

Type:
int
Value:
0                                                                     

ContactApprox1

Type:
int
Value:
12288                                                                 

ContactApprox1_1

Type:
int
Value:
4096                                                                  

ContactApprox1_2

Type:
int
Value:
8192                                                                  

ContactBounce

Type:
int
Value:
4                                                                     

ContactFDir1

Type:
int
Value:
2                                                                     

ContactMotion1

Type:
int
Value:
32                                                                    

ContactMotion2

Type:
int
Value:
64                                                                    

ContactMu2

Type:
int
Value:
1                                                                     

ContactSlip1

Type:
int
Value:
128                                                                   

ContactSlip2

Type:
int
Value:
256                                                                   

ContactSoftCFM

Type:
int
Value:
16                                                                    

ContactSoftERP

Type:
int
Value:
8                                                                     

environment

Type:
NoneType
Value:
None                                                                  

Infinity

Type:
float
Value:
1.7976931348623157e+308                                               

paramBounce

Type:
int
Value:
5                                                                     

ParamBounce

Type:
int
Value:
5                                                                     

ParamBounce2

Type:
int
Value:
261                                                                   

ParamBounce3

Type:
int
Value:
517                                                                   

ParamCFM

Type:
int
Value:
6                                                                     

paramCFM

Type:
int
Value:
6                                                                     

ParamCFM2

Type:
int
Value:
262                                                                   

ParamCFM3

Type:
int
Value:
518                                                                   

ParamFMax

Type:
int
Value:
3                                                                     

paramFMax

Type:
int
Value:
3                                                                     

ParamFMax2

Type:
int
Value:
259                                                                   

ParamFMax3

Type:
int
Value:
515                                                                   

ParamFudgeFactor

Type:
int
Value:
4                                                                     

paramFudgeFactor

Type:
int
Value:
4                                                                     

ParamFudgeFactor2

Type:
int
Value:
260                                                                   

ParamFudgeFactor3

Type:
int
Value:
516                                                                   

ParamGroup

Type:
int
Value:
256                                                                   

ParamHiStop

Type:
int
Value:
1                                                                     

paramHiStop

Type:
int
Value:
1                                                                     

ParamHiStop2

Type:
int
Value:
257                                                                   

ParamHiStop3

Type:
int
Value:
513                                                                   

paramLoStop

Type:
int
Value:
0                                                                     

ParamLoStop

Type:
int
Value:
0                                                                     

ParamLoStop2

Type:
int
Value:
256                                                                   

ParamLoStop3

Type:
int
Value:
512                                                                   

paramStopCFM

Type:
int
Value:
8                                                                     

ParamStopCFM

Type:
int
Value:
8                                                                     

ParamStopCFM2

Type:
int
Value:
264                                                                   

ParamStopCFM3

Type:
int
Value:
520                                                                   

ParamStopERP

Type:
int
Value:
7                                                                     

paramStopERP

Type:
int
Value:
7                                                                     

ParamStopERP2

Type:
int
Value:
263                                                                   

ParamStopERP3

Type:
int
Value:
519                                                                   

paramSuspensionCFM

Type:
int
Value:
10                                                                    

ParamSuspensionCFM

Type:
int
Value:
10                                                                    

ParamSuspensionCFM2

Type:
int
Value:
266                                                                   

ParamSuspensionCFM3

Type:
int
Value:
522                                                                   

ParamSuspensionERP

Type:
int
Value:
9                                                                     

paramSuspensionERP

Type:
int
Value:
9                                                                     

ParamSuspensionERP2

Type:
int
Value:
265                                                                   

ParamSuspensionERP3

Type:
int
Value:
521                                                                   

paramVel

Type:
int
Value:
2                                                                     

ParamVel

Type:
int
Value:
2                                                                     

ParamVel2

Type:
int
Value:
258                                                                   

ParamVel3

Type:
int
Value:
514                                                                   

_geom_c2py_lut

Type:
dict
Value:
{}                                                                     

Generated by Epydoc 2.1 on Sun Feb 4 17:54:12 2007 http://epydoc.sf.net