You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
(13) |
Apr
|
May
(1) |
Jun
(34) |
Jul
(23) |
Aug
(16) |
Sep
|
Oct
(11) |
Nov
(13) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(2) |
Feb
(3) |
Mar
(13) |
Apr
(1) |
May
(5) |
Jun
(11) |
Jul
(5) |
Aug
(10) |
Sep
(16) |
Oct
(8) |
Nov
(4) |
Dec
(5) |
2006 |
Jan
(18) |
Feb
(5) |
Mar
(6) |
Apr
(12) |
May
(3) |
Jun
(1) |
Jul
(4) |
Aug
(16) |
Sep
(1) |
Oct
(5) |
Nov
(35) |
Dec
(7) |
2007 |
Jan
(17) |
Feb
(14) |
Mar
(7) |
Apr
(9) |
May
(16) |
Jun
(31) |
Jul
(13) |
Aug
(23) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(1) |
2008 |
Jan
(8) |
Feb
(1) |
Mar
(3) |
Apr
(2) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
(5) |
Mar
|
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(5) |
Sep
(1) |
Oct
|
Nov
(3) |
Dec
|
2010 |
Jan
(6) |
Feb
(6) |
Mar
(10) |
Apr
(5) |
May
(11) |
Jun
|
Jul
|
Aug
(2) |
Sep
(8) |
Oct
(2) |
Nov
(3) |
Dec
(5) |
2011 |
Jan
(7) |
Feb
|
Mar
(1) |
Apr
(3) |
May
(10) |
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Ethan Glasser-C. <gl...@cs...> - 2007-01-09 00:52:20
|
Jacob Everist wrote: > I think I successfully built against ode0.7. But it's been a while, > so I don't quite remember what I did to do it. Look over the email > archives, and I think you should find some information from my posts. I have too, just not on Windows. Ethan |
From: Jacob E. <jac...@gm...> - 2007-01-09 00:14:23
|
I think I successfully built against ode0.7. But it's been a while, so I don't quite remember what I did to do it. Look over the email archives, and I think you should find some information from my posts. Jacob Everist On 1/8/07, Ethan Glasser-Camp <gl...@cs...> wrote: > Matthias Baas wrote: > > That shouldn't be a problem as the old names are still around. But the > > build process might fail for other reasons (user-settings missing, etc.) > > so I'd also recommend using the current CVS version which is meant to be > > used with ODE 0.7. > > I think pyode built against ODE 0.5 will link against the CCylinder > symbol, which is absent in 0.7. But I see ODE has #defines that change > CCylinder calls to Capsule calls, so building 1.1.0 against 0.7 > shouldn't be a problem (at least not because of names changing). > > Is a new release of pyode expected any time soon? Is there anything > holding it back from being released? Failing that, are there any plans > to make Windows builds of Pyode CVS? I'm trying to compile it myself > but it's a huge pain. > > Ethan > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > _______________________________________________ > Pyode-user mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyode-user > > > > -- Jacob Everist |
From: Ethan Glasser-C. <gl...@cs...> - 2007-01-08 18:58:37
|
Matthias Baas wrote: > That shouldn't be a problem as the old names are still around. But the = > build process might fail for other reasons (user-settings missing, etc.= )=20 > so I'd also recommend using the current CVS version which is meant to b= e=20 > used with ODE 0.7. I think pyode built against ODE 0.5 will link against the CCylinder symbol, which is absent in 0.7. But I see ODE has #defines that change CCylinder calls to Capsule calls, so building 1.1.0 against 0.7 shouldn't be a problem (at least not because of names changing). Is a new release of pyode expected any time soon? Is there anything holding it back from being released? Failing that, are there any plans to make Windows builds of Pyode CVS? I'm trying to compile it myself but it's a huge pain. Ethan |
From: Matthias B. <ba...@ir...> - 2007-01-08 18:18:17
|
Ethan Glasser-Camp wrote: > pyode in CVS has support for 0.7, but no version of pyode has been > released since ODE 0.5. I don't think pyode 1.1.0 will work if you > build it against 0.7, because CCylinder was changed to Capsule, but if > you try it, let us know what happens! That shouldn't be a problem as the old names are still around. But the build process might fail for other reasons (user-settings missing, etc.) so I'd also recommend using the current CVS version which is meant to be used with ODE 0.7. - Matthias - |
From: Ethan Glasser-C. <gl...@cs...> - 2007-01-07 08:36:17
|
[Sorry Nathan about the duplicate post -- I do this all the time. :( ] Nathan Hu wrote: > I use pyode about 1 year. however the ode 0.5 have so many problems.=20 > the bodies often move strangely especially when there are many joints. > I printed the number in doulbe, but the number is a mistake sign. > =20 > I don't know whether ode 0.7 is better. will pyode support ode 0.7? > do you think ode 0.7 is better than 0.5? I really did not use it. Although I've had a lot of difficulty getting ODE to do what I wanted to do, eventually I found workarounds for all the problems I found. I don't know if I actually encountered bugs in ODE or if what I did was wrong. pyode in CVS has support for 0.7, but no version of pyode has been released since ODE 0.5. I don't think pyode 1.1.0 will work if you build it against 0.7, because CCylinder was changed to Capsule, but if you try it, let us know what happens! My understanding is that 0.7 mostly adds features to 0.5: LMotor, Plane2d, Cylinder. But I didn't follow the development process, so I'm not sure. Ethan |
From: Nathan H. <nat...@gm...> - 2007-01-06 18:05:58
|
Hi, I use pyode about 1 year. however the ode 0.5 have so many problems. the bodies often move strangely especially when there are many joints. I printed the number in doulbe, but the number is a mistake sign. I don't know whether ode 0.7 is better. will pyode support ode 0.7? do you think ode 0.7 is better than 0.5? I really did not use it. Thank you very much! Regards, Nathan |
From: Paul K. <pki...@in...> - 2006-12-17 08:06:49
|
Thanks for the help Matthias. Trying your method didn't seem to work for me, however, as you suggested, putting the two versions of ode.pyd into different directories was a better solution and works well. Paul -----Original Message----- From: pyo...@li... [mailto:pyo...@li...] On Behalf Of Matthias Baas Sent: Thursday, 14 December 2006 8:20 PM To: pyo...@li... Subject: Re: [Pyode-user] Renaming ode.pyd Paul Kinnane wrote: > I have a situation where I need to run pyode under 2 versions of python > - 2.1 and 2.4. In order to do this, I need to compile pyODE under > python 2.1 and 2.4, which I have done successfully. However I need to > differentiate to the names of the libraries from the 2 versions (they > both compile as ode.pyd), so I can specifically import one of them > depending on which version of python is running. When I simply rename > ode.pyd to ode21.pyd, the import command does not work (since I guess > there is a naming difference between the compiled C code and the pyd name. Right, the initialization function of the extension module must be called "init<modulename>", in the case of ode it's "initode". If you rename the module to ode21 Python expects the function to be called "initode21", but this function doesn't exist, so the import fails. > So my question is, how can I compile pyODE to produce a filename of > ode21.pyd? Pyrex names the initialization function after the input file, so you would have to rename src/ode.pyx to src/ode21.pyx and update the setup script accordingly so that Pyrex reads the renamed file. Alternatively you could just manually modify the generated source file and rename the init function. But the other question is, why do you keep modules for two separate Python versions in the same directory? You could stick the correct ode.pyd into sub-directories py21 and py24 and either update PYTHONPATH or sys.path so that they point to the correct directory. - Matthias - ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE V _______________________________________________ Pyode-user mailing list Pyo...@li... https://lists.sourceforge.net/lists/listinfo/pyode-user |
From: Matthias B. <ba...@ir...> - 2006-12-16 10:16:35
|
Roses Roses wrote: > I'm want to install pyode in a Suse 10.0 but I have the next error message: > [...] > Reading ODE configuration "/usr/include/ode/config/user-settings"... ERROR: > [Errno 2] No such file or directory: '/usr/include/ode/config/user-settings' > Traceback (most recent call last): File "setup.py", line 153, in ? config = > readODEConfig() File "setup.py", line 59, in readODEConfig raise > RuntimeError RuntimeError Please use the latest version of PyODE from the cvs repository. The setup script has been updated not to use the user-settings file anymore as this file doesn't exist in ODE 0.7 anymore. - Matthias - |
From: Roses R. <sal...@ho...> - 2006-12-15 09:21:19
|
Hi!!! I'm want to install pyode in a Suse 10.0 but I have the next error message: This Python ODE wrapper assumes that you have a compiled version of the ODE library already somewhere on your system. The path to the ODE distribution has to be set in the setup script via the variable ODE_BASE. Currently it points to "../ode". However, that path does not exist. So please change the variable inside the script so that it points to the actual location of the ODE directory. I've installed Pyrex, Python and Ode with Yast, but I'm continue this problem. I've tried to create the "ode" file, but the error is the next: Reading ODE configuration "/usr/include/ode/config/user-settings"... ERROR: [Errno 2] No such file or directory: '/usr/include/ode/config/user-settings' Traceback (most recent call last): File "setup.py", line 153, in ? config = readODEConfig() File "setup.py", line 59, in readODEConfig raise RuntimeError RuntimeError Help please!! Thank you!! _________________________________________________________________ Descubre la descarga digital con MSN Music. Más de un millón de canciones. http://music.msn.es/ |
From: Roses R. <sal...@ho...> - 2006-12-15 09:13:36
|
Hi!!! I'm want to install pyode in a Suse 10.0 but I have the next error message: This Python ODE wrapper assumes that you have a compiled version of the ODE library already somewhere on your system. The path to the ODE distribution has to be set in the setup script via the variable ODE_BASE. Currently it points to "../ode". However, that path does not exist. So please change the variable inside the script so that it points to the actual location of the ODE directory. I've installed Pyrex, Python and Ode with Yast, but I'm continue this problem. I've tried to create the "ode" file, but the error is the next: Reading ODE configuration "/usr/include/ode/config/user-settings"... ERROR: [Errno 2] No such file or directory: '/usr/include/ode/config/user-settings' Traceback (most recent call last): File "setup.py", line 153, in ? config = readODEConfig() File "setup.py", line 59, in readODEConfig raise RuntimeError RuntimeError Help please!! Thank you!! _________________________________________________________________ ¿Estás pensando en cambiar de coche? Todas los modelos de serie y extras en MSN Motor. http://motor.msn.es/researchcentre/ |
From: Matthias B. <ba...@ir...> - 2006-12-14 09:51:35
|
Paul Kinnane wrote: > I have a situation where I need to run pyode under 2 versions of python > – 2.1 and 2.4. In order to do this, I need to compile pyODE under > python 2.1 and 2.4, which I have done successfully. However I need to > differentiate to the names of the libraries from the 2 versions (they > both compile as ode.pyd), so I can specifically import one of them > depending on which version of python is running. When I simply rename > ode.pyd to ode21.pyd, the import command does not work (since I guess > there is a naming difference between the compiled C code and the pyd name. Right, the initialization function of the extension module must be called "init<modulename>", in the case of ode it's "initode". If you rename the module to ode21 Python expects the function to be called "initode21", but this function doesn't exist, so the import fails. > So my question is, how can I compile pyODE to produce a filename of > ode21.pyd? Pyrex names the initialization function after the input file, so you would have to rename src/ode.pyx to src/ode21.pyx and update the setup script accordingly so that Pyrex reads the renamed file. Alternatively you could just manually modify the generated source file and rename the init function. But the other question is, why do you keep modules for two separate Python versions in the same directory? You could stick the correct ode.pyd into sub-directories py21 and py24 and either update PYTHONPATH or sys.path so that they point to the correct directory. - Matthias - |
From: Paul K. <pki...@in...> - 2006-12-14 08:25:03
|
Hi I have a situation where I need to run pyode under 2 versions of python - 2.1 and 2.4. In order to do this, I need to compile pyODE under python 2.1 and 2.4, which I have done successfully. However I need to differentiate to the names of the libraries from the 2 versions (they both compile as ode.pyd), so I can specifically import one of them depending on which version of python is running. When I simply rename ode.pyd to ode21.pyd, the import command does not work (since I guess there is a naming difference between the compiled C code and the pyd name. So my question is, how can I compile pyODE to produce a filename of ode21.pyd? Thanks Paul |
From: Jacob E. <jac...@gm...> - 2006-12-02 01:31:02
|
Yes, it seems that upgrading my PyRex to 0.9.4 did the trick. Lots of warnings still, but it didn't fail to compile. Now it appears to be working :) Thanks! Jacob Everist On 11/27/06, Matthias Baas <ba...@ir...> wrote: > Jacob Everist wrote: > > I am running Fedora Core 6, ODE 0.7, Python 2.4.x, and Pyrex 0.9.3 > > > > I tried to use the provided setup.py script and the alternate provided > > by Matthias Baas, but I still get the same errors. Can anyone give me > > some insight into this problem? Below is the error messages, and I > > will also attach the setup.py script I am using. Thanks! > > > > Output > > ------ > > [wildmage@localhost PyODE-1.1.0]$ python setup.py build > > INFO: <ode/ode.h> found in /usr/local/include > > INFO: ode_trimesh.c is up to date > > Where does this version of ode_trimesh.c come from? Was it generated by > yourself on a previous run or did you get it from a source archive? > > I'd suggest to upgrade Pyrex (I'm using 0.9.4.1) and re-generate > ode_trimesh.c (by removing the old version). > > - Matthias - > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Pyode-user mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyode-user > -- Jacob Everist |
From: chris <dra...@gm...> - 2006-11-28 12:39:09
|
On 11/28/06, Matthias Baas <ba...@ir...> wrote: > chris wrote: > > FYI, I get this error for all versions where I set CFP and ERP to 0, > > including 10, 1000 and 10000 from the origin. For example look at the > > attached and see the difference in rest position, > > When CFM and ERP are both 0 I get the LCP error in every step. I think > an ERP of 0 doesn't make any sense anyway, does it? I wonder why the > collision is resolved at all. Doesn't ERP=0 mean that the joint force > isn't taken into account at all? > Similarly, I also wouldn't recommend a CFM value of exactly 0 (see the > ODE manual: "In fact, if the system is mis-behaving, one of the first > things to try is to increase the global CFM.") yeah it probably is not sensibel to set these to zero. I just didi it because someone suggested it and I thought I would prove that it still does not remove the problem (it fixes it for displacement of 10 but not for general case). > > By the way, as was mentioned in a previous mail, if you switch to > quickStep() there's no error message anymore (but the movement is not > identical anyway). ok > > Anyway, as these things happen right inside ODE and are not particular > to PyODE I recommend to post a message in the ODE mailing list. yes, will do, bit busy atm - at a conference, cheers, chris > > - Matthias - > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Pyode-user mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyode-user > |
From: Matthias B. <ba...@ir...> - 2006-11-28 12:16:24
|
chris wrote: > FYI, I get this error for all versions where I set CFP and ERP to 0, > including 10, 1000 and 10000 from the origin. For example look at the > attached and see the difference in rest position, When CFM and ERP are both 0 I get the LCP error in every step. I think an ERP of 0 doesn't make any sense anyway, does it? I wonder why the collision is resolved at all. Doesn't ERP=0 mean that the joint force isn't taken into account at all? Similarly, I also wouldn't recommend a CFM value of exactly 0 (see the ODE manual: "In fact, if the system is mis-behaving, one of the first things to try is to increase the global CFM.") By the way, as was mentioned in a previous mail, if you switch to quickStep() there's no error message anymore (but the movement is not identical anyway). Anyway, as these things happen right inside ODE and are not particular to PyODE I recommend to post a message in the ODE mailing list. - Matthias - |
From: Ricardo K. <ric...@gm...> - 2006-11-27 13:36:21
|
Hi: I came up with this error a few times myself Matthias Baas wrote: > mi...@mi... wrote: >> Strange. There is no 's' variable... apart from sx,sy,sz when setting glScale in the draw_body() part. Setting scale to zero would give an error, but they shouldn't be zero. > > I also get such a message, but only for the version at the origin: > > ODE Message 3: LCP internal error, s <= 0 (s=-5.2075e-003) What this means is that the matrix (that represents the current state of the simulation) to be solved is near singular, and thus the LCP solver fails. It cannot solve this matrix, because it cannot find the inverse matrix to solve the equation system. This happens mostly when using the WorldStep method, because this method depends on finding the exact inverse matrix. There is another method QuickStep, which uses an iterative approach to solve the equation system, that can handle most of these cases. The only problem with QuickStep is that the simulation becomes less accurate (although faster). As far as I know there is not (yet) a real solution to this problem. There was some discussion about throwing an exception when this occurred, so that people could handle the error, instead of just breaking the simulations, but I am not quite sure what the state of that is right now. I hope you could understand at least a little of what I tried to explain (due to my bad english :)) ricardo |
From: Matthias B. <ba...@ir...> - 2006-11-27 09:41:38
|
Jacob Everist wrote: > I am running Fedora Core 6, ODE 0.7, Python 2.4.x, and Pyrex 0.9.3 > > I tried to use the provided setup.py script and the alternate provided > by Matthias Baas, but I still get the same errors. Can anyone give me > some insight into this problem? Below is the error messages, and I > will also attach the setup.py script I am using. Thanks! > > Output > ------ > [wildmage@localhost PyODE-1.1.0]$ python setup.py build > INFO: <ode/ode.h> found in /usr/local/include > INFO: ode_trimesh.c is up to date Where does this version of ode_trimesh.c come from? Was it generated by yourself on a previous run or did you get it from a source archive? I'd suggest to upgrade Pyrex (I'm using 0.9.4.1) and re-generate ode_trimesh.c (by removing the old version). - Matthias - |
From: Matthias B. <ba...@ir...> - 2006-11-27 09:33:48
|
mi...@mi... wrote: > Strange. There is no 's' variable... apart from sx,sy,sz when setting glScale in the draw_body() part. Setting scale to zero would give an error, but they shouldn't be zero. I also get such a message, but only for the version at the origin: ODE Message 3: LCP internal error, s <= 0 (s=-5.2075e-003) This is a message that originates from ODE (not PyODE), so the variable 's' doesn't refer to any Python variable but rather to a variable that is most likely be used somewhere in the source code of ODE. As one version shows the above error and the other doesn't, it is not very surprising that the results differ. Now as to why the error occurs I have no idea, I'd recommend to post a message into the ODE mailing list. By the way, when I slightly rotate the cube (just so that it isn't perfectly aligned with the ground plane anymore) then the error does not occur anymore and the two simulations look the same. - Matthias - PS: I think the other case with the different start times is just the same. |
From: chris <dra...@gm...> - 2006-11-26 17:38:13
|
Ah, I did not explain properly: the dropping of the right hand block starts at counter=8000 in the file preciseBlocksTime8000.py. I.e. it just starts dropping at a later time but otherwise the simulation is the same (position of objects, gravity etc) and, one would expect, end up in the same rest state as for the http://www.planet-earth.org/pyode/preciseBlocks.py where the right hand block is dropped when counter = 20. cheers, chris On 11/26/06, Timothy Stranex <tim...@gm...> wrote: > In preciseBlocksTime8000.py, counter still starts from 0. To make the > two simulations equivalent, it should start at 7980. > > -- > Timothy > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Pyode-user mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyode-user > |
From: Timothy S. <tim...@gm...> - 2006-11-26 15:13:22
|
In preciseBlocksTime8000.py, counter still starts from 0. To make the two simulations equivalent, it should start at 7980. -- Timothy |
From: chris <dra...@gm...> - 2006-11-26 14:07:04
|
Hi list, We have discussed the effect of position on simulation accuracy in pyode but no one has answered this riddle about the start time, anyone have an answer? regards, chris On 11/24/06, chris <dra...@gm...> wrote: > Hi, > > I have been doing some experiments as part of my phd and, tho the > theory predicts some differences in physics results, it was still > surprising to see it in actuality. the following differ only in the > start time (the second has a start time of 8000), but the final > resting place of the RH block is quite different from its position > when running the first example, even tho the spatial positions, size > of everything, duration of sim and grav constant are the same. > > http://www.planet-earth.org/pyode/preciseBlocks.py > http://www.planet-earth.org/pyode/preciseBlocksTime8000.py > > Can anyone explain to me what is happening inside ode to produce these > different results? I can explain the results abstractly, but not in > detailed terms relating to the specifics of pyode. > > thanks, > > chris > |
From: chris <dra...@gm...> - 2006-11-26 12:24:07
|
On 11/25/06, Hart's Antler <bha...@ya...> wrote: > setting your worlds ERP and CFM to zero seems to fix this, not sure why tho.. > -brett > > ok, I looked into this and those settings only have the effect of resucing the error. If you use these settings but set the displacement to 1000,1000,1000 instead of (10,10,10) of my original example and a small difference is apparent in the rest position compared to the one at (0,0,0) using (10000, 10000, 10000) give a more obvious difference. So my little experiment is still valid, whether you use the default ERP and CFM or not: pyode is very sensitive to position dependent error in its physics simulations. regards, chris > --- mi...@mi... wrote: > > > Hi folks, > > > > A friend (he's probably joining pyode-user as I send this) sent me the two small python scripts > > (attached). They both drop a block near another. They are the same except for one being at > > (0,0,0) the other at (10,10,10), but their behavior is markedly different. Why? > > > > Is there any way to ensure that behavior has positional independence? ...at least in fairly > > ordinary ranges. I know things will get crazy near the limits of numerical precision, but this > > is just a little over 10 units from the center of the universe. > > > > Is there some other parameter that needs to be handled to take account of the position? > > > > Best wishes, > > > > - Miriam > > -- > > ---------=---------=---------=---------=---------=---------=------ > > A life! Cool! Where can I download one of those from? > > ---------=---------=---------=---------=---------=---------=------ > > Website: http://miriam-english.org > > Blog: http://www.livejournal.com/users/miriam_e/ > > > # pyODE example 3: Collision detection > > # origin > > > > # Originally by Matthias Baas. > > # Updated by Pierre Gay to work without pygame or cgkit. > > > > import sys, os, random, time > > from math import * > > from OpenGL.GL import * > > from OpenGL.GLU import * > > from OpenGL.GLUT import * > > > > import ode > > > > # geometric utility functions > > def scalp (vec, scal): > > vec[0] *= scal > > vec[1] *= scal > > vec[2] *= scal > > > > def length (vec): > > return sqrt (vec[0]**2 + vec[1]**2 + vec[2]**2) > > > > # prepare_GL > > def prepare_GL(): > > """Prepare drawing. > > """ > > > > # Viewport > > glViewport(0,0,640,480) > > > > # Initialize > > glClearColor(0.8,0.8,0.9,0) > > glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); > > glEnable(GL_DEPTH_TEST) > > glDisable(GL_LIGHTING) > > glEnable(GL_LIGHTING) > > glEnable(GL_NORMALIZE) > > glShadeModel(GL_FLAT) > > > > # Projection > > glMatrixMode(GL_PROJECTION) > > glLoadIdentity() > > gluPerspective (45,1.3333,0.2,20) > > > > # Initialize ModelView matrix > > glMatrixMode(GL_MODELVIEW) > > glLoadIdentity() > > > > # Light source > > glLightfv(GL_LIGHT0,GL_POSITION,[0,0,1,0]) > > glLightfv(GL_LIGHT0,GL_DIFFUSE,[1,1,1,1]) > > glLightfv(GL_LIGHT0,GL_SPECULAR,[1,1,1,1]) > > glEnable(GL_LIGHT0) > > > > # View transformation > > gluLookAt (2.4, 3.6, 4.8, 0.5, 0.5, 0, 0, 1, 0) > > > > # draw_body > > def draw_body(body): > > """Draw an ODE body. > > """ > > > > x,y,z = body.getPosition() > > R = body.getRotation() > > #rot = [R[0], R[3], R[6], 0., > > # R[1], R[4], R[7], 0., > > # R[2], R[5], R[8], 0., > > # x, y, z, 1.0] > > rot = [1, 0.0, 0.0, 0.0, > > 0.0, 1, 0.0, 0.0, > > 0.0, 0.0, 1.0, 0.0, > > x, y, z, 1.0] > > glPushMatrix() > > glMultMatrixd(rot) > > if body.shape=="box": > > sx,sy,sz = body.boxsize > > glScale(sx, sy, sz) > > glutSolidCube(1) > > glPopMatrix() > > > > > > # create_box > > def create_box(world, space, density, lx, ly, lz): > > """Create a box body and its corresponding geom.""" > > > > # Create body > > body = ode.Body(world) > > M = ode.Mass() > > M.setBox(density, lx, ly, lz) > > body.setMass(M) > > > > # Set parameters for drawing the body > > body.shape = "box" > > body.boxsize = (lx, ly, lz) > > > > # Create a box geom for collision detection > > geom = ode.GeomBox(space, lengths=body.boxsize) > > geom.setBody(body) > > > > return body > > > > # create box object > > def create_object(posx, posy, posz): > > """create one box at a given position.""" > > > > global bodies, counter, objcount > > > > body = create_box(world, space, 1000, 1.0,1.0,1.0) > > body.setPosition((posx, posy, posz)) > > bodies.append(body) > > #counter=0 > > objcount+=1 > > > > > > # drop_object > > def drop_object(posx, posy, posz): > > """Drop an object into the scene.""" > > > > global bodies, counter, objcount > > > > body = create_box(world, space, 1000, 1.0,1.0,1.0) > > body.setPosition((posx, posy, posz)) > > bodies.append(body) > > #counter=0 > > objcount+=1 > > > > # Collision callback > > def near_callback(args, geom1, geom2): > > """Callback function for the collide() method. > > > > This function checks if the given geoms do collide and > > creates contact joints if they do. > > """ > > > > # Check if the objects do collide > > contacts = ode.collide(geom1, geom2) > > > > # Create contact joints > > world,contactgroup = args > > for c in contacts: > > c.setBounce(0.2) > > c.setMu(5000) > > j = ode.ContactJoint(world, contactgroup, c) > > j.attach(geom1.getBody(), geom2.getBody()) > > > > > > > > ###################################################################### > > > > # Initialize Glut > > glutInit ([]) > > > > # Open a window > > glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE) > > > > x = 0 > > y = 0 > > width = 640 > > height = 480 > > glutInitWindowPosition (x, y); > > glutInitWindowSize (width, height); > > glutCreateWindow ("(0,0,0)") > > > > # Create a world object > > world = ode.World() > > world.setGravity( (0,-9.81,0) ) > > world.setERP(0.8) > > world.setCFM(1E-5) > > > > # Create a space object > > space = ode.Space() > > > > # Create a plane geom which prevent the objects from falling forever > > floor = ode.GeomPlane(space, (0,1,0), 0) > > > > # A list with ODE bodies > > bodies = [] > > > > # A joint group for the contact joints that are generated whenever > > # two bodies collide > > contactgroup = ode.JointGroup() > > > > # Some variables used inside the simulation loop > > fps = 50 > > dt = 1.0/fps > > running = True > > state = 0 > > counter = 0 > > objcount = 0 > > lasttime = time.time() > > > > > > # keyboard callback > > def _keyfunc (c, x, y): > > sys.exit (0) > > > > glutKeyboardFunc (_keyfunc) > > > > # draw callback > > def _drawfunc (): > > > === message truncated ===> # pyODE example 3: Collision detection > > # 1000 > > > > # Originally by Matthias Baas. > > # Updated by Pierre Gay to work without pygame or cgkit. > > > > import sys, os, random, time > > from math import * > > from OpenGL.GL import * > > from OpenGL.GLU import * > > from OpenGL.GLUT import * > > > > import ode > > > > # geometric utility functions > > def scalp (vec, scal): > > vec[0] *= scal > > vec[1] *= scal > > vec[2] *= scal > > > > def length (vec): > > return sqrt (vec[0]**2 + vec[1]**2 + vec[2]**2) > > > > # prepare_GL > > def prepare_GL(): > > """Prepare drawing. > > """ > > > > # Viewport > > glViewport(0,0,640,480) > > > > # Initialize > > glClearColor(0.8,0.8,0.9,0) > > glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); > > glEnable(GL_DEPTH_TEST) > > glDisable(GL_LIGHTING) > > glEnable(GL_LIGHTING) > > glEnable(GL_NORMALIZE) > > glShadeModel(GL_FLAT) > > > > # Projection > > glMatrixMode(GL_PROJECTION) > > glLoadIdentity() > > gluPerspective (45,1.3333,0.2,20) > > > > # Initialize ModelView matrix > > glMatrixMode(GL_MODELVIEW) > > glLoadIdentity() > > > > # Light source > > glLightfv(GL_LIGHT0,GL_POSITION,[0,0,1,0]) > > glLightfv(GL_LIGHT0,GL_DIFFUSE,[1,1,1,1]) > > glLightfv(GL_LIGHT0,GL_SPECULAR,[1,1,1,1]) > > glEnable(GL_LIGHT0) > > > > # View transformation > > gluLookAt (12.4, 13.6, 14.8, 10.5, 10.5, 10, 0, 1, 0) > > > > # draw_body > > def draw_body(body): > > """Draw an ODE body. > > """ > > > > x,y,z = body.getPosition() > > R = body.getRotation() > > #rot = [R[0], R[3], R[6], 0., > > # R[1], R[4], R[7], 0., > > # R[2], R[5], R[8], 0., > > # x, y, z, 1.0] > > rot = [1, 0.0, 0.0, 0.0, > > 0.0, 1, 0.0, 0.0, > > 0.0, 0.0, 1.0, 0.0, > > x, y, z, 1.0] > > glPushMatrix() > > glMultMatrixd(rot) > > if body.shape=="box": > > sx,sy,sz = body.boxsize > > glScale(sx, sy, sz) > > glutSolidCube(1) > > glPopMatrix() > > > > > > # create_box > > def create_box(world, space, density, lx, ly, lz): > > """Create a box body and its corresponding geom.""" > > > > # Create body > > body = ode.Body(world) > > M = ode.Mass() > > M.setBox(density, lx, ly, lz) > > body.setMass(M) > > > > # Set parameters for drawing the body > > body.shape = "box" > > body.boxsize = (lx, ly, lz) > > > > # Create a box geom for collision detection > > geom = ode.GeomBox(space, lengths=body.boxsize) > > geom.setBody(body) > > > > return body > > > > # create box object > > def create_object(posx, posy, posz): > > """create one box at a given position.""" > > > > global bodies, counter, objcount > > > > body = create_box(world, space, 1000, 1.0,1.0,1.0) > > body.setPosition((posx, posy, posz)) > > bodies.append(body) > > #counter=0 > > objcount+=1 > > > > > > # drop_object > > def drop_object(posx, posy, posz): > > """Drop an object into the scene.""" > > > > global bodies, counter, objcount > > > > body = create_box(world, space, 1000, 1.0,1.0,1.0) > > body.setPosition((posx, posy, posz)) > > bodies.append(body) > > #counter=0 > > objcount+=1 > > > > # Collision callback > > def near_callback(args, geom1, geom2): > > """Callback function for the collide() method. > > > > This function checks if the given geoms do collide and > > creates contact joints if they do. > > """ > > > > # Check if the objects do collide > > contacts = ode.collide(geom1, geom2) > > > > # Create contact joints > > world,contactgroup = args > > for c in contacts: > > c.setBounce(0.2) > > c.setMu(5000) > > j = ode.ContactJoint(world, contactgroup, c) > > j.attach(geom1.getBody(), geom2.getBody()) > > > > > > > > ###################################################################### > > > > # Initialize Glut > > glutInit ([]) > > > > # Open a window > > glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE) > > > > x = 0 > > y = 0 > > width = 640 > > height = 480 > > glutInitWindowPosition (x, y); > > glutInitWindowSize (width, height); > > glutCreateWindow ("(10,10,10)") > > > > # Create a world object > > world = ode.World() > > world.setGravity( (0,-9.81,0) ) > > world.setERP(0.8) > > world.setCFM(1E-5) > > > > # Create a space object > > space = ode.Space() > > > > # Create a plane geom which prevent the objects from falling forever > > floor = ode.GeomPlane(space, (0,1,0), 10) > > > > # A list with ODE bodies > > bodies = [] > > > > # A joint group for the contact joints that are generated whenever > > # two bodies collide > > contactgroup = ode.JointGroup() > > > > # Some variables used inside the simulation loop > > fps = 50 > > dt = 1.0/fps > > running = True > > state = 0 > > counter = 0 > > objcount = 0 > > lasttime = time.time() > > > > > > # keyboard callback > > def _keyfunc (c, x, y): > > sys.exit (0) > > > > glutKeyboardFunc (_keyfunc) > > > > # draw callback > > def _drawfunc (): > > > === message truncated ===> > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys - and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > _______________________________________________ > > Pyode-user mailing list > > Pyo...@li... > > https://lists.sourceforge.net/lists/listinfo/pyode-user > > > > > > > ____________________________________________________________________________________ > Do you Yahoo!? > Everyone is raving about the all-new Yahoo! Mail beta. > http://new.mail.yahoo.com > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Pyode-user mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyode-user > |
From: Jacob E. <jac...@gm...> - 2006-11-25 09:19:22
|
Hello, I am running Fedora Core 6, ODE 0.7, Python 2.4.x, and Pyrex 0.9.3 I tried to use the provided setup.py script and the alternate provided by Matthias Baas, but I still get the same errors. Can anyone give me some insight into this problem? Below is the error messages, and I will also attach the setup.py script I am using. Thanks! - Jacob Everist Output ------ [wildmage@localhost PyODE-1.1.0]$ python setup.py build INFO: <ode/ode.h> found in /usr/local/include INFO: ode_trimesh.c is up to date INFO: ode_notrimesh.c is up to date INFO: Installing with trimesh support. running build running build_py running build_ext building 'ode' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC -I/usr -I/usr/local -I/usr/local/include -I/usr/include/python2.4 -c ode_trimesh.c -o build/temp.linux-i686-2.4/ode_trimesh.o ode_trimesh.c: In function '__pyx_f_3ode_4Mass___new__': ode_trimesh.c:392: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_4Mass_setZero': ode_trimesh.c:413: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_5World___new__': ode_trimesh.c:2202: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_5World___dealloc__': ode_trimesh.c:2226: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_4Body___dealloc__': ode_trimesh.c:3041: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_4Body_getMass': ode_trimesh.c:3781: error: invalid lvalue in assignment ode_trimesh.c:3789: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_4Body_enable': ode_trimesh.c:4856: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_4Body_disable': ode_trimesh.c:4877: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_10JointGroup___new__': ode_trimesh.c:5144: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_10JointGroup___dealloc__': ode_trimesh.c:5193: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_10JointGroup_empty': ode_trimesh.c:5239: warning: label '__pyx_L3' defined but not used ode_trimesh.c:5221: warning: label '__pyx_L2' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_5Joint__destroyed': ode_trimesh.c:5588: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_9BallJoint___new__': ode_trimesh.c:5978: error: invalid lvalue in assignment ode_trimesh.c:5993: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_9BallJoint_setParam': ode_trimesh.c:6225: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_10HingeJoint___new__': ode_trimesh.c:6277: error: invalid lvalue in assignment ode_trimesh.c:6292: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_11SliderJoint___new__': ode_trimesh.c:6752: error: invalid lvalue in assignment ode_trimesh.c:6767: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_14UniversalJoint___new__': ode_trimesh.c:7089: error: invalid lvalue in assignment ode_trimesh.c:7104: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_11Hinge2Joint___new__': ode_trimesh.c:7606: error: invalid lvalue in assignment ode_trimesh.c:7621: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_10FixedJoint___new__': ode_trimesh.c:8201: error: invalid lvalue in assignment ode_trimesh.c:8216: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_10FixedJoint_setFixed': ode_trimesh.c:8308: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_12ContactJoint___new__': ode_trimesh.c:8331: error: invalid lvalue in assignment ode_trimesh.c:8347: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_6AMotor___new__': ode_trimesh.c:8444: error: invalid lvalue in assignment ode_trimesh.c:8459: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_6AMotor_setNumAxes': ode_trimesh.c:8604: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_10GeomObject___dealloc__': ode_trimesh.c:9048: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_10GeomObject_getSpace': ode_trimesh.c:9796: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_10GeomObject_enable': ode_trimesh.c:9951: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_10GeomObject_disable': ode_trimesh.c:9972: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_14_SpaceIterator___iter__': ode_trimesh.c:10057: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_9SpaceBase___new__': ode_trimesh.c:10175: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_9SpaceBase___dealloc__': ode_trimesh.c:10251: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_11SimpleSpace___new__': ode_trimesh.c:10687: error: invalid lvalue in assignment ode_trimesh.c:10701: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_11SimpleSpace___init__': ode_trimesh.c:10753: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_9HashSpace___new__': ode_trimesh.c:10776: error: invalid lvalue in assignment ode_trimesh.c:10790: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_9HashSpace___init__': ode_trimesh.c:10842: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_13QuadTreeSpace___new__': ode_trimesh.c:10974: error: invalid lvalue in assignment ode_trimesh.c:10988: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_13QuadTreeSpace___init__': ode_trimesh.c:11098: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_10GeomSphere___new__': ode_trimesh.c:11200: error: invalid lvalue in assignment ode_trimesh.c:11214: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_10GeomSphere___init__': ode_trimesh.c:11273: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_7GeomBox___new__': ode_trimesh.c:11460: error: invalid lvalue in assignment ode_trimesh.c:11474: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_7GeomBox___init__': ode_trimesh.c:11547: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_9GeomPlane___new__': ode_trimesh.c:11773: error: invalid lvalue in assignment ode_trimesh.c:11787: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_9GeomPlane___init__': ode_trimesh.c:11860: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_13GeomCCylinder___new__': ode_trimesh.c:12071: error: invalid lvalue in assignment ode_trimesh.c:12085: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_13GeomCCylinder___init__': ode_trimesh.c:12149: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_7GeomRay___new__': ode_trimesh.c:12351: error: invalid lvalue in assignment ode_trimesh.c:12365: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_7GeomRay___init__': ode_trimesh.c:12424: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_13GeomTransform___new__': ode_trimesh.c:12655: error: invalid lvalue in assignment ode_trimesh.c:12669: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_13GeomTransform_getGeom': ode_trimesh.c:12921: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_11TriMeshData___new__': ode_trimesh.c:13026: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_11TriMeshData___dealloc__': ode_trimesh.c:13070: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_11TriMeshData_build': ode_trimesh.c:13269: warning: label '__pyx_L5' defined but not used ode_trimesh.c:13195: warning: label '__pyx_L4' defined but not used ode_trimesh.c:13186: warning: label '__pyx_L3' defined but not used ode_trimesh.c:13146: warning: label '__pyx_L2' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_11GeomTriMesh___new__': ode_trimesh.c:13308: error: invalid lvalue in assignment ode_trimesh.c:13314: error: invalid lvalue in assignment ode_trimesh.c:13328: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_f_3ode_11GeomTriMesh_clearTCCache': ode_trimesh.c:13463: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_collide': ode_trimesh.c:13584: error: invalid lvalue in assignment ode_trimesh.c:13631: error: invalid lvalue in assignment ode_trimesh.c:13650: warning: label '__pyx_L3' defined but not used ode_trimesh.c:13621: warning: label '__pyx_L2' defined but not used ode_trimesh.c: In function '__pyx_f_3ode_CloseODE': ode_trimesh.c:13761: warning: label '__pyx_L1' defined but not used ode_trimesh.c: In function '__pyx_tp_new_3ode_Mass': ode_trimesh.c:13899: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_Mass': ode_trimesh.c:13907: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_Mass': ode_trimesh.c:13913: warning: unused variable 'p' ode_trimesh.c:13912: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_Mass': ode_trimesh.c:13918: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_Contact': ode_trimesh.c:14071: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_Contact': ode_trimesh.c:14079: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_Contact': ode_trimesh.c:14085: warning: unused variable 'p' ode_trimesh.c:14084: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_Contact': ode_trimesh.c:14090: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_World': ode_trimesh.c:14242: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_World': ode_trimesh.c:14250: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_World': ode_trimesh.c:14265: warning: unused variable 'p' ode_trimesh.c:14264: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_World': ode_trimesh.c:14270: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_BallJoint': ode_trimesh.c:15015: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_BallJoint': ode_trimesh.c:15023: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_BallJoint': ode_trimesh.c:15029: warning: unused variable 'p' ode_trimesh.c:15028: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_BallJoint': ode_trimesh.c:15035: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_HingeJoint': ode_trimesh.c:15167: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_HingeJoint': ode_trimesh.c:15175: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_HingeJoint': ode_trimesh.c:15181: warning: unused variable 'p' ode_trimesh.c:15180: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_HingeJoint': ode_trimesh.c:15187: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_SliderJoint': ode_trimesh.c:15324: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_SliderJoint': ode_trimesh.c:15332: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_SliderJoint': ode_trimesh.c:15338: warning: unused variable 'p' ode_trimesh.c:15337: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_SliderJoint': ode_trimesh.c:15344: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_UniversalJoint': ode_trimesh.c:15478: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_UniversalJoint': ode_trimesh.c:15486: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_UniversalJoint': ode_trimesh.c:15492: warning: unused variable 'p' ode_trimesh.c:15491: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_UniversalJoint': ode_trimesh.c:15498: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_Hinge2Joint': ode_trimesh.c:15635: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_Hinge2Joint': ode_trimesh.c:15643: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_Hinge2Joint': ode_trimesh.c:15649: warning: unused variable 'p' ode_trimesh.c:15648: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_Hinge2Joint': ode_trimesh.c:15655: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_FixedJoint': ode_trimesh.c:15795: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_FixedJoint': ode_trimesh.c:15803: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_FixedJoint': ode_trimesh.c:15809: warning: unused variable 'p' ode_trimesh.c:15808: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_FixedJoint': ode_trimesh.c:15815: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_ContactJoint': ode_trimesh.c:15943: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_ContactJoint': ode_trimesh.c:15951: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_ContactJoint': ode_trimesh.c:15957: warning: unused variable 'p' ode_trimesh.c:15956: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_ContactJoint': ode_trimesh.c:15963: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_AMotor': ode_trimesh.c:16090: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_AMotor': ode_trimesh.c:16098: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_AMotor': ode_trimesh.c:16104: warning: unused variable 'p' ode_trimesh.c:16103: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_AMotor': ode_trimesh.c:16110: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_SpaceBase': ode_trimesh.c:16461: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_SpaceBase': ode_trimesh.c:16469: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_SpaceBase': ode_trimesh.c:16484: warning: unused variable 'p' ode_trimesh.c:16483: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_SpaceBase': ode_trimesh.c:16490: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_SimpleSpace': ode_trimesh.c:16624: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_SimpleSpace': ode_trimesh.c:16632: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_SimpleSpace': ode_trimesh.c:16638: warning: unused variable 'p' ode_trimesh.c:16637: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_SimpleSpace': ode_trimesh.c:16644: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_HashSpace': ode_trimesh.c:16771: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_HashSpace': ode_trimesh.c:16779: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_HashSpace': ode_trimesh.c:16785: warning: unused variable 'p' ode_trimesh.c:16784: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_HashSpace': ode_trimesh.c:16791: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_QuadTreeSpace': ode_trimesh.c:16920: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_QuadTreeSpace': ode_trimesh.c:16928: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_QuadTreeSpace': ode_trimesh.c:16934: warning: unused variable 'p' ode_trimesh.c:16933: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_QuadTreeSpace': ode_trimesh.c:16940: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_GeomSphere': ode_trimesh.c:17067: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_GeomSphere': ode_trimesh.c:17075: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_GeomSphere': ode_trimesh.c:17081: warning: unused variable 'p' ode_trimesh.c:17080: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_GeomSphere': ode_trimesh.c:17087: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_GeomBox': ode_trimesh.c:17219: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_GeomBox': ode_trimesh.c:17227: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_GeomBox': ode_trimesh.c:17233: warning: unused variable 'p' ode_trimesh.c:17232: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_GeomBox': ode_trimesh.c:17239: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_GeomPlane': ode_trimesh.c:17371: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_GeomPlane': ode_trimesh.c:17379: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_GeomPlane': ode_trimesh.c:17385: warning: unused variable 'p' ode_trimesh.c:17384: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_GeomPlane': ode_trimesh.c:17391: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_GeomCCylinder': ode_trimesh.c:17522: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_GeomCCylinder': ode_trimesh.c:17530: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_GeomCCylinder': ode_trimesh.c:17536: warning: unused variable 'p' ode_trimesh.c:17535: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_GeomCCylinder': ode_trimesh.c:17542: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_GeomRay': ode_trimesh.c:17674: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_GeomRay': ode_trimesh.c:17682: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_GeomRay': ode_trimesh.c:17688: warning: unused variable 'p' ode_trimesh.c:17687: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_GeomRay': ode_trimesh.c:17694: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_TriMeshData': ode_trimesh.c:17986: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_dealloc_3ode_TriMeshData': ode_trimesh.c:17994: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_traverse_3ode_TriMeshData': ode_trimesh.c:18009: warning: unused variable 'p' ode_trimesh.c:18008: warning: unused variable 'e' ode_trimesh.c: In function '__pyx_tp_clear_3ode_TriMeshData': ode_trimesh.c:18014: warning: unused variable 'p' ode_trimesh.c: In function '__pyx_tp_new_3ode_GeomTriMesh': ode_trimesh.c:18142: error: invalid lvalue in assignment ode_trimesh.c: In function '__pyx_tp_clear_3ode_GeomTriMesh': ode_trimesh.c:18169: error: invalid lvalue in assignment ode_trimesh.c: In function '__Pyx_GetStarArgs': ode_trimesh.c:19068: warning: suggest explicit braces to avoid ambiguous 'else' ode_trimesh.c:19070: warning: suggest explicit braces to avoid ambiguous 'else' ode_trimesh.c: In function '__Pyx_EndUnpack': ode_trimesh.c:19219: warning: suggest parentheses around assignment used as truth value error: command 'gcc' failed with exit status 1 [wildmage@localhost PyODE-1.1.0]$ rpm -qa | grep pyrex |
From: <mi...@mi...> - 2006-11-24 21:41:05
|
Strange. There is no 's' variable... apart from sx,sy,sz when setting glScale in the draw_body() part. Setting scale to zero would give an error, but they shouldn't be zero. Thanks for checking on your machine. I wonder what's happening there. - Miriam > mi...@mi... wrote: > > but their behavior is markedly different. Why? > > They behave the same on my machine, but both generate this message: > > ODE Message 3: LCP internal error, s <= 0 (s=-0.0000e+00) > > Ethan |
From: <mi...@mi...> - 2006-11-24 21:33:02
|
Thank you. I'll look into that. - Miriam > setting your worlds ERP and CFM to zero seems to fix this, not sure why tho.. > -brett > > > --- mi...@mi... wrote: > > > Hi folks, > > > > A friend (he's probably joining pyode-user as I send this) sent me the two small python scripts > > (attached). They both drop a block near another. They are the same except for one being at > > (0,0,0) the other at (10,10,10), but their behavior is markedly different. Why? > > > > Is there any way to ensure that behavior has positional independence? ...at least in fairly > > ordinary ranges. I know things will get crazy near the limits of numerical precision, but this > > is just a little over 10 units from the center of the universe. > > > > Is there some other parameter that needs to be handled to take account of the position? > > > > Best wishes, > > > > - Miriam > > -- > > ---------=---------=---------=---------=---------=---------=------ > > A life! Cool! Where can I download one of those from? > > ---------=---------=---------=---------=---------=---------=------ > > Website: http://miriam-english.org > > Blog: http://www.livejournal.com/users/miriam_e/ > > > # pyODE example 3: Collision detection > > # origin > > > > # Originally by Matthias Baas. > > # Updated by Pierre Gay to work without pygame or cgkit. > > > > import sys, os, random, time > > from math import * > > from OpenGL.GL import * > > from OpenGL.GLU import * > > from OpenGL.GLUT import * > > > > import ode > > > > # geometric utility functions > > def scalp (vec, scal): > > vec[0] *= scal > > vec[1] *= scal > > vec[2] *= scal > > > > def length (vec): > > return sqrt (vec[0]**2 + vec[1]**2 + vec[2]**2) > > > > # prepare_GL > > def prepare_GL(): > > """Prepare drawing. > > """ > > > > # Viewport > > glViewport(0,0,640,480) > > > > # Initialize > > glClearColor(0.8,0.8,0.9,0) > > glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); > > glEnable(GL_DEPTH_TEST) > > glDisable(GL_LIGHTING) > > glEnable(GL_LIGHTING) > > glEnable(GL_NORMALIZE) > > glShadeModel(GL_FLAT) > > > > # Projection > > glMatrixMode(GL_PROJECTION) > > glLoadIdentity() > > gluPerspective (45,1.3333,0.2,20) > > > > # Initialize ModelView matrix > > glMatrixMode(GL_MODELVIEW) > > glLoadIdentity() > > > > # Light source > > glLightfv(GL_LIGHT0,GL_POSITION,[0,0,1,0]) > > glLightfv(GL_LIGHT0,GL_DIFFUSE,[1,1,1,1]) > > glLightfv(GL_LIGHT0,GL_SPECULAR,[1,1,1,1]) > > glEnable(GL_LIGHT0) > > > > # View transformation > > gluLookAt (2.4, 3.6, 4.8, 0.5, 0.5, 0, 0, 1, 0) > > > > # draw_body > > def draw_body(body): > > """Draw an ODE body. > > """ > > > > x,y,z = body.getPosition() > > R = body.getRotation() > > #rot = [R[0], R[3], R[6], 0., > > # R[1], R[4], R[7], 0., > > # R[2], R[5], R[8], 0., > > # x, y, z, 1.0] > > rot = [1, 0.0, 0.0, 0.0, > > 0.0, 1, 0.0, 0.0, > > 0.0, 0.0, 1.0, 0.0, > > x, y, z, 1.0] > > glPushMatrix() > > glMultMatrixd(rot) > > if body.shape=="box": > > sx,sy,sz = body.boxsize > > glScale(sx, sy, sz) > > glutSolidCube(1) > > glPopMatrix() > > > > > > # create_box > > def create_box(world, space, density, lx, ly, lz): > > """Create a box body and its corresponding geom.""" > > > > # Create body > > body = ode.Body(world) > > M = ode.Mass() > > M.setBox(density, lx, ly, lz) > > body.setMass(M) > > > > # Set parameters for drawing the body > > body.shape = "box" > > body.boxsize = (lx, ly, lz) > > > > # Create a box geom for collision detection > > geom = ode.GeomBox(space, lengths=body.boxsize) > > geom.setBody(body) > > > > return body > > > > # create box object > > def create_object(posx, posy, posz): > > """create one box at a given position.""" > > > > global bodies, counter, objcount > > > > body = create_box(world, space, 1000, 1.0,1.0,1.0) > > body.setPosition((posx, posy, posz)) > > bodies.append(body) > > #counter=0 > > objcount+=1 > > > > > > # drop_object > > def drop_object(posx, posy, posz): > > """Drop an object into the scene.""" > > > > global bodies, counter, objcount > > > > body = create_box(world, space, 1000, 1.0,1.0,1.0) > > body.setPosition((posx, posy, posz)) > > bodies.append(body) > > #counter=0 > > objcount+=1 > > > > # Collision callback > > def near_callback(args, geom1, geom2): > > """Callback function for the collide() method. > > > > This function checks if the given geoms do collide and > > creates contact joints if they do. > > """ > > > > # Check if the objects do collide > > contacts = ode.collide(geom1, geom2) > > > > # Create contact joints > > world,contactgroup = args > > for c in contacts: > > c.setBounce(0.2) > > c.setMu(5000) > > j = ode.ContactJoint(world, contactgroup, c) > > j.attach(geom1.getBody(), geom2.getBody()) > > > > > > > > ###################################################################### > > > > # Initialize Glut > > glutInit ([]) > > > > # Open a window > > glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE) > > > > x = 0 > > y = 0 > > width = 640 > > height = 480 > > glutInitWindowPosition (x, y); > > glutInitWindowSize (width, height); > > glutCreateWindow ("(0,0,0)") > > > > # Create a world object > > world = ode.World() > > world.setGravity( (0,-9.81,0) ) > > world.setERP(0.8) > > world.setCFM(1E-5) > > > > # Create a space object > > space = ode.Space() > > > > # Create a plane geom which prevent the objects from falling forever > > floor = ode.GeomPlane(space, (0,1,0), 0) > > > > # A list with ODE bodies > > bodies = [] > > > > # A joint group for the contact joints that are generated whenever > > # two bodies collide > > contactgroup = ode.JointGroup() > > > > # Some variables used inside the simulation loop > > fps = 50 > > dt = 1.0/fps > > running = True > > state = 0 > > counter = 0 > > objcount = 0 > > lasttime = time.time() > > > > > > # keyboard callback > > def _keyfunc (c, x, y): > > sys.exit (0) > > > > glutKeyboardFunc (_keyfunc) > > > > # draw callback > > def _drawfunc (): > > > === message truncated ===> # pyODE example 3: Collision detection > > # 1000 > > > > # Originally by Matthias Baas. > > # Updated by Pierre Gay to work without pygame or cgkit. > > > > import sys, os, random, time > > from math import * > > from OpenGL.GL import * > > from OpenGL.GLU import * > > from OpenGL.GLUT import * > > > > import ode > > > > # geometric utility functions > > def scalp (vec, scal): > > vec[0] *= scal > > vec[1] *= scal > > vec[2] *= scal > > > > def length (vec): > > return sqrt (vec[0]**2 + vec[1]**2 + vec[2]**2) > > > > # prepare_GL > > def prepare_GL(): > > """Prepare drawing. > > """ > > > > # Viewport > > glViewport(0,0,640,480) > > > > # Initialize > > glClearColor(0.8,0.8,0.9,0) > > glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); > > glEnable(GL_DEPTH_TEST) > > glDisable(GL_LIGHTING) > > glEnable(GL_LIGHTING) > > glEnable(GL_NORMALIZE) > > glShadeModel(GL_FLAT) > > > > # Projection > > glMatrixMode(GL_PROJECTION) > > glLoadIdentity() > > gluPerspective (45,1.3333,0.2,20) > > > > # Initialize ModelView matrix > > glMatrixMode(GL_MODELVIEW) > > glLoadIdentity() > > > > # Light source > > glLightfv(GL_LIGHT0,GL_POSITION,[0,0,1,0]) > > glLightfv(GL_LIGHT0,GL_DIFFUSE,[1,1,1,1]) > > glLightfv(GL_LIGHT0,GL_SPECULAR,[1,1,1,1]) > > glEnable(GL_LIGHT0) > > > > # View transformation > > gluLookAt (12.4, 13.6, 14.8, 10.5, 10.5, 10, 0, 1, 0) > > > > # draw_body > > def draw_body(body): > > """Draw an ODE body. > > """ > > > > x,y,z = body.getPosition() > > R = body.getRotation() > > #rot = [R[0], R[3], R[6], 0., > > # R[1], R[4], R[7], 0., > > # R[2], R[5], R[8], 0., > > # x, y, z, 1.0] > > rot = [1, 0.0, 0.0, 0.0, > > 0.0, 1, 0.0, 0.0, > > 0.0, 0.0, 1.0, 0.0, > > x, y, z, 1.0] > > glPushMatrix() > > glMultMatrixd(rot) > > if body.shape=="box": > > sx,sy,sz = body.boxsize > > glScale(sx, sy, sz) > > glutSolidCube(1) > > glPopMatrix() > > > > > > # create_box > > def create_box(world, space, density, lx, ly, lz): > > """Create a box body and its corresponding geom.""" > > > > # Create body > > body = ode.Body(world) > > M = ode.Mass() > > M.setBox(density, lx, ly, lz) > > body.setMass(M) > > > > # Set parameters for drawing the body > > body.shape = "box" > > body.boxsize = (lx, ly, lz) > > > > # Create a box geom for collision detection > > geom = ode.GeomBox(space, lengths=body.boxsize) > > geom.setBody(body) > > > > return body > > > > # create box object > > def create_object(posx, posy, posz): > > """create one box at a given position.""" > > > > global bodies, counter, objcount > > > > body = create_box(world, space, 1000, 1.0,1.0,1.0) > > body.setPosition((posx, posy, posz)) > > bodies.append(body) > > #counter=0 > > objcount+=1 > > > > > > # drop_object > > def drop_object(posx, posy, posz): > > """Drop an object into the scene.""" > > > > global bodies, counter, objcount > > > > body = create_box(world, space, 1000, 1.0,1.0,1.0) > > body.setPosition((posx, posy, posz)) > > bodies.append(body) > > #counter=0 > > objcount+=1 > > > > # Collision callback > > def near_callback(args, geom1, geom2): > > """Callback function for the collide() method. > > > > This function checks if the given geoms do collide and > > creates contact joints if they do. > > """ > > > > # Check if the objects do collide > > contacts = ode.collide(geom1, geom2) > > > > # Create contact joints > > world,contactgroup = args > > for c in contacts: > > c.setBounce(0.2) > > c.setMu(5000) > > j = ode.ContactJoint(world, contactgroup, c) > > j.attach(geom1.getBody(), geom2.getBody()) > > > > > > > > ###################################################################### > > > > # Initialize Glut > > glutInit ([]) > > > > # Open a window > > glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE) > > > > x = 0 > > y = 0 > > width = 640 > > height = 480 > > glutInitWindowPosition (x, y); > > glutInitWindowSize (width, height); > > glutCreateWindow ("(10,10,10)") > > > > # Create a world object > > world = ode.World() > > world.setGravity( (0,-9.81,0) ) > > world.setERP(0.8) > > world.setCFM(1E-5) > > > > # Create a space object > > space = ode.Space() > > > > # Create a plane geom which prevent the objects from falling forever > > floor = ode.GeomPlane(space, (0,1,0), 10) > > > > # A list with ODE bodies > > bodies = [] > > > > # A joint group for the contact joints that are generated whenever > > # two bodies collide > > contactgroup = ode.JointGroup() > > > > # Some variables used inside the simulation loop > > fps = 50 > > dt = 1.0/fps > > running = True > > state = 0 > > counter = 0 > > objcount = 0 > > lasttime = time.time() > > > > > > # keyboard callback > > def _keyfunc (c, x, y): > > sys.exit (0) > > > > glutKeyboardFunc (_keyfunc) > > > > # draw callback > > def _drawfunc (): > > > === message truncated ===> > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys - and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > _______________________________________________ > > Pyode-user mailing list > > Pyo...@li... > > https://lists.sourceforge.net/lists/listinfo/pyode-user > > > > > > > ____________________________________________________________________________________ > Do you Yahoo!? > Everyone is raving about the all-new Yahoo! Mail beta. > http://new.mail.yahoo.com |