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: Chris B. <chr...@gm...> - 2007-05-28 16:06:34
|
On 28/05/07, Martin Vopatek <vo...@na...> wrote: > Hello > > There seem to be a memory leak in PyODE due to > undeleted geom objects. I found the problem while working on a > simulator that need to create and delete many geom objects. > I used the Heapy memory profiler (part of Guppy-PE) to determine > the cause of the leak. > I'm running python-2.4.2 and PyODE 1.2.0. Attached a reply from a thread in 2005 (since I can't find it archived anywhere). Matthias Baas <ba...@ir...> to pyode-user 04/08/05 Chris Bainbridge wrote: > Hi, the following code appears to leak Body and dict objects. Memprof > [...] > I've looked at the pyode code. It appears that nothing is ever removed > from the global dictionary _geom_c2py_lut. Should this be done in geom > __dealloc__ ? The _geom_c2py_lut is a dictionary that serves as a lookup table to convert the geom pointer received from ODE into the appropriate Python geom object (which has to be done during collisions). So when a geom is created it adds itself to the dictionary and indeed, it is never removed from there. The geom cannot remove itself in __dealloc__() because as long as there's a reference in the dictionary it is not destroyed and __dealloc__() is never called. The solution would be weak references but at the time I wrote the stuff Pyrex didn't support this. I contacted the author, but I believe the current version of Pyrex still doesn't support it (I haven't checked explicitly but at least I never noticed anything in the changelogs). |
From: Martin V. <vo...@na...> - 2007-05-28 13:02:34
|
Hello There seem to be a memory leak in PyODE due to undeleted geom objects. I found the problem while working on a simulator that need to create and delete many geom objects. I used the Heapy memory profiler (part of Guppy-PE) to determine the cause of the leak. I'm running python-2.4.2 and PyODE 1.2.0. The following program fills memory quickly: import ode while True: s = ode.Space() The cause is due to a internal global lookup dictionary for geom objects called _geom_c2py_lut. When a geometry object is created it is added to the global dictionary. This will prohibit the reference count to reach zero and the object will not be removed. I'm still quite new to Python and Pyrex and can unfortunately not contribute much to any solution. Currently I simply set ode._geom_c2py_lut = {} when deleting an instance of my simulator. The same could be achieved by placing a _geom_c2py_lut.clear() in CloseODE(). Neither is a solution. One would like the geom objects to remove themselves from the dictionary when deleted. Why is the dictionary not removed when I do a reload(ode)? /Martin |
From: christopher t. <chr...@gm...> - 2007-05-22 01:10:00
|
Hi there sorry if this seems a redundant question but, i'm in the process of hacking out an XODE viewer for a project i'm currently working on. i'm doing this in python with pygame, pyode, and pyopengl. one good thing is that i can get the AABB vertices (min/max for x,y,z) so that's a start for my viewer my next big issue is getting the triangles from a GeomTriMesh object, unfortunately the sources to pyode and the documentation for pyode indicate that this could happen getTriangle is available. unfortunately, it just isn't going to happen until a method for getting the triangle index values is exposed in the pyode api. right now, i've tried to iterate over an 'infinite series' (generator) of indexes for this data but i get a segmentation fault when i overstep the number of triangle indexes that are actually in the structure (for a trimesh with 20 triangles, i get a segfault when i iterate over 0 to 50 via a generator). i tried to do a try/except clause but, yeah...that doesn't quite stop segfaults. so is this data going to be provided in the next pyode release? thanks! ct |
From: Ethan Glasser-C. <gl...@cs...> - 2007-05-01 17:22:40
|
Chris Bainbridge wrote: > See http://ode.org/ode-latest-userguide.html#sec_3_8_0 for a more > detailed explanation. The user guide makes a distinction between soft constraints and hard constraints. Am I understanding correctly that all ODE joints are soft constraints, just with varying degrees of softness? If you wanted hard collisions, is there some way you could scale CFM by mass, or by 1/mass or something? Does the default CFM "work best" with objects of particular mass? I think someone who uses ODE for the first time will be surprised that collisions are "soft". I'd like to edit the wiki to make it more obvious, but I haven't signed up for an account yet. Ethan |
From: Chris B. <chr...@gm...> - 2007-05-01 08:38:02
|
On 01/05/07, Ethan Glasser-Camp <gl...@cs...> wrote: > To quote Chris Bainbridge, who once answered a similar plea for help > from me: > > "Your CFM value is too high, which allows the generated contacts to be > violated significantly. Try world.setCFM(1E-8)" > > Indeed, I put that line > > world.setCFM(1e-8) > > at line 107 of your program, and everything seems to work more as > you'd expect. I don't really understand this part of ODE too well, > maybe someone else can explain better what's happening. Specifically, > is it true that for any given CFM, you can increase the mass of your > objects, and get more sponginess in your collisions? What gives? Pretty much, yes. CFM just scales the force that would be applied to correct the error from a constraint. Suppose you need a force of 10N to totally correct a constraint in a single simulation step, and CFM is 0.5, then the simulator will actually apply a 5N force in that time step. Hence the error due to the constraint will be slowly corrected over several time steps, rather than in a single time step. Your observation about mass being related to sponginess is correct. Imagine two objects with mass colliding. The larger the mass, the larger the force required to correct the collision and stop the objects from penetrating. Since you only apply a proportion of this force in a single step you'll see more more overlap of the two objects as the mass increases because there is more uncorrected force in total. Hmm. Imagine being hit in the face with an iron bar - you'd expect it to penetrate further than a plastic bar. Now imagine the collision constraint like a very thin/weak force field around your head that pushes objects away. It couldn't stop the lead bar from being swung straight through your skull, but probably could stop the plastic one! ;-) See http://ode.org/ode-latest-userguide.html#sec_3_8_0 for a more detailed explanation. |
From: Malcolm R. <mal...@cs...> - 2007-05-01 08:28:40
|
On 01/05/2007, at 4:27 PM, Ethan Glasser-Camp wrote: > "Your CFM value is too high, which allows the generated contacts to be > violated significantly. Try world.setCFM(1E-8)" > > Indeed, I put that line > > world.setCFM(1e-8) Yes. That seems to work. I notice also that setting CFM to zero causes a singularity. Malcolm -- "The Christian ideal has not been tried and found wanting; it has been found difficult and left untried." - G.K.Chesterton, What's Wrong With The World |
From: Ethan Glasser-C. <gl...@cs...> - 2007-05-01 06:27:33
|
Your original program is kind of hypnotic, actually.. Malcolm Ryan wrote: > Can anyone explain what is going on here? To quote Chris Bainbridge, who once answered a similar plea for help from me: "Your CFM value is too high, which allows the generated contacts to be violated significantly. Try world.setCFM(1E-8)" Indeed, I put that line world.setCFM(1e-8) at line 107 of your program, and everything seems to work more as you'd expect. I don't really understand this part of ODE too well, maybe someone else can explain better what's happening. Specifically, is it true that for any given CFM, you can increase the mass of your objects, and get more sponginess in your collisions? What gives? Ethan |
From: Ethan Glasser-C. <gl...@cs...> - 2007-05-01 06:12:58
|
Sorry to Ting Li for the duplicate messages -- I do this all the time, I'm really sorry. Ting Li wrote: > I expect the sphere1 should move in an arc. But I cannot see the change= > in y-axis. > what's wrong here? BTW, can anyone give an example of a dumbbell I > described above > using geomtransform? Thanks in advance! Hi, I just started looking at your program and haven't found anything yet, but one suggestion I would make: when troubleshooting, take out as much code as you can, and see if you still have the error. In ODE, the dynamics is done separately from the collision detection. You could take out the collision detection, the contactGroup, the GeomSpheres, and see if you still have the same problem. Basically, I think the behavior you are seeing is "correct", but not what you want. The center of mass of a body is always at that object's center, as far as I know, even when you use mass.translate(). I think mass.translate() is only useful for combining masses and finding out where their combined center of mass will be. You might want to try joining the two bodies together using a joint, or using GeomTransform. I don't have an example handy right now, sorry. Ethan |
From: Malcolm R. <mal...@cs...> - 2007-05-01 05:26:40
|
Hi, I'm a new user of ODE, working with the PyODE interface in order to build games with PyGame. I've written a test program (attached) but it doesn't seem to work right. Basically, it involves two objects (a box and a sphere) dropping onto a floor (a plane). When they collide with the floor, they are supposed to stop. It all works fine, until I give the objects mass. Once I add the following lines: M = ode.Mass() M.setSphere(10, self.radius) self.body.setMass(M) The Circle object starts to significantly penetrate the floor, and bounce a lot. It eventually comes to rest half-embedded in the floor. If I reduce the density from 10 to 1, the problem is significantly reduced, but still there is a lot of bouncing before the objects come to rest on the surface. Can anyone explain what is going on here? Thanks, Malcolm -- "Cleanliness is not next to godliness nowadays, for cleanliness is made an essential and godliness is regarded as an offence. - G.K.Chesterton, On Lying in Bed |
From: Ting L. <dri...@gm...> - 2007-04-30 16:43:31
|
Hello, I'm learning Pyode now. I'm blocked by the usage of 'geomtransform' and the mass property. I intended to make a dumbell in the ode world, composed of two geoms connecting to one ode body. When I touch or something hits one of the two balls, the dumbbell should rotate. (as the center of mass is in the middle) I made the following program to test if a force acting on a point other than the center of mass can make body1 rotate about its center of mass? I first move the center of mass of body1 to M1.translate((0.0, 5.0, 0.0)) Then I add a force in x direction at a relative position (0,1,0) ode_body1.addForceAtRelPos((-100.0,0.0,0.0),(0.0,1.0,0.0)) I expect the sphere1 should move in an arc. But I cannot see the change in y-axis. what's wrong here? BTW, can anyone give an example of a dumbbell I described above using geomtransform? Thanks in advance! ################################################################# import ode def near_callback(args,geom1,geom2): '''callback function for ODE collision detect''' #check if two geoms do collide contacts = ode.collide(geom1, geom2) #get args world,contactgroup = args for c in contacts: c.setBounce(1.0) #bounceness 0-1 c.setMu(0) #friction #create contact joint and add it to two bodies j = ode.ContactJoint(world,contactgroup,c) j.attach(geom1.getBody(),geom2.getBody()) pass # Create a ODE world object ode_world = ode.World() ode_world.setERP(0.8) ode_world.setCFM(1E-5) # Create a space object ode_space = ode.Space() # A joint group for the contact joints that are generated whenever # two bodies collide ode_contactgroup = ode.JointGroup() #add ode bodies ode_body1 = ode.Body(ode_world) M1 = ode.Mass() M1.setSphere(1000.0, 1.0) M1.mass = 1.0 #move the center of gravity M1.translate((0.0, 5.0, 0.0)) print M1 ode_body1.setMass(M1) #add geom for body1 geom1 = ode.GeomSphere(ode_space, radius = 1.0) geom1.setBody(ode_body1) #add ode bodies ode_body2 = ode.Body(ode_world) M2 = ode.Mass() M2.setSphere(1000.0, 1.0) M2.mass = 1.0 print M2 ode_body2.setMass(M2) #add geom for body2 geom2 = ode.GeomSphere(ode_space, radius = 1.0) geom2.setBody(ode_body2) #place two bodies along x axis geom1.setPosition((-1.5, 0.0, 0.0)) geom2.setPosition((1.5, 0.0, 0.0)) #add some force ##ode_body1.addForceAtPos((-100.0,0.0,0.0),(0.0,0.0,0.0)) ode_body1.addForceAtRelPos((-100.0,0.0,0.0),(0.0,1.0,0.0)) #assign a negative velcocity in x-axis to collide with body1 ##ode_body2.setLinearVel((-0.5,0,0)) dt=0.0001 while 1: print ode_body1.getPosition(),ode_body2.getPosition() ode_space.collide((ode_world,ode_contactgroup),near_callback) ode_world.step(dt) ode_contactgroup.empty() ############################################################################ |
From: Chris B. <chr...@gm...> - 2007-04-24 08:42:10
|
On 24/04/07, Simon Hildebrandt <twi...@ob...> wrote: > Chris Bainbridge wrote: > > a) not use an ODE body for your object - use a Geom, do the collision > > detection, then in your collide handler create an ode.ContactJoint, > > and instead of attaching it to the body of the draggable Geom attach > > it to the static environment (ode.environment). That should give ODE a > > contact on the object you hit, but not on the one you're dragging. > > > *nod* Yeah - from reading the wiki, that seemed to be the best technique > to isolate the selected object. > > Particularly, I'm wondering what would be the best way to get the > selected object in motion? Setting the position seems to interfere with > the collision detection, and I don't think I could get the positioning > accurately by adding forces... Setting velocity, then? You set velocity, add forces etc. to ODE bodies. Those are the things with mass. Geoms are just shapes - you can translate them and rotate them, but they have no properties like velocity. So if you only have a Geom, you have to set its position. Now the collision detection normally generates a ContactJoint constraint from the two Geoms and then applies it to the actual ODE bodies in order to push them apart. In your code this looks something like: j = ode.ContactJoint(self.world, self.contactGroup, c) j.attach(geom1.getBody(), geom2.getBody()) c is the contact - you can get its parameters with c.getContactGeomParams(), which returns the depth, normal, and two intersecting Geoms. As this code shows, the actual collision detection is completely separate from the ODE body simulation. So setting a position directly is only going to be a problem if you have an ODE body attached to the Geom. You can play around with it by calling ode.collide(geom1,geom2) and examining the list of contacts it returns. It's completely up to you how this list gets applied in the ODE simulator; it's just a list of Geoms, intersection normals, penetration depths, and friction coefficients. |
From: Chris B. <chr...@gm...> - 2007-04-23 09:32:26
|
On 22/04/07, Martijn Kragtwijk <m.k...@ru...> wrote: > I've just started using pyode and I must say i find it a pleasure to > use. Keep up the good work! > One 'problem' I encountered however is that I couldn't find out how to > remove a body from the simulation. In 'regular' ODE there is the > function dBodyDestroy(dBodyID) but in pyode.body there is no comparable > destroy() method. Am I overlooking something or is there another way to > remove a body from the simulation? If you get rid of all of your references to the body it will be destroyed. So either 'del body_ref_variable' or let it go out of scope. Keep in mind that any Geom references you have will also have internal references to the body (Geom.body). You can clear it with Geom.setBody(None). |
From: Chris B. <chr...@gm...> - 2007-04-23 09:00:59
|
On 23/04/07, Simon Hildebrandt <twi...@ob...> wrote: > Firstly, I'd like to second Martijn's sentiment - ODE (and PyODE) are very nice to work with. :) > > Secondly - I have a problem that I hope someone has already solved, and that they can point me in the right direction... > Am I going about this the wrong way? I *do* seem to be fighting ODE for control of the object - is it back-to-front to think I can control an ODE object's exact position, while still having it collide with other objects? The problem is that you're simulating a body with ODE. The body has mass, velocity, momentum etc. which I'm assuming you don't want - you want to click and drag the object instead. So you can either: a) not use an ODE body for your object - use a Geom, do the collision detection, then in your collide handler create an ode.ContactJoint, and instead of attaching it to the body of the draggable Geom attach it to the static environment (ode.environment). That should give ODE a contact on the object you hit, but not on the one you're dragging. b) envisage the mouse location as somewhere you'd like the object to be, rather than actually is. Use something like a proportional derivative or LQR controller to add forces to the dragged object in order to reposition it. This way you're treating the object as a proper body, so there will be some delay before it reaches your desired position. |
From: Simon H. <twi...@ob...> - 2007-04-23 00:15:52
|
Firstly, I'd like to second Martijn's sentiment - ODE (and PyODE) are very nice to work with. :) Secondly - I have a problem that I hope someone has already solved, and that they can point me in the right direction... I'm working on a physics-enabled boardgame environment ( http://groups.google.com/group/pyglet-users/web/geoffrey-a-board-game-environment ) and I'm using PyODE for selection and collision detection/physics. The selection code works perfectly (using glUnProject to position a GeomRay in the scene, then test for contacts with pieces) but I'm slightly stuck on *moving* the selected piece to keep it under the mouse pointer each frame. First I tried setting it's position every frame, but that doesn't seem like the right way to do it, as collisions become unreliable. I tried setting it's linear velocity so that it would move to the target position each frame, but I couldn't get that working nicely either. I've experimented with attaching the object to *another* object, and setting *it's* position, but that didn't seem like the right solution - and applying a force (as per the 'thrust control logic' article in the wiki) didn't seem like it would solve my problem either. Am I going about this the wrong way? I *do* seem to be fighting ODE for control of the object - is it back-to-front to think I can control an ODE object's exact position, while still having it collide with other objects? Any suggestions welcome. :) Sincerely, Simon Hildebrandt. |
From: Martijn K. <m.k...@ru...> - 2007-04-22 14:17:58
|
Hi all, I've just started using pyode and I must say i find it a pleasure to use. Keep up the good work! One 'problem' I encountered however is that I couldn't find out how to remove a body from the simulation. In 'regular' ODE there is the function dBodyDestroy(dBodyID) but in pyode.body there is no comparable destroy() method. Am I overlooking something or is there another way to remove a body from the simulation? Thanks in advance, Martijn Kragtwijk (m.k...@ru...) -- VR Engineer University of Groningen, The Netherlands Department of High-Performance Computing and Visualisation Nettelbosje 1, 9747 AJ Groningen tel: +31 50 3639245 gsm: +31 6 25030665 fax: +31 50-3633406 http://www.rug.nl/rc/hpcv/ |
From: Chris B. <chr...@gm...> - 2007-04-22 09:27:46
|
Hi Mizipzor, You aren't keeping references to your ode.Joint objects, so they're getting deallocated. Try this patch: --- xorig.py 2007-04-22 10:11:33.000000000 +0100 +++ x.py 2007-04-22 10:20:41.000000000 +0100 @@ -3,8 +3,8 @@ world = None # the gravity world worldscale = 1 - -class Joint(): +objs=[] +class Joint: """ a joining between two ropes """ def __init__(self, mass, radius, length, parent, attachPoint): #create the mass @@ -31,13 +31,14 @@ #create the joint j = ode.BallJoint(world) + objs.append(j) if parent == None: j.attach(self.body, ode.environment) if not parent == None: j.attach(self.body, parent.body) j.setAnchor((attachPoint[0],attachPoint[1],0)) -class Rope(): +class Rope: """ a rope """ def __init__(self, topPosition, joints, mass, radius, length): self.joints = [] Incidentally, you don't need to explicitly compare to None either... you can just do 'if parent: x.. if not parent: ...' which looks cleaner. |
From: Mizipzor <miz...@gm...> - 2007-04-21 15:40:57
|
Hi. Im trying to make a rope. It seems that the joints between each other works well but the "top" joint isnt attached to the world. Heres how I create the joint: #create the joint j = ode.BallJoint(world) if parent == None: j.attach(self.body, ode.environment) if not parent == None: j.attach(self.body, parent.body) j.setAnchor((attachPoint[0],attachPoint[1],0)) If no parent is submitted it attaches itself to the environment instead. You can find the full source here: http://rafb.net/p/3OAuKo49.html In that code I use a vector class, if you want to look at it or try to run the program, you can find the source for the class here: http://rafb.net/p/u1LwRm51.html |
From: Kaijen H. <kj...@MI...> - 2007-04-17 15:27:30
|
Has anyone tried to use GIMPACT with PyODE/can tell me what might be involved in trying to do so? -Kaijen |
From: Ethan Glasser-C. <gl...@cs...> - 2007-03-27 01:57:07
|
Alexander Gabriel wrote: > That bit of knowledge will serve me good in the future. :o) Just be sure to call the first argument of the __new__ function cls, not self as I did. Oops! Have fun! Ethan |
From: Alexander G. <Ale...@tu...> - 2007-03-27 01:46:37
|
Thank you Ethan! That did it. That bit of knowledge will serve me good in the future. :o) I admit the posted code was a quick hack to show the problem without all the irritating code around it. Thanks again! alex |
From: Ethan Glasser-C. <gl...@cs...> - 2007-03-27 01:32:47
|
Alexander Gabriel wrote: > I've got a little problem with ode.Body which is as follows: >=20 > Now, why doesn't it work as it's supposed to? > I'm puzzled. Hi, I googled for "pyrex subclass" and found: http://mail.python.org/pipermail/python-list/2007-January/424177.html Accordingly I added a function to your example as follows: def __new__(self, world, foo, bar): return ode.Body.__new__(self, world) and ran the program only to uncover that you left out self in your call to ode.Body.__init__ :). I added that and I think your program works as expected. Hope this helps, Ethan |
From: Alexander G. <Ale...@tu...> - 2007-03-27 00:47:18
|
Hello List! I've got a little problem with ode.Body which is as follows: <snip> #!/usr/bin/env python import ode class foobar(ode.Body): def __init__(self, world, foo, bar): print foo ode.Body.__init__(world) print bar real_life = ode.World() mybody = foobar(real_life, "foo", "bar") </snip> returns this: <snip> imtrey% ./test2.py Traceback (most recent call last): File "./test2.py", line 12, in <module> mybody = foobar(real_life, "foo", "bar") TypeError: function takes exactly 1 argument (3 given) imtrey% </snip> Now, why doesn't it work as it's supposed to? I'm puzzled. I hope you can help me. Best wishes, alex |
From: Nick C. <nac...@gm...> - 2007-03-12 00:50:40
|
Hello, I'm building a ragdoll demo with python 2.5 The problem that I'm having is that when I add torqe to hinge joints, I get violent shaking throughout limbs. Can anyone think of why this might be? Thanks. |
From: <the...@br...> - 2007-03-02 23:53:08
|
T24gMy8yLzA3LCBNYXR0aWFzIEJyw6RuZHN0csO2bSA8dGhlYnJhc3NlQGJyYXNzZS5vcmc+IHdy b3RlOgo+ICAgICBnZW9tID0gb2RlLkdlb21UcmFuc2Zvcm0oc3BhY2UpCj4gICAgIGdlb20uc2V0 R2VvbShvZGUuR2VvbUNhcHN1bGUoTm9uZSwgUkFESVVTLCBIRUlHSFQpKQo+ICAgICBnZW9tLnNl dFJvdGF0aW9uKHJlc2hhcGUocm90KCgxLCAwLCAwKSwgcGkvMiksICg5LCkpKQoKTmV2ZXIgbWlu ZC4gSSB3ZW50IGJhY2sgYW5kIFJURk0uIE5vdyBJIHVuZGVyc3RhbmQgdGhhdCBJIG5lZWQgdG8g c2V0CnRoZSBvcmllbnRhdGlvbiBvbiB0aGUgR2VvbUNhcHN1bGUgYW5kIG5vdCB0aGUgR2VvbVRy YW5zZm9ybS4KCjouOjogbWF0dGlhcwo= |
From: <the...@br...> - 2007-03-02 21:24:04
|
Hello! I am trying to insert an upright (up being the positive Y-axis) capsule into my simulation. The documentation says that a GeomCapsule is aligned along the local Z-axis. I guess this means that I have to rotate it around the X-axis to get it aligned along my world Y-axis. Is this correct? As far as I can see I can to this with a GeomTransform like this: geom = ode.GeomTransform(space) geom.setGeom(ode.GeomCapsule(None, RADIUS, HEIGHT)) geom.setRotation(reshape(rot((1, 0, 0), pi/2), (9,))) (The complete file can be found here http://keso.brasse.org/capsule.py (it's short)) However, when I run the simulation it behaves as if the capsule is still aligned along the world Z-axis. What am I missing? Is the format of the 9-tuple sent to setRotation() wrong? I assumed that the first three values is the first row in the matrix. Any ideas would be greatly appreciated! Regards, Mattias |