> ode.__builtins__.True = 1
> ode.__builtins__.False = 0
Defining ode.__builtins__.True and ode.__builtins__.False worked!
However....the simulation stops/crashes when there is a collision. My
recompiled version 0.35 doesn't have this problem. To clarify, version
1.0 and 1.1 of PyODE do NOT crash on a standard Phython22 or 23
environment when there is a collision detected. However it does crash
on the non-standard python22 implementation that the 3d app uses. A
recompiled PyODE0.35 works fine under the non-standard 3d app python
environment. The crash is happening in call to contactgroup.empty()
after a collision has been detected. It even happens with the code from
tutorial3 (when I run that python script in my 3d app). Given the code
for contactgroup.empty() and for destroying joint is identical between
PyODE 0.35 and 1.1, I'm at a loss to explain it! The only area I can
see that is significantly different is the joint.attach() method.
> You have to link against the static ODE lib. If you're using the ODE
> binaries then you have make sure to use one of the zip files that
> have the "-dll-" in their name.
Of course - you are right - I downloaded the DLL version by mistake.
> I'm not sure if I understand what you mean here.... has it something
> do with mixing up the single and double version of ODE?
I've since fixed this problem. It was due to having ode.pyd calling the
ode.dll rather than linking in the ode library.
> When did you attach the joints?
> It seems to work over here:
Thanks. I got around the problem by simply not having bodies attached
to the geom.
[mailto:pyode-user-admin@...] On Behalf Of Matthias
Sent: Thursday, 4 August 2005 11:38 PM
Subject: Re: [Pyode-user] Compiling PyODE
Paul Kinnane wrote:
> 1) Initially I was using version 0.35 - which was running fine in the
> python environment I'm using (which is part of a 3d app - which has a
> Python22 interface). However I needed Trimeshes, so moved to version
> 1.1, which does not work in the python environment, due to the
> environment not defining True and False. Is there a way I can define
> True and False before calling the ode methods? I tried setting
> = 1 in my python app, however that didn't work.
Please try the following:
ode.__builtins__.True = 1
ode.__builtins__.False = 0
> 2) The obvious solution to 1) is to recompile PyODE, changing the
> True/Falses to 1/0's. However, when I recompile, it is compiling
> including the ODE library (ie. It is requiring the ODE.DLL be present
> the python\lib\site-packages directory.
You have to link against the static ODE lib. If you're using the ODE
binaries then you have make sure to use one of the zip files that don't
have the "-dll-" in their name.
If you're compiling it yourself you have to make sure to compile a
static library and link against this one instead of the import library
for the dll.
> Also, the resulting pyd doesn't
> work correctly. For example, recompiling PyODE0.35 results in my Y
> cords being given as a result of body.getPosition.
I'm not sure if I understand what you mean here.... has it something to
do with mixing up the single and double version of ODE?
> 3) I have some static objects in my scene. To keep them in place, I
> attaching those objects to ode.environment with a FixedJoint. The
> objects are rotated (prior to the SetFixed call), however after a call
> to world.step, body.setRotation returns an identity matrix (so the are
When did you attach the joints?
It seems to work over here:
from ode import *
w = World()
b = Body(w)
# Set some rotation other than the identity...
b.setRotation([0,-1,0, 1,0,0, 0,0,1])
# Attach the body to the environment...
j = FixedJoint(w)
# Do some simulation steps...
for i in range(100):
# See if the orientation has changed...
For me, this program prints the same orientation twice.
- Matthias -
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
Security * Process Improvement & Measurement *
Pyode-user mailing list