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...> - 2009-08-19 00:06:26
|
Leo Rocha wrote: > On Mon, Aug 17, 2009 at 7:28 PM, George<pin...@gm...> wrote: >> Well, I think I found the solution. The plane defines a ground-like >> object and not a paper-like infinitely thin surface as we're used to >> from math. So when the top_rail is used, the simulation assumes the >> ball is inside that ground object and goes crazy. > > Hae you thought about that the surfaces are orientable (mathematical > analysis) and that the vector is different from one side and the > other? that is why acts like if it is solid in one side and a surface > in the other. That said, I think it does behave like George says in the sense that it isn't infinitely thin, but instead infinitely deep. That's why it shoots up so fast at t=0, even when there's no force on it. Ethan |
From: Leo R. <le...@gm...> - 2009-08-18 21:06:35
|
On Mon, Aug 17, 2009 at 7:28 PM, George<pin...@gm...> wrote: > Well, I think I found the solution. The plane defines a ground-like > object and not a paper-like infinitely thin surface as we're used to > from math. So when the top_rail is used, the simulation assumes the > ball is inside that ground object and goes crazy. Hae you thought about that the surfaces are orientable (mathematical analysis) and that the vector is different from one side and the other? that is why acts like if it is solid in one side and a surface in the other. Best, Leonardo Manuel Rocha |
From: George <pin...@gm...> - 2009-08-17 17:28:19
|
Well, I think I found the solution. The plane defines a ground-like object and not a paper-like infinitely thin surface as we're used to from math. So when the top_rail is used, the simulation assumes the ball is inside that ground object and goes crazy. Thanks for your help. On Mon, Aug 17, 2009 at 8:12 PM, Ian Mallett<geo...@gm...> wrote: > Hi, > > Long answer: > -Look at the output with raw_input. > -The code presented seems to make the sphere fall, but then fall the other > direction, and back and forth until it settles at top_rail. > -Try setting the gravity to 0, and the ball goes up indefinitely. > -I recommend moving the two for loops together. When the rails are removed, > you see that the sphere just sits there. An interaction with the rail must > be starting the sphere moving. This explains the earlier observation with > gravity. It's the top rail, not the bottom rail. > -The problem only seems to occur when top_rail is over the sphere. When it > is at the level of the sphere, the sphere moves up on top of it. When it is > a little over the sphere, we see that the sphere is still moving up. > Intuitively, I flip the normal (and the distance argument). The result is a > perfect simulation, even when the gravity is flipped. > > Short answer: > -Change top_rail=ode.GeomPlane(space, (0,1,0), 1.42) to > top_rail=ode.GeomPlane(space, (0,-1,0), -1.42). > > Ian > > > |
From: George <pin...@gm...> - 2009-08-17 09:14:42
|
Actually, the code above works fine only if we remove the top_rail definition. That's a mystery as well. |
From: George <pin...@gm...> - 2009-08-17 09:12:24
|
import ode BD=.0615 BR=BD/2 def c_callback(args, geom1, geom2): contacts=ode.collide(geom1, geom2) world, contact_group = args for c in contacts: c.setBounce(.7) c.setMu(5000) j = ode.ContactJoint(world, contact_group, c) j.attach(geom1.getBody(), geom2.getBody()) world=ode.World() space=ode.Space() contact_group=ode.JointGroup() world.setGravity((0,-9,0)) top_rail=ode.GeomPlane(space, (0,1,0), 1.42) bottom_rail=ode.GeomPlane(space, (0,1,0), 0) bballs=[ode.Body(world) for i in range(1)] for bball in bballs: M=ode.Mass() M.setSphere(2500., BR) bball.setMass(M) geom=ode.GeomSphere(space, BR) geom.setBody(bball) for bball in bballs: bball.setPosition((1,0.8,1) ) bball.addForce((0,0,0)) dt=.01 while(1): space.collide((world,contact_group), c_callback) world.step(dt) print bballs[0].getPosition() contact_group.empty() The above works fine. But if I change the ygravity from -9 to 9 the ball doesn't bounce on the top_rail, it just goes through. Why? |
From: Jim T. <jt...@mi...> - 2009-06-20 18:54:56
|
I have posted my VisualPyODE library at http://www.missioncognition.net/visualpyode/ under the LGPL or BSD licenses. For those not familiar, VisualPython is a fairly simple yet capable 3D visualization package for python. I had been using VisualPython for visualization of my models and found it cumbersome to have to define every object three times (once each for physics, collision, and display). So I made a library which automatically handles all three at once. It is an alpha release that works pretty reliably but is not yet what I would consider feature-complete. I have implemented some demos that show the library in action (three of them are re implementations of the PyODE tutorials). It should work correctly with either v5.1 or v3.2.9 of VisualPython. JT |
From: Gilbert R. R. <g.r...@gm...> - 2009-04-22 12:07:16
|
Hi physicist, I patched PyOde to compile with Cython and Python 3 (appended). I tested it somehow with examples/tutorial*.py but I think this won't be enough tests ;) I commented all the PyGame and PyOpenGL code out cause they aren't available for Python 3. There is a weird line in my patch in src/mass.pyx. Cause it is my first try with Cython and my first "project" with Python 3, I didn't investigated it much... maybe I do that when a second error like this occurs. It has something to do with string encoding and the difference of the types bytes and str. There was also a recursive import in xode/body.py and xode/geom.py I deleted. Thx for using .pyx files ;) Gilbert |
From: Dodo D. <dod...@go...> - 2009-04-22 04:19:32
|
hey i was running the tutorial 3 with python2.5.2 and noticed that there is a bug in the create_box function ... my little repair-hack is: * geom_cache = [] #hack* 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) *geom_cache.append(geom) #hack* return body the problem is that the garbage collector frees the geom-objects after left from the function, which are neccessary for collision-detection. sincerely dodo |
From: Tristam M. <swi...@gm...> - 2009-02-23 04:54:25
|
On Sun, Feb 22, 2009 at 10:41 PM, Tristam MacDonald <swi...@gm...>wrote: > Is anyone able to provide some pointers on getting pyode to build in a > windows environment? I need to compile the updates I made earlier. > What I have so far: > > Python 2.6, working. > ODE compiled with VS 2008 > Stock PyODE compiles and works. > Pyrex, seemingly working, attached to stock MinGW w/ gcc 3.4 > > However, I can't for the life of me get setup.py to compile the pyrex files > - are there any special tricks required? > Apologies, it turned out to be an issue with my pyrex installation (the instructions around the web are far from clear). -- Tristam MacDonald http://swiftcoder.wordpress.com/ |
From: Tristam M. <swi...@gm...> - 2009-02-23 03:41:45
|
Is anyone able to provide some pointers on getting pyode to build in a windows environment? I need to compile the updates I made earlier. What I have so far: Python 2.6, working. ODE compiled with VS 2008 Stock PyODE compiles and works. Pyrex, seemingly working, attached to stock MinGW w/ gcc 3.4 However, I can't for the life of me get setup.py to compile the pyrex files - are there any special tricks required? -- Tristam MacDonald http://swiftcoder.wordpress.com/ |
From: Tristam M. <swi...@gm...> - 2009-02-20 02:50:43
|
On Thu, Feb 19, 2009 at 7:08 PM, Ethan Glasser-Camp <gl...@cs...>wrote: > > Sending patches to this mailing list is fine. But you might consider > using cvs diff -u in the future, everyone loves unified diff :) > Thanks for the tip - been a while since I used CVS ;) -- Tristam MacDonald http://swiftcoder.wordpress.com/ |
From: Ethan Glasser-C. <gl...@cs...> - 2009-02-20 00:30:35
|
Tristam MacDonald wrote: > I am using pyode to develop a game, and have had to start updating the > bindings to match ODE 0.11, as I need access to several more recent > features (currently linear and angular damping). > > I have attached a patch against CVS head for this particular feature, > but I am sure more will be forthcoming over the next few weeks, as I > work with ODE. Is there interest in having these updates added to CVS, > and if so, to whom should I submit the patches? > > -- > Tristam MacDonald > http://swiftcoder.wordpress.com/ Applied, thanks! Sending patches to this mailing list is fine. But you might consider using cvs diff -u in the future, everyone loves unified diff :) Ethan |
From: Thomas P. <tho...@fr...> - 2008-06-19 15:55:28
|
Hello, You will find below a modified version of the script 'tutorial3.py'. Press either 'b' to drop boxes geoms, 's' to drop spheres, 'c' to drop ccylinder or 'q' to exit. Dropping boxes is the default behaviour. Regards, Thomas Paviot # pyODE example 3: Collision detection # Originally by Matthias Baas. # Updated by Pierre Gay to work without pygame or cgkit. # Updated by Thomas Paviot (tho...@fr...) to drop either boxes, spheres or cylinders import sys, os, random, time from math import * from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * import ode # geoms definition BOX = 1 CCYLINDER = 2 SPHERE = 3 GEOM_TO_DROP = BOX quadratic = None #necessary for cylinder # 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. """ global quadratic quadratic = gluNewQuadric() # Viewport glViewport(0,0,800,600) # 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] glPushMatrix() glMultMatrixd(rot) if body.shape=="sphere": radius = body.radius glutSolidSphere(radius,20,20) elif body.shape=="box": sx,sy,sz = body.boxsize glScale(sx, sy, sz) glutSolidCube(1) elif body.shape=="ccylinder": radius = body.radius height = body.height gluCylinder(quadratic,radius,radius,height,32,32) #gluCylinder(radius,height,20,20) 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 def create_sphere(world, space, density, radius): """Create a box body and its corresponding geom.""" # Create body body = ode.Body(world) M = ode.Mass() M.setSphere(density, radius) body.setMass(M) # Set parameters for drawing the body body.shape = "sphere" body.radius = radius # Create a Sphere geom for collision detection geom = ode.GeomSphere(space, radius) geom.setBody(body) return body def create_ccylinder(world, space, density, radius, height): """Create a box body and its corresponding geom.""" # Create body body = ode.Body(world) M = ode.Mass() M.setCappedCylinder(density, direction=1, r = radius, h = height) body.setMass(M) # Set parameters for drawing the body body.shape = "ccylinder" body.radius = radius body.height = height # Create a CCylinder geom for collision detection geom = ode.GeomCCylinder(space, radius, height) geom.setBody(body) return body # drop_object def drop_object(): """Drop an object into the scene.""" global bodies, counter, objcount if GEOM_TO_DROP==SPHERE: body = create_sphere(world, space, 1000, radius = 0.2) elif GEOM_TO_DROP == BOX: body = create_box(world, space, 1000, 1.0, 0.2,0.2) elif GEOM_TO_DROP == CCYLINDER: body = create_ccylinder(world, space, 1000, radius = 0.2, height = 0.2) body.setPosition( (random.gauss(0,0.1),3.0,random.gauss(0,0.1)) ) theta = random.uniform(0,2*pi) ct = cos (theta) st = sin (theta) body.setRotation([ct, 0., -st, 0., 1., 0., st, 0., ct]) bodies.append(body) counter=0 objcount+=1 # explosion def explosion(): """Simulate an explosion. Every object is pushed away from the origin. The force is dependent on the objects distance from the origin. """ global bodies for b in bodies: l=b.getPosition () d = length (l) a = max(0, 40000*(1.0-0.2*d*d)) l = [l[0] / 4, l[1], l[2] /4] scalp (l, a / length (l)) b.addForce(l) # pull def pull(): """Pull the objects back to the origin. Every object will be pulled back to the origin. Every couple of frames there'll be a thrust upwards so that the objects won't stick to the ground all the time. """ global bodies, counter for b in bodies: l=list (b.getPosition ()) scalp (l, -1000 / length (l)) b.addForce(l) if counter%60==0: b.addForce((0,10000,0)) # 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 = 800 height = 600 glutInitWindowPosition (x, y); glutInitWindowSize (width, height); glutCreateWindow ("testode") # Create a world object world = ode.World() world.setGravity( (0,-9.81,0) ) world.setERP(0.8) world.setCFM(1E-3) # 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): global GEOM_TO_DROP if c=="b": GEOM_TO_DROP = BOX elif c=="s": GEOM_TO_DROP = SPHERE elif c=="c": GEOM_TO_DROP = CCYLINDER elif c=="q": sys.exit (0) glutKeyboardFunc (_keyfunc) # draw callback def _drawfunc (): # Draw the scene prepare_GL() for b in bodies: draw_body(b) glutSwapBuffers () glutDisplayFunc (_drawfunc) # idle callback def _idlefunc (): global counter, state, lasttime t = dt - (time.time() - lasttime) if (t > 0): time.sleep(t) counter += 1 if state==0: if counter==20: drop_object() if objcount==30: state=1 counter=0 # State 1: Explosion and pulling back the objects elif state==1: if counter==100: explosion() if counter>300: pull() if counter==500: counter=20 glutPostRedisplay () # Simulate n = 2 for i in range(n): # Detect collisions and create contact joints space.collide((world,contactgroup), near_callback) # Simulation step world.step(dt/n) # Remove all contact joints contactgroup.empty() lasttime = time.time() glutIdleFunc (_idlefunc) # # # print "Press 'b' to drop a box" print "Press 's' to drop a sphere" print "Press 'c' to drop a cylinder" print "Press 'q' to quit." glutMainLoop () |
From: Travis D. <the...@gm...> - 2008-06-18 04:21:35
|
Sorry to be a bit spammy, but I've re-tested this on a winXP environment and the exact same code executes as expected without major problems. That leads me to believe that there's some problem with running the python-pyode package (available via apt-get) on Hardy Heron 64 bit. Regards, Travis Dixon |
From: Travis D. <the...@gm...> - 2008-06-17 22:59:57
|
Ok, so I've researched faces a little more, and now I'm of the opinion that it means a list of triplets, each triplet holds the index of 3 vertices in the vertice list. Unfortunately now that I've got my trimeshdata building I get a seg fault as soon as I test for collisions. here's a snippet of my code to create the geometry odePos = (2.0, 2.0, 0) triMeshData = ode.TriMeshData() verts = [(0.0, 0.0, 0.0),#0 (2.0, 0.5, 0.0),#1 (2.0, 0.5, 1.0)]#2 faces = [(0,1,2)] triMeshData.build(verts, faces) geom = ode.GeomTriMesh(triMeshData, space) geom.setPosition(odePos) Which I'm expecting to create a geom with a single triangle on an incline. I've tried using the same thing to define a complete wedge (my eventual goal) using shared vertices. I guess the only thing left that I haven't tried is a wedge with repeated vertices, assuming there could be a problem if the tri-mesh is not a closed shape... I think this is an area where the docs could definitely use a little extra commentary. It may be that I'm just lacking a lot of basic 3d programming fundamentals, but I think there's probably more than one way of specifying vertexes and faces and neither the tutorials nor the docstrings really talk about how you go about setting the trimesh data up. Once I understand it I'd be happy to provide some extra doc strings and/or a tutorial |
From: Travis D. <the...@gm...> - 2008-06-16 22:00:14
|
Hi Everyone, I'm not only new to pyode, but relatively new to phyiscs sim's in general. I'm trying to create a 2d simulation of a bunch of balls bouncing off boxes and ramps. So far I can get the balls and the boxes working using sphere's and boxes, however I've gotten stuck on the ramps. As far as I can see trimesh is the geom I need to use, however I don't really understand how I'm supposed to structure my data. The constructor requires a list of vertexes and a list of faces, I'm guessing the vertexes are just 3d points, which i can handle (I just leave the third value at 0) but the faces I don't really understand. are they normals? do I need one for every pair of vertexes or every three vertexes? Is it going to extend from the center of the triangle to the specified point? Are there any online tutorials / docs explaining this data structure and how I can go about setting it up manually? Alternatively, are there any utilities floating around for creating tri-meshes in a GUI app and exporting the data to the pair of lists which I can then feed into pyode? Thanks for taking the time to read, Trav |
From: Michel S. <sa...@sc...> - 2008-04-08 21:30:41
|
Hello I am new to pyODE and have been trying to use it for packing complex molecular geometry object into sub-cellular regions. I started with the 3 tutorials and then moved on to using trimesh objects instead of the Box objects in tutorial3. When I do this my object bounce way to much and each trimesh-trimesh contact seems to generate a huge energy and makes the boxes fly apart when they touch. I looked into the test_trimesh.cpp and test_moving_trimesh demos and tried to used the parameters they use in their near_callback function. This makes my objects sticky and they seem to be glued together as soon as they touch. Has anyone used trimesh-trimesh collision successfully and reliably yet? I am using version 0.8 with opcode. Finally, are they plans to update the wrapper to work with version 0.9? Thanks for any input with this -Michel |
From: Diez B. R. <de...@we...> - 2008-04-07 14:50:19
|
> But how do I go back later, and adjust the mass? I've tried (using Pygame): > elif e.key == K_d: > #self.Ship(mass, position, ode.Body) > M = ode.Mass() > M.setSphere(2500, 0.05) > M.adjust(100) > print M > playerShip.setMass(M) > print playerShip.getMass(M) > > Yet this does nothing, (as far as I know) to the existing ship (it's > velocity doesn't change). Am I creating a new Mass for the object > instead of modifying an existing one? Obviously you are. You create a new one instead of manipulating an existing one. Regarding the effect that has: I'm not sure and can't experiment right now, and you don't give much information. Of course if any forces are applied, they should take the new mass into consideration. If that's not happening, I can only suggest removing the whole ship and replacing it with a new one to make sure internals are proper. But what do you expect to happen just because you alter the mass to the flying ship? Why should it experience any change in velocitiy? Diez |
From: Joseph Q. <cpu...@gm...> - 2008-03-30 18:45:17
|
Hi, I'm working on a space game (kind of like asteroids) but I'd like to be able to adjust the mass of the ship. I can't, for the life of me, figure out how. My code sets the properties for a ship with: def Ship(self, mass, pos, ship): M = ode.Mass() M.setSphere(mass, 0.05) ship.setMass(M) ship.setPosition(pos) But how do I go back later, and adjust the mass? I've tried (using Pygame): elif e.key == K_d: #self.Ship(mass, position, ode.Body) M = ode.Mass() M.setSphere(2500, 0.05) M.adjust(100) print M playerShip.setMass(M) print playerShip.getMass(M) Yet this does nothing, (as far as I know) to the existing ship (it's velocity doesn't change). Am I creating a new Mass for the object instead of modifying an existing one? Thanks, Joe -- All Your Base Are Belong To Us!!! chown -r us ./base "After three days without programming, life becomes meaningless.'' -- Tao of Programming Book 2 |
From: Matthias B. <mb...@us...> - 2008-03-16 19:24:52
|
Hi Petr, sorry for the late reply. You might have figured yourself by now that unfortunately we don't have that much time anymore that we can spend on updating the wrappers. It's quite a while now since I've last used PyODE myself which is why I haven't done any major improvements other than applying patches that were sent to the list. There is no "roadmap" or similar such thing and there are currently no plans about a new release. Sorry. As to your XODE questions, this module was written by Timothy Stranex and I'm not familiar with the code at all. So I can't really help you on that one. If you (or anybody else here) wants to get involved in the development and can spend some time on updating the wrappers, then let me know. I think the wrappers could do with an overhaul anyway. Meanwhile Pyrex supports weak references which could be used inside the code. Alternatively, it might be worth considering if switching to ctypes-based wrappers wouldn't be a better approach anyway. - Matthias - Petr Schreiber wrote: > Hi, > > is there any new version planned during Q1 of 2008? > > I like how PyODE module is done, but as a typical user I want more :) > I would appreciate any functionality on XODE file handling, such as > easier access to GEOM primitives. > It seems developement on this field has been stopped a bit. > > Currently I solve problem with missing features via own modifications of > PyODE core files, but I feel this is not the best thing to do. > > What I miss most is parsing more info from XODE geoms ( exact > dimensions, not just AABB bounding box ) and loading of cylinders. > > To load cylinders I added following to > --- XODE\geom.py: > [code] > def _parseGeomCylinder(self, attrs): > def start(name, attrs): > if (name == 'ext'): > pass > else: > raise errors.ChildError('cylinder', name) > > def end(name): > if (name == 'cylinder'): > self._parser.pop() > > radius = float(attrs['radius']) > length = float(attrs['length']) > > self._setObject(ode.GeomCylinder, radius=radius, length=length) > self._parser.push(startElement=start, endElement=end) > print "Remark: XODE/Mass/Cylinder - Supported only in unofficial > extension..." > [/code] > > In _startElement: > [code] > elif (name == 'cylinder'): > self._parseGeomCylinder(attrs) > [/code] > > --- XODE\body.py ( in _parseMassShape ): > [code] > elif (name == 'cylinder'): > # -- My mod > print "Remark: XODE/Mass/Cylinder - Supported only in > unofficial extension..." > radius = float(attrs['radius']) > length = float(attrs['length']) > if (density is not None): > mass.setCylinder(float(density), 3, radius, length) > [/code] > > I must admit I am very far from being Python or ODE master, so I would > appreciate any addition on this from the "pros". > I will make appropriate post in "feature requests", but I am curious > when new official release is planned, what are your future plans with > this module... > > > Thanks, > Petr > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Pyode-user mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyode-user > |
From: Petr S. <pet...@gm...> - 2008-03-16 16:05:36
|
Hi, I am user of PyODE 1.2 and according to: http://pyode.sourceforge.net/api-1.2.0/public/xode.parser-module.html ... only joint supported in XODE is BallJoint. But when I have a look at XODE/joint.py it seems even other types are parsed and handled. When I define fixed joint in XODE file, I get no error or exception, but the bodies tend to behave very odd ( far from anything which I could call result of simulation :) ). I would appreciate any code snippet, or word of help. Best regards, Petr P.S. I did not get any reply to any of mine questions in at least half year, please let me know if you cannot understand my english, I am already very frustrated and the documentation is very very brief, so not sure what I am doing wrong. |
From: Petr S. <pet...@gm...> - 2008-02-10 19:51:25
|
Hi, is there any new version planned during Q1 of 2008? I like how PyODE module is done, but as a typical user I want more :) I would appreciate any functionality on XODE file handling, such as easier access to GEOM primitives. It seems developement on this field has been stopped a bit. Currently I solve problem with missing features via own modifications of PyODE core files, but I feel this is not the best thing to do. What I miss most is parsing more info from XODE geoms ( exact dimensions, not just AABB bounding box ) and loading of cylinders. To load cylinders I added following to --- XODE\geom.py: [code] def _parseGeomCylinder(self, attrs): def start(name, attrs): if (name == 'ext'): pass else: raise errors.ChildError('cylinder', name) def end(name): if (name == 'cylinder'): self._parser.pop() radius = float(attrs['radius']) length = float(attrs['length']) self._setObject(ode.GeomCylinder, radius=radius, length=length) self._parser.push(startElement=start, endElement=end) print "Remark: XODE/Mass/Cylinder - Supported only in unofficial extension..." [/code] In _startElement: [code] elif (name == 'cylinder'): self._parseGeomCylinder(attrs) [/code] --- XODE\body.py ( in _parseMassShape ): [code] elif (name == 'cylinder'): # -- My mod print "Remark: XODE/Mass/Cylinder - Supported only in unofficial extension..." radius = float(attrs['radius']) length = float(attrs['length']) if (density is not None): mass.setCylinder(float(density), 3, radius, length) [/code] I must admit I am very far from being Python or ODE master, so I would appreciate any addition on this from the "pros". I will make appropriate post in "feature requests", but I am curious when new official release is planned, what are your future plans with this module... Thanks, Petr |
From: nicholas s. <nic...@gm...> - 2008-01-27 16:46:30
|
you have to attach a Transform Geom to the body. Then the transform encapsulates other geoms applied to it. So for example if I wanted to have a barbell as single object, I would create a body, and then assign it a Transform geom, then I would create the two spheres, offset them and then assign them to the Transform geom so that they are locked into place, and then do likewise for the connecting bar. You have the option of assigning a mass based on some other shape, or using the offset geoms as to position the masses as well. But when I did the latter I ran into problems with PyOde in not being able to rotate masses and lock them to the Transform as I did with the geoms. The function below only shows how to assign one geom to a transform. I can't recall if you create a Transform for every geom, or one encapsulates many. best, nick def createGeomSphere(space,body,r,pos): trans = ode.GeomTransform(space) trans.setBody(body) geom = ode.GeomSphere() geom.setRadius(r) trans.setGeom(geom) trans.setInfo(0) geom.setPosition(pos) trans.geom = geom return trans On Jan 26, 2008 7:14 PM, tim rau <bla...@ya...> wrote: > Traceback (most recent call last): > File "C:\Documents and Settings\Owner\My > Documents\NIm's code\sandbox\sandbox.py", line 258, in > <module> > input(pygame.event.get()) > File "C:\Documents and Settings\Owner\My > Documents\NIm's code\sandbox\sandbox.py", line 166, in > input > player.clampDeploy() > File "C:\Documents and Settings\Owner\My > Documents\NIm's code\sandbox\sandbox.py", line 133, in > clampDeploy > self.clamp.setBody(self.body) > File "geomobject.pyx", line 107, in > ode.GeomObject.setBody > TypeError: exceptions must be strings, classes, or > instances, not type > > > Yahoo wont let me keep my exception lines the way > python gave them to me. grumble. Anyway, I'm calling > geom.setBody(self.body), and it seems to be throwing > an exception, but python doesn't like the flavor of > the exception. I've already done a bit of searching on > this one. the geom in question is a ray, and self.body > is really a valid ode.Body, and I know cause I checked > it with pdb. I've looked in the docs, and an ode.Body > seems to be exactly what the function wants. > > I already have a geom attached to this body, but I > want another one as a probe for the magnetic grapple. > I've heard that a body can have any number of geoms, > but I couldn't find it in the docs, so I need this > verified. Also, how do I set the position of the geom > relative to the body? > > > ____________________________________________________________________________________ > Never miss a thing. Make Yahoo your home page. > http://www.yahoo.com/r/hs > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Pyode-user mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyode-user > |
From: tim r. <bla...@ya...> - 2008-01-27 00:14:39
|
Traceback (most recent call last): File "C:\Documents and Settings\Owner\My Documents\NIm's code\sandbox\sandbox.py", line 258, in <module> input(pygame.event.get()) File "C:\Documents and Settings\Owner\My Documents\NIm's code\sandbox\sandbox.py", line 166, in input player.clampDeploy() File "C:\Documents and Settings\Owner\My Documents\NIm's code\sandbox\sandbox.py", line 133, in clampDeploy self.clamp.setBody(self.body) File "geomobject.pyx", line 107, in ode.GeomObject.setBody TypeError: exceptions must be strings, classes, or instances, not type Yahoo wont let me keep my exception lines the way python gave them to me. grumble. Anyway, I'm calling geom.setBody(self.body), and it seems to be throwing an exception, but python doesn't like the flavor of the exception. I've already done a bit of searching on this one. the geom in question is a ray, and self.body is really a valid ode.Body, and I know cause I checked it with pdb. I've looked in the docs, and an ode.Body seems to be exactly what the function wants. I already have a geom attached to this body, but I want another one as a probe for the magnetic grapple. I've heard that a body can have any number of geoms, but I couldn't find it in the docs, so I need this verified. Also, how do I set the position of the geom relative to the body? ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs |
From: tim r. <bla...@ya...> - 2008-01-27 00:05:58
|
Markus Wondered: >Hi All, > >i am new to pyODE. > >Can i use pyODE for Problems like lifting force at >Water. >For Example i have got a empty Bottle which will be >swim on the Water, >but will be sink if it is filled with Water. My >Programm should calculate >what will happen. Or if something lies on the bottle >and push the Bottle >into the Water. > >Bye Markus I think it's unlikely that you'd find a library to do buoyancy for you. There are, however, libraries to make it relatively easy. Google 3d boolean operations. There is likely an operation that would allow you to find the section of your bottle that is below the water. Then, you find a library to help you find the volume and geometric center of the bottle. multiply the density of the fluid by the volume, and you get the magnitude of the force. Of course it will be pointed straight up, and applied at the center of the underwater portion. This is where ODE comes in. It's possible to feed in the buoyancy force you found, the force of gravity, and whatever other forces you have(an outboard engine?!?) and ODE will tell you exactly what's happening. ODE can easily handle setting soemthing on top of your bottle. It's just a matter of creating something to set on top, detecting collisions, and creating a contact joint as long as they are touching. ODE does all these things easily The other thing ODE can do is detect collisions between the neck of the bottle and the water. This will allow you to use some other method to calculate how much water flows in. I'm not sure what you'd do about the Free Surface Effect of the water inside the bottle(google it if you don't know what I'm talking about). You would certaintly have to add it to your center of gravity for the bottle, and thus to your gravitational force. You may not want to get this detailed. There are calculus methods for calculating how much water goes through a given opening in a given time. I could help you with that if you like. It's a fair bit of work, though, so I'll only help you if you want me to. I really do want you to ask me, because I enjoy this sort of thing, and tend to work problems like this at the slightest provocation :) --Tim Rau ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs |