[ODE] Simulating with trimesh

henrikmo@idi.ntnu.no henrikmo at idi.ntnu.no
Mon Aug 14 10:25:31 MST 2006

Thanks, but could anyone go into more detail? I am really a beginner with
this, and the fundamental knowledge of ODE is missing. Maybe a few lines
of code to illustrate? I am able to set up a basic scene with a box or
sphere and drop it onto a plane and make it collide. But that is about it
unfortunately. How do I simulate with the trimesh (i.e. get rotation and
position). Basically, what is inside the sim loop? Here is some of my test

triGeomID triGeomId = dCreateGeomTransform(0);
dTriMeshDataID triDataId = dGeomTriMeshDataCreate();
  visitor.accumData.vertices.size(),  //this is a osg drawableVisitor
  dCreateTriMesh(space, triDataId, 0, 0, 0)

What else do I need for the trimesh? The manual (10.7.6. Triangle Mesh
Class) says I need to update the data manually. I didn't quite get this.


ZHANG Zikai wrote:
> 2006/8/14, henrikmo at idi.ntnu.no <henrikmo at idi.ntnu.no>:
>> Hello.
>> I have no experience with ODE so please excuse the stupid questions.
>> I have loaded a .osg file and made a dTriMeshDataID with a call to
>> dGeomTriMeshDataBuildSimple with the corresponding inputs. I have called
>> dGeomTransformSetGeom(geomid,dCreateTriMesh(space, triid, 0, 0, 0)), but
>> i
>> have no dBodyID for the.
>> Is dBodyID required? If so, how do I do it for the trimesh?
>> Is the dGeomID required for simulation since I am using OSG to draw?
> The dBodyID could be 0, and the mesh becomes a static environment.
> see 7.2. dBodyID dJointGetBody (dJointID, int index); in the ode user
> guide :)
>> The application is a glove controlled hand (several hinged boxes) which
>> should be able to interact with the world by pushing away and possibly
>> picking up different trimesh objects. Any tips? The hand should exist in
>> the simulation, but have no gravity and if it touches an object, as
>> little
>> kinetic energy as possible should be transferred.
> I am not sure of this will help, try directly call dGeomSetPositon when
> your
> glove is moving. Since the static geom has no body, contact attach may
> not work, but when the collision has been detected you can attach the
> geom yourself. Something like 'glove.curHoldingGeom'.
>> There might be many followup questions :)
>> Best regards
>> Henrik Gundersen
>> _______________________________________________
>> ODE mailing list
>> ODE at q12.org
>> http://q12.org/mailman/listinfo/ode
> kaikai

More information about the ODE mailing list