From stephan at eisscholle.de Fri Nov 1 02:09:02 2002 From: stephan at eisscholle.de (Stephan Heigl) Date: Fri Nov 1 02:09:02 2002 Subject: [ODE] Tri-Collider code and OpCode 1.2? Message-ID: <000c01c28187$268650e0$0411a8c0@tonline> This is a multi-part message in MIME format. ------=_NextPart_000_0009_01C2818F.88079560 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, how does opcode 1.2 support for the tri-collider come along? I am = looking forward to it since opcode 1.0 isn't available for Unix. Thanks. - Stephan ------=_NextPart_000_0009_01C2818F.88079560 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
how does opcode 1.2 support for the = tri-collider=20 come along? I am looking forward to it since opcode 1.0 isn't available = for=20 Unix.
 
Thanks.
- Stephan
------=_NextPart_000_0009_01C2818F.88079560-- From Remko at act-3d.com Fri Nov 1 06:16:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Fri Nov 1 06:16:02 2002 Subject: [ODE] GTA3 and Physics Message-ID: <278777570.1387675341.98@server> Hi, We implemented ODE in our real-time 3D authoring tool. I created a demo called 'Monster Mayhem' that demonstrates the vehicle simulation capabilities of ODE. You get to drive around in stunt level with ramps, loopings and jumps. There are power-ups spread trough the level that change the car into a monster truck, reduce gravity, speed up time, or give the car a turbo engine. The results are just as good as the physics in GTA3. The capabilities of ODE really amazed me. To be honest, the results are better than I expected. To get everything working, we added several extensions to ODE. We made the collision routine work with our binary partitioning tree and we implemented better polygon collision. We also build in a feature so you can pin the simulation down to a certain frequency. This is VERY important because this ensures your perfectly tweaked simulation will run the same way on any system. The source is available in our SDK. The SDK is downloadable in our support section. Another important feature we added is angular velocity damping. We simply reduce the angular velocity each step so rotating objects can come to a halt (simulated rotational friction). This feature is very important to get stable vehicles. By applying an angular velocity damping to the body of the car, you prevent it from tipping over too quickly (keeping the simulation fun). These are the bottlenecks of ODE I found during a month of full time testing: - Lack of certain collision shapes (cylinder, cone, pyramid) - Stack overflow when there are too many collisions (because of a recursive function) If this occurs, the simulation is too slow anyway. - Box stacking problem (a lot of info about this in the mailing list) - 'Bending wheels' when the wheel rotate extremely fast (this can be prevented by tweaking the simulation) - Except for the hinge2 joint, the joints are not really usable, they are very un-rigid and they have a hard time keeping bodies together. The joints can only keep bodies together if the bodies are not too heavy.(Maybe we did something wrong here but I can't get a regular hinge to behave as you would expect. At first, I planned a bridge in the demo but the hinge could not keep the bridge into its place. Tweaking the CFM and ERP values made some improvements but they did not solve the problem.) - The way ODE works, makes heavy objects or objects that are under a lot of stress behave in a spongy way. This is not a real problem because you can solve it by tweaking the simulation and it is the reason why ODE is so very stable. You can see this effect at the beginning of the demo where you see the balls squash into each other because the ball at the bottom is under so much stress. In some cases, this is actually a nice side effect. - It is impossible to prevent bodies from rotating. This is important if you want to make a 1st person camera using ODE. Now, the character will always roll down a shallow slope. Maybe this is solvable now, suggestions are welcome. In the end, I must say ODE does a great job. The lack of certain collision shapes can be solved by coding them yourself and there already is a cylinder shape in development. The box-stacking problem is not an ODE problem but just a problem in the collision detection routine. This problem can be solved with not to much effort it is just a matter of waiting until someone finds some time to fix it. I do not have a clue about the hinges but there is a lot you can do without using hinges :) ODE is very forgiving when it comes to errors. I can throw in random objects and ODE solves the physics perfectly. ODE is a great alternative to commercial physics engines although it is more limited of course. Hey, its free and it works like a charm so why should you complain about it? Have a look: http://www.quest3d.com You can download the demo version of Quest3D and experiment with ODE yourself. -Remko (P.S. Russ, If you read this, can you put our page on your community list? http://www.quest3d.com/index.php3?id=116) -----Original Message----- From: Aanand Narayanan.P.P [mailto:aanand@milestoneindia.com] Sent: Wednesday, October 30, 2002 10:05 AM To: ode@q12.org; Remko Jacobs (act-3d.com) Subject: [ODE] GTA3 and Physics Does anybody know which method (direct LCP, iterative LCP, penalty etc) was used in the (vehicle) physics for GTA3? Is it possible to achieve the same level of stability with ODE? I would like to hear from other people who have used ODE for full fledged physics simulations. Thanks AN --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/2002 _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From martin at metahuman.org Fri Nov 1 06:33:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Fri Nov 1 06:33:02 2002 Subject: [ODE] GTA3 and Physics References: <278777570.1387675341.98@server> Message-ID: <3DC28266.C376AC14@metahuman.org> "Remko Jacobs (act-3d.com)" wrote: > > Hi, > > - Except for the hinge2 joint, the joints are not really usable, ... > I do not have a clue > about the hinges but there is a lot you can do without using hinges :) When you say "the joints are not really usable," did you mean hinges? Or, for example, do you consider the ball and socket joints to also be usable? > - The way ODE works, makes heavy objects or objects that are under a lot > of stress behave in a spongy way. I wonder whether this could be reduced by adding a constraint a timestep early, to help prevent objects from penetrating in the first place. From mattias at cambrianlabs.com Fri Nov 1 11:14:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Fri Nov 1 11:14:02 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> References: <278777570.1387675341.98@server> Message-ID: > (P.S. Russ, If you read this, can you put our page on your community > list? http://www.quest3d.com/index.php3?id=116) Excellent game! cheers, m From russ at q12.org Fri Nov 1 12:11:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 1 12:11:02 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: > We implemented ODE in our real-time 3D authoring tool. I created a demo > called 'Monster Mayhem' that demonstrates the vehicle simulation nice! > - Stack overflow when there are too many collisions (because of a > recursive function) If this occurs, the simulation is too slow anyway. what recursive function do you mean? perhaps you mean a stack overflow in the main ODE solver function - because too many collisions = too many contacts = a big matrix that is slow to solve. if ODE moves to an iterative LCP method then this problem might go away (lots of experiments to do here). > - 'Bending wheels' when the wheel rotate extremely fast (this can be > prevented by tweaking the simulation) yes ... when i get all the other things on the TO-DO out of the way, i'd like to try some solutions for this problem (i.e. 'glue the wheels back on'). > - Except for the hinge2 joint, the joints are not really usable, they are > very un-rigid and they have a hard time keeping bodies together. this is surprising ... but i can think of two ways this could happen. (1) if the vehicle is rotating quickly through the air, errors in the simulation may cause the wheels to pull apart. (2) if you are directly setting the velocity of individual bodies to implement damping, the joints will certainly pull apart, as the velocities at the joint points will no longer match up. also on the TO-DO list is stable rotational damping. > - The way ODE works, makes heavy objects or objects that are under a lot > of stress behave in a spongy way. this should only be the case if that CFM number is high. > (P.S. Russ, If you read this, can you put our page on your community > list? http://www.quest3d.com/index.php3?id=116) sure, this might take until after the weekend though. russ. -- Russ Smith http://www.q12.org/ From gazza at shaw.ca Fri Nov 1 17:10:02 2002 From: gazza at shaw.ca (Gazza) Date: Fri Nov 1 17:10:02 2002 Subject: [ODE] How do I code my own constraints ? Message-ID: <000a01c281be$11650e40$03324c18@vf.shawcable.net> This is a multi-part message in MIME format. --Boundary_(ID_1JqNyQXxqSfOhiMWDfjTSQ) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Hi, I'm trying to understand how to compute the constraints matrix for a particular constraint. I'm of the understanding that a 'contact' constraint would remove a DOF along the contact normal, thus requiring 1 value. When solved, the force/impulse is applied along the normal. For a ball joint, 3 DOF's are removed - x,y,z translations, and for a hinge, 5 DOF's are removed - x,y,z translation and say x,y rotation. Am I correct in these assumptions ? What I don't understand (or can find any documentation/papers on) is how the value(s) are computed for the A(n*n) matrix and b(n*1) for each constraint, which tell the system to remove these DOF's. Any help given is most appreciated. Thanks in advance. Gazza --Boundary_(ID_1JqNyQXxqSfOhiMWDfjTSQ) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: 7BIT
Hi,
 
I'm trying to understand how to compute the constraints matrix for a particular constraint.
 
I'm of the understanding that a 'contact' constraint would remove a DOF along the contact normal, thus requiring 1 value.  When solved, the force/impulse is applied along the normal.  For a ball joint, 3 DOF's are removed - x,y,z translations,  and for a hinge, 5 DOF's are removed - x,y,z translation and say x,y rotation.  Am I correct in these assumptions ?
 
What I don't understand (or can find any documentation/papers on) is how the value(s) are computed for the A(n*n) matrix and b(n*1) for each constraint, which tell the system to remove these DOF's.
 
Any help given is most appreciated.
 
Thanks in advance.
  Gazza
--Boundary_(ID_1JqNyQXxqSfOhiMWDfjTSQ)-- From aanand_pp at myrealbox.com Fri Nov 1 17:11:44 2002 From: aanand_pp at myrealbox.com (Aanand Narayanan.P.P) Date: Fri Nov 1 17:11:44 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: <000001c281cd$f6ae6be0$4ac1c0cb@digitalcrusher> Hi Thanks for all that info from everyone. > The source is available in our SDK. The SDK > is downloadable in our support section. Is it freely downloadable? > - The way ODE works, makes heavy objects or objects that are under a lot > of stress behave in a spongy way. ... I guess that's the reason why it is safer to limit the mass of objects between 1.0 and 10.0. Am I right, Russ? Thanks for the info, it was really useful and I should watch out for that stack overflow problem :). Cheers AN From coding at natew.com Fri Nov 1 18:10:02 2002 From: coding at natew.com (Nate W) Date: Fri Nov 1 18:10:02 2002 Subject: [ODE] msvc dlls? In-Reply-To: Message-ID: On Thu, 31 Oct 2002, Anselm Hook wrote: > Using msvc 7.0 I think that I have to have __dllexport... defined - but > none of the methods in objects.h have SHAREDLIBEXPORT as a prefix. [...] > > But I am a bit baffled about how I did it last time - I don't think I was > using cygwin... maybe these define prefixes were removed? Did you run the configurator? SHAREDLIBEXPORT is my my config.h, which if I recall correctly is generated by the configurator program. I haven't actually generated my config.h in a long time since I've just been copying that file from previous build trees. > Also I noticed that there's an include of alloca.h - msdev doesn't have > that. I think that may be another configurator/config.h thing. -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Fri Nov 1 22:13:01 2002 From: coding at natew.com (Nate W) Date: Fri Nov 1 22:13:01 2002 Subject: [ODE] slider trouble In-Reply-To: <20021031221053.291c8cac.russ@q12.org> Message-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --1363170581-1279554879-1036185734=:7964 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 31 Oct 2002, Russ Smith wrote: > nate, can you verify the fix? Unfortunately, no... I've attached another test that bounces things off the ground a bit differently, and you can watch two blocks bounce skyward and then gradually spin up to an explosion. How's this for an alternate approach: apply the linear force created by the joint stop at each body's center of mass, but apply it in the direction of the other body's center of mass, rather than along the slider axis (project the force vector along the direction of the other body's center of mass). Would that also cancel out the torque effect, without adding torques to the bodies explicitly? Also, could this problem be related to the problem where a single flying spinning body also gains angular momentum? I actually saw the slider-limit acceleration problem months ago, but I mistook it for the explicit integration problem described in the FAQ in 11.12. -- Nate Waddoups Redmond WA USA http://www.natew.com --1363170581-1279554879-1036185734=:7964 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="test_sliderstops.cpp" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="test_sliderstops.cpp" LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioNDQogKiAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKg0NCiAqIE9wZW4gRHluYW1pY3MgRW5naW5lLCBD b3B5cmlnaHQgKEMpIDIwMDEsMjAwMiBSdXNzZWxsIEwuIFNtaXRoLiAgICAg ICAqDQ0KICogQWxsIHJpZ2h0cyByZXNlcnZlZC4gIEVtYWlsOiBydXNzQHEx Mi5vcmcgICBXZWI6IHd3dy5xMTIub3JnICAgICAgICAgICoNDQogKiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKg0NCiAqIFRoaXMgbGlicmFyeSBpcyBm cmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3Ig ICAgICAgICAqDQ0KICogbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiBF SVRIRVI6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNDQog KiAgICgxKSBUaGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNl IGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSAgKg0NCiAqICAgICAgIFNvZnR3 YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIuMSBvZiB0aGUgTGlj ZW5zZSwgb3IgKGF0ICAqDQ0KICogICAgICAgeW91ciBvcHRpb24pIGFueSBs YXRlciB2ZXJzaW9uLiBUaGUgdGV4dCBvZiB0aGUgR05VIExlc3NlciAgICAg ICoNDQogKiAgICAgICBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGlzIGluY2x1 ZGVkIHdpdGggdGhpcyBsaWJyYXJ5IGluIHRoZSAgICAgKg0NCiAqICAgICAg IGZpbGUgTElDRU5TRS5UWFQuICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAqDQ0KICogICAoMikgVGhlIEJTRC1zdHls ZSBsaWNlbnNlIHRoYXQgaXMgaW5jbHVkZWQgd2l0aCB0aGlzIGxpYnJhcnkg aW4gICAgICoNDQogKiAgICAgICB0aGUgZmlsZSBMSUNFTlNFLUJTRC5UWFQu ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKg0NCiAq ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAqDQ0KICogVGhpcyBsaWJyYXJ5 IGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1 c2VmdWwsICAgICAgICoNDQogKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7 IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAg Kg0NC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lciwwLDAsMSk7DQ0KICBkSm9p bnRTZXRTbGlkZXJQYXJhbSAoc2xpZGVyLCBkUGFyYW1Mb1N0b3AsIC0xLjAp Ow0NCiAgZEpvaW50U2V0U2xpZGVyUGFyYW0gKHNsaWRlciwgZFBhcmFtSGlT dG9wLCAxLjApOw0NCg0NCiAgLy8gcnVuIHNpbXVsYXRpb24NDQogIGRzU2lt dWxhdGlvbkxvb3AgKGFyZ2MsYXJndiwzNTIsMjg4LCZmbik7DQ0KDQ0KICBk V29ybGREZXN0cm95ICh3b3JsZCk7DQ0KICByZXR1cm4gMDsNDQp9DQ0K --1363170581-1279554879-1036185734=:7964-- From russ at q12.org Fri Nov 1 23:46:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 1 23:46:02 2002 Subject: [ODE] slider trouble In-Reply-To: References: <20021031221053.291c8cac.russ@q12.org> Message-ID: <20021101225009.53deb28e.russ@q12.org> > > nate, can you verify the fix? > > Unfortunately, no... I've attached another test that bounces things off > the ground a bit differently, and you can watch two blocks bounce skyward > and then gradually spin up to an explosion. i'll check this out after the weekend. russ. -- Russell Smith http://www.q12.org From jeffreyweber at hotmail.com Sat Nov 2 08:07:01 2002 From: jeffreyweber at hotmail.com (Jeff Weber) Date: Sat Nov 2 08:07:01 2002 Subject: [ODE] GTA3 and Physics Message-ID: Quick question. What "geometry" are you using for you wheels? Are you using one of the built in ode geometries, or your own? ----Original Message Follows---- From: "Remko Jacobs (act-3d.com)" To: "ODE@q12.org" Subject: RE: [ODE] GTA3 and Physics Date: Fri, 1 Nov 2002 14:13:00 +0100 Hi, We implemented ODE in our real-time 3D authoring tool. I created a demo called 'Monster Mayhem' that demonstrates the vehicle simulation capabilities of ODE. You get to drive around in stunt level with ramps, loopings and jumps. There are power-ups spread trough the level that change the car into a monster truck, reduce gravity, speed up time, or give the car a turbo engine. The results are just as good as the physics in GTA3. The capabilities of ODE really amazed me. To be honest, the results are better than I expected. To get everything working, we added several extensions to ODE. We made the collision routine work with our binary partitioning tree and we implemented better polygon collision. We also build in a feature so you can pin the simulation down to a certain frequency. This is VERY important because this ensures your perfectly tweaked simulation will run the same way on any system. The source is available in our SDK. The SDK is downloadable in our support section. Another important feature we added is angular velocity damping. We simply reduce the angular velocity each step so rotating objects can come to a halt (simulated rotational friction). This feature is very important to get stable vehicles. By applying an angular velocity damping to the body of the car, you prevent it from tipping over too quickly (keeping the simulation fun). These are the bottlenecks of ODE I found during a month of full time testing: - Lack of certain collision shapes (cylinder, cone, pyramid) - Stack overflow when there are too many collisions (because of a recursive function) If this occurs, the simulation is too slow anyway. - Box stacking problem (a lot of info about this in the mailing list) - 'Bending wheels' when the wheel rotate extremely fast (this can be prevented by tweaking the simulation) - Except for the hinge2 joint, the joints are not really usable, they are very un-rigid and they have a hard time keeping bodies together. The joints can only keep bodies together if the bodies are not too heavy.(Maybe we did something wrong here but I can't get a regular hinge to behave as you would expect. At first, I planned a bridge in the demo but the hinge could not keep the bridge into its place. Tweaking the CFM and ERP values made some improvements but they did not solve the problem.) - The way ODE works, makes heavy objects or objects that are under a lot of stress behave in a spongy way. This is not a real problem because you can solve it by tweaking the simulation and it is the reason why ODE is so very stable. You can see this effect at the beginning of the demo where you see the balls squash into each other because the ball at the bottom is under so much stress. In some cases, this is actually a nice side effect. - It is impossible to prevent bodies from rotating. This is important if you want to make a 1st person camera using ODE. Now, the character will always roll down a shallow slope. Maybe this is solvable now, suggestions are welcome. In the end, I must say ODE does a great job. The lack of certain collision shapes can be solved by coding them yourself and there already is a cylinder shape in development. The box-stacking problem is not an ODE problem but just a problem in the collision detection routine. This problem can be solved with not to much effort it is just a matter of waiting until someone finds some time to fix it. I do not have a clue about the hinges but there is a lot you can do without using hinges :) ODE is very forgiving when it comes to errors. I can throw in random objects and ODE solves the physics perfectly. ODE is a great alternative to commercial physics engines although it is more limited of course. Hey, its free and it works like a charm so why should you complain about it? Have a look: http://www.quest3d.com You can download the demo version of Quest3D and experiment with ODE yourself. -Remko (P.S. Russ, If you read this, can you put our page on your community list? http://www.quest3d.com/index.php3?id=116) -----Original Message----- From: Aanand Narayanan.P.P [mailto:aanand@milestoneindia.com] Sent: Wednesday, October 30, 2002 10:05 AM To: ode@q12.org; Remko Jacobs (act-3d.com) Subject: [ODE] GTA3 and Physics Does anybody know which method (direct LCP, iterative LCP, penalty etc) was used in the (vehicle) physics for GTA3? Is it possible to achieve the same level of stability with ODE? I would like to hear from other people who have used ODE for full fledged physics simulations. Thanks AN --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/2002 _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp From filipe.dias at mind.pt Sat Nov 2 08:51:01 2002 From: filipe.dias at mind.pt (Filipe Dias) Date: Sat Nov 2 08:51:01 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: <200211021550.gA2FoSu02059@hook.org> I liked it much! the only criticism I have is that I find the car to stable... What are you doing to make the car always stand up? My guess is you have a "weight" under the wheels of the car.. Oh, and it is nearly impossible to make the loop.. Fil. -----Original Message----- From: "Remko Jacobs (act-3d.com)" To: "ODE@q12.org" Date: Fri, 1 Nov 2002 14:13:00 +0100 Subject: RE: [ODE] GTA3 and Physics > Hi, > > We implemented ODE in our real-time 3D authoring tool. I created a demo > > called 'Monster Mayhem' that demonstrates the vehicle simulation > capabilities of ODE. You get to drive around in stunt level with ramps, > > loopings and jumps. There are power-ups spread trough the level that > change the car into a monster truck, reduce gravity, speed up time, or > > give the car a turbo engine. The results are just as good as the > physics > in GTA3. The capabilities of ODE really amazed me. To be honest, the > results are better than I expected. > > To get everything working, we added several extensions to ODE. We made > > the collision routine work with our binary partitioning tree and we > implemented better polygon collision. We also build in a feature so you > > can pin the simulation down to a certain frequency. This is VERY > important because this ensures your perfectly tweaked simulation will > run > the same way on any system. The source is available in our SDK. The SDK > > is downloadable in our support section. > > Another important feature we added is angular velocity damping. We > simply > reduce the angular velocity each step so rotating objects can come to a > > halt (simulated rotational friction). This feature is very important to > > get stable vehicles. By applying an angular velocity damping to the > body > of the car, you prevent it from tipping over too quickly (keeping the > simulation fun). > > These are the bottlenecks of ODE I found during a month of full time > testing: > > - Lack of certain collision shapes (cylinder, cone, pyramid) > - Stack overflow when there are too many collisions (because of a > recursive function) If this occurs, the simulation is too slow anyway. > - Box stacking problem (a lot of info about this in the mailing list) > - 'Bending wheels' when the wheel rotate extremely fast (this can be > prevented by tweaking the simulation) > - Except for the hinge2 joint, the joints are not really usable, they > are > very un-rigid and they have a hard time keeping bodies together. The > joints can only keep bodies together if the bodies are not too > heavy.(Maybe we did something wrong here but I can't get a regular > hinge > to behave as you would expect. At first, I planned a bridge in the demo > > but the hinge could not keep the bridge into its place. Tweaking the > CFM > and ERP values made some improvements but they did not solve the > problem.) > - The way ODE works, makes heavy objects or objects that are under a > lot > of stress behave in a spongy way. This is not a real problem because > you > can solve it by tweaking the simulation and it is the reason why ODE is > > so very stable. You can see this effect at the beginning of the demo > where you see the balls squash into each other because the ball at the > > bottom is under so much stress. In some cases, this is actually a nice > > side effect. > - It is impossible to prevent bodies from rotating. This is important > if > you want to make a 1st person camera using ODE. Now, the character will > > always roll down a shallow slope. Maybe this is solvable now, > suggestions > are welcome. > > In the end, I must say ODE does a great job. The lack of certain > collision shapes can be solved by coding them yourself and there > already > is a cylinder shape in development. The box-stacking problem is not an > > ODE problem but just a problem in the collision detection routine. This > > problem can be solved with not to much effort it is just a matter of > waiting until someone finds some time to fix it. I do not have a clue > about the hinges but there is a lot you can do without using hinges :) > > ODE is very forgiving when it comes to errors. I can throw in random > objects and ODE solves the physics perfectly. ODE is a great > alternative > to commercial physics engines although it is more limited of course. > Hey, > its free and it works like a charm so why should you complain about it? > > Have a look: > http://www.quest3d.com > > You can download the demo version of Quest3D and experiment with ODE > yourself. > > -Remko > > (P.S. Russ, If you read this, can you put our page on your community > list? http://www.quest3d.com/index.php3?id=116) > > > -----Original Message----- > From: Aanand Narayanan.P.P [mailto:aanand@milestoneindia.com] > Sent: Wednesday, October 30, 2002 10:05 AM > To: ode@q12.org; Remko Jacobs (act-3d.com) > Subject: [ODE] GTA3 and Physics > > > > > Does anybody know which method (direct LCP, iterative LCP, penalty etc) > was used in the (vehicle) physics for GTA3? > Is it possible to achieve the same level of stability with ODE? I would > like to hear from other people who have used ODE for full fledged > physics simulations. > > Thanks > AN > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/2002 > > > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From ander_taylor at hotmail.com Sat Nov 2 16:21:02 2002 From: ander_taylor at hotmail.com (Ander Taylor) Date: Sat Nov 2 16:21:02 2002 Subject: [ODE] Complie to a Lib Message-ID: Hi, I am new to ODE and C++. I am working on a wrapper to allow the use of ODE from .Net, extending the work already done by Jeff Weber. Anyway, my qestion, how should I complie ODE to a Lib from VC++7? Does anyone know the settings I should use? Cheers, Ander _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From coding at natew.com Sat Nov 2 23:49:02 2002 From: coding at natew.com (Nate W) Date: Sat Nov 2 23:49:02 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: On Sat, 2 Nov 2002, Ander Taylor wrote: > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > from .Net, extending the work already done by Jeff Weber. Have a look at Anselm Hook's work too, if you haven't seen it yet: http://p2pmap.org/cgi-bin/cvsweb.cgi/p2pmap/src/ode/ode.cs?rev=1.3&content-type=text/x-cvsweb-markup > Anyway, my qestion, how should I compile ODE to a Lib from VC++7? Does > anyone know the settings I should use? If you want to build a DLL, have a look at the contrib/msvc7/ CVS folder, it's got .sln files for regular ODE and ODE with the tri-collider extension. -- Nate Waddoups Redmond WA USA http://www.natew.com From ps_yumemi at yahoo.com Sun Nov 3 02:10:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sun Nov 3 02:10:02 2002 Subject: [ODE] rotation matrix Message-ID: <20021103090928.66813.qmail@web40509.mail.yahoo.com> hello, i have a simple question: how do you access the contents of the rotation matrix that the function dGeomGetRotation or dBodyGetRotation give out? I know that the pointer is only a dReal and the matrix i need is a dMatrix3. How do you resolve this? i really need to pass that info somehow. thanks pia __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From coding at natew.com Sun Nov 3 03:10:02 2002 From: coding at natew.com (Nate W) Date: Sun Nov 3 03:10:02 2002 Subject: [ODE] rotation matrix In-Reply-To: <20021103090928.66813.qmail@web40509.mail.yahoo.com> Message-ID: On Sun, 3 Nov 2002, pia dalusong wrote: > i have a simple question: how do you access the > contents of the rotation matrix that the function > dGeomGetRotation or dBodyGetRotation give out? > I know that the pointer is only a dReal and the matrix > i need is a dMatrix3. How do you resolve this? > i really need to pass that info somehow. Have a look at the setTransform function in drawstuff.cpp, around line 325. This shows how to use the array of values returned by a dBodyGetRotation call to populate a matrix for OpenGL. Note that dBodyGetRotation returns a 4x3 matrix, so every fourth scalar is ignored during the conversion. -- Nate Waddoups Redmond WA USA http://www.natew.com From kaffiene at xtra.co.nz Sun Nov 3 12:31:01 2002 From: kaffiene at xtra.co.nz (Peter) Date: Sun Nov 3 12:31:01 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: <001301c2836f$78a17190$5c02a8c0@peter> > - 'Bending wheels' when the wheel rotate extremely fast (this can be > prevented by tweaking the simulation) Can I ask which tweaks you used? Peter. From anselm at hook.org Sun Nov 3 20:12:02 2002 From: anselm at hook.org (Anselm Hook) Date: Sun Nov 3 20:12:02 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: > On Sat, 2 Nov 2002, Ander Taylor wrote: > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > from .Net, extending the work already done by Jeff Weber. Cool! > Have a look at Anselm Hook's work too, if you haven't seen it yet: I recently moved my version here - you'll want this copy if you use this: http://p2pmap.org/cgi-bin/cvsweb.cgi/p2pmap/src/ode/contrib/csharp/ > > Anyway, my qestion, how should I compile ODE to a Lib from VC++7? Does > > anyone know the settings I should use? > > If you want to build a DLL, have a look at the contrib/msvc7/ CVS folder, > it's got .sln files for regular ODE and ODE with the tri-collider > extension. Some misc thoughts re C# ODE bindings: I think it's a good idea to do a C# wrapper. I have one that you can grab pieces from as Nate pointed out - although I simply haven't had time to finish it up. There might be some merit in my approach however - regardless of if you do your own or not: 1) I made C# methods that directly bind to all DLL methods. All of the raw dll methods I stuck into a single class - and made them static. (so effectively I have a big bucket of static methods) 2) Then - separately - I made C# classes that called the static methods. 3) I used no-arg constructors so that it was easier to manufacture my ODE objects using an XML notation. The factory methods that discover the ODE objects (using the C# type reflection) are easier to deal with if you can invoke no-arg constructors on them... This *is* a bit of a hassle; it means that you have to 'late submit' ODE bodies to the world... my code does that. Oh, one other reason for no-arg constructors - it allows out of order instantiation of objects. The reason for the two stage approach is that it allows other developers to build their own class abstraction layer on top of the ODE API. ...um... otherwise I think the only thing that I did that (while actually pretty lame and pretty incomplete) was to try to keep the collision callback in C. I slightly extended the ODE DLL to have a new self managing callback method for collision. [ The reason that Russ makes us normally handle collision ourselves is because collision is subjective to the application. There are many ways two surfaces can interact. Imagine sandpaper and granite, or granite and granite, or gummy bears and ceramic tile... It turns out that finding ways to abstract surface properties in the general case is not easy to solve.] In the case of C# you really don't want to have an inner loop like this being exposed to C# - my own tests and others show that it is slow: http://www.tempest-sw.com/benchmark/ http://www.kuro5hin.org/story/2002/6/25/122237/078 (although I expect that this will be untrue soon) It might be possible to build intersection tables that are exposed to C# - you could define the intersection of material properties. Finally... I just gave a little talk recently on using C# for games - I will post my notes somewhere on my website - I'll make a link at: http://p2pmap.org/technology/csharp.html for now. Basically I think binding ODE to C# is good but I wouldn't use C# for the mainloop if you want performance... - a From anselm at hook.org Sun Nov 3 22:30:02 2002 From: anselm at hook.org (Anselm Hook) Date: Sun Nov 3 22:30:02 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: There is one good reason not to use my C# binding - I am relying on a class based Vector and Matrix math library (that I ported from an open source clone of Java3D). I strongly suggest using a struct based Vector and Matrix library such as http://www.exocortex.org/3dengine or others (his starting point is BSD licenced). I'll bet Jeff Weber has solved this correctly - where is Jeff's site? Jeff? - a > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > > from .Net, extending the work already done by Jeff Weber. From ps_yumemi at yahoo.com Mon Nov 4 00:31:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Mon Nov 4 00:31:02 2002 Subject: [ODE] rotation matrix Message-ID: <20021104073051.52060.qmail@web40507.mail.yahoo.com> hello, first of all thanks for replying. i tried to pass the values to the dMatrix3 the same way in the setTransform function in the drawstuff.cpp file. unfortunately, my mobot is heading towards the opposite direction now. what i did was this : const dReal *mobot_pos; const dReal *mobot_rot; mobot_rot = dBodyGetRotation (mobot.chassis.body); mobot_pos = dBodyGetPosition (mobot.chassis.body); mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[4]; mobotdata.rota[2]=mobot_rot[8]; mobotdata.rota[3]=0; mobotdata.rota[4]=mobot_rot[1]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[9]; mobotdata.rota[7]=0; mobotdata.rota[8]=mobot_rot[2]; mobotdata.rota[9]=mobot_rot[6]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=0; i also tried this mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[1]; mobotdata.rota[2]=mobot_rot[2]; mobotdata.rota[3]=mobot_rot[3]; mobotdata.rota[4]=mobot_rot[4]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[6]; mobotdata.rota[7]=mobot_rot[7]; mobotdata.rota[8]=mobot_rot[8]; mobotdata.rota[9]=mobot_rot[9]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=mobot_rot[11]; __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From ps_yumemi at yahoo.com Mon Nov 4 00:33:01 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Mon Nov 4 00:33:01 2002 Subject: [ODE] rotation matrix Message-ID: <20021104073214.21133.qmail@web40509.mail.yahoo.com> hello, first of all thanks for replying. i tried to pass the values to the dMatrix3 the same way in the setTransform function in the drawstuff.cpp file. unfortunately, my mobot is heading towards the opposite direction now. what i did was this : const dReal *mobot_pos; const dReal *mobot_rot; mobot_rot = dBodyGetRotation (mobot.chassis.body); mobot_pos = dBodyGetPosition (mobot.chassis.body); mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[4]; mobotdata.rota[2]=mobot_rot[8]; mobotdata.rota[3]=0; mobotdata.rota[4]=mobot_rot[1]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[9]; mobotdata.rota[7]=0; mobotdata.rota[8]=mobot_rot[2]; mobotdata.rota[9]=mobot_rot[6]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=0; i also tried this mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[1]; mobotdata.rota[2]=mobot_rot[2]; mobotdata.rota[3]=mobot_rot[3]; mobotdata.rota[4]=mobot_rot[4]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[6]; mobotdata.rota[7]=mobot_rot[7]; mobotdata.rota[8]=mobot_rot[8]; mobotdata.rota[9]=mobot_rot[9]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=mobot_rot[11]; and the mobot went 90 degrees away from the rotation it was suppose to have. it only works when the values are 1 0 0 0 0 1 0 0 0 0 1 0 and that's it. what else can i do? pia __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From ps_yumemi at yahoo.com Mon Nov 4 04:55:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Mon Nov 4 04:55:02 2002 Subject: [ODE] rotation matrix In-Reply-To: <3DC64BDF.8070505@oracle.com> Message-ID: <20021104115420.48967.qmail@web40506.mail.yahoo.com> hello, ummm, what did you use to set the rotation and position of the mobots? did you still use dBodySetRotation and dBodySetPosition? or settransform? and how did you do it exactly? sorry. got confused. pia --- Ed Jones wrote: > Hiya, > > I've done exactly the same and just pinched (ahem, > "reused") this code > from drawstuff. > > As far as I know; if you define "mobotdata.rota" as > "GLfloat rota[16]" > (something like "mobotdata.transform" would probably > make more sense) > then you just need to do exactly what you've already > done, plus; > > mobotdata.rota[12] = mobot_pos[0]; > mobotdata.rota[13] = mobot_pos[1]; > mobotdata.rota[14] = mobot_pos[2]; > mobotdata.rota[15] = 1; > > ...and that works fine for me. > > I hope I'm right in saying that if things are going > in the wrong > direction then there's probably just some signs > wrong somewhere. > > Cheers, > Ed. > __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From jeffreyweber at hotmail.com Mon Nov 4 05:29:02 2002 From: jeffreyweber at hotmail.com (Jeff Weber) Date: Mon Nov 4 05:29:02 2002 Subject: [ODE] Complie to a Lib Message-ID: I just made my own vector and matrix structs. One other thing that is different about my approach is I used a "Managed C++" wrapper rather than the PInvoke method. It seemed to work great considering my lack of any true C++ experience. I'll be getting back to it eventually, but currently I'm busy "faking" some vehicle physics for a demo that is due in december. I didn't want to chance using ode as I wasn't sure I'd be able to get things running correctly by then and still have time to work on the other things that need to be in the demo. -jeff ----Original Message Follows---- From: Anselm Hook To: Nate W CC: Subject: Re: [ODE] Complie to a Lib Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) There is one good reason not to use my C# binding - I am relying on a class based Vector and Matrix math library (that I ported from an open source clone of Java3D). I strongly suggest using a struct based Vector and Matrix library such as http://www.exocortex.org/3dengine or others (his starting point is BSD licenced). I'll bet Jeff Weber has solved this correctly - where is Jeff's site? Jeff? - a > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > > from .Net, extending the work already done by Jeff Weber. _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode _________________________________________________________________ Unlimited Internet access -- and 2 months free!  Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.asp From ander_taylor at hotmail.com Mon Nov 4 06:17:02 2002 From: ander_taylor at hotmail.com (Ander Taylor) Date: Mon Nov 4 06:17:02 2002 Subject: [ODE] Complie to a Lib Message-ID: I just worked out that I dont need the lib. I can compile the whole lot, managed bits and everything, to a DLL. Finished Space, AMotor and Geom, also added Params to JointHinge. Works great. Ander ----Original Message Follows---- From: "Jeff Weber" To: ode@q12.org I just made my own vector and matrix structs. One other thing that is different about my approach is I used a "Managed C++" wrapper rather than the PInvoke method. It seemed to work great considering my lack of any true C++ experience. I'll be getting back to it eventually, but currently I'm busy "faking" some vehicle physics for a demo that is due in december. I didn't want to chance using ode as I wasn't sure I'd be able to get things running correctly by then and still have time to work on the other things that need to be in the demo. -jeff ----Original Message Follows---- From: Anselm Hook To: Nate W CC: Subject: Re: [ODE] Complie to a Lib Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) There is one good reason not to use my C# binding - I am relying on a class based Vector and Matrix math library (that I ported from an open source clone of Java3D). I strongly suggest using a struct based Vector and Matrix library such as http://www.exocortex.org/3dengine or others (his starting point is BSD licenced). I'll bet Jeff Weber has solved this correctly - where is Jeff's site? Jeff? - a > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > > from .Net, extending the work already done by Jeff Weber. _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp From ed.jones at oracle.com Mon Nov 4 08:55:02 2002 From: ed.jones at oracle.com (Ed Jones) Date: Mon Nov 4 08:55:02 2002 Subject: [ODE] CVS is Scary Message-ID: <3DC6981D.5080408@oracle.com> Hi Folks, I've been fiddling about with ODE v0.03 for a while yet, and I think it's probably best if I get my head around CVS, so I can get the latest stuff, specifically to do with the recent "dContactApprox1 mode" updates. Not having used CVS before I've tried to get the latest version of everything using WinCVS and it seems to have worked. I set the CVSROOT in the Preferences, set authentication to the "passwd" option, logged in, and used the Admin->Command Line option to type in "cvs co ode". That seemed to copy everything out of CVS and it all builds fine. Presumably, I now just need to do "cvs update" in future to pick up any changes? I assume that the "anonymous" user I logged in as doesn't have permissions to lock or change any files within CVS? So there's no danger that me being crap at using WinCVS can cause any damage to the code tree? I've seen other CVS based projects that produce a "nightly tarball" from their repositories. Is this something that's been considered for ODE? To save me worrying about accidentally deleting all the code. Or something. ;-) Cheers, Ed. From wristy_j at yahoo.com Mon Nov 4 09:00:02 2002 From: wristy_j at yahoo.com (Jason Gott) Date: Mon Nov 4 09:00:02 2002 Subject: [ODE] How do I code my own constraints ? In-Reply-To: <000a01c281be$11650e40$03324c18@vf.shawcable.net> Message-ID: <20021104155943.53446.qmail@web40804.mail.yahoo.com> Hello, The best paper I've found for describing the A matrix and B (right hand side) vector is "Linear-Time Dynamics Using Lagrange Multipliers" by David Baraff. It was in Siggraph '96. Search for it by name and you'll find .pdf's. "Fast Contact Force Computation for Nonpenetrating Rigid Bodies", also by Baraff (Siggraph '94) is also helpful. It talks about LCP's and Dantzig's algorithm. As far as figuring out what to put in J (the constraint matrices), look at ODE's source code for the different joint types. Hope that helps! J --- Gazza wrote: > Hi, > > I'm trying to understand how to compute the > constraints matrix for a particular constraint. > > I'm of the understanding that a 'contact' constraint > would remove a DOF along the contact normal, thus > requiring 1 value. When solved, the force/impulse > is applied along the normal. For a ball joint, 3 > DOF's are removed - x,y,z translations, and for a > hinge, 5 DOF's are removed - x,y,z translation and > say x,y rotation. Am I correct in these assumptions > ? > > What I don't understand (or can find any > documentation/papers on) is how the value(s) are > computed for the A(n*n) matrix and b(n*1) for each > constraint, which tell the system to remove these > DOF's. > > Any help given is most appreciated. > > Thanks in advance. > Gazza > __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From anselm at hook.org Mon Nov 4 09:33:01 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 4 09:33:01 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: do you have a site for your stuff or is it something you're not sharing yet? just curious because i'd like to see your approach. -a On Mon, 4 Nov 2002, Ander Taylor wrote: > I just worked out that I dont need the lib. > > I can compile the whole lot, managed bits and everything, to a DLL. > > Finished Space, AMotor and Geom, also added Params to JointHinge. > > Works great. > > Ander > > > ----Original Message Follows---- > From: "Jeff Weber" > To: ode@q12.org > > > I just made my own vector and matrix structs. > > One other thing that is different about my approach is I used a "Managed > C++" wrapper rather than the PInvoke method. > > It seemed to work great considering my lack of any true C++ experience. > I'll be getting back to it eventually, but currently I'm busy "faking" some > vehicle physics for a demo that is due in december. I didn't want to chance > using ode as I wasn't sure I'd be able to get things running correctly by > then and still have time to work on the other things that need to be in the > demo. > > -jeff > > > ----Original Message Follows---- > From: Anselm Hook > To: Nate W > CC: > Subject: Re: [ODE] Complie to a Lib > Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) > > > There is one good reason not to use my C# binding - I am relying on a > class based Vector and Matrix math library (that I ported from an open > source clone of Java3D). I strongly suggest using a struct based Vector > and Matrix library such as http://www.exocortex.org/3dengine or others > (his starting point is BSD licenced). > > I'll bet Jeff Weber has solved this correctly - where is Jeff's site? > Jeff? > > - a > > > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > > I am new to ODE and C++. I am working on a wrapper to allow the use > of ODE > > > > from .Net, extending the work already done by Jeff Weber. > > > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From anselm at hook.org Mon Nov 4 09:43:01 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 4 09:43:01 2002 Subject: [ODE] CVS is Scary In-Reply-To: <3DC6981D.5080408@oracle.com> Message-ID: > Presumably, I now just need to do "cvs update" in future to pick up any > changes? Yup. > I assume that the "anonymous" user I logged in as doesn't have > permissions to lock or change any files within CVS? So there's no danger > that me being crap at using WinCVS can cause any damage to the code tree? Right - there's no way you can cause any damage. It's totally safe. > I've seen other CVS based projects that produce a "nightly tarball" from > their repositories. Is this something that's been considered for ODE? To > save me worrying about accidentally deleting all the code. Or something. ;-) Russ has to answer that. I suppose once it moves to sourceforge this will happen. - a From adam.moravanszky at novodex.com Mon Nov 4 10:19:02 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [Novodex]) Date: Mon Nov 4 10:19:02 2002 Subject: [ODE] Joint Naming Message-ID: <00ae01c28425$ebdb2820$17a08481@nxcommanche> Hi, while working on improving joint support for an app that will support both ODE and Nx physics back ends, it occurred to me that there is a good opportunity for misunderstandings regarding joint naming. In particular, I think the picture for slider joint in the ODE user's guide is misleading. The joint has a circular shaft, which makes one think that rotation around the shaft may be possible. However, when one considers that such a joint would need an additional anchor parameter, it becomes clear that rotation around the axis is in fact not possible. It says this too in section 3.5, though not later in the section on slider: "... a slider joint that constraints the ``piston'' and ``socket'' to line up, and additionally constraints the two bodies to have the same orientation." We call such a joint a Prismatic joint, and draw it in the manual with a square shaft. We also have joints called sliders, with circular shafts, which is what can be created in ODE by combining a slider and a hinge through a proxy body. Obviously it is inconvenient to do any sort of renaming, but I would suggest changing the picture in ODE. --Adam -- Adam Moravanszky /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From coding at natew.com Mon Nov 4 13:18:01 2002 From: coding at natew.com (Nate W) Date: Mon Nov 4 13:18:01 2002 Subject: [ODE] CVS is Scary In-Reply-To: <3DC6981D.5080408@oracle.com> Message-ID: On Mon, 4 Nov 2002, Ed Jones wrote: > Not having used CVS before I've tried to get the latest version of > everything using WinCVS and it seems to have worked. I was using WinCVS myself until a couple weeks ago when someone suggested I try this instead: http://www.tortoisecvs.org/ It's MUCH more user-friendly. WinCVS GUI just made me want to learn the command line syntax so I wouldn't have to be confronted with all those cryptic buttons. :-) Tortoise is probably not as powerful, but all I need is to stay current with ODE and one other project I'm peripherally involved with, so I'm happy with it. It's also implemented as a shell extension, which is kind of neat. -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Mon Nov 4 13:38:02 2002 From: coding at natew.com (Nate W) Date: Mon Nov 4 13:38:02 2002 Subject: [ODE] Joint Naming In-Reply-To: <00ae01c28425$ebdb2820$17a08481@nxcommanche> Message-ID: On Mon, 4 Nov 2002, Adam Moravanszky [Novodex] wrote: > The joint has a circular shaft, which makes one think that rotation > around the shaft may be possible. [.....] We call such a joint a > Prismatic joint, and draw it in the manual with a square shaft. FWIW, I feel the same way. I use the "prismatic" term in the XML generated by Juice. It's called "slider" in the UI, but I think that was a mistake, as the term is ambiguous. > We also have joints called sliders, with circular shafts [....] So long as we're talking about naming, how about "cylindrical joint" for those? -- Nate Waddoups Redmond WA USA http://www.natew.com From adam.moravanszky at novodex.com Mon Nov 4 14:22:02 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [NovodeX]) Date: Mon Nov 4 14:22:02 2002 Subject: [ODE] Joint Naming References: Message-ID: <004001c28440$1ca4a200$f311da50@powerhouse> > > We also have joints called sliders, with circular shafts [....] > > So long as we're talking about naming, how about "cylindrical joint" for > those? > Perhaps -- I like it because it describes a shape like 'spherical' and 'prismatic' do. I'd have to ask someone with a robotics background what the 'official' term is. Not that I insist on using those -- sometimes they are confusing to novices: For example "prismatic" isn't exactly intuitive: most people will think of optics when they hear that. We still use it to avoid ambiguity. -- Adam /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From ander_taylor at hotmail.com Mon Nov 4 14:35:02 2002 From: ander_taylor at hotmail.com (Ander Taylor) Date: Mon Nov 4 14:35:02 2002 Subject: [ODE] Complie to a Lib Message-ID: No I don't have a site. I will ask Jeff if I can put it on his. I will keep you posted. Ander ----Original Message Follows---- From: Anselm Hook To: Ander Taylor do you have a site for your stuff or is it something you're not sharing yet? just curious because i'd like to see your approach. -a On Mon, 4 Nov 2002, Ander Taylor wrote: > I just worked out that I dont need the lib. > > I can compile the whole lot, managed bits and everything, to a DLL. > > Finished Space, AMotor and Geom, also added Params to JointHinge. > > Works great. > > Ander > > > ----Original Message Follows---- > From: "Jeff Weber" > To: ode@q12.org > > > I just made my own vector and matrix structs. > > One other thing that is different about my approach is I used a "Managed > C++" wrapper rather than the PInvoke method. > > It seemed to work great considering my lack of any true C++ experience. > I'll be getting back to it eventually, but currently I'm busy "faking" some > vehicle physics for a demo that is due in december. I didn't want to chance > using ode as I wasn't sure I'd be able to get things running correctly by > then and still have time to work on the other things that need to be in the > demo. > > -jeff > > > ----Original Message Follows---- > From: Anselm Hook > To: Nate W > CC: > Subject: Re: [ODE] Complie to a Lib > Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) > > > There is one good reason not to use my C# binding - I am relying on a > class based Vector and Matrix math library (that I ported from an open > source clone of Java3D). I strongly suggest using a struct based Vector > and Matrix library such as http://www.exocortex.org/3dengine or others > (his starting point is BSD licenced). > > I'll bet Jeff Weber has solved this correctly - where is Jeff's site? > Jeff? > > - a > > > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > > I am new to ODE and C++. I am working on a wrapper to allow the use > of ODE > > > > from .Net, extending the work already done by Jeff Weber. > > > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > _________________________________________________________________ Internet access plans that fit your lifestyle -- join MSN. http://resourcecenter.msn.com/access/plans/default.asp From p.terdiman at wanadoo.fr Mon Nov 4 15:09:02 2002 From: p.terdiman at wanadoo.fr (Pierre Terdiman) Date: Mon Nov 4 15:09:02 2002 Subject: [ODE] Joint Naming References: <004001c28440$1ca4a200$f311da50@powerhouse> Message-ID: <001d01c2844e$76582980$0e00000a@pierre> "Cylindrical" seems nice : http://www.solid-dynamics.com/mwfunctionalities/index.htm Pierre > > > We also have joints called sliders, with circular shafts [....] > > > > So long as we're talking about naming, how about "cylindrical joint" for > > those? > > > > Perhaps -- I like it because it describes a shape like 'spherical' and > 'prismatic' do. I'd have to ask someone with a robotics background what the > 'official' term is. Not that I insist on using those -- sometimes they are > confusing to novices: For example "prismatic" isn't exactly intuitive: most > people will think of optics when they hear that. We still use it to avoid > ambiguity. > > -- Adam > > /*================*\ > |Chief Software Architect > |NovodeX AG > |physics middleware > |www.novodex.com > \*================*/ > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From adam.moravanszky at novodex.com Mon Nov 4 15:46:01 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [NovodeX]) Date: Mon Nov 4 15:46:01 2002 Subject: [ODE] Joint Naming References: <004001c28440$1ca4a200$f311da50@powerhouse> <001d01c2844e$76582980$0e00000a@pierre> Message-ID: <019101c2844b$df61fdf0$f311da50@powerhouse> Cool site. Too bad the tiny pictures don't always make sense. So "cylindrical" it is, then. -- Adam Moravanszky /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From henri at cs.sun.ac.za Mon Nov 4 15:46:50 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Mon Nov 4 15:46:50 2002 Subject: [ODE] Optimization maybe? Message-ID: <012801c28454$367ee3c0$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_0125_01C28464.FA0087D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi everybody :) I'm your newest newcomer... *grinZ* I've been very impressed with what I've seen of ODE upto now (not that = I've had much exposure yet) - enough to consider porting the entire code = to Delphi just to understand it better (but after looking at that = whirlwind that is the code for ODE I decided to be less ambitious for = the time being... ;) Nonetheless, I'd like to see if I can help a little; one of the things I = have some experience in is low-level programming. I'd appreciate if = somebody could show me to the part of the ODE code that is the most CPU = intensive (presumably the big Jacobian matrix solving) I'd like to give = a crack at optimizing the code (not the algorithm!!) manually. Maybe its = possible to wring a couple of speed increases out of it. hmmm... and maybe somebody should tell me how the matrix would typically = look (random values all over, mostly just a diagonal, or whatever) so I = can setup test cases. And what would a suitable matrix size be for = testing purposes? (50x50, 200x200, smaller, bigger?) Anything else I should know? (Maybe give-up now, before its too late?) thanks :) Henri ------=_NextPart_000_0125_01C28464.FA0087D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi everybody :)
 
I'm your newest newcomer... = *grinZ*
 
I've been very impressed with what I've = seen of ODE=20 upto now (not that I've had much exposure yet) - enough to consider = porting the=20 entire code to Delphi just to understand it better (but after looking at = that=20 whirlwind that is the code for ODE I decided to be less ambitious for = the time=20 being... ;)
 
Nonetheless, I'd like to see if I can = help a=20 little; one of the things I have some experience in is low-level = programming.=20 I'd appreciate if somebody could show me to the part of the ODE code = that is the=20 most CPU intensive (presumably the big Jacobian matrix solving) I'd like = to give=20 a crack at optimizing the code (not the algorithm!!) manually. Maybe its = possible to wring a couple of speed increases out of it.
 
hmmm... and maybe somebody should tell = me how the=20 matrix would typically look (random values all over, mostly just a = diagonal, or=20 whatever) so I can setup test cases. And what would a suitable matrix = size be=20 for testing purposes? (50x50, 200x200, smaller, bigger?)
 
Anything else I should know? (Maybe = give-up now,=20 before its too late?)
 
thanks :)
  Henri
------=_NextPart_000_0125_01C28464.FA0087D0-- From jeffreyweber at hotmail.com Mon Nov 4 16:59:02 2002 From: jeffreyweber at hotmail.com (Jeff Weber) Date: Mon Nov 4 16:59:02 2002 Subject: [ODE] Complie to a Lib Message-ID: My site is at www.farseer.com. The ode stuff is in the downloads section. It's not finished, but Ander Taylor has picked up where I left off. He's going to send me his code and I'll post it on my site. -jeff ----Original Message Follows---- From: Anselm Hook To: Ander Taylor CC: Subject: Re: [ODE] Complie to a Lib Date: Mon, 4 Nov 2002 09:32:30 -0700 (MST) do you have a site for your stuff or is it something you're not sharing yet? just curious because i'd like to see your approach. -a On Mon, 4 Nov 2002, Ander Taylor wrote: > I just worked out that I dont need the lib. > > I can compile the whole lot, managed bits and everything, to a DLL. > > Finished Space, AMotor and Geom, also added Params to JointHinge. > > Works great. > > Ander > > > ----Original Message Follows---- > From: "Jeff Weber" > To: ode@q12.org > > > I just made my own vector and matrix structs. > > One other thing that is different about my approach is I used a "Managed > C++" wrapper rather than the PInvoke method. > > It seemed to work great considering my lack of any true C++ experience. > I'll be getting back to it eventually, but currently I'm busy "faking" some > vehicle physics for a demo that is due in december. I didn't want to chance > using ode as I wasn't sure I'd be able to get things running correctly by > then and still have time to work on the other things that need to be in the > demo. > > -jeff > > > ----Original Message Follows---- > From: Anselm Hook > To: Nate W > CC: > Subject: Re: [ODE] Complie to a Lib > Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) > > > There is one good reason not to use my C# binding - I am relying on a > class based Vector and Matrix math library (that I ported from an open > source clone of Java3D). I strongly suggest using a struct based Vector > and Matrix library such as http://www.exocortex.org/3dengine or others > (his starting point is BSD licenced). > > I'll bet Jeff Weber has solved this correctly - where is Jeff's site? > Jeff? > > - a > > > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > > I am new to ODE and C++. I am working on a wrapper to allow the use > of ODE > > > > from .Net, extending the work already done by Jeff Weber. > > > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode _________________________________________________________________ Get a speedy connection with MSN Broadband.  Join now! http://resourcecenter.msn.com/access/plans/freeactivation.asp From russ at q12.org Mon Nov 4 17:30:02 2002 From: russ at q12.org (Russ Smith) Date: Mon Nov 4 17:30:02 2002 Subject: [ODE] Optimization maybe? In-Reply-To: <012801c28454$367ee3c0$45d4e892@temple> Message-ID: > Nonetheless, I'd like to see if I can help a little; one of the things > I have some experience in is low-level programming. I'd appreciate if > somebody could show me to the part of the ODE code that is the most CPU > intensive there are two things right now: (A) the factorization of large matrices (fast_ldlt.c) and solving right hand sides (fast_lsolve.c) and (B) the formation of that matrix in the first place (parts of step.cpp). problem (A) can be made faster by rewriting the factorizer/solver functions to use SIMD assembly, for various platforms (XMM, altivec, whatever). problem (B) is harder because it's a mix of detailed algorithm and many small matrix multiplies - probably implementing XMM versions of the small matrix multiplies would make it faster. note that there has been some talk about using some other, faster (but less precise) dynamics algorithms instead of the big-matrix-factorizing technique (e.g. iterative LCP), but there are still plenty of reasons to optimize the big-matrix algorithms: - they're faster for systems less than N*N, where N is maybe around 20. - they're more precise, and will give good answers in some cases where iterative LCP might fail. - the work done (and experience gained) optimizing the big-matrix algorithms will also apply to optimizing the other algorithms that come along later. - they'll probably be easier to optimize this way. > hmmm... and maybe somebody should tell me how the matrix would > typically look (random values all over, mostly just a diagonal, or > whatever) the big system matrix 'A' is block-sparse. get some test cases by printing out A at the entry to dSolveLCP() in lcp.cpp. > And what would a suitable matrix > size be for testing purposes? (50x50, 200x200, smaller, bigger?) it depends - you can optimize for large or small problems. i would optimize for 20x20 to 50x50 sizes, as systems larger than this will benefit (eventually) from other solver algorithms. > Anything else I should know? (Maybe give-up now, before its too late?) don't give up just yet! search the archive of this mailing list for messages of mine that mention SIMD, XMM or the factorizer, because i've written about this topic before. you'll also want to look at the factorizer builder code in ode/fbuild for an idea of how the current code is constructed. also reading a good book on numerical code will help, e.g. "numerical recipes in C, 2nd ed". (before someone retorts that NRC is not a good book ... on the subject of factorizers it has a good introduction and coverage of the basic issues, even though the code examples they provide are either lame, broken or both). russ. -- Russ Smith http://www.q12.org/ From ps_yumemi at yahoo.com Tue Nov 5 02:15:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Tue Nov 5 02:15:02 2002 Subject: [ODE] rotation Message-ID: <20021105091356.64536.qmail@web40510.mail.yahoo.com> hello, again... sorry people. i really don't get what i'm doing wrong or why my rotation matrix doesn't work. i have two variables: dMatrix3 mobot_rotation const dReal *mobot_rot i use the following code to pass the rotation matrix mobot_rot = dBodyGetRotation(bodyID) mobot_rotation[0]=mobot_rot[0] ... mobot_rotation[11]=mobot_rot[11] dBodySetRotation(bodyID, mobot_rotation) it doesn't work? the bodies end up rotated wrong. i also tried to use the same technique as the settransform function in drawstuff.cpp mobot_rotation[0]=mobot_rot[0] mobot_rotation[1]=mobot_rot[4] ... mobot_rotation[11]=0 and it still didn't turn out right. please help. i really need to solve this problem. __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From ed.jones at oracle.com Tue Nov 5 03:22:01 2002 From: ed.jones at oracle.com (Ed Jones) Date: Tue Nov 5 03:22:01 2002 Subject: [ODE] rotation References: <20021105091356.64536.qmail@web40510.mail.yahoo.com> Message-ID: <3DC79BC2.6050402@oracle.com> Hi, So you are doing this; Get the rotation of "bodyID". Copy that into another matrix. Use that matrix to set the rotation of "bodyID" I think I'm misunderstanding what you're trying to do. My example code, which was nabbed directly from drawstuff does this; Gets the rotation of a body according to ODE Copies that ODE flavoured matrix to an OpenGL matrix Sets the OpenGL transform so that the box (or whatever) gets drawn in its "correct" place, according to ODE What is the effect you're trying to achieve? Cheers, Ed. pia dalusong wrote: >hello, > >again... sorry people. i really don't get what i'm >doing wrong or why my rotation matrix doesn't work. > >i have two variables: >dMatrix3 mobot_rotation >const dReal *mobot_rot > >i use the following code to pass the rotation matrix > >mobot_rot = dBodyGetRotation(bodyID) >mobot_rotation[0]=mobot_rot[0] >... >mobot_rotation[11]=mobot_rot[11] > >dBodySetRotation(bodyID, mobot_rotation) > >it doesn't work? the bodies end up rotated wrong. > >i also tried to use the same technique as the >settransform function in drawstuff.cpp > >mobot_rotation[0]=mobot_rot[0] >mobot_rotation[1]=mobot_rot[4] >... >mobot_rotation[11]=0 > >and it still didn't turn out right. > >please help. i really need to solve this problem. > > >__________________________________________________ >Do you Yahoo!? >HotJobs - Search new jobs daily now >http://hotjobs.yahoo.com/ >_______________________________________________ >ODE mailing list >ODE@q12.org >http://q12.org/mailman/listinfo/ode > > From paul.chavent at fnac.net Tue Nov 5 03:52:02 2002 From: paul.chavent at fnac.net (Chavent Paul) Date: Tue Nov 5 03:52:02 2002 Subject: [ODE] Can i access each geom of a space? Message-ID: <3DC7956A.6040608@fnac.net> Can i access each geom of a space? Yes, it seams possible. But i need to do : dGeomGroupGetNumGeoms() dGeomGroupGetGeom() i wonder if it couldn't be fastest to access geoms with the "first" pointer that is in the "space" structure. Unfortunately, the structure isn't declared in the includes. Is there someone that can say to me if my idea is wrong and/or if there is a solution to access "geoms" without having to do a geomgroup containing all my scene ? From n_di_leva at hotmail.com Tue Nov 5 05:49:02 2002 From: n_di_leva at hotmail.com (Nicola Di Leva) Date: Tue Nov 5 05:49:02 2002 Subject: [ODE] bending wheels again? Message-ID: Hi everybody, done enough RDTL, so don't complain about the overused topic;) Just to be original, I've started my own car simulator using ODE, stealing code..ehm, taking inspiration from the freefall buggy demo ( very stable and smooth indeed ). When it's just a matter of going back and forth, the car behaves quite well, but as soon as it starts turning, the wheels progressively lose their alignment with the relative joint axes. Previous posts mentioned high rotation speeds and friction coefficients, but this is not the case ( i won't list the details of the simulation since they are the same of the freefall buggy demo ). I've read something about problems using directx with ODE too, can someone tell me more? ps. ODE is great, keep up the good work Russ! _________________________________________________________________ Unlimited Internet access for only $21.95/month.  Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp From Remko at act-3d.com Tue Nov 5 07:32:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Tue Nov 5 07:32:02 2002 Subject: [ODE] bending wheels again? Message-ID: <279127752.1737917222.98@server> Maybe you have set the ERP value of the hinge2 to 0.0? We are using ODE with DirectX 8.1 for quite a while now and I do not know of any problems :) -----Original Message----- From: Nicola Di Leva [mailto:n_di_leva@hotmail.com] Sent: Tuesday, November 05, 2002 12:48 PM To: ode@q12.org; Remko Jacobs (act-3d.com) Subject: [ODE] bending wheels again? Hi everybody, done enough RDTL, so don't complain about the overused topic;) Just to be original, I've started my own car simulator using ODE, stealing code..ehm, taking inspiration from the freefall buggy demo ( very stable and smooth indeed ). When it's just a matter of going back and forth, the car behaves quite well, but as soon as it starts turning, the wheels progressively lose their alignment with the relative joint axes. Previous posts mentioned high rotation speeds and friction coefficients, but this is not the case ( i won't list the details of the simulation since they are the same of the freefall buggy demo ). I've read something about problems using directx with ODE too, can someone tell me more? ps. ODE is great, keep up the good work Russ! _________________________________________________________________ Unlimited Internet access for only $21.95/month.á Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From marco.koegler at web.de Tue Nov 5 07:38:02 2002 From: marco.koegler at web.de (=?ISO-8859-2?Q?Marco_K=F6gler?=) Date: Tue Nov 5 07:38:02 2002 Subject: [ODE] Tri-Collider ... confused Message-ID: <3DC7D7A7.7010507@web.de> Hi! I was wondering whether somebody on the list would be kind enough to shed some light regarding the tricollider. There is a tricollider in the CVS repository, but it seems 'oldish' ... is that still the tricollider to use? I'm using Opcode 1.2 in my project and fear that this will conflict with the tricollider in the CVS (as it needs Opcode 1.0). Erwin posted an update to the list sometime in August (newstuff.gz). This uses Opcode 1.2, so that should solve that problem. A bit later Erwin posted something about this code having problems with large triangles and other issues ... he also said that he was glad he didn't commit the changes in the CVS. So, I don't know which code to use :( Should I use the version in the CVS or the one posted in August? Is there a possibility of a more stable/current version in the near future? Questions over questions *sigh* Anyways, ODE rocks ... -Marco From n_di_leva at hotmail.com Tue Nov 5 10:14:01 2002 From: n_di_leva at hotmail.com (Nicola Di Leva) Date: Tue Nov 5 10:14:01 2002 Subject: [ODE] bending wheels again? Message-ID: >Maybe you have set the ERP value of the hinge2 to 0.0? We are using ODE >with DirectX 8.1 for quite a while now and I do not know of any problems >:) No, joint erp and cfm are always set. I've tried several combinations of values for them, but the bending is still there. _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From russ at q12.org Tue Nov 5 11:54:01 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 5 11:54:01 2002 Subject: [ODE] Can i access each geom of a space? In-Reply-To: <3DC7956A.6040608@fnac.net> Message-ID: > Can i access each geom of a space? Yes, it seams possible. the new collision code i'm working on will allow this (and many other things). it'll be checked into CVS hopefully by the end of this week (gotta work the bugs out first). russ. -- Russ Smith http://www.q12.org/ From coding at natew.com Tue Nov 5 12:04:01 2002 From: coding at natew.com (Nate W) Date: Tue Nov 5 12:04:01 2002 Subject: [ODE] bending wheels again? In-Reply-To: Message-ID: On Tue, 5 Nov 2002, Nicola Di Leva wrote: > When it's just a matter of going back and forth, the car behaves quite > well, but as soon as it starts turning, the wheels progressively lose their > alignment with the relative joint axes. > Previous posts mentioned high rotation speeds and friction coefficients, but > this is not the case [...]/ I think you're describing something that I also noticed with the freefall demo on my machine, and my guess is that it could be corrected by tweaking the CFM. Try making it an order of magnitude smaller... e.g. if it's 0.001, change it to 0.0001 (more zeroes). I didn't actually test this theory, but it looks similar to what simulations in Juice do when the CFM is too high, so I think it could be the same thing. The catch is that turning down the CFM makes the simulation more rigid, thus less forgiving, thus more prone to instability or explosion. It's a compromise. It may well be possible to stiffen it a bit before any problems appear, it's impossible to say without trying. -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Tue Nov 5 12:35:02 2002 From: coding at natew.com (Nate W) Date: Tue Nov 5 12:35:02 2002 Subject: [ODE] bending wheels again? In-Reply-To: Message-ID: On Tue, 5 Nov 2002, Nicola Di Leva wrote: > >Maybe you have set the ERP value of the hinge2 to 0.0? > > No, joint erp and cfm are always set. I've tried several combinations of > values for them, but the bending is still there. That reminds me, I should have been more clear in my last message... when I suggested changing CFM, I was referring to the world CFM (set with dWorldSetCFM()). -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Tue Nov 5 17:20:02 2002 From: coding at natew.com (Nate W) Date: Tue Nov 5 17:20:02 2002 Subject: [ODE] LMotor? Message-ID: While talking off-list with Adam M about motors, I had an idea that I want to share here, in hopes of elongating Russ' to-do list. ODE has angular motors, but how about linear motors? I'd like to be able to define an 'anchor' body and one to three axes relative to that body, and then constrain the position of a second body along those axes... sorta like the angular motors do now, but with position rather than orientation. The thing I like about this approach to motorization is that AMotors and LMotors together will allow me to create gaits for walking creatures using a higher-level "language." It's basically a way to use ODE's solver to do reverse kinematics. For example, rather than commanding the hip to flex 5 degrees, the knee to bend 10 degrees, and the ankle to flex 5 degrees, the control system could just attach the foot to the hip via an LMotor and command the foot to move up a couple inches. It should allow creature motions to be controlled in a more intuitive way - and in a way that should still work with little or tuning even if the creature's limbs get lengthened or shortened or placed at different angles. From the user's perspective, it turns the problem of foot or hand placement from a nonlinear problem with as many variables as there are joints in the limb, to a linear problem with only as many variables as the user wants to bother with. Comments? Volunteers? I started trying to implement this myself, but couldn't shake the feeling that I was getting in way over my head and would have no idea how to debug what I was writing. Math is hard. :-) -- Nate Waddoups Redmond WA USA http://www.natew.com From n_di_leva at hotmail.com Tue Nov 5 19:31:01 2002 From: n_di_leva at hotmail.com (Nicola Di Leva) Date: Tue Nov 5 19:31:01 2002 Subject: [ODE] bending wheels again? Message-ID: A weird demo is better than 1000 words, so if you want take a look at http://ndileva.250free.com/ToyCar.zip. Any suggestion will be appreciated ( especially on turning the car, which is still a hard task ). ps. i noticed that the freefall demo does not set world's cfm and erp at all, shouldn't it blow up? _________________________________________________________________ Broadband? Dial-up? Get reliable MSN Internet Access. http://resourcecenter.msn.com/access/plans/default.asp From russ at q12.org Tue Nov 5 23:41:01 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 5 23:41:01 2002 Subject: [ODE] slider trouble In-Reply-To: References: <20021031221053.291c8cac.russ@q12.org> Message-ID: <20021105224532.446b7061.russ@q12.org> > I've attached another test that bounces things off > the ground a bit differently, and you can watch two blocks bounce > skyward and then gradually spin up to an explosion. i'm chalking this one up to integrator error - if you lower the timestep, the effect disappears. i'm pretty sure that there are no non-physical forces being applied to the system (as was the case with your previous slider-stop problem). unfortunately this kind of thing (integrator error) is unavoidable with ODE's current integrator in some situations where you have rapidly rotating bodies. > Also, could this problem be related to the problem where a single > flying spinning body also gains angular momentum? yes, it's the same kind of thing. i'll do some more experiments and see if something can be done about this. in the meantime, use a smaller timestep, or less bounce, or larger mass - anything to reduce the amount of rotation experienced per time step. russ. -- Russell Smith http://www.q12.org From adam.moravanszky at novodex.com Wed Nov 6 01:46:01 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [Novodex]) Date: Wed Nov 6 01:46:01 2002 Subject: [ODE] bending wheels again? References: Message-ID: <003201c28570$8c555870$17a08481@nxcommanche> From: "Nicola Di Leva" > Any suggestion will be appreciated ( especially on turning the car, > which is still a hard task ). Automobile manufacturers have tried in the past to make cars with four wheel steering, but it did not turn out to be a good idea. I would recommend sticking to front wheel steering only when making virtual cars as well. Not sure why the primary ODE buggy demo has this absolutely undriveable configuration either. I tried setting "turnable" to false in your car config file for the rear wheels, but it didn't make a difference. Also: I can still drive the car when it is flipped over! -- Adam Moravanszky /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From max.lungarella at aist.go.jp Wed Nov 6 02:21:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 02:21:02 2002 Subject: [ODE] joint friction Message-ID: <20021106181905.203257ac.max.lungarella@aist.go.jp> hi there, i may be asking something that is documented somewhere. but anyhow ... is there a way to enable friction in the joints? in ball and socket joints, for instance? or do i need to implement my own friction model? or do i need to play around with the joint related ERP and CFM? the API does not feature a dJointSetBallAndSocketParam() though! thanks a lot for any sort of feedback! cheers, max From mattias at cambrianlabs.com Wed Nov 6 02:32:01 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Wed Nov 6 02:32:01 2002 Subject: [ODE] bending wheels again? In-Reply-To: <003201c28570$8c555870$17a08481@nxcommanche> References: <003201c28570$8c555870$17a08481@nxcommanche> Message-ID: You must reduce friction if you don't want the car to turn over. cheers, m From Daniel.Groll at t-online.de Wed Nov 6 03:42:02 2002 From: Daniel.Groll at t-online.de (Daniel.Groll@t-online.de) Date: Wed Nov 6 03:42:02 2002 Subject: [ODE] bending wheels again? In-Reply-To: References: <003201c28570$8c555870$17a08481@nxcommanche> Message-ID: <1036578694.3dc8ef864be07@webmail.t-online.de> Hi! I made the wheel bending problem go away by adjusting the rotation of the steering wheels every 6-10th timestep. I calculate which direction they should have and set it with dBodySetQuaternion (or dBodySetRotation). To prevent the car from turning over, I check if all four wheels have contact with the ground. If yes, I apply small forces to them as a "glue" and I reduce the angular velocity of the car body. On an even surface it's almost impossible to tip over now. The behaviour of the car when jumping or flying around seems to be ok because the the tweaks are only applied when the car touches the ground as said before. From neo-nb at gmx.de Wed Nov 6 07:01:01 2002 From: neo-nb at gmx.de (Stefan Werner) Date: Wed Nov 6 07:01:01 2002 Subject: [ODE] Suddenly Disappearing ODE Objects Message-ID: <002401c2859c$f2cba560$1701a8c0@cion> Hello, I've created a simple car sim with ODE and everything works fine. I can drive through my landscape and can jump over other objects. But there is still one problem. If my car doesn't move, then after a few seconds it completely disappears. I get my position out of const dReal *pos; pos = dBodyGetPosition(carbody[0]); I've also noticed, that when my car disappears, "pos" is not a number anymore, it contains a string: "QNAN". I programm with MS VC++ .Net. What does this mean? Does anyone knows this problem? I can't explain it because everything works fine when my car moves around, it happens only when the car doesn't move. I hope someone can help me. Karl Koch From russ at q12.org Wed Nov 6 12:12:01 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 6 12:12:01 2002 Subject: [ODE] joint friction In-Reply-To: <20021106181905.203257ac.max.lungarella@aist.go.jp> Message-ID: > i may be asking something that is documented somewhere. > but anyhow ... is there a way to enable friction in the joints? there is a good and simple way to do this. set the joint 'fmax' parameter to some (positive) value. set the desired velocity parameter to 0. now the joint will exert a force up to fmax to bring the joint velocity down to 0. this is actually a pretty good model of coulomb friction for a joint. changing fmax to be higher will give more friction - and there's no stability problem with choosing any value of fmax >= 0. russ. -- Russ Smith http://www.q12.org/ From neo-nb at gmx.de Wed Nov 6 15:01:01 2002 From: neo-nb at gmx.de (Stefan Werner) Date: Wed Nov 6 15:01:01 2002 Subject: [ODE] Suddenly Disappearing ODE Objects Message-ID: <001201c285df$ec009ea0$1701a8c0@cion> I found out that when my object disappears, the dJointGetHinge2Angle1(Joints[0]) retrieves exactly PI or -PI. When my car move this value lies between -0.5 and 0.5; I think that the reason why dBodyGetPosition retrieves a wrong value. Now does anyone know why suddenly the value jumps to "PI"? And what's about "single" and "double" ODE? What shall I use and how can I switch between both precisions in C++? > Hello, > > I've created a simple car sim with ODE and everything works fine. I can > drive through my landscape and can jump over other objects. But there is > still one problem. If my car doesn't move, then after a few seconds it > completely disappears. I get my position out of > const dReal *pos; > pos = dBodyGetPosition(carbody[0]); > I've also noticed, that when my car disappears, "pos" is not a number > anymore, it contains a string: "QNAN". I programm with MS VC++ .Net. > What does this mean? Does anyone knows this problem? I can't explain it > because everything works fine when my car moves around, it happens only when > the car doesn't move. > I hope someone can help me. > Karl Koch From max.lungarella at aist.go.jp Wed Nov 6 17:07:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 17:07:02 2002 Subject: [ODE] joint friction In-Reply-To: References: <20021106181905.203257ac.max.lungarella@aist.go.jp> Message-ID: <20021107090532.54d375b5.max.lungarella@aist.go.jp> hi russ, yes, your model sounds perfectly reasonable to me. thank you very much. but what about ball and socket joints? is there a way to set something similar to an "fmax" parameter for them? was not able to figure out any function dealing with it. thanks a lot! cheers, max > > i may be asking something that is documented somewhere. > > but anyhow ... is there a way to enable friction in the joints? > > there is a good and simple way to do this. set the joint 'fmax' parameter > to some (positive) value. set the desired velocity parameter to 0. now the > joint will exert a force up to fmax to bring the joint velocity down to 0. > this is actually a pretty good model of coulomb friction for a joint. > changing fmax to be higher will give more friction - and there's no > stability problem with choosing any value of fmax >= 0. > > russ. > > -- > Russ Smith > http://www.q12.org/ > From russ at q12.org Wed Nov 6 17:35:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 6 17:35:02 2002 Subject: [ODE] joint friction In-Reply-To: <20021107090532.54d375b5.max.lungarella@aist.go.jp> Message-ID: friction can be applied to ball and socket joints using the amotor joint - again setting fmax=something and vel=0 for the three axes. note that this is not as general as for the hinge and slider joints - for three free axes there are many ways to derive three (or one or two) friction forces to get various effects. the amotor joint will implement friction as though there were three hinge-type linkages connecting the two bodies - but this is different from what you would get if there was an actual ball fitting into an actual socket, for example. russ. -- Russ Smith http://www.q12.org/ From max.lungarella at aist.go.jp Wed Nov 6 17:43:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 17:43:02 2002 Subject: [ODE] joint friction In-Reply-To: References: <20021107090532.54d375b5.max.lungarella@aist.go.jp> Message-ID: <20021107094110.1651031d.max.lungarella@aist.go.jp> thank you very much for the hint. i'll give it a try right away. keep up the good work! max > friction can be applied to ball and socket joints using the amotor joint - > again setting fmax=something and vel=0 for the three axes. note that this > is not as general as for the hinge and slider joints - for three free axes > there are many ways to derive three (or one or two) friction forces to get > various effects. the amotor joint will implement friction as though there > were three hinge-type linkages connecting the two bodies - but this > is different from what you would get if there was an actual ball fitting > into an actual socket, for example. > > russ. > > -- > Russ Smith > http://www.q12.org/ > From erickt at andrew.cmu.edu Wed Nov 6 18:42:01 2002 From: erickt at andrew.cmu.edu (Erick Tryzelaar) Date: Wed Nov 6 18:42:01 2002 Subject: [ODE] Slip friction coefficient In-Reply-To: Message-ID: Hello all, I was just wondering if the slip friction coefficient corresponds to one to one with dynamic friction. Or is it something else? -Erick From thomas_buehrmann at web.de Wed Nov 6 19:09:02 2002 From: thomas_buehrmann at web.de (Thomas Buehmann) Date: Wed Nov 6 19:09:02 2002 Subject: [ODE] Message-ID: <200211070208.gA728bX26148@mailgate5.cinetic.de> Hi, i'm new to ODE and just tried to install the last release on WinXP. Unfortunately, the make just fails displaying following error code: D:\Development\ODE\ode-0.03>make cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC /Feconfigurator.exe configur ator.c process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBU G_ALLOC /Feconfigurator.exe configurator.c, ...) failed. make (e=2): Das System kann die angegebene Datei nicht finden. make: *** [configurator.exe] Error 2 (sorry for the german stuff in the line before the last; it just means the system wasn't able to find the specified file). i have to admit i'm a make dummy, but it seems as if make fails while trying to build the configurator.exe, right? is there supposed to be a config.h file somewhere (e.g. in include\ode), cause there is none? at least in the doc it's saying you could as well just set the condiguration yourself in that file. or am i just too stupid? any help would be great. thanks, thomas. ________________________________________________________________ Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 From max.lungarella at aist.go.jp Wed Nov 6 19:28:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 19:28:02 2002 Subject: [ODE] In-Reply-To: <200211070208.gA728bX26148@mailgate5.cinetic.de> References: <200211070208.gA728bX26148@mailgate5.cinetic.de> Message-ID: <20021107112605.294d406e.max.lungarella@aist.go.jp> you've got to properly set your "path" environment variable, i guess. apparently your makefile is not able to find "Feconfigurator.exe". try to type "path" in the console (if winXP's got one) and check the output. the directory where "Feconfigurator.exe" is installed should be there. if not, add it to "path". hope this works. cheers, max > Hi, > i'm new to ODE and just tried to install the last release on WinXP. > Unfortunately, the make just fails displaying following error code: > > D:\Development\ODE\ode-0.03>make > cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC > /Feconfigurator.exe configur ator.c > process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC > /DdDOUBLE /DdDEBU G_ALLOC /Feconfigurator.exe configurator.c, ...) > failed. make (e=2): Das System kann die angegebene Datei nicht finden. > make: *** [configurator.exe] Error 2 > > (sorry for the german stuff in the line before the last; it just means > the system wasn't able to find the specified file). > > i have to admit i'm a make dummy, but it seems as if make fails while > trying to build the configurator.exe, right? is there supposed to be a > config.h file somewhere (e.g. in include\ode), cause there is none? at > least in the doc it's saying you could as well just set the > condiguration yourself in that file. > > or am i just too stupid? > any help would be great. > > thanks, > thomas. > > ________________________________________________________________ > Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! > Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From max.lungarella at aist.go.jp Wed Nov 6 19:36:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 19:36:02 2002 Subject: [ODE] : update In-Reply-To: <200211070208.gA728bX26148@mailgate5.cinetic.de> References: <200211070208.gA728bX26148@mailgate5.cinetic.de> Message-ID: <20021107113406.7b685a55.max.lungarella@aist.go.jp> i'm sorry ... thomas, you should be looking for "cl.exe"'s (the compiler's) directory and NOT for "configurator.exe"'s! cheers, max > Hi, > i'm new to ODE and just tried to install the last release on WinXP. Unfortunately, the make just fails displaying following error code: > > D:\Development\ODE\ode-0.03>make > cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC /Feconfigurator.exe configur > ator.c > process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBU > G_ALLOC /Feconfigurator.exe configurator.c, ...) failed. > make (e=2): Das System kann die angegebene Datei nicht finden. > make: *** [configurator.exe] Error 2 > > (sorry for the german stuff in the line before the last; it just means the system > wasn't able to find the specified file). > > i have to admit i'm a make dummy, but it seems as if make fails while trying to build > the configurator.exe, right? is there supposed to be a config.h file somewhere (e.g. in > include\ode), cause there is none? at least in the doc it's saying you could as well just > set the condiguration yourself in that file. > > or am i just too stupid? > any help would be great. > > thanks, > thomas. > > ________________________________________________________________ > Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! > Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From gene at erachampion.com Wed Nov 6 22:31:02 2002 From: gene at erachampion.com (Gene Ruebsamen) Date: Wed Nov 6 22:31:02 2002 Subject: [ODE] Thesis on Evolving Virtual Creatures Message-ID: <1036656107.5212.7.camel@aludra.eranet.com> Hello Everybody, Just finished my thesis on evolving intelligent behaviors in embodied agents. I've updated my page with new videos and information at: http://www.erachampion.com/ai/ I am very happy I selected to use ODE as the physics engine, and I wanted to thank all of you who have offered your input over the past year. Now that I have more time, I will try and make further optimizations and improvements to my work, and hopefully release the code soon (have to clean it up first!). For those of you that are not familiar with my work, I have been evolving locomotive strategies in virtual creatures in a 3D environment. The creatures try to "survive" by evolving faster and more efficient means of locomotion. I am utilizing the ANN/GA paradigm that several of you have discussed in earlier posts. Thanks again! Gene Ruebsamen From coding at natew.com Wed Nov 6 23:23:02 2002 From: coding at natew.com (Nate W) Date: Wed Nov 6 23:23:02 2002 Subject: [ODE] Thesis on Evolving Virtual Creatures In-Reply-To: <1036656107.5212.7.camel@aludra.eranet.com> Message-ID: On 7 Nov 2002, Gene Ruebsamen wrote: > Just finished my thesis on evolving intelligent behaviors in embodied > agents. [...] Nice work! -- Nate Waddoups Redmond WA USA http://www.natew.com From minorlogic at yahoo.com Thu Nov 7 01:16:02 2002 From: minorlogic at yahoo.com (Michael Norel) Date: Thu Nov 7 01:16:02 2002 Subject: [ODE] Optimization again Message-ID: <20021107081527.91338.qmail@web11703.mail.yahoo.com> Have a look at ODE sources, and have a quest : code such this is not very important but calculated every step and for every object: ............ for (i=0; ifacc[0] += body[i]->mass.mass * world->gravity[0]; body[i]->facc[1] += body[i]->mass.mass * world->gravity[1]; body[i]->facc[2] += body[i]->mass.mass * world->gravity[2]; } ............. Is this possible to ilolate such a code and optimaze it ? I think it will not change often ? ............ // some example for C like style code for (i=0; ifacc; dReal mass = body[i]->mass.mass; dReal * gravity = world->gravity; // some isolated performance primitives MULTYPLY_BLOCK( facc, gravity, mass, 3 ); // MULTYPLY_BLOCK( dest, src, multer, counter ); } } __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ed.jones at oracle.com Thu Nov 7 03:11:02 2002 From: ed.jones at oracle.com (Ed Jones) Date: Thu Nov 7 03:11:02 2002 Subject: [ODE] References: <200211070208.gA728bX26148@mailgate5.cinetic.de> <20021107112605.294d406e.max.lungarella@aist.go.jp> Message-ID: <3DCA3C01.4020800@oracle.com> Hi, I don't know which compiler you're using, but for Visual C/C++ 6.0 I type something like; "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat" ...(including the quotes) at the command prompt, before typing "make", and that seems to work just fine. In the olden days you'd probably be able to call this script from your autoexec.bat file, but I'm not sure if recent versions of Windows have such a thing. Alternatively, when I install VC there's an option which says something like "Register the environment variables" which I guess sets the environment properly within Windows, so you don't have to type this everytime. Alternatively (again), you could look in that script and register all environment variables manually, with Windows, yourself. Mind you, that's on Win2k and VC6, dunno about XP. ;-) Hope that's useful. Cheers, Ed. Max Lungarella wrote: >you've got to properly set your "path" environment variable, i guess. >apparently your makefile is not able to find "Feconfigurator.exe". try >to type "path" in the console (if winXP's got one) and check the output. >the directory where "Feconfigurator.exe" is installed should be there. >if not, add it to "path". > >hope this works. > >cheers, > max > > > > >>Hi, >>i'm new to ODE and just tried to install the last release on WinXP. >>Unfortunately, the make just fails displaying following error code: >> >>D:\Development\ODE\ode-0.03>make >>cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC >>/Feconfigurator.exe configur ator.c >>process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC >>/DdDOUBLE /DdDEBU G_ALLOC /Feconfigurator.exe configurator.c, ...) >>failed. make (e=2): Das System kann die angegebene Datei nicht finden. >>make: *** [configurator.exe] Error 2 >> >>(sorry for the german stuff in the line before the last; it just means >>the system wasn't able to find the specified file). >> >>i have to admit i'm a make dummy, but it seems as if make fails while >>trying to build the configurator.exe, right? is there supposed to be a >>config.h file somewhere (e.g. in include\ode), cause there is none? at >>least in the doc it's saying you could as well just set the >>condiguration yourself in that file. >> >>or am i just too stupid? >>any help would be great. >> >>thanks, >>thomas. >> >>________________________________________________________________ >>Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! >>Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 >> >> >>_______________________________________________ >>ODE mailing list >>ODE@q12.org >>http://q12.org/mailman/listinfo/ode >> >> >_______________________________________________ >ODE mailing list >ODE@q12.org >http://q12.org/mailman/listinfo/ode > > From ps_yumemi at yahoo.com Thu Nov 7 08:55:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Thu Nov 7 08:55:02 2002 Subject: [ODE] rotation Message-ID: <20021107155451.29271.qmail@web40506.mail.yahoo.com> hello, ok, i finally got my variables right. i have another question though. i got my rotation matrix using const dReal dBodyGetRotation(bodyID) and then i got the values using a dReal matrix[12]; i then to transfer it to a dMatrix3 rotation_matrix and use dBodySetRotation(bodyID,rotation_matrix) however, i'm not getting the result i want. is there any way to get the euler angles from the matrix? if i'm using it on a car just on the chassis body after i attach everything else is that ok? is there any reason for this not to work? pia __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From coding at natew.com Thu Nov 7 10:27:01 2002 From: coding at natew.com (Nate W) Date: Thu Nov 7 10:27:01 2002 Subject: [ODE] rotation In-Reply-To: <20021107155451.29271.qmail@web40506.mail.yahoo.com> Message-ID: On Thu, 7 Nov 2002, pia dalusong wrote: > is there any way to get the euler angles from the > matrix? I'm not sure, but a google search on "euler angle matrix conversion" does turn up a bunch of pages that I think show how to extract euler angles from a quaternion. I only skimmed the results, but it looks promising. > if i'm using it on a car just on the chassis body > after i attach everything else is that ok? > is there any reason for this not to work? If "it" refers to dBodySetRotation, then I think you're going to get some weird behavior if you're rotating the body more than a tiny amount. ODE will try to bring the wheels back into alignment during the next timestep, and that could take huge forces, and that could lead to explosive behavior. At the very least I would expect the car to wiggle a lot during the first few timesteps. -- Nate Waddoups Redmond WA USA http://www.natew.com From erwin at vo.com Thu Nov 7 11:05:02 2002 From: erwin at vo.com (Erwin de Vries) Date: Thu Nov 7 11:05:02 2002 Subject: [ODE] Tri-Collider ... confused References: <3DC7D7A7.7010507@web.de> Message-ID: <000201c28688$0983c4e0$73fefea9@athlon> You should try both and see which works best for you. Both are very similar, and its pretty trivial to convert the CVS version to Opcode 1.2. If you need your trilist to be transformed dynamically, you can only use the one posted on this list. The tricollider will be integrated into ODE at some point in the future. I will fix the issues i reported to this list earlier, sometime soon. I've been saying this for a while.. Busy.. :-( But it will happen this year! :-P Erwin ----- Original Message ----- From: "Marco Kögler" To: Sent: Tuesday, November 05, 2002 15:37 Subject: [ODE] Tri-Collider ... confused > Hi! > > I was wondering whether somebody on the list would be kind enough to > shed some light regarding the tricollider. > > There is a tricollider in the CVS repository, but it seems 'oldish' ... > is that still the tricollider to use? > > I'm using Opcode 1.2 in my project and fear that this will conflict with > the tricollider in the CVS (as it needs Opcode 1.0). Erwin posted an > update to the list sometime in August (newstuff.gz). This uses Opcode > 1.2, so that should solve that problem. A bit later Erwin posted > something about this code having problems with large triangles and other > issues ... he also said that he was glad he didn't commit the changes in > the CVS. > > So, I don't know which code to use :( > > Should I use the version in the CVS or the one posted in August? Is > there a possibility of a more stable/current version in the near future? > > Questions over questions *sigh* > > Anyways, ODE rocks ... > > -Marco > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > > From mattias at cambrianlabs.com Thu Nov 7 11:32:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Thu Nov 7 11:32:02 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: <000201c28688$0983c4e0$73fefea9@athlon> References: <3DC7D7A7.7010507@web.de> <000201c28688$0983c4e0$73fefea9@athlon> Message-ID: > The tricollider will be integrated into ODE at some point > in the future. If I recall correctly, the tri-collider requires ODE to be compiled in single precision - will this change for the integration, or will tri- collider not be available when compiling to double precision? cheers, m From stephan at eisscholle.de Thu Nov 7 12:19:02 2002 From: stephan at eisscholle.de (Stephan Heigl) Date: Thu Nov 7 12:19:02 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: <000201c28688$0983c4e0$73fefea9@athlon> References: <3DC7D7A7.7010507@web.de> <000201c28688$0983c4e0$73fefea9@athlon> Message-ID: <200211072018.29994.stephan@eisscholle.de> Since i haven't been subscribed that long to that list, what patches are you refering to? I've searched through the the ml archive of August, but i haven't found the mentioned patch. Thanks alot. - Stephan On Wednesday 06 November 2002 22:58, Erwin de Vries wrote: > You should try both and see which works best for you. Both are very > similar, and its pretty trivial to convert the CVS version to Opcode 1.2. > If you need your trilist to be transformed dynamically, you can only use > the one posted on this list. The tricollider will be integrated into ODE at > some point in the future. > > I will fix the issues i reported to this list earlier, sometime soon. I've > been saying this for a while.. Busy.. :-( > > But it will happen this year! :-P > > Erwin > > ----- Original Message ----- > From: "Marco Kögler" > To: > Sent: Tuesday, November 05, 2002 15:37 > Subject: [ODE] Tri-Collider ... confused > > > Hi! > > > > I was wondering whether somebody on the list would be kind enough to > > shed some light regarding the tricollider. > > > > There is a tricollider in the CVS repository, but it seems 'oldish' ... > > is that still the tricollider to use? > > > > I'm using Opcode 1.2 in my project and fear that this will conflict with > > the tricollider in the CVS (as it needs Opcode 1.0). Erwin posted an > > update to the list sometime in August (newstuff.gz). This uses Opcode > > 1.2, so that should solve that problem. A bit later Erwin posted > > something about this code having problems with large triangles and other > > issues ... he also said that he was glad he didn't commit the changes in > > the CVS. > > > > So, I don't know which code to use :( > > > > Should I use the version in the CVS or the one posted in August? Is > > there a possibility of a more stable/current version in the near future? > > > > Questions over questions *sigh* > > > > Anyways, ODE rocks ... > > > > -Marco > > > > _______________________________________________ > > ODE mailing list > > ODE@q12.org > > http://q12.org/mailman/listinfo/ode > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From erickt at andrew.cmu.edu Thu Nov 7 12:25:02 2002 From: erickt at andrew.cmu.edu (Erick Tryzelaar) Date: Thu Nov 7 12:25:02 2002 Subject: [ODE] rotation In-Reply-To: Message-ID: Sure there is: This is from David Eberly's (chief architect behind the netimmerse engine) webpage: http://www.magic-software.com/Documentation/EulerAngles.pdf Also, if you're interested, the rest of that site has an amazing amount of useful information. Its good stuff. -Erick On Thu, 7 Nov 2002, Nate W wrote: > On Thu, 7 Nov 2002, pia dalusong wrote: > > > is there any way to get the euler angles from the > > matrix? > > I'm not sure, but a google search on "euler angle matrix conversion" does > turn up a bunch of pages that I think show how to extract euler angles > from a quaternion. I only skimmed the results, but it looks promising. > > > if i'm using it on a car just on the chassis body > > after i attach everything else is that ok? > > is there any reason for this not to work? > > If "it" refers to dBodySetRotation, then I think you're going to get some > weird behavior if you're rotating the body more than a tiny amount. ODE > will try to bring the wheels back into alignment during the next timestep, > and that could take huge forces, and that could lead to explosive > behavior. At the very least I would expect the car to wiggle a lot during > the first few timesteps. > > -- > > Nate Waddoups > Redmond WA USA > http://www.natew.com > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > > From marco.koegler at web.de Thu Nov 7 13:09:02 2002 From: marco.koegler at web.de (=?ISO-8859-2?Q?Marco_K=F6gler?=) Date: Thu Nov 7 13:09:02 2002 Subject: [ODE] Tri-Collider ... confused References: <3DC7D7A7.7010507@web.de> <000201c28688$0983c4e0$73fefea9@athlon> <200211072018.29994.stephan@eisscholle.de> Message-ID: <3DCAC82E.8020404@web.de> Stephan Heigl wrote: > Since i haven't been subscribed that long to that list, what patches are you > refering to? I've searched through the the ml archive of August, but i > haven't found the mentioned patch. You can find it here: http://q12.org/pipermail/ode/2002-August/001646.html I had to copy/paste the base64 encoded stuff into a file and then decode it with the 'base64' command-line tool. Should be standard on Linux/Unix ... a Windows version can be found here: http://www.fourmilab.ch/webtools/base64/ -Marco From coding at natew.com Thu Nov 7 13:49:01 2002 From: coding at natew.com (Nate W) Date: Thu Nov 7 13:49:01 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: Message-ID: On Thu, 7 Nov 2002, Mattias Fagerlund wrote: > > The tricollider will be integrated into ODE at some point > > in the future. > > If I recall correctly, the tri-collider requires ODE to be compiled in > single precision - will this change for the integration, or will tri- > collider not be available when compiling to double precision? I am using tri-collider with single-precision ODE right now with good results. I tried compiling both with double-precision and although the build worked I couldn't get it work at run time. I think the run-time problem was caused by pointer confusion - something expecting an arry of single-precision values received an array of doubles, or vice versa. I really don't think it would take much effort to get it work with doubles, but at the time this happened the CRCRLF bug in VS.Net was making some of the tri-collider source files impossible for me to work with. FWIW, my app doesn't behave noticably different when built with dSINGLE vs dDOUBLE. Juice started out in dDOUBLE mode, but has been released in dSINGLE mode since I integrated Demeter and the tri collider. If anyone noticed the change they haven't mentioned it to me. -- Nate Waddoups Redmond WA USA http://www.natew.com From mattias at cambrianlabs.com Thu Nov 7 14:03:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Thu Nov 7 14:03:02 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: References: Message-ID: > > > The tricollider will be integrated into ODE at some point > > > in the future. > > > > If I recall correctly, the tri-collider requires ODE to be compiled > in > > single precision - will this change for the integration, or will tri- > > collider not be available when compiling to double precision? > > I am using tri-collider with single-precision ODE right now with good > results. I tried compiling both with double-precision and although the > build worked I couldn't get it work at run time. My evolved demos exploded spectacularly when I used single precision. I mean, my hopper left for saturn or something. I haven't seen it since. In double precision, things work just fine. That could be some bug on my part, but nothing I could track down. > I really don't think it would take much effort to get > it > work with doubles, but at the time this happened the CRCRLF bug in > VS.Net > was making some of the tri-collider source files impossible for me to > work with. I made a small util that loads all files that match a pattern and re- saves them, fixing all lines with CrLf (i recurses into subdirs as well). Let me know if you're interested. cheers, m From russ at q12.org Fri Nov 8 00:58:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 8 00:58:02 2002 Subject: [ODE] new ODE collision Message-ID: <20021108000235.5bc25ca1.russ@q12.org> if you're curious, the source files for the new collision infrastructure have been checked into CVS (collision_*.h, collision_*.cpp). it has not been hooked up to the rest of ODE yet, so the only reason i mention it is for the curious. note that there's still a bunch of stuff to do, in particular to hook up the ray, trimesh and cylinder classes, and to convert the hash table space to use an incremental approach ... but you can get an idea of the new layout. the new collision infrastructure is 99% API compatible with the old, but i'll provide an ODE 'legacy' collision option so that existing code is guaranteed not to break - but all new collision development will go on the new infrastructure. russ. -- Russell Smith http://www.q12.org From ps_yumemi at yahoo.com Fri Nov 8 08:12:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Fri Nov 8 08:12:02 2002 Subject: [ODE] missing function Message-ID: <20021108151058.35692.qmail@web40510.mail.yahoo.com> hello, do these functions exist and what do they do? dStopwatchReset dStopwatchStop dStopwatchStart i know they probably work the way they sound but are they in ode? pia __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From espmiii at yahoo.com Fri Nov 8 10:26:03 2002 From: espmiii at yahoo.com (James Myers) Date: Fri Nov 8 10:26:03 2002 Subject: [ODE] Pool table physics Message-ID: <20021108172523.74417.qmail@web11303.mail.yahoo.com> Hello all, new user here... Is ODE appropriate for simulating a game of pool? I ask because I'm either modifying the wrong parameters or barking up the wrong library. There are two big problems I'm having: The first problem is that the balls are not "rolling". The friction from the table should put torque on the ball and cause angular acceleration until the ball reaches natural rolling. The balls orientation as returned by dBodyGetRotation doesn't reflect this. Eventually the balls' orientation does change a little, but only after a lot of playing. I'm using dBodyAddForce, so there shouldn't be any english applied to the cue ball. The second problem is that as the balls start to slow down, they will not travel in a straight line. This is hard to describe but if I apply a small force at about a 35 degree angle around the y axis parallel to the xz plane, the cue ball will travel straight for a bit, then start to curve in the +x direction, then roll straight along +x until it stops. The same happens if I hit on an angle closer to + or - z, it will start to head along that axis. It also happens on say, a break shot, where all the balls will eventually be traveling in + or - x or z near the end of the shot. I'm guessing there's just something wrong with my surface parameters. I am only using the dContactBounce flag and changing the mu and bounce parameters based on the type of collision (bumper-ball, ball-floor, ball-ball). I'm not a real physics genius, which is why I switched to ODE in the first place. I am using my own collision functions right now, perhaps there should be more than a single contact joint where the ball meets the table? They tend to jitter a bit every 50 frames (which is about 200 world ticks). Maybe that's due to using the double precision ode and performing my collision detection with single precision? It does happen in both the 0.03 release and whatever was in cvs wednesday afternoon. Any advice would be appreciated greatly. Is more information needed? Thanks much, James __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ps_yumemi at yahoo.com Sat Nov 9 02:27:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sat Nov 9 02:27:02 2002 Subject: [ODE] need to understand this Message-ID: <20021109092556.77275.qmail@web40507.mail.yahoo.com> hello, after a lot of digging, i saw this void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal theta, dReal psi) { dReal sphi,cphi,stheta,ctheta,spsi,cpsi; dAASSERT (R); sphi = dSin(phi); cphi = dCos(phi); stheta = dSin(theta); ctheta = dCos(theta); spsi = dSin(psi); cpsi = dCos(psi); _R(0,0) = cpsi*ctheta; _R(0,1) = spsi*ctheta; _R(0,2) =-stheta; _R(1,0) = cpsi*stheta*sphi - spsi*cphi; _R(1,1) = spsi*stheta*sphi + cpsi*cphi; _R(1,2) = ctheta*sphi; _R(2,0) = cpsi*stheta*cphi + spsi*sphi; _R(2,1) = spsi*stheta*cphi - cpsi*sphi; _R(2,2) = ctheta*cphi; } i'm a little confused as to how you put values into a dMatrix and how do you call it? if i have a variable const dReal *R and dMatrix3 M is R[0]=m[0,0] ? i'm sorry but i don't understand what happens when you write _R(2,1) is it an 2d array matrix[3][3] or a 1d matrix[12]? thanks __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ps_yumemi at yahoo.com Sat Nov 9 04:42:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sat Nov 9 04:42:02 2002 Subject: [ODE] speed control Message-ID: <20021109114122.66919.qmail@web40508.mail.yahoo.com> hi, how do you best control the speed and orientation of your mobot when you have specific values in mind? how can i control the time it stays that way? is using dbodysetlinearvel and dbodysetangular vel during a simloop wrong? what else can i use? thanks __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From erwin at vo.com Sat Nov 9 05:37:02 2002 From: erwin at vo.com (Erwin de Vries) Date: Sat Nov 9 05:37:02 2002 Subject: [ODE] new ODE collision References: <20021108000235.5bc25ca1.russ@q12.org> Message-ID: <000401c287ec$8c862b70$73fefea9@athlon> Looking good. Some comments: - Remember to add dGeomMoved() calls inside of all Set functions of a geom. Also SetRadius, etc. - I think the destructor of a geom needs to tell the body it might be attached to that it wants to remove itself. Otherwise the body will use this geom in its linked list after it has been destroyed, which crashes. - When adding the ray class we should think about what the 'penetration depth' should be. Do you have any thoughts on this? - Why do you memcopy inside the dxSpace::computeAABB() function? - Should we add support for a user defined, or infinite AABB on demand for spaces? This is really useful for the quadtree space containing huge (10.000 for example) amounts of geoms. If i would remove a single geom it would need to do a lot of work. Its very nice to see how you transformed parts of my code to work with your (existing) code, resulting in the best of both worlds. Great job. Erwin ----- Original Message ----- From: "Russ Smith" To: Sent: Friday, November 08, 2002 06:02 Subject: [ODE] new ODE collision > > if you're curious, the source files for the new collision infrastructure > have been checked into CVS (collision_*.h, collision_*.cpp). it has not > been hooked up to the rest of ODE yet, so the only reason i mention it > is for the curious. note that there's still a bunch of stuff to do, in > particular to hook up the ray, trimesh and cylinder classes, and to > convert the hash table space to use an incremental approach ... but you > can get an idea of the new layout. > > the new collision infrastructure is 99% API compatible with the old, but > i'll provide an ODE 'legacy' collision option so that existing code is > guaranteed not to break - but all new collision development will go on > the new infrastructure. > > russ. > > -- > Russell Smith > http://www.q12.org > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > > From Daniel.Groll at t-online.de Sat Nov 9 07:19:02 2002 From: Daniel.Groll at t-online.de (Daniel.Groll@t-online.de) Date: Sat Nov 9 07:19:02 2002 Subject: [ODE] rate for fixed timesteps Message-ID: <1036851471.3dcd190fc0ebf@webmail.t-online.de> I use fixed timesteps to run my car simulation game. With a rate of 60 Hz the simulation runs smooth and seemed to be stable but now with further testing I encountered some stability problems when cars or objects move fast. Sometimes they seem to break through geometry or "caught" in geometry. Is this the cause of a relatively low rate of world timesteps? Or are there other reasons for instability? At which rates run phyiscs simulations in common? From ps_yumemi at yahoo.com Sat Nov 9 10:35:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sat Nov 9 10:35:02 2002 Subject: [ODE] no rotation Message-ID: <20021109173403.55406.qmail@web40513.mail.yahoo.com> hello, i called a dBodySetRotation and the program doesn't go through it. all the other functions work but that particular pair. i called dRFromEulerAngles before i called dbodysetrotation before i joined the wheels to my chassis but the chassis doesn't rotate at all. i even put different values to check dRFromEulerAngles (bodyID,0,0,270) and it still doesn't turn? what could possibly wrong with it? btw this is the second mobot in the system can that affect it? thanks __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ps_yumemi at yahoo.com Sun Nov 10 10:03:01 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sun Nov 10 10:03:01 2002 Subject: [ODE] matrix Message-ID: <20021110170253.68888.qmail@web40508.mail.yahoo.com> is the rotation matrix unique for ANY combination of theta, phi and psi? or do they have their drawbacks? are the linear and angular velocities related to euler angles? __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From thomasharte at lycos.co.uk Sun Nov 10 15:51:02 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Sun Nov 10 15:51:02 2002 Subject: [ODE] matrix Message-ID: <1036968557010081@lycos-europe.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --=_NextPart_Lycos_0100811036968557_ID Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit >is the rotation matrix unique for ANY combination of >theta, phi and psi? or do they have their drawbacks? The rotation matrix is unique for any particular orientation. However, the three angle orientation system has singularities, which more or less just means that not all unique combinations of theta, phi and psi produce unique orientations. Therefore the rotation matrix for a unique theta/phi/psi is not necessarily unique. However, the rotation matrix method of storing orientations has drawbacks in this sense. It is the three angle description that is limited. In fact, ODE is unlikely to be using the rotation matrix form internally at all, but intead using quaternions internally then converting to orientation matrices when requested because that form is more useful for object display. Were it solely using rotation matrices however, the drawbacks would include relatively costly rotations (due mostly to having to deal with precision issues) and larger than necessary data size. >are the linear and angular velocities related to euler angles? No. Linear velocity is exactly the same as if an object could not rotation. So, e.g. a velocity vector of (a, b, c) will always mean a units along the global 'x axis', b along the global 'y' and c along the global 'z', regardless of object orientation. Angular velocity has a different meaning again. It is a 3 component vector, which may therefore be thought of as describing a direction and a magnitude. The rotation it describes is a rotation around the axis described by its rotation of n radians, where n is equal to the vector's magnitude. This is a very useful form for calculating how applied impulses and forces affect rotation. -Thomas

______________________________________________________
The making of Brazillian football

--=_NextPart_Lycos_0100811036968557_ID-- From russ at q12.org Sun Nov 10 18:54:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 18:54:01 2002 Subject: [ODE] ODE's new collision system Message-ID: <20021110175837.73e010cb.russ@q12.org> ODE's new collision system has been hooked up to the rest of ODE. here's the docs for the new API, as well as a porting guide. http://q12.org/ode/ode-docs.html note that the user can activate either the old or new collision API when ODE is compiled, by setting the ODE_OLD_COLLISION variable in config/user-settings. BUT NOTE, even if the old ODE collision code is used, spaces must still be created with the new API, using a parent argument or 0. work is continuing on adding features to the new collision code. russ. -- Russell Smith http://www.q12.org From russ at q12.org Sun Nov 10 19:09:02 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 19:09:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <000401c287ec$8c862b70$73fefea9@athlon> References: <20021108000235.5bc25ca1.russ@q12.org> <000401c287ec$8c862b70$73fefea9@athlon> Message-ID: <20021110181315.7c8dcc2e.russ@q12.org> > - Remember to add dGeomMoved() calls inside of all Set functions of a > geom. Also SetRadius, etc. yup, i'm on it. > - I think the destructor of a geom needs to tell the body it might be > attached to that it wants to remove itself. Otherwise the body will > use this geom in its linked list after it has been destroyed, which > crashes. quite right - i'll do this too. > - When adding the ray class we should think about what the > 'penetration depth' should be. Do you have any thoughts on this? i'm not sure that dRay will ever be attached to a body, in which case penetration depth does not have much use for the dynamics. perhaps you can think of a non-dynamics use/definition for the penetration depth? > - Why do you memcopy inside the dxSpace::computeAABB() function? no good reason. it may actually be marginally faster because the g->recomputeAABB() call will cause a reload of the class aabb pointer, but not the stack aabb buffer. it's an optimization, but i doubt anyone would notice the extra cycles. > - Should we add support for a user defined, or infinite AABB on demand > for spaces? This is really useful for the quadtree space containing > huge (10.000 for example) amounts of geoms. If i would remove a single > geom it would need to do a lot of work. i don't understand this .. ? russ. -- Russell Smith http://www.q12.org From russ at q12.org Sun Nov 10 20:44:02 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 20:44:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <000401c287ec$8c862b70$73fefea9@athlon> References: <20021108000235.5bc25ca1.russ@q12.org> <000401c287ec$8c862b70$73fefea9@athlon> Message-ID: <20021110194819.0b0957de.russ@q12.org> > - Remember to add dGeomMoved() calls inside of all Set functions of a > geom. Also SetRadius, etc. done. > - I think the destructor of a geom needs to tell the body it might be > attached to that it wants to remove itself. Otherwise the body will > use this geom in its linked list after it has been destroyed, which > crashes. done. also the previous dGeomSetBody(0) code was completely broken, this is fixed too (hopefully). russ. -- Russell Smith http://www.q12.org From mein at cs.umn.edu Sun Nov 10 20:54:01 2002 From: mein at cs.umn.edu (Kent Mein) Date: Sun Nov 10 20:54:01 2002 Subject: [ODE] another small patch to the ode source Message-ID: <20021105201649.A4038@cs.umn.edu> At the end of the build: My machine is trying to link the following with gcc, it should be g++. (I'm on a Sparc running SunOS5.8 useing gcc-3.2) Example: gcc -o ode/test/test_chain2.exe ode/test/test_chain2.o lib/libode.a lib/libdrawstuff.a -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib/X11R6 -L/usr/lib/X11 -lX11 -lGL -lGLU -lm Kent -- mein@cs.umn.edu http://www.cs.umn.edu/~mein From si at sjbrown.co.uk Sun Nov 10 21:02:35 2002 From: si at sjbrown.co.uk (Si Brown) Date: Sun Nov 10 21:02:35 2002 Subject: [ODE] bending wheels again? Message-ID: <200211061355.gA6DtVu11493@hook.org> Hi, >I've read something about problems using directx with ODE too, can someone >tell me more? The only problem I had was with getting DirectX to preserve the FPU exception behaviour, which can be achieved by creating the device with the D3DCREATE_FPU_PRESERVE flag set. Failing to do so broke some of the ODE internals (in the version I was using). Ta, Si From maddocks at metservice.com Sun Nov 10 21:15:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Sun Nov 10 21:15:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <20021110194819.0b0957de.russ@q12.org> Message-ID: <1B6F5262-F52C-11D6-8ACD-00039394FB86@metservice.com> Does all this mean that tricollider is now part of the core distribution? Henry On Monday, November 11, 2002, at 01:48 PM, Russ Smith wrote: > > russ. > From russ at q12.org Sun Nov 10 21:38:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 21:38:01 2002 Subject: [ODE] credit Message-ID: <20021110204247.41e37209.russ@q12.org> in the spirit of giving credit where it is due, i've created a list of ODE contributors and their contributions: http://q12.org/cgi-bin/wiki.pl?ContributorsToODE if i forgot your name or what you did, can you edit this page accordingly? (it's a wiki, so everyone can edit it). i'll move this list to the ODE main page when it's accurate. russ. -- Russell Smith http://www.q12.org From russ at q12.org Sun Nov 10 21:47:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 21:47:01 2002 Subject: [ODE] new ODE collision In-Reply-To: <1B6F5262-F52C-11D6-8ACD-00039394FB86@metservice.com> References: <20021110194819.0b0957de.russ@q12.org> <1B6F5262-F52C-11D6-8ACD-00039394FB86@metservice.com> Message-ID: <20021110204313.0f068550.russ@q12.org> > Does all this mean that tricollider is now part of the core > distribution? not quite yet, but it will be. russ. -- Russell Smith http://www.q12.org From maddocks at metservice.com Sun Nov 10 21:56:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Sun Nov 10 21:56:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <20021110204313.0f068550.russ@q12.org> Message-ID: kewl...I can't wait:) On Monday, November 11, 2002, at 02:43 PM, Russ Smith wrote: > not quite yet, but it will be. From dmcclurg at pandemicstudios.com.au Sun Nov 10 22:04:43 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Sun Nov 10 22:04:43 2002 Subject: [ODE] rate for fixed timesteps Message-ID: To avoid breaking through geometry or generating large collision penetration depths, you'll need use a step value which scales to your velocity. step = 1/60 speed = length(vel) if (speed * step) > max_depth then step = max_depth / speed endif dWorldStep(world, step) just make sure max_depth is less than the radius of your moving vehicle. ideally, it would be small enough not to visually notice either (eg. radius * 0.1f) if you really want to use a fixed time step, step = max_depth / max_speed -----Original Message----- From: Daniel.Groll@t-online.de [mailto:Daniel.Groll@t-online.de] Sent: Sunday, 10 November 2002 12:18 AM To: ode@q12.org Subject: [ODE] rate for fixed timesteps I use fixed timesteps to run my car simulation game. With a rate of 60 Hz the simulation runs smooth and seemed to be stable but now with further testing I encountered some stability problems when cars or objects move fast. Sometimes they seem to break through geometry or "caught" in geometry. Is this the cause of a relatively low rate of world timesteps? Or are there other reasons for instability? At which rates run phyiscs simulations in common? From chris.campbell at l8tech.com Sun Nov 10 22:38:01 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Sun Nov 10 22:38:01 2002 Subject: [ODE] bang! Message-ID: Sometimes having explosions in a physics simulation is a good thing :) http://oscar.lincmedia.co.jp:58080/bang.zip Press h to get some instructions - you should really be inside the room to throw the dynamite properly. This is from the final (?) tutorial on how to use a game engine I have been working on which has a small amount of integration with ODE. I'm hoping to get my website organised and up sometime in the next few weeks. ChrisC From coding at natew.com Mon Nov 11 01:44:02 2002 From: coding at natew.com (Nate W) Date: Mon Nov 11 01:44:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <20021110181315.7c8dcc2e.russ@q12.org> Message-ID: On Sun, 10 Nov 2002, Russ Smith wrote: > > - When adding the ray class we should think about what the > > 'penetration depth' should be. Do you have any thoughts on this? > > i'm not sure that dRay will ever be attached to a body, in which case > penetration depth does not have much use for the dynamics. perhaps you > can think of a non-dynamics use/definition for the penetration depth? The first thing that came to my mind when I heard about the ray class was sensors for the critters I'm making in Juice, sort of like IR or ultrasonic rangefinders in robots, or like whiskers on cats. I'd want to know the distance from the ray's origin to the first object it collides with. Second, I think they might be useful for fast-moving objects - if you project a ray forward along a missile's direction of travel, you could get "collision" info in cases where the missile would otherwise teleport around an object due to its position changing by a distance greater than its length. In that case, could the ray intersection be used to generate a contact joint, to stop the missile from penetrating? -- Nate Waddoups Redmond WA USA http://www.natew.com From Remko at act-3d.com Mon Nov 11 03:33:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Mon Nov 11 03:33:02 2002 Subject: [ODE] Universal joint Message-ID: <279631823.2242109102.98@server> Is it possible to include parameters that limit the rotation of a universal joint? This way you could create a rag doll with ODE. This is very useful in games, like Doom 3 where a character drops of the stairs after dying instead of playing a standard animation. From ed.jones at oracle.com Mon Nov 11 04:11:02 2002 From: ed.jones at oracle.com (Ed Jones) Date: Mon Nov 11 04:11:02 2002 Subject: [ODE] need to understand this References: <20021109092556.77275.qmail@web40507.mail.yahoo.com> Message-ID: <3DCF9028.4040402@oracle.com> Hi, From "common.h"... typedef dReal dMatrix3[4*3]; and from the top of "rotation.cpp"... #define _R(i,j) R[(i)*4+(j)] ;-) Cheers, Ed. pia dalusong wrote: >hello, > >after a lot of digging, i saw this >void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal >theta, dReal psi) >{ > dReal sphi,cphi,stheta,ctheta,spsi,cpsi; > dAASSERT (R); > sphi = dSin(phi); > cphi = dCos(phi); > stheta = dSin(theta); > ctheta = dCos(theta); > spsi = dSin(psi); > cpsi = dCos(psi); > _R(0,0) = cpsi*ctheta; > _R(0,1) = spsi*ctheta; > _R(0,2) =-stheta; > _R(1,0) = cpsi*stheta*sphi - spsi*cphi; > _R(1,1) = spsi*stheta*sphi + cpsi*cphi; > _R(1,2) = ctheta*sphi; > _R(2,0) = cpsi*stheta*cphi + spsi*sphi; > _R(2,1) = spsi*stheta*cphi - cpsi*sphi; > _R(2,2) = ctheta*cphi; >} >i'm a little confused as to how you put values into a >dMatrix and how do you call it? >if i have a variable >const dReal *R >and >dMatrix3 M > >is R[0]=m[0,0] ? >i'm sorry but i don't understand what happens when you >write _R(2,1) > >is it an 2d array matrix[3][3] or a 1d matrix[12]? > >thanks > > > >__________________________________________________ >Do you Yahoo!? >U2 on LAUNCH - Exclusive greatest hits videos >http://launch.yahoo.com/u2 >_______________________________________________ >ODE mailing list >ODE@q12.org >http://q12.org/mailman/listinfo/ode > > From dominicmorris2 at yahoo.com Mon Nov 11 07:32:01 2002 From: dominicmorris2 at yahoo.com (Dominic Morris) Date: Mon Nov 11 07:32:01 2002 Subject: [ODE] Car handling - Overturning too easily Message-ID: <20021111143146.93605.qmail@web80305.mail.yahoo.com> Hello all, I'm sure that there must be a simple solution to this, so if anybody can advise me I'd be very grateful. I've got my car driving over my terrain mesh using the contrib tri-collider, and the one remaining problem I have is that when I steer the car when it's travelling quickly, it overturns much too easily. I've based my code on the buggy example, so the geoms are four spheres and a box. Is this down to the use of spheres for the wheels? If so, what is the solution? Capped Cylinders don't seem any better, as they don't seem to fit the geometery of wheels any better than spheres, and I'm not sure of a user tri-collider for CCylinders. I've played about with masses, and friction models etc, and I can tune down the overturning tendancy, at the expense of the car's grip by using the Slip1 and Slip2 parameters (not that I fully understand these either!) Any help is appreciated, DM. __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From henri at cs.sun.ac.za Mon Nov 11 08:35:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Mon Nov 11 08:35:02 2002 Subject: [ODE] Faster replacement for fastldlt.c Message-ID: <000d01c28997$fcabf4f0$39d4e892@shrine> This is a multi-part message in MIME format. ------=_NextPart_000_000A_01C289A8.C02B4F10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi ODE fans and perpetrators :) I've been looking into various ways to optimize the LDLT factorization = which is one of the computationally intensive tasks in ODE. = Unforetunately I cannot directly test alot of my results due to not = having a C(++) compiler around. Nonetheless, I've restructured the = original "fastldlt.c" file which should be functionally equivalent to = the original but considerably faster. (Russ... the version I send you = had a bug in it - this version here should be correct.) I hope the = version I provide is correct, this is difficult to ascertain just by = inspection though, as the code is heavily interdependent. Please can somebody that is "in the know" test the replacement file for = correctness and speed. If it gets the thumbs-up I'd be happy to see it = integrated into the ODE package. You can find the file at: = http://www.cs.sun.ac.za/~henri/fastldlt_henri.c thanks Henri ------=_NextPart_000_000A_01C289A8.C02B4F10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi ODE fans and = perpetrators :)
 
I've been looking into various ways to optimize = the LDLT=20 factorization which is one of the computationally intensive = tasks in ODE.=20 Unforetunately I cannot directly test alot of my results due to not = having a=20 C(++) compiler around. Nonetheless, I've restructured the original = "fastldlt.c"=20 file which should be functionally equivalent to the original but=20 considerably faster. (Russ... the version I send you had a bug in it - = this=20 version here should be correct.) I hope the version I provide is = correct, this=20 is difficult to ascertain just by inspection though, as the code is = heavily=20 interdependent.
 
Please can somebody that is "in the know" test = the=20 replacement file for correctness and speed. If it gets the thumbs-up I'd = be=20 happy to see it integrated into the ODE package. You can find the file = at: http://www.cs.sun.ac.za/~henri/fastldlt_henri.c
 
thanks
  Henri
------=_NextPart_000_000A_01C289A8.C02B4F10-- From anselm at hook.org Mon Nov 11 09:54:02 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 11 09:54:02 2002 Subject: [ODE] Car handling - Overturning too easily In-Reply-To: <20021111143146.93605.qmail@web80305.mail.yahoo.com> Message-ID: Hi Dominic, You can put a weight far below the car's chassis - the Monster Mayhem demo does this. - a On Mon, 11 Nov 2002, Dominic Morris wrote: > Hello all, > > I'm sure that there must be a simple solution to this, > so if anybody can advise me I'd be very grateful. > > I've got my car driving over my terrain mesh using the > contrib tri-collider, and the one remaining problem I > have is that when I steer the car when it's travelling > quickly, it overturns much too easily. > > I've based my code on the buggy example, so the geoms > are four spheres and a box. Is this down to the use of > spheres for the wheels? If so, what is the solution? > Capped Cylinders don't seem any better, as they don't > seem to fit the geometery of wheels any better than > spheres, and I'm not sure of a user tri-collider for > CCylinders. > > I've played about with masses, and friction models > etc, and I can tune down the overturning tendancy, at > the expense of the car's grip by using the Slip1 and > Slip2 parameters (not that I fully understand these > either!) > > Any help is appreciated, > > DM. > > __________________________________________________ > Do you Yahoo!? > New DSL Internet Access from SBC & Yahoo! > http://sbc.yahoo.com > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From coding at natew.com Mon Nov 11 11:30:02 2002 From: coding at natew.com (Nate W) Date: Mon Nov 11 11:30:02 2002 Subject: [ODE] Car handling - Overturning too easily In-Reply-To: <20021111143146.93605.qmail@web80305.mail.yahoo.com> Message-ID: On Mon, 11 Nov 2002, Dominic Morris wrote: > I'm sure that there must be a simple solution to this, > so if anybody can advise me I'd be very grateful. > > I've got my car driving over my terrain mesh using the > contrib tri-collider, and the one remaining problem I > have is that when I steer the car when it's travelling > quickly, it overturns much too easily. I ran into this as well. I've mostly just been tuning the tire-ground friction, so it is more likely to slide sideways than flip onto its roof. You might also want to try lowering the car's center of gravity, either by changing the chassis' inertial tensor or by reducing the 'ride height' of the suspension. I think you have to expect a certain amount of rollover, since it's a problem with real off-road racing as well. Also, are you steering with a joystick, or are you using the keyboard? If the latter, you might want to try slowing down the steering response, or reducing the steering angle as the car gains speed. > Capped Cylinders don't seem any better, as they don't > seem to fit the geometery of wheels any better than > spheres, and I'm not sure of a user tri-collider for > CCylinders. I'm using spheres for driving over terrain, and flat-ended cylinders for driving over ground planes. I've been wondering if it might be useful to have a "tire" collision hull - something similar to a cylinder but simplified. For example, just the ends of a flat-end cylinder, or just the middle section of a capped cylinder (not the caps). It might be more trouble than it's worth, but then again it might be possible to save some clock cycles by using a shape that is correct 99% of the time. -- Nate Waddoups Redmond WA USA http://www.natew.com From erwin at vo.com Mon Nov 11 12:04:02 2002 From: erwin at vo.com (Erwin de Vries) Date: Mon Nov 11 12:04:02 2002 Subject: [ODE] new ODE collision References: Message-ID: <004401c289b5$109f81d0$73fefea9@athlon> > On Sun, 10 Nov 2002, Russ Smith wrote: > > > > - When adding the ray class we should think about what the > > > 'penetration depth' should be. Do you have any thoughts on this? > > > > i'm not sure that dRay will ever be attached to a body, in which case > > penetration depth does not have much use for the dynamics. perhaps you > > can think of a non-dynamics use/definition for the penetration depth? > > The first thing that came to my mind when I heard about the ray class was > sensors for the critters I'm making in Juice, sort of like IR or > ultrasonic rangefinders in robots, or like whiskers on cats. I'd want to > know the distance from the ray's origin to the first object it collides > with. Thats also what i'm thinking of. Its not what it currently does, but i believe this would be more useful than the current version. > Second, I think they might be useful for fast-moving objects - if you > project a ray forward along a missile's direction of travel, you could get > "collision" info in cases where the missile would otherwise teleport > around an object due to its position changing by a distance greater than > its length. In that case, could the ray intersection be used to generate > a contact joint, to stop the missile from penetrating? I'd say it would be more appropriate to use a ccylinder here. Unless you want it to bounce off of course. Erwin From maddocks at metservice.com Mon Nov 11 12:50:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Mon Nov 11 12:50:02 2002 Subject: Fwd: [ODE] Car handling - Overturning too easily Message-ID: On Tuesday, November 12, 2002, at 03:31 AM, Dominic Morris wrote: > I've got my car driving over my terrain mesh using the > contrib tri-collider, and the one remaining problem I > have is that when I steer the car when it's travelling > quickly, it overturns much too easily. > I had this problem too. > I've based my code on the buggy example, so the geoms > are four spheres and a box. I didn't base my code on the buggy but I've got a box and four spheres. > > I've played about with masses, and friction models > etc, and I can tune down the overturning tendancy, at > the expense of the car's grip by using the Slip1 and > Slip2 parameters (not that I fully understand these > either!) > That's how I fixed it. It took a while to get a good balance between too much grip (overturning) and not enough (skidding). My car still over turns sometimes which I think is because my centre of gravity is too high. And anyway, cars do turn over in real life, I know:) henry From Filipe Dias" Message-ID: <001601c289bd$21d47070$4601a8c0@mind.pt> I don't know how many turning wheels you guys have (assuming the front 2), but shifting the center of gravity forward or backwards will also affect the turning... more weight on the front wheels will turn more (the back slips easyer), but I like to place more wieght on the back wheels.. But don't exagerate!! Fil. From dmcclurg at pandemicstudios.com.au Mon Nov 11 16:55:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Mon Nov 11 16:55:02 2002 Subject: [ODE] new ODE collision Message-ID: >>> - When adding the ray class we should think about what the 'penetration depth' should be. Do you have any thoughts on this? The way a ray works is that you get one contact point where the ray first hits something. Penetration depth doesn't mean anything but it is very convenient to know the distance from the origin of the ray to the contact position. Storing that in the 'depth' field would make alot of sense for rays. >> i'm not sure that dRay will ever be attached to a body, in which case penetration depth does not have much use for the dynamics. perhaps you can think of a non-dynamics use/definition for the penetration depth? I'm finding two uses for rays in my game. 1) Ground Height Detection 2) LOS - line of sight The rays are almost always associated with a moving body! Perhaps some examples will clarify... - cameras: i don't want the chase camera going under the ground or perhaps i want to look at the ground point under the puppet so i don't have to head bob when he jumps. two rays are useful here-- one for the target and one for the eye. also the camera will need to cast a LOS ray to determine if there is an obstruction. - floating prizes: i detect the ground height so that prizes can automatically find a convenient home position where the player can grab them. in this situation, the ray is used for one HIT and then the ray is destroyed. Hope that helps! From claytonious at cox.net Mon Nov 11 18:02:02 2002 From: claytonious at cox.net (Clay Fowler) Date: Mon Nov 11 18:02:02 2002 Subject: [ODE] Weird collision/force problem Message-ID: <006a01c289e6$fe384860$0500a8c0@angus> This is a multi-part message in MIME format. ------=_NextPart_000_0067_01C289AC.51C413A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, everyone. I have a problem with forces being applied to my rigid body. My = vehicle's "front" is along the positive Y-Axis, its "right" is along the = positive X-axis and it's "up" is positive-Z. When I call = dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"), = specifying the rear-right of the vehicle as the point (so it's, for = example, an X of 1 and a Y of -1), for some reason the FRONT LEFT of the = vehicle gets pushed up into the air. This is the opposite corner of the = point I am specifying! When I swap the coordinates and apply an upward = force at the point (-1,1), the REAR RIGHT of the vehicle gets pushed up. = I have verified that ODE and my app both have the same idea of what the = world coordinate axes are by applying forces to the center of mass to = move the vehicle along the world's X, Y, and Z axes and these all behave = exactly as I would expect. But when I apply a force at a point, it seems = like the point I'm passing is "mirrored" on the axes. I am specifying = the mass of the vehicle with a simple dMassSetBox() and I have visually = verified that the box is a very good fit to the vehicle. Any ideas on = why the axes are "mirrored" this way for applying forces? The reason this is such a big problem is because I am doing my own = collision detection with the terrain beneath the vehicle by creating my = own Contact joints where the vehicle touches the terrain. Of course, the = vehicle responds incorrectly to these points because of the mirroring = problem. Thanks for any help! - Clay ------=_NextPart_000_0067_01C289AC.51C413A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello, everyone.
 
I have a problem with forces being = applied to my=20 rigid body. My vehicle's "front" is along the positive Y-Axis, its = "right" is=20 along the positive X-axis and it's "up" is positive-Z. When I call=20 dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"), = specifying=20 the rear-right of the vehicle as the point (so it's, for example, an X = of 1 and=20 a Y of -1), for some reason the FRONT LEFT of the vehicle gets pushed up = into=20 the air. This is the opposite corner of the point I am specifying! When = I swap=20 the coordinates and apply an upward force at the point (-1,1), the REAR = RIGHT of=20 the vehicle gets pushed up. I have verified that ODE and my app both = have the=20 same idea of what the world coordinate axes are by applying forces to = the center=20 of mass to move the vehicle along the world's X, Y, and Z axes and these = all=20 behave exactly as I would expect. But when I apply a force at a point, = it seems=20 like the point I'm passing is "mirrored" on the axes. I am specifying = the mass=20 of the vehicle with a simple dMassSetBox() and I have visually verified = that the=20 box is a very good fit to the vehicle. Any ideas on why the axes are = "mirrored"=20 this way for applying forces?
 
The reason this is such a big problem = is because I=20 am doing my own collision detection with the terrain beneath the vehicle = by=20 creating my own Contact joints where the vehicle touches the terrain. Of = course,=20 the vehicle responds incorrectly to these points because of the = mirroring=20 problem.
 
Thanks for any help!
 
- Clay
 
------=_NextPart_000_0067_01C289AC.51C413A0-- From mal at candomultimedia.com Tue Nov 12 05:54:02 2002 From: mal at candomultimedia.com (Mal) Date: Tue Nov 12 05:54:02 2002 Subject: [ODE] ODE / Blender news... In-Reply-To: <006a01c289e6$fe384860$0500a8c0@angus> Message-ID: <000101c28a4a$7c2f1ab0$b000a8c0@MalLaptop> Here's some ODE related news regarding Blender... http://www.blender.org/modules.php?op=modload&name=News&file=article&sid =15&mode=thread&order=0&thold=0 " No new functionality is added in Blender, with one exception: ODE. Commits in this part of Blender should be aimed at getting Blender not crashing, and preferably running (some) of the old demos again. The current Blender physics system (nicked SUMO) will be entirely replaced with ODE later. That might give a compatibility problem, but at least it will provide quite some cool new features." Sounds like things are flying along! Norman, do you have any binary beta files with ODE support that we can test out? :) I'm just recovering from a pretty bad PC crash, and have lost all my old eMails, so I don't have your direct eMail anymore! Mal From anselm at hook.org Tue Nov 12 12:11:01 2002 From: anselm at hook.org (Anselm Hook) Date: Tue Nov 12 12:11:01 2002 Subject: [ODE] irc? In-Reply-To: <000101c28a4a$7c2f1ab0$b000a8c0@MalLaptop> Message-ID: Where was that irc channel again for ode? Which server? - a From Alan_Gordie at payformance.com Tue Nov 12 12:39:02 2002 From: Alan_Gordie at payformance.com (Alan Gordie) Date: Tue Nov 12 12:39:02 2002 Subject: [ODE] irc? Message-ID: It's #ode on EFNet Alan -----Original Message----- From: Anselm Hook [mailto:anselm@hook.org] Sent: Tuesday, November 12, 2002 2:11 PM To: ode@q12.org Subject: [ODE] irc? Where was that irc channel again for ode? Which server? - a _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From colire02 at noa.nintendo.com Wed Nov 13 11:32:02 2002 From: colire02 at noa.nintendo.com (Colin Reed) Date: Wed Nov 13 11:32:02 2002 Subject: [ODE] Convex hulls Message-ID: How difficult would it be to get convex hulls working as a more general collision type as opposed to box collisions? For me this would be really helpfull, I was just wondering how much work it would be. Colin From dmcclurg at pandemicstudios.com.au Wed Nov 13 17:51:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Wed Nov 13 17:51:02 2002 Subject: [ODE] Convex hulls Message-ID: > if you're curious, the source files for the new collision infrastructure have been checked into CVS (collision_*.h, collision_*.cpp). it has not been hooked up to the rest of ODE yet, so the only reason i mention it is for the curious. note that there's still a bunch of stuff to do, in particular to hook up the ray, trimesh and cylinder classes, and to convert the hash table space to use an incremental approach ... but you can get an idea of the new layout. i think the trimesh, when completed, should work for you. -----Original Message----- From: Colin Reed [mailto:colire02@noa.nintendo.com] Sent: Wednesday, 13 November 2002 1:53 PM To: ode@q12.org Subject: [ODE] Convex hulls How difficult would it be to get convex hulls working as a more general collision type as opposed to box collisions? For me this would be really helpfull, I was just wondering how much work it would be. Colin From claytonious at cox.net Wed Nov 13 18:45:02 2002 From: claytonious at cox.net (Clay Fowler) Date: Wed Nov 13 18:45:02 2002 Subject: [ODE] Weird collision/force problem References: <006a01c289e6$fe384860$0500a8c0@angus> Message-ID: <003d01c28b7f$50820180$0500a8c0@angus> This is a multi-part message in MIME format. ------=_NextPart_000_003A_01C28B44.A40C1F10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable In case anyone else runs into this, here is the solution... The axes seemed inverted because I was incorrectly copying the = transformation matrix from ODE into OSG. I finally looked at the code in = the drawstuff lib to see how to fill an OpenGL-style 4x4 matrix with = values, and I was doing it backwards. Now that I'm filling xform = matrices properly, everything works wonderfully. ----- Original Message -----=20 From: Clay Fowler=20 To: ode@q12.org=20 Sent: Monday, November 11, 2002 6:01 PM Subject: [ODE] Weird collision/force problem Hello, everyone. I have a problem with forces being applied to my rigid body. My = vehicle's "front" is along the positive Y-Axis, its "right" is along the = positive X-axis and it's "up" is positive-Z. When I call = dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"), = specifying the rear-right of the vehicle as the point (so it's, for = example, an X of 1 and a Y of -1), for some reason the FRONT LEFT of the = vehicle gets pushed up into the air. This is the opposite corner of the = point I am specifying! When I swap the coordinates and apply an upward = force at the point (-1,1), the REAR RIGHT of the vehicle gets pushed up. = I have verified that ODE and my app both have the same idea of what the = world coordinate axes are by applying forces to the center of mass to = move the vehicle along the world's X, Y, and Z axes and these all behave = exactly as I would expect. But when I apply a force at a point, it seems = like the point I'm passing is "mirrored" on the axes. I am specifying = the mass of the vehicle with a simple dMassSetBox() and I have visually = verified that the box is a very good fit to the vehicle. Any ideas on = why the axes are "mirrored" this way for applying forces? The reason this is such a big problem is because I am doing my own = collision detection with the terrain beneath the vehicle by creating my = own Contact joints where the vehicle touches the terrain. Of course, the = vehicle responds incorrectly to these points because of the mirroring = problem. Thanks for any help! - Clay ------=_NextPart_000_003A_01C28B44.A40C1F10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
In case anyone else runs into this, = here is the=20 solution...
 
The axes seemed inverted because I was = incorrectly=20 copying the transformation matrix from ODE into OSG. I finally looked at = the=20 code in the drawstuff lib to see how to fill an OpenGL-style 4x4 matrix = with=20 values, and I was doing it backwards. Now that I'm filling xform = matrices=20 properly, everything works wonderfully.
----- Original Message -----
From:=20 Clay Fowler=20
Sent: Monday, November 11, 2002 = 6:01=20 PM
Subject: [ODE] Weird = collision/force=20 problem

Hello, everyone.
 
I have a problem with forces being = applied to my=20 rigid body. My vehicle's "front" is along the positive Y-Axis, its = "right" is=20 along the positive X-axis and it's "up" is positive-Z. When I call=20 dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"),=20 specifying the rear-right of the vehicle as the point (so it's, for = example,=20 an X of 1 and a Y of -1), for some reason the FRONT LEFT of the = vehicle gets=20 pushed up into the air. This is the opposite corner of the point I am=20 specifying! When I swap the coordinates and apply an upward force at = the point=20 (-1,1), the REAR RIGHT of the vehicle gets pushed up. I have verified = that ODE=20 and my app both have the same idea of what the world coordinate axes = are by=20 applying forces to the center of mass to move the vehicle along the = world's X,=20 Y, and Z axes and these all behave exactly as I would expect. But when = I apply=20 a force at a point, it seems like the point I'm passing is "mirrored" = on the=20 axes. I am specifying the mass of the vehicle with a simple = dMassSetBox() and=20 I have visually verified that the box is a very good fit to the = vehicle. Any=20 ideas on why the axes are "mirrored" this way for applying=20 forces?
 
The reason this is such a big problem = is because=20 I am doing my own collision detection with the terrain beneath the = vehicle by=20 creating my own Contact joints where the vehicle touches the terrain. = Of=20 course, the vehicle responds incorrectly to these points because of = the=20 mirroring problem.
 
Thanks for any help!
 
- Clay
 
------=_NextPart_000_003A_01C28B44.A40C1F10-- From claytonious at cox.net Wed Nov 13 22:42:01 2002 From: claytonious at cox.net (Clay Fowler) Date: Wed Nov 13 22:42:01 2002 Subject: [ODE] slip1 and slip2 Message-ID: <000e01c28ba0$7f74e270$0500a8c0@angus> This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C28B65.D2F478B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable What do the slip1 and slip2 parameters in a contact structure do? ------=_NextPart_000_000B_01C28B65.D2F478B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
What do the slip1 and slip2 parameters = in a contact=20 structure do?
------=_NextPart_000_000B_01C28B65.D2F478B0-- From Tony.Peguero at xtra.co.nz Wed Nov 13 23:53:01 2002 From: Tony.Peguero at xtra.co.nz (Tony Peguero) Date: Wed Nov 13 23:53:01 2002 Subject: [ODE] more physics In-Reply-To: Message-ID: >Costs in what way? It does say memory usage and how much of >the cpu per frame the physics system takes. What other costs >are there? He he. You must have been working with open source projects for quite a while to have forgotten that some things cost money. Some physics engines cost a LOT of money. >Also is it just me or do the chain and hinge behave strangly? >If you continue to force it upwards it starts to wobble. Like >a snake or something. Maybe it's just me and thats how it >should behave. I noticed that too. I think it's because of the way the keyboard controls were written, rather than a problem with the engine. When you press the lift key, it applies a momentary impulse to the end of the chain. When you hold the button down it applies repeated impulses, not a constant force, so the end of the chain is basically being shaken up and down. -----Original Message----- From: ode-admin@q12.org [mailto:ode-admin@q12.org]On Behalf Of Joakim Eriksson Sent: Friday, 1 November 2002 10:27 a.m. To: ode@q12.org Subject: SV: [ODE] more physics > > looks like another physics engine... > > > > www.tokamakphysics.com > > interesting. yet another mention of iterative constraint > solving methods here. the demos are kind of bare bones >(i.e., like ODE's bare bones demos). no mention of the cost. Costs in what way? It does say memory usage and how much of the cpu per frame the physics system takes. What other costs are there? > the box stack demo has an interesting flaw: a nudged stack > will tip over, then freeze part of the way down. this suggests > that 'stable' box stacking is achieved through simply turning >off the phisics for a stationary stack Yes, seems like the objects sleep VERY quickly. After just a few tries I manage to get it to sleep in a physicly impossible position. (If the simulation had run for just a few ticks more the boxes would have fallen over) but they quickly froze in place. > the collision looks like it allows penetration, like ODE. if > you collapse the chain on top of itself it will squish into > itself a bit then expand out. It does indeed allow penetration. Just move closer to a object and spawn a sphere or something. You can see that even if the object is inside another object he can handle it. Its also a dead give away that he for the moment only handles primitives vs primitives and primitives vs static triangle meshes. It seems to be able to handle quite a lot. It does use a bit of memory 500Kb in some cases but they do contain quite a lot of objects. Too bad they dont have any more information on thier method. Also is it just me or do the chain and hinge behave strangly? If you continue to force it upwards it starts to wobble. Like a snake or something. Maybe it's just me and thats how it should behave. /Joakim E. - www.planestate.net _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From Remko at act-3d.com Thu Nov 14 03:54:01 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Thu Nov 14 03:54:01 2002 Subject: [ODE] Universal joint Message-ID: <279892225.2502571807.98@server> I noticed that two bodies that are connected by a joint do not have collision with each other. Am I missing something here? The ODE examples show the same behavior between connected bodies. -----Original Message----- From: Martin C. Martin [mailto:martin@metahuman.org] Sent: Monday, November 11, 2002 8:58 AM To: Remko Jacobs (act-3d.com) Subject: Re: [ODE] Universal joint Hi, The way I do it is to use collisions with the body to limit the rotation. That looks pretty natural... - Martin "Remko Jacobs (act-3d.com)" wrote: > > Is it possible to include parameters that limit the rotation of a > universal joint? This way you could create a rag doll with ODE. This is > very useful in games, like Doom 3 where a character drops of the stairs > after dying instead of playing a standard animation. > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From Remko at act-3d.com Thu Nov 14 04:00:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Thu Nov 14 04:00:02 2002 Subject: [ODE] rate for fixed timesteps Message-ID: <279892645.2502991882.98@server> Using a fixed time step is the way to go. The problem is that the frame rate is not constant. We solved this by using a constant update rate (in Hz) for ODE that is independent of the program updates. CFM and ERP values work differently with different time steps so you should avoid using more than one different time step for one project. Using a constant update frequency means that for some frames there might be 10 time steps calculated for ODE and other frames ODE does not update at all. From: David McClurg [mailto:dmcclurg@pandemicstudios.com.au] >To avoid breaking through geometry or generating large collision >penetration depths, you'll need use a step value which scales to your >velocity. > > step = 1/60 > speed = length(vel) > if (speed * step) > max_depth then > step = max_depth / speed > endif > dWorldStep(world, step) > >just make sure max_depth is less than the radius of your moving vehicle. >ideally, it would be small enough not to visually notice either (eg. radius * 0.1f) >if you really want to use a fixed time step, > > step = max_depth / max_speed From martin at metahuman.org Thu Nov 14 06:41:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 14 06:41:02 2002 Subject: [ODE] Universal joint References: <279892225.2502571807.98@server> Message-ID: <3DD3A7AB.4A2594E9@metahuman.org> "Remko Jacobs (act-3d.com)" wrote: > > I noticed that two bodies that are connected by a joint do not have > collision with each other. They do in my application. Does your near callback create collision constraints for them? Are you sure the size/location/orientation/shape that you're drawing are the same as ODE is using? - Martin From ykhun at singnet.com.sg Thu Nov 14 08:23:02 2002 From: ykhun at singnet.com.sg (ykhun) Date: Thu Nov 14 08:23:02 2002 Subject: [ODE] Help for beginners Message-ID: <000a01c28bf2$1cf993a0$889f15a5@dune> This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C28C35.2ADC9650 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, i'm very new to ODE and rigid body physics. I found that there isn't = much stuff to help newbies like me to kickstart using ODE. Read the docs = and learn much about how ODE works but not how to use it! Is there any resource to help beginners up and running with ODE in a = short time?? Cheers! ykhun ------=_NextPart_000_0007_01C28C35.2ADC9650 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
i'm very new to ODE and rigid body = physics. I found=20 that there isn't much stuff to help newbies like me to kickstart using = ODE. Read=20 the docs and learn much about how ODE works but not how to use = it!
 
Is there any resource to help beginners = up and=20 running with ODE in a short time??
Cheers!
 
ykhun
------=_NextPart_000_0007_01C28C35.2ADC9650-- From martin at metahuman.org Thu Nov 14 08:43:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 14 08:43:02 2002 Subject: [ODE] Help for beginners References: <000a01c28bf2$1cf993a0$889f15a5@dune> Message-ID: <3DD3C44B.1F9A8A9C@metahuman.org> You can take a look at the examples included with ODE, especially the boxstack and buggy demos. - Martin > ykhun wrote: > > Hi, > i'm very new to ODE and rigid body physics. I found that there isn't > much stuff to help newbies like me to kickstart using ODE. Read the docs > and learn much about how ODE works but not how to use it! > > Is there any resource to help beginners up and running with ODE in a > short time?? > Cheers! > > ykhun From max.lungarella at aist.go.jp Thu Nov 14 08:59:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Thu Nov 14 08:59:02 2002 Subject: [ODE] Help for beginners In-Reply-To: <000a01c28bf2$1cf993a0$889f15a5@dune> References: <000a01c28bf2$1cf993a0$889f15a5@dune> Message-ID: <20021115005725.5ff946cb.max.lungarella@aist.go.jp> hi, you can also learn a lot by browsing through the archives of this mailing list. cheerio, max > i'm very new to ODE and rigid body physics. I found that there isn't > much stuff to help newbies like me to kickstart using ODE. Read the > docs and learn much about how ODE works but not how to use it! > > Is there any resource to help beginners up and running with ODE in a > short time?? Cheers! > > ykhun From christian.verbeek at ais.fraunhofer.de Thu Nov 14 10:57:01 2002 From: christian.verbeek at ais.fraunhofer.de (Christian Verbeek) Date: Thu Nov 14 10:57:01 2002 Subject: [ODE] test_buggy with 13 buggys Message-ID: <3DD3E3E6.C600B51@ais.fraunhofer.de> dear ode-users, i am quite new to ode. but it took me half a day to write a program that will crash. you can find it under http://ais.gmd.de/~verbeek/ode/ this is the test_buggy example modularised. for the buggy i made a class RBuggy where i am deriving 13 objects from. when the buggys collide the program crashes. when i do the same with 12 buggys, everthing is ok. i tested it with ode-0.03 and the latest cvs-version under cygwin and windowsXP. dont blame me, but linux does not support the graficsadapter of my laptop. compiling this with linux works, but execution of the program is really really slow. i used gdb to find out, where the program crashes. i think it is somewhere in the collision detection routines. at least these are called right before the program crashes. help needed, c. -- -__________________________________________ Dr. rer. nat. Dipl.-Phys. C. Verbeek email: christian.verbeek@ais.fraunhofer.de room: C2-214 http://www.ais.fraunhofer.de/~verbeek phone: +49 2241 14 2057 fax : +49 2241 14 2384 From ericc at xenopi.com Thu Nov 14 11:08:02 2002 From: ericc at xenopi.com (Eric Cha) Date: Thu Nov 14 11:08:02 2002 Subject: [ODE] test_buggy with 13 buggys In-Reply-To: <3DD3E3E6.C600B51@ais.fraunhofer.de> Message-ID: <005701c28c09$37a798c0$6401a8c0@donald> Sounds like stack overflow to me... I could see that happening with 13 buggies rolling around.. > -----Original Message----- > From: ode-admin@q12.org [mailto:ode-admin@q12.org] On Behalf > Of Christian Verbeek > Sent: Thursday, November 14, 2002 9:57 AM > To: ode@q12.org > Subject: [ODE] test_buggy with 13 buggys > > > dear ode-users, > > i am quite new to ode. but it took me half a day to write a > program that will crash. you can find it under > http://ais.gmd.de/~verbeek/ode/ this is the test_buggy example modularised. for the buggy i made a class RBuggy where i am deriving 13 objects from. when the buggys collide the program crashes. when i do the same with 12 buggys, everthing is ok. i tested it with ode-0.03 and the latest cvs-version under cygwin and windowsXP. dont blame me, but linux does not support the graficsadapter of my laptop. compiling this with linux works, but execution of the program is really really slow. i used gdb to find out, where the program crashes. i think it is somewhere in the collision detection routines. at least these are called right before the program crashes. help needed, c. -- -__________________________________________ Dr. rer. nat. Dipl.-Phys. C. Verbeek email: christian.verbeek@ais.fraunhofer.de room: C2-214 http://www.ais.fraunhofer.de/~verbeek phone: +49 2241 14 2057 fax : +49 2241 14 2384 _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.410 / Virus Database: 231 - Release Date: 10/31/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.410 / Virus Database: 231 - Release Date: 10/31/2002 From coding at natew.com Thu Nov 14 11:42:02 2002 From: coding at natew.com (Nate W) Date: Thu Nov 14 11:42:02 2002 Subject: [ODE] test_buggy with 13 buggys In-Reply-To: <3DD3E3E6.C600B51@ais.fraunhofer.de> Message-ID: On Thu, 14 Nov 2002, Christian Verbeek wrote: > this is the test_buggy example modularised. for the buggy i made a class > RBuggy where i am deriving 13 objects from. when the buggys collide the > program crashes. when i do the same with 12 buggys, everthing is ok. > > i tested it with ode-0.03 and the latest cvs-version under cygwin and > windowsXP. Try doubling the size of the stack. There should be a linker option for that. Windows doesn't grow the stack automatically, and ODE uses a lot of stack for complex worlds. -- Nate Waddoups Redmond WA USA http://www.natew.com From christian.verbeek at ais.fraunhofer.de Fri Nov 15 03:35:02 2002 From: christian.verbeek at ais.fraunhofer.de (Christian Verbeek) Date: Fri Nov 15 03:35:02 2002 Subject: [ODE] test_buggy with 13 buggys References: Message-ID: <3DD4CD9A.4BCA2A58@ais.fraunhofer.de> i did not find out how to increase the stack size with cygwin. but i compiled the program on linux and there it works. i tried 100 buggys. no crash, but simulation goes very slow, when all 100 buggys collide. when are the first THz processors coming out? does anyone know how to increase the stack size under cygwin? something like gcc -Wl,--stack,4096 does not help. c. Nate W wrote: > On Thu, 14 Nov 2002, Christian Verbeek wrote: > > > this is the test_buggy example modularised. for the buggy i made a class > > RBuggy where i am deriving 13 objects from. when the buggys collide the > > program crashes. when i do the same with 12 buggys, everthing is ok. > > > > i tested it with ode-0.03 and the latest cvs-version under cygwin and > > windowsXP. > > Try doubling the size of the stack. There should be a linker option for > that. Windows doesn't grow the stack automatically, and ODE uses a lot of > stack for complex worlds. > > -- > > Nate Waddoups > Redmond WA USA > http://www.natew.com > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode -- -__________________________________________ Dr. rer. nat. Dipl.-Phys. C. Verbeek email: christian.verbeek@ais.fraunhofer.de room: C2-214 http://www.ais.fraunhofer.de/~verbeek phone: +49 2241 14 2057 fax : +49 2241 14 2384 From hans at tat.physik.uni-tuebingen.de Fri Nov 15 06:30:02 2002 From: hans at tat.physik.uni-tuebingen.de (Torsten Hans) Date: Fri Nov 15 06:30:02 2002 Subject: [ODE] what integration method is used ? In-Reply-To: <200211151243.gAFCh2u15455@hook.org> Message-ID: hello, i recently came across ode. its seems like an interesting project. however i couldn't find out an important information: what basic integration scheme does ODE use ? is it an explicit or implicit integration method ? does it use runge kutta or something else ? is it possible to use a different integration scheme ? any information would be appreciated. kind regards, torsten hans From henri at cs.sun.ac.za Fri Nov 15 08:30:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Fri Nov 15 08:30:02 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? Message-ID: <00ba01c28cbc$227f17d0$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_00B7_01C28CCC.E600BBE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi :) I've played with the hinge-joint recently and figured out how to use lo = and hi stops to limit rotations. My problem now is to have a similar system for ball-socket joints. The = idea is to have limited range of motions similar to (for example) the = joint holding arm and shoulder together. It should have some degree of = mobility to rotate around an arbitrary axis of motion, and it should be = able to deviate from the initial axis of rotation to some degree. Essentially it should be able to move inside a cone-of-freedom (plus it = is only allowed to twist to a certain extend). Help please. Henri ------=_NextPart_000_00B7_01C28CCC.E600BBE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi :)
 
I've played with the hinge-joint = recently and=20 figured out how to use lo and hi stops to limit rotations.
 
My problem now is to have a similar = system for=20 ball-socket joints. The idea is to have limited range of motions similar = to (for=20 example) the joint holding arm and shoulder together. It should have = some degree=20 of mobility to rotate around an arbitrary axis of motion, and it should = be able=20 to deviate from the initial axis of rotation to some = degree.
 
Essentially it should be able to move = inside a=20 cone-of-freedom (plus it is only allowed to twist to a certain=20 extend).
 
Help please.
  Henri
------=_NextPart_000_00B7_01C28CCC.E600BBE0-- From pete_graves at hotmail.com Fri Nov 15 14:21:01 2002 From: pete_graves at hotmail.com (Pete Graves) Date: Fri Nov 15 14:21:01 2002 Subject: [ODE] Problems installing ODE 0.03 Message-ID: I'm new to ODE, and inexperienced with C++ and the Microsoft Visual C/C++ 6.0 IDE, so please bear with me. I wanted to try out ODE and some of the test programs. I downloaded ODE 0.03, and followed the installation instructions in the User Guide. I set MSVC's path variables during its installation, downloaded the GNU make tool from the ODE web site, left the user-settings with PLATFORM=msvc and PRECISION=DOUBLE, and ran make in the ODE directory. This is some clips of the results: ... ctest.c(1) : fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory ... ctest.c(2) : error C2143: syntax error : missing ')' before ':' ctest.c(2) : error C2059: syntax error : ')' ... *** configurator succeeded *** ... cl /nologo /DWIN32 /DMSVC /c /GR- /GX- /W3 /GF /Oy /Iinclude /DdNODEBUG /O2 /Fo ode/src/array.obj ode/src/array.cpp Command line warning D4002 : ignoring unknown option '/Oy' (this is shown loads of times} ... LIB : fatal error LNK1104: cannot open file "lib/ode.lib" MAKE: *** [lib/ode.lib] Error 1104 I don't appear to have a lib/ directory at all. Am I missing something? Could anyone suggest what I am doing wrong? Thanks, Pete. _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From coding at natew.com Fri Nov 15 21:29:01 2002 From: coding at natew.com (Nate W) Date: Fri Nov 15 21:29:01 2002 Subject: [ODE] Problems installing ODE 0.03 In-Reply-To: Message-ID: On Fri, 15 Nov 2002, Pete Graves wrote: > ctest.c(1) : fatal error C1083: Cannot open include file: 'alloca.h': No > such file or directory Change that to "malloc.h" instead. I'm not sure about the rest though. -- Nate Waddoups Redmond WA USA http://www.natew.com From pete_graves at hotmail.com Sat Nov 16 08:49:01 2002 From: pete_graves at hotmail.com (Pete Graves) Date: Sat Nov 16 08:49:01 2002 Subject: [ODE] Re: Problems installing ODE 0.03 Message-ID: The only file I can find that contains 'alloca.h' is 'configurator.c': 229: char *header[7] = {"stdio.h", "stdlib.h", "math.h", "string.h", 330: "stdarg.h", "malloc.h", "alloca.h"}; ~~~~~~~~ Can I just remove this? 'malloc.h' is already there? Am I looking in the right place? _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From martin at metahuman.org Sat Nov 16 09:06:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Sat Nov 16 09:06:01 2002 Subject: [ODE] Re: Problems installing ODE 0.03 References: Message-ID: <3DD66C9A.B8FA8884@metahuman.org> You don't need to replace alloca with anything. What the configurator does is see how your computer is set up by compiling a bunch of programs. So the fact that some of them fail is normal. It said "configurator succeeded" so you can ignore all messages above that. Try making an empty "lib" directory. I think that's your only problem. - Martin Pete Graves wrote: > > The only file I can find that contains 'alloca.h' is 'configurator.c': > > 229: char *header[7] = {"stdio.h", "stdlib.h", "math.h", "string.h", > 330: "stdarg.h", "malloc.h", "alloca.h"}; > ~~~~~~~~ > > Can I just remove this? 'malloc.h' is already there? Am I looking in the > right place? > > _________________________________________________________________ > The new MSN 8: smart spam protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From coding at natew.com Sat Nov 16 11:24:01 2002 From: coding at natew.com (Nate W) Date: Sat Nov 16 11:24:01 2002 Subject: [ODE] Re: Problems installing ODE 0.03 In-Reply-To: Message-ID: On Sat, 16 Nov 2002, Pete Graves wrote: > The only file I can find that contains 'alloca.h' is 'configurator.c': > > 229: char *header[7] = {"stdio.h", "stdlib.h", "math.h", "string.h", > 330: "stdarg.h", "malloc.h", "alloca.h"}; > > Can I just remove this? 'malloc.h' is already there? Am I looking in the > right place? When configurator gets run, it creates a header file called config.h. Once I got a working config.h (I may have edited this file by hand, I don't recall as it was quite a while ago), I took the configurator out of my build process. -- Nate Waddoups Redmond WA USA http://www.natew.com From henri at cs.sun.ac.za Sat Nov 16 11:30:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Sat Nov 16 11:30:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? References: <00ba01c28cbc$227f17d0$45d4e892@temple> Message-ID: <004701c28d9e$70bd7990$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_0044_01C28DAF.34418EA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Anybody??? ----- Original Message -----=20 From: Henri Hakl=20 To: ode@q12.org=20 Sent: Friday, November 15, 2002 5:31 PM Subject: [ODE] Lo/Hi Stops for ball-sockets? Hi :) I've played with the hinge-joint recently and figured out how to use = lo and hi stops to limit rotations. My problem now is to have a similar system for ball-socket joints. The = idea is to have limited range of motions similar to (for example) the = joint holding arm and shoulder together. It should have some degree of = mobility to rotate around an arbitrary axis of motion, and it should be = able to deviate from the initial axis of rotation to some degree. Essentially it should be able to move inside a cone-of-freedom (plus = it is only allowed to twist to a certain extend). Help please. Henri ------=_NextPart_000_0044_01C28DAF.34418EA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Anybody???
 
----- Original Message -----
From:=20 Henri = Hakl=20
Sent: Friday, November 15, 2002 = 5:31=20 PM
Subject: [ODE] Lo/Hi Stops for=20 ball-sockets?

Hi :)
 
I've played with the hinge-joint = recently and=20 figured out how to use lo and hi stops to limit = rotations.
 
My problem now is to have a similar = system for=20 ball-socket joints. The idea is to have limited range of motions = similar to=20 (for example) the joint holding arm and shoulder together. It should = have some=20 degree of mobility to rotate around an arbitrary axis of motion, and = it should=20 be able to deviate from the initial axis of rotation to some=20 degree.
 
Essentially it should be able to move = inside a=20 cone-of-freedom (plus it is only allowed to twist to a certain=20 extend).
 
Help please.
 =20 Henri
------=_NextPart_000_0044_01C28DAF.34418EA0-- From coding at natew.com Sat Nov 16 11:46:01 2002 From: coding at natew.com (Nate W) Date: Sat Nov 16 11:46:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? In-Reply-To: <004701c28d9e$70bd7990$45d4e892@temple> Message-ID: On Sat, 16 Nov 2002, Henri Hakl wrote: > Essentially it should be able to move inside a cone-of-freedom (plus > it is only allowed to twist to a certain extend). > > Anybody??? Have you tried using an AMotor to set the limits? I haven't tried this myself, but looking at 7.5.1. of the documentation it seem like it should be possible to apply an AMotor to the two bodies and set limits using dParamSetHiStopN where N is empty, 2 or 3 for each of the AMotor's axes. Especially look at the last part of 7.5.1, below the table of parameters. Like I said, I haven't tried it, but from a quick look at the docs I think it might do what you want. -- Nate Waddoups Redmond WA USA http://www.natew.com From henri at cs.sun.ac.za Sat Nov 16 17:44:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Sat Nov 16 17:44:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? References: Message-ID: <006901c28dd2$ab7efcf0$45d4e892@temple> hmmmm... thanks Nate... - it looks like something that might work. :) It would help to see an example or something that uses the AMotorJoint (prefably with limits and everything) - can anybody point me to some simple program that makes use of it? None of the examples seem to make use of it (I'm using the DelphiODE). ----- Original Message ----- From: "Nate W" To: Sent: Saturday, November 16, 2002 8:46 PM Subject: Re: [ODE] Lo/Hi Stops for ball-sockets? > On Sat, 16 Nov 2002, Henri Hakl wrote: > > > Essentially it should be able to move inside a cone-of-freedom (plus > > it is only allowed to twist to a certain extend). > > > > Anybody??? > > Have you tried using an AMotor to set the limits? I haven't tried this > myself, but looking at 7.5.1. of the documentation it seem like it should > be possible to apply an AMotor to the two bodies and set limits using > dParamSetHiStopN where N is empty, 2 or 3 for each of the AMotor's axes. > Especially look at the last part of 7.5.1, below the table of parameters. > > Like I said, I haven't tried it, but from a quick look at the docs I think > it might do what you want. > > -- > > Nate Waddoups > Redmond WA USA > http://www.natew.com > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From mattias at cambrianlabs.com Sun Nov 17 03:44:01 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Sun Nov 17 03:44:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? In-Reply-To: <006901c28dd2$ab7efcf0$45d4e892@temple> References: <006901c28dd2$ab7efcf0$45d4e892@temple> Message-ID: > It would help to see an example or something that uses the AMotorJoint > (prefably with limits and everything) - can anybody point me to some > simple > program that makes use of it? None of the examples seem to make use of > it (I'm using the DelphiODE). I was going to say "I have some examples, but they're built using delphi", but now that's not a problem; // Create a AMotor AMotor := dJointCreateAMotor(world, 0); dJointAttach(AMotor, MainBody, UpperLeg); BallLimit := pi*0.15; dJointSetAMotorNumAxes (AMotor,2); dJointSetAMotorAxis (AMotor, 0, 1, 1,0,0); dJointSetAMotorAxis (AMotor, 1, 1, 0,0,1); // AUTO AXIS BY EULER MOTOR dJointSetAMotorAxis (AMotor, 2, 2, 0,1,0); dJointSetAMotorParam (AMotor, dParamLoStop, -BallLimit); dJointSetAMotorParam (AMotor, dParamHiStop, BallLimit); dJointSetAMotorParam (AMotor, dParamFudgeFactor, 0.01);//} // This axis of the motor isn't used with EULER (?) dJointSetAMotorParam (AMotor, dParamLoStop2, -0.01); dJointSetAMotorParam (AMotor, dParamHiStop2, 0.01); dJointSetAMotorParam (AMotor, dParamFudgeFactor2, 0.01);//} dJointSetAMotorParam (AMotor, dParamLoStop3, -BallLimit); dJointSetAMotorParam (AMotor, dParamHiStop3, BallLimit); dJointSetAMotorParam (AMotor, dParamFudgeFactor3, 0.01);//} dJointSetAMotorMode (AMotor, dAMotorEuler); cheers, m From laury.michel at free.fr Sun Nov 17 17:42:02 2002 From: laury.michel at free.fr (Laury MICHEL) Date: Sun Nov 17 17:42:02 2002 Subject: [ODE] Collision problem with geomGroups Message-ID: <016c01c28e9b$5b79cfe0$9cdc933e@hal9000> Hello! I'm quite new to ODE, but I did a little "buggy-like" program that works! The problem is that when I want to use a geomGroup for my buggy, it does not collide with the "world geometry" anymore... My "world geometry" consists of a large box with a smaller rotated box in the middle playing the role of a ramp... The buggy geometry is created in space 0 then added to a geomGroup wich is created in the same space as the world geometry. But, when running the program the buggy falls through the "world"! Before, without geomGroups, it worked well beside the fact that I couldn't put the vehicle wheels too close from the chassis as they collided resulting in strange behavior as soon as the sim started... I'm using ode v0.03, I've read the doc and I think I understood the part on geomGroups so I don't see what I've missed :-( Please help! Here is part of the code I use: void odeBox::InitOde(dWorldID _worldID, dSpaceID _spaceID, dReal _fMass) { m_bodyID = dBodyCreate(_worldID); dBodySetPosition(m_bodyID, 0, 0, 0); const dReal fDensity = 1.0f; dMassSetBox(&m_mass, fDensity, m_fLength, m_fWidth, m_fHeight); dMassAdjust (&m_mass, _fMass); dBodySetMass(m_bodyID, &m_mass); m_geomID = dCreateBox(_spaceID, m_fLength, m_fWidth, m_fHeight); dGeomSetBody(m_geomID, m_bodyID); } void odeCar::CreateChassis(float _fWidth, float _fLength, float _fHeight) { m_geomGroupID = dCreateGeomGroup (m_spaceID); m_pChassis = new odeBox; dReal fMass = 10.0f; ((odeBox*) m_pChassis)->InitBox(_fWidth, _fLength, _fHeight); m_pChassis->InitOde(m_worldID, 0, fMass); // 0 for space as it is added to a geomGroup m_pChassis->SetPosition(5,0,35); dGeomGroupAdd (m_geomGroupID, m_pChassis->GetGeomID()); } void odeWheel::InitOde(dWorldID _worldID, dSpaceID _spaceID, dReal _fMass) { m_bodyID = dBodyCreate(_worldID); dBodySetPosition(m_bodyID, 0, 0, 0); const dReal fDensity = 1.0f; dMassSetSphere(&m_mass, fDensity, m_fRadius); dMassAdjust (&m_mass, _fMass); dBodySetMass(m_bodyID, &m_mass); m_geomID = dCreateSphere(_spaceID, m_fRadius); dGeomSetBody(m_geomID, m_bodyID); } void odeCar::AddWheel(dReal _posX, dReal _posY, dReal _posZ, float _fRadius, float _fWidth) { // odeWheel odeWheel* pWheel = new odeWheel; pWheel->InitWheel(_fRadius, _fWidth); pWheel->InitOde(m_worldID, 0, m_fDefaultWheelMass); // 0 for space as it is added to a geomGroup const dReal *a = dBodyGetPosition(m_pChassis->GetBodyID()); dBodySetPosition(pWheel->GetBodyID(), a[0] + _posX, a[1] + _posY, a[2] + _posZ); m_vpWheel.push_back(pWheel); // Joint dJointID jointID = dJointCreateHinge2(m_worldID, 0); dJointAttach(jointID, m_pChassis->GetBodyID(), pWheel->GetBodyID()); dJointSetHinge2Anchor(jointID, a[0] + _posX, a[1] + _posY, a[2] + _posZ); dJointSetHinge2Axis1(jointID, 0, 0, 1); dJointSetHinge2Axis2(jointID, 1, 0, 0); dJointSetHinge2Param(jointID, dParamSuspensionERP, 0.6f); dJointSetHinge2Param(jointID, dParamSuspensionCFM, 0.08f); dJointSetHinge2Param(jointID, dParamLoStop, 0); dJointSetHinge2Param(jointID, dParamHiStop, 0); m_vJoint.push_back(jointID); m_vPowered.push_back(false); m_vSteered.push_back(false); dGeomGroupAdd (m_geomGroupID, pWheel->GetGeomID()); } From Nguyen Binh Sun Nov 17 21:23:03 2002 From: Nguyen Binh (Nguyen Binh) Date: Sun Nov 17 21:23:03 2002 Subject: [ODE] what integration method is used ? In-Reply-To: References: Message-ID: <301716267.20021118105438@glassegg.com> Hi , TH> what basic integration scheme does ODE use ? is it an TH> explicit or implicit integration method ? does it use TH> runge kutta or something else ? Refer to the 0.3 docs, you'll see that ODE curently use basic Euler integration. TH> is it possible to use a different integration scheme ? Sure, But maybe you'll have to do it yourself or waiting for future ODE release. -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media Me Linh Point Tower, 10th Floor 2 Ngo Duc Ke District 1, Ho Chi Minh City Vietnam Fax: (84.8)823-8392 www.glassegg.com --------------------------------------------------------------------- From franjesus at medtelecom.net Mon Nov 18 02:59:02 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-15?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Mon Nov 18 02:59:02 2002 Subject: [ODE] Bug in documentation? Message-ID: <200211181055.20531.franjesus@medtelecom.net> In section 3.2 documentation states: - Position of the center of mass with respect to the point of reference. In the current implementation the center of mass and the point of reference must coincide. But later, in section 8.2: void dMassTranslate (dMass *, dReal x, dReal y, dReal z); Given mass parameters for some object, adjust them to represent the object displaced by (x,y,z) relative to the body frame. void dMassRotate (dMass *, const dMatrix3 R); Given mass parameters for some object, adjust them to represent the object rotated by R relative to the body frame. So, can the center of mass be displaced wrt. the body frame or I'm missing something? -- "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989 From nlin at nlin.net Mon Nov 18 03:35:02 2002 From: nlin at nlin.net (nlin@nlin.net) Date: Mon Nov 18 03:35:02 2002 Subject: [ODE] what integration method is used ? Message-ID: <20021118120342.GA1863@nlin.net> Nguyen Binh wrote: > On Fri, Nov 15, 2002 at 02:28:59PM +0100, Torsten Hans wrote: > TH> what basic integration scheme does ODE use ? is it an > TH> explicit or implicit integration method ? does it use > TH> runge kutta or something else ? > > Refer to the 0.3 docs, you'll see that ODE curently use basic Euler > integration. Not quite. Somewhere in the docs is mentioned that ODE uses a _time_ _stepping_ Euler integration scheme. This is a bit more hairy to extend to higher order schemes. For the gory details and some links to research papers see the thread started in April 2002 at http://q12.org/pipermail/ode/2002-April/001175.html > TH> is it possible to use a different integration scheme ? > Sure, But maybe you'll have to do it yourself or waiting for future > ODE release. A discussion on this topic in March 2002: nlin> The problem with all of this ... is the interplay of all of this nlin> with the time-stepping scheme. russ>actually i'm not sure what a higher order time stepping scheme russ>will look like in this case. i'd have to sit down and read some russ>papers and write some equations. it's not a problem i have russ>considered yet. Don't let this stop you - I'd also be interested in seeing the performance and accuracy of higher-order integration schemes with ODE - but be aware that this isn't a completely trivial thing to do because of the time-stepping (rather than instantaneous) view of the equations to be solved. -Norman From Dominique at SavageSoftware.com.au Mon Nov 18 03:49:02 2002 From: Dominique at SavageSoftware.com.au (Dominique Louis) Date: Mon Nov 18 03:49:02 2002 Subject: [ODE] Rag Doll Demo? Message-ID: <3DD8C604.8000203@SavageSoftware.com.au> I was recently playing the Unreal Tournament demo and was impressed by the rag doll physics they used, though it still did not look 100% realistic. I beleive they used the MathEngine for their physics. It is still a very cool game. I was wondering if anyone has used ODE to create a rag doll type demo, and also if anyone knows where I can get or find information on the UT model format. Thanks, Dominique. From mattias at cambrianlabs.com Mon Nov 18 03:56:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Mon Nov 18 03:56:02 2002 Subject: [ODE] Rag Doll Demo? In-Reply-To: <3DD8C604.8000203@SavageSoftware.com.au> References: <3DD8C604.8000203@SavageSoftware.com.au> Message-ID: Have a look at this site; http://taat.fi/taat/porrasturvat/ cheers, m -----Original Message----- From: Dominique Louis To: ode@q12.org Date: Mon, 18 Nov 2002 10:50:44 +0000 Subject: [ODE] Rag Doll Demo? > I was recently playing the Unreal Tournament demo and was impressed by > the rag doll physics they used, though it still did not look 100% > realistic. I beleive they used the MathEngine for their physics. It is > still a very cool game. > > I was wondering if anyone has used ODE to create a rag doll type demo, > and also if anyone knows where I can get or find information on the UT > model format. > > Thanks, > > > > Dominique. > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From Dominique at SavageSoftware.com.au Mon Nov 18 05:22:02 2002 From: Dominique at SavageSoftware.com.au (Dominique Louis) Date: Mon Nov 18 05:22:02 2002 Subject: [ODE] Rag Doll Demo? References: <3DD8C604.8000203@SavageSoftware.com.au> Message-ID: <3DD8DBE5.4040506@SavageSoftware.com.au> That is an excellent demo! Will a similar type demo be included as part of the "standard" demos that ship with ODE? Thanks again, Dominique. Mattias Fagerlund wrote: > Have a look at this site; http://taat.fi/taat/porrasturvat/ > > cheers, > m > > -----Original Message----- > From: Dominique Louis > To: ode@q12.org > Date: Mon, 18 Nov 2002 10:50:44 +0000 > Subject: [ODE] Rag Doll Demo? > > >>I was recently playing the Unreal Tournament demo and was impressed by >>the rag doll physics they used, though it still did not look 100% >>realistic. I beleive they used the MathEngine for their physics. It is >>still a very cool game. >> >>I was wondering if anyone has used ODE to create a rag doll type demo, >>and also if anyone knows where I can get or find information on the UT >>model format. >> >>Thanks, >> >> >> >>Dominique. >> >>_______________________________________________ >>ODE mailing list >>ODE@q12.org >>http://q12.org/mailman/listinfo/ode > > > From anselm at hook.org Mon Nov 18 12:06:02 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 18 12:06:02 2002 Subject: [ODE] ode networking code snippet In-Reply-To: <301716267.20021118105438@glassegg.com> Message-ID: Here's a small hack to network a couple of ODE cars together. I had a couple of hours and I was thinking about a comment somebody asked earlier - so I threw this together... I'll probably improve it later since it is really crude right now. It really just hammers on objects positions and it doesn't network all of the state of each object so it doesn't look very good - although this could be improved. The networking layer itself might be useful as a test-bench for people to explore other more effacious networking strategies. The theory is that even if object physics state is hammered on, one will still get the appearance of reasonably believable physical interaction simply because of the way each machine will simulate forward the whole system. But in practice since not all state is networked properly, the first pass at least looks pretty poor - however I do think the theory is still sound. If this theory doesn't pan out then (if I have time) I may modify the code to try out a variety of other approaches. For example the simplest approach is simply to integrate everything on the server. To build it replace the test_buggy.cpp code with the below, and compile ODE as usual under cygwin. It doesn't build under msvc because I haven't bothered fully implementing the berkeley sockets for msvc. To run a server type: test_buggy To run a client type: test_buggy be a client It networks on 127.0.0.1:8000 so you can run multiple instances on one machine to fiddle with it... BTW I *really* like the geomgroups stuff now... way better! Have fun! - a /* "bangup" - a small testbed for ode networking. The code is broken up into a number of pieces, 1) NetSocket - a network abstraction layer (runs under cygwin only - not ported to windows) 2) SimObject - a generic type of simulation object 3) Dynamics - the basic ODE dynamics (world, space, ground ) 4) Car - a car 5) Main - handles network traffic and overall event stuff In general the networking scheme here is: 1) There is a server and a number of clients. 2) A server is similar to a client in that it also has a window and a pov 3) Each machine is locally authoritative for some objects 4) Other objects on a machine are considered to be driven by some remote authority 5) In the tests so far the clients are authoritative for the local participants pov. 6) In the tests so far the server is authoritative for its pov 7) The clients and server echo to each other any state that they are authoritative for. 8) The server additionally re-echoes out all state so that other clients can be advised of changes. 9) Rather than publishing a database on new client connections; clients dynamically create missing objects. This is extremely crude... and one will see that it does not behave well. Not much state is networked so things tend to jump around and misbehave terribly. It may improve over time. */ /**************************************************************/ // network stuff /**************************************************************/ //#if defined( WIN32 ) || defined( __CYGWIN32__ ) //#include //#else #include #include #include #include #define _USE_BSD #include #include #include #include #include #include #include #include #include #include #include typedef int SOCKET; //#endif #include class NetSocket { public: struct sockaddr_in sa; struct hostent *hp; SOCKET sock; FILE* sockin; FILE* sockout; NetSocket* next; #define MAXHOSTNAME 64 char myname[MAXHOSTNAME+1]; int isserver; int key; void error_fail(char* str,...) { puts(str); } void init() { isserver = 0; sock = 0; next = 0; sockin = 0; sockout = 0; myname[0] = 0; key = 0; } NetSocket() { init(); } NetSocket(SOCKET _s) { init(); attach(_s); } ~NetSocket() { disconnect(); // xxx remove from list } void attach(SOCKET _s) { sock = _s; int opts = fcntl(sock,F_GETFL); opts = opts | O_NONBLOCK; fcntl(sock,F_SETFL,opts); sockin = fdopen(sock,"r"); sockout = fdopen(sock,"w"); } void disconnect() { if( sockout ) { fflush(sockout); fclose(sockout); sockout = 0; } if( sockin ) { fclose(sockin); sockin = 0; } if( sock ) { #ifdef USEWIN32 closesocket(sock); #else close(sock); #endif sock = 0; } } bool serve(int portnum = 8700 ) { isserver = 1; #ifdef USEWIN32 WSAData ws; if( WSAStartup(0x0101,&ws) < 0 ) { error_fail("TcpServer: tcp does not seem to be supported"); return 0; } #endif struct protoent *tcp_prot = getprotobyname("tcp"); if(!tcp_prot) { error_fail("TcpServer: tcp does not seem to be supported"); return 0; } sock = socket(AF_INET,SOCK_STREAM,tcp_prot->p_proto); if( sock < 0 ) { error_fail(" can't make server socket: %s", strerror(errno)); return 0; } int one = 1; if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(int)) < 0) { error_fail("failed on setsockopt(): %s", strerror(errno)); return 0; } gethostname(myname, MAXHOSTNAME); if ((hp= gethostbyname(myname)) == NULL) { disconnect(); return 0; } memset(&sa, 0, sizeof(struct sockaddr_in)); sa.sin_family= hp->h_addrtype; sa.sin_port= htons(portnum); sa.sin_family = AF_INET; sa.sin_addr.s_addr = htonl(INADDR_ANY); if( bind(sock,(struct sockaddr *)&sa,sizeof(sa)) == -1 ) { error_fail("server count not bind"); disconnect(); return 0; } #ifdef USEWIN32 WSAAsyncSelect(sock,GetForegroundWindow(),WM_USER+1,FD_ACCEPT | FD_CLOSE | FD_READ | FD_WRITE ); #endif if( listen(sock,100) < 0 ) { disconnect(); return 0; } return 1; } void update() { if( !isserver ) { return; } if( !sock ) { return; } timeval tv; tv.tv_sec = 0; tv.tv_usec = 10; fd_set readmask,writemask,exceptmask; FD_ZERO( &readmask ); FD_ZERO( &writemask ); FD_ZERO( &exceptmask ); FD_SET( sock, &readmask ); int results = select( FD_SETSIZE, &readmask, &writemask, &exceptmask, &tv ); if( !results ) { return; } int conn; if( (conn = accept(sock,NULL,NULL)) < 0 ) { printf("failed conn\n"); return; } printf("new conn\n"); NetSocket* cl = new NetSocket( conn ); cl->next = next; next = cl; } void client(const char* hostname = "localhost", unsigned short portnum = 8700 ) { isserver = 0; if ((hp= gethostbyname(hostname)) == NULL) { return; } printf("got localhost\n"); memset(&sa, 0, sizeof(struct sockaddr_in)); memcpy((char *)&sa.sin_addr,hp->h_addr,hp->h_length); sa.sin_family= hp->h_addrtype; sa.sin_port= htons((u_short)portnum); if ((sock= socket(hp->h_addrtype,SOCK_STREAM,0)) < 0) { return; } if (connect(sock,(struct sockaddr *)&sa,sizeof sa) < 0) { disconnect(); return; } attach( sock ); printf("conned %x,%x,%x\n",sock,(int)sockin,(int)sockout); } void publish(char* str) { if( sockout ) { fputs(str,sockout); fflush(sockout); } } }; #if 0 /* // some inactivated code - idea here was to run 2 sims, one at present moment, and one in past that is synced. // but i am concerned that ode is not deterministic between machines; there might be strange rounding errors. // non deterministic input event structure class ndi_event { public: struct ndi_event* next; struct ndi_event* prev; time_t timenow; int key; int cmd; ndi_event( int key, int cmd) { next = prev = 0; time(&timenow); this->key = key; this->cmd = cmd; } }; // data structures static ndi_event* ndi_head = 0; static ndi_event* ndi_tail = 0; // insert event into temporally sorted queue void ndi_hold_event(ndi_event* event) { event->next = event->prev = 0; for( ndi_event* cursor = ndi_tail ; cursor ; cursor = cursor->prev ) { if( cursor->time < event->time ) { event->next = cursor->next; event->prev = cursor; if( cursor->next ) cursor->next->prev = event; cursor->next = event; return; } } event->next = ndi_head; ndi_head = event; } void system_command( int key, int cmd ); // do all events up to the current time void ndi_advance(int current_time) { for( ndi_event* cursor = ndi_head ; cursor ; ) { if( cursor->time > current_time ) { return; } ndi_head = cursor->next; system_command(cursor->key, cursor->cmd ); cursor = cursor->next free cursor->prev; } } void network_publish_event(int key, int cmd) { // ndi_hold_event( new ndi_event(key,cmd) ); // - send over net now also - except maybe updates // for updates we want to do this general bookkeeping // accept new pending connections and fire off a copy of my objects once only as well as pending state // get current time // ndi_advance( to current time - 1 ); // and do a local command update too... or heart beated } */ #endif /**********************************************************************/ // game stuff /**********************************************************************/ #ifdef USE_WIN32 #define __USE_W32_SOCKETS 1 #include #include #ifdef MSVC #pragma warning(disable:4244 4305) // for VC++, no precision loss complaints #endif #endif #include #include // select correct drawing functions #ifdef dDOUBLE #define dsDrawBox dsDrawBoxD #define dsDrawSphere dsDrawSphereD #define dsDrawCylinder dsDrawCylinderD #define dsDrawCappedCylinder dsDrawCappedCylinderD #endif /**********************************************************************/ // simobject - game object management /**********************************************************************/ class SimObject { public: SimObject* next; int key; static class SimObject* objects; SimObject() { next = objects; objects = this; } virtual ~SimObject() { for(SimObject** obj = &objects; *obj; obj = &((*obj)->next)) { if( *obj == this ) { *obj = (*obj)->next; break; } } } virtual void draw() {} virtual void update() {} virtual void command(char *cmd) {} }; SimObject* SimObject::objects = 0; /**********************************************************************/ // a dynamics object /**********************************************************************/ class Dynamics { public: dWorldID world; dSpaceID space; dGeomID ground; dJointGroupID contactgroup; Dynamics* next; // this is called by dSpaceCollide when two objects in space are potentially colliding. void nearCallback2 (void *data, dGeomID o1, dGeomID o2) { int i,n; const int N = 10; dContact contact[N]; n = dCollide (o1,o2,N,&contact[0].geom,sizeof(dContact)); if (n > 0) { for (i=0; inearCallback2(0,o1,o2); } Dynamics() { world = dWorldCreate(); space = dHashSpaceCreate(); contactgroup = dJointGroupCreate (0); dWorldSetGravity (world,0,0,-0.5); ground = dCreatePlane (space,0,0,1,0); } void draw() {} void update() { dSpaceCollide (space,this,&nearCallback); dWorldStep (world,0.05); dJointGroupEmpty (contactgroup); } void command(char* cmd) {} ~Dynamics() { dJointGroupDestroy (contactgroup); dSpaceDestroy (space); dWorldDestroy (world); } }; /**********************************************************************/ // a car /**********************************************************************/ class Car: public SimObject { public: // some constants #define LENGTH 0.7 // chassis length #define WIDTH 0.5 // chassis width #define HEIGHT 0.2 // chassis height #define RADIUS 0.18 // wheel radius #define STARTZ 0.5 // starting height of chassis #define CMASS 1 // chassis mass #define WMASS 0.2 // wheel mass // dynamics and collision objects (chassis, 3 wheels ) dBodyID body[4]; dJointID joint[3]; // joint[0] is the front wheel dGeomID geom_group; dGeomID box[1]; dGeomID sphere[3]; double speed,steer; Dynamics* parent; Car(Dynamics* parent, dReal x, dReal y, dReal z); virtual ~Car(); virtual void update(); virtual void draw(); virtual void command(char *); }; Car::Car(Dynamics* parent, dReal x, dReal y, dReal z): SimObject() { this->parent = parent; int i; dMass m; // chassis body body[0] = dBodyCreate (parent->world); dBodySetPosition (body[0],x+0,y+0,z+STARTZ); dMassSetBox (&m,1,LENGTH,WIDTH,HEIGHT); dMassAdjust (&m,CMASS); dBodySetMass (body[0],&m); box[0] = dCreateBox (0,LENGTH,WIDTH,HEIGHT); dGeomSetBody (box[0],body[0]); // wheel bodies for (i=1; i<=3; i++) { body[i] = dBodyCreate ( parent->world); dQuaternion q; dQFromAxisAndAngle (q,1,0,0,M_PI*0.5); dBodySetQuaternion (body[i],q); dMassSetSphere (&m,1,RADIUS); dMassAdjust (&m,WMASS); dBodySetMass (body[i],&m); sphere[i-1] = dCreateSphere (0,RADIUS); dGeomSetBody (sphere[i-1],body[i]); } dBodySetPosition (body[1],x+ 0.5*LENGTH,y+ 0,z + STARTZ-HEIGHT*0.5); dBodySetPosition (body[2],x+ -0.5*LENGTH,y+ WIDTH*0.5,z + STARTZ-HEIGHT*0.5); dBodySetPosition (body[3],x+ -0.5*LENGTH,y+ -WIDTH*0.5,z + STARTZ-HEIGHT*0.5); // front and back wheel hinges for (i=0; i<3; i++) { joint[i] = dJointCreateHinge2 (parent->world,0); dJointAttach (joint[i],body[0],body[i+1]); const dReal *a = dBodyGetPosition (body[i+1]); dJointSetHinge2Anchor (joint[i],a[0],a[1],a[2]); dJointSetHinge2Axis1 (joint[i],0,0,1); dJointSetHinge2Axis2 (joint[i],0,1,0); } // set joint suspension for (i=0; i<3; i++) { dJointSetHinge2Param (joint[i],dParamSuspensionERP,0.4); dJointSetHinge2Param (joint[i],dParamSuspensionCFM,0.8); } // lock back wheels along the steering axis for (i=1; i<3; i++) { // set stops to make sure wheels always stay in alignment dJointSetHinge2Param (joint[i],dParamLoStop,0); dJointSetHinge2Param (joint[i],dParamHiStop,0); // the following alternative method is no good as the wheels may get out // of alignment: // dJointSetHinge2Param (joint[i],dParamVel,0); // dJointSetHinge2Param (joint[i],dParamFMax,dInfinity); } // create geometry group and add it to the space geom_group = dCreateGeomGroup ( parent->space ); dGeomGroupAdd (geom_group,box[0]); dGeomGroupAdd (geom_group,sphere[0]); dGeomGroupAdd (geom_group,sphere[1]); dGeomGroupAdd (geom_group,sphere[2]); speed = 0; steer = 0; } Car::~Car() { // destroy body xxx dGeomDestroy (box[0]); dGeomDestroy (sphere[0]); dGeomDestroy (sphere[1]); dGeomDestroy (sphere[2]); } void Car::update() { // motor dJointSetHinge2Param (joint[0],dParamVel2,-speed); dJointSetHinge2Param (joint[0],dParamFMax2,0.1); // steering dReal v = steer - dJointGetHinge2Angle1 (joint[0]); if (v > 0.1) v = 0.1; if (v < -0.1) v = -0.1; v *= 10.0; dJointSetHinge2Param (joint[0],dParamVel,v); dJointSetHinge2Param (joint[0],dParamFMax,0.2); dJointSetHinge2Param (joint[0],dParamLoStop,-0.75); dJointSetHinge2Param (joint[0],dParamHiStop,0.75); dJointSetHinge2Param (joint[0],dParamFudgeFactor,0.1); } void Car::draw() { dsSetColor (0,1,1); dsSetTexture (DS_WOOD); dReal sides[3] = {LENGTH,WIDTH,HEIGHT}; dsDrawBox (dBodyGetPosition(body[0]),dBodyGetRotation(body[0]),sides); dsSetColor (1,1,1); int i; for (i=1; i<=3; i++) dsDrawCylinder (dBodyGetPosition(body[i]),dBodyGetRotation(body[i]),0.02f,RADIUS); } void Car::command(char* command) { int cmd; float x,y,z; sscanf(command,"%d %f %f %f",&cmd,&x,&y,&z); switch( cmd ) { case 'a': case 'A': speed += 0.3; break; case 'z': case 'Z': speed -= 0.3; break; case ',': steer -= 0.5; break; case '.': steer += 0.5; break; case ' ': speed = 0.0; steer = 0.0; default: break; } } /**************************************************************************************/ // main /**************************************************************************************/ static NetSocket network; static Dynamics* dynamics; static int local_sim_key_code = 0x00010000; static int remote_machine_code = 0x00010000; static void network_command(NetSocket* s,char* buffer) { if(!strncmp(buffer,"login",5)) { // remote has logged into me; accept their login printf("got login\n"); remote_machine_code += 0x00010000; if( s ) { fprintf(s->sockout,"id %x\n",remote_machine_code); // tell client to make an obj fprintf(s->sockout,"new %x %d %f %f %f\n",remote_machine_code + 1, 0, 0.0f,0.0f,0.0f); fflush(s->sockout); s->key = remote_machine_code; } } else if(!strncmp(buffer,"id",2)) { // remote sent us our own unique id sscanf(buffer+2,"%x",&local_sim_key_code); printf("local is is now %x\n",local_sim_key_code); remote_machine_code = local_sim_key_code; } else if(!strncmp(buffer,"new",3)) { // remote has asked us to make something at location xyz int id,type; float x,y,z; sscanf(buffer+3,"%x %d %f %f %f",&id,&type,&x,&y,&z); printf("got new request: 0x%x,%d,%f,%f,%f\n",id,type,x,y,z); Car* car = new Car(dynamics,x,y,z); car->key = id; } else if(!strncmp(buffer,"update",3)) { int key; float x,y,z; float rotf[12]; double rot[12]; sscanf(buffer+6,"%x %f %f %f\n",&key,&x,&y,&z); sscanf(buffer+6,"%x %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f\n", &key,&x,&y,&z, &rotf[0],&rotf[1],&rotf[2],&rotf[3], &rotf[4],&rotf[5],&rotf[6],&rotf[7], &rotf[8],&rotf[9],&rotf[10],&rotf[11] ); rot[0] = rotf[0]; rot[1] = rotf[1]; rot[2] = rotf[2]; rot[3] = rotf[3]; rot[4] = rotf[4]; rot[5] = rotf[5]; rot[6] = rotf[6]; rot[7] = rotf[7]; rot[8] = rotf[8]; rot[9] = rotf[9]; rot[10] = rotf[10]; rot[11] = rotf[11]; for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { if( obj->key == key ) { Car* car = (Car*)obj; dBodySetPosition( car->body[0],x,y,z); dBodySetRotation( car->body[0], rot ); return; } } // if not found then add Car* car = new Car(dynamics,x,y,z); car->key = key; } } static void network_input_events() { // handle incoming traffic from any port for(NetSocket* s = &network; s ; s = s->next ) { if(! s->sockin ) continue; char buffer[2048]; while( fgets(buffer,2040,s->sockin) ) { network_command(s,buffer); } } } static void network_output_events() { // for all machines that have observers here, tell them about all objects we are responsible for static int counter = 0; if( counter++ < 16 ) { return; } counter = 0; for(NetSocket* s = &network; s ; s = s->next ) { if( !s->sockout ) continue; for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { if(network.sockout) { // if we are a client then emit information about our objects only - else emit all if( (obj->key & 0xffff0000) != (local_sim_key_code & 0xffff0000) ) { continue; } } else { // if we are a server - emit all objects to all machines except real owners if( (obj->key & 0xffff0000) == ( s->key & 0xffff0000) ) { continue; } } Car* car = (Car*)obj; const dReal* pos = dBodyGetPosition( car->body[0] ); const dReal* rot = dBodyGetRotation( car->body[0] ); float x = pos[0]; float y = pos[1]; float z = pos[2]; fprintf(s->sockout,"update %x %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f\n", obj->key,x,y,z, (float)rot[0],(float)rot[1],(float)rot[2],(float)rot[3], (float)rot[4],(float)rot[5],(float)rot[6],(float)rot[7], (float)rot[8],(float)rot[9],(float)rot[10],(float)rot[11] ); fflush(s->sockout); } } } static void mainLoop (int pause) { // for server only - look for new socket connections network.update(); // for servers and clients - deal with any remote commands network_input_events(); // for servers and clients - emit anything anybody else might be interested in network_output_events(); // update... could be done before outputting state for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { obj->update(); } if( dynamics ) { dynamics->update(); } // redraw... best done after updating state for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { obj->draw(); } } void key_events(int cmd ) { switch(cmd) { default: int key = ( local_sim_key_code & 0xffff0000 ) + 1; for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { printf("%x %x\n",obj->key,key); if( obj->key == key ) { char buffer[512]; sprintf(buffer,"%d 0 0 0\n",cmd); obj->command(buffer); return; } } } } void start() { printf ("Press:\t'a' to increase speed.\n" "\t'z' to decrease speed.\n" "\t',' to steer left.\n" "\t'.' to steer right.\n" "\t' ' to reset speed and steering.\n"); // move camera somewhere useful { //const dReal* pos = dBodyGetPosition(body[0]); float pos[3] = { 3,-3,2 }; // xxx move viewpoint behind car - xxx wrong - do dynamically static float xyz[3] = {0.8317f,-0.9817f,0.8000f}; static float hpr[3] = {121.0000f,-27.5000f,0.0000f}; xyz[0] = pos[0] + 0.8317f; xyz[1] = pos[1] - 0.9817f; xyz[2] = pos[2] + 0.8000f; dsSetViewpoint (xyz,hpr); } } int main (int argc, char **argv) { dynamics = new Dynamics(); if( argc < 2 ) { // be a server - server will always start up one dynamics engine and always add one car to kickstart itself. printf("server\n"); network.serve(); network_command(0,"id 0x00010000\n"); // server id network_command(0,"new 0x00010001 0 2.0 0 0\n"); // server car location } else { // be a client - client explicitly logs in and waits for reply with an id before doing anything network.client(); if( network.sockout ) { network.publish("login joe\n"); printf("client: network up - logging in\n"); } else { printf("client: no network :-(\n"); } } // setup pointers to drawstuff callback functions and run forever dsFunctions fn; fn.version = DS_VERSION; fn.start = &start; fn.step = &mainLoop; fn.command = &key_events; fn.stop = 0; fn.path_to_textures = "../../drawstuff/textures"; dsSimulationLoop (0,0,352,288,&fn); // exit... network.disconnect(); } From ccos at bigpond.com Tue Nov 19 01:07:01 2002 From: ccos at bigpond.com (ccos) Date: Tue Nov 19 01:07:01 2002 Subject: [ODE] os x compile probs Message-ID: <6FC6A94D-FB95-11D6-9679-000393722276@bigpond.com> hello everybody, i'm trying to build ode on os x 10.1.5 and this is what i'm doing (from the docs): > Step 1: Unpack the ODE archive. done > Step 2: Get the GNU make tool. Many Unix platforms come with this, > although sometimes it is called gmake. I have provided a version of GNU > make for windows here. done, ( default os x make ) > Step 3: Edit the settings in the file config/user-settings. The list of > supported platforms is given in that file. done, set it to osx > Step 4: Run make to configure and build ODE and the graphical test > programs. > Be sure you are using the correct version of GNU make. which is the correct version? > The make targets for building the parts of ODE are: > * make configure : Create the configuration file include/ode/config.h. i get: *** configurator succeeded *** > * make ode-lib : Build the core ODE library. seems to work these are all i can make because i don't have X11, but i don't really need to run the drawing library, so i should be fine right? > Step 5: To install the ODE library onto your system you should copy the > lib/ and include/ directories to a suitable place, e.g. on Unix: > > * include/ode/ --> /usr/local/include/ode/ > * lib/libode.a --> /usr/local/lib/libode.a done ok, so everything seems alright, but when i try to compile with #include i get: /usr/bin/ld: archive: /usr/local/lib/libode.a has no table of contents, add one with ranlib(1) (can't load from it) hints very well appreciated. has anybody here built ode on os x? thanks much, c From nnevatie at welho.com Tue Nov 19 10:31:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Tue Nov 19 10:31:02 2002 Subject: [ODE] Step size vs. frame rate + building ODE Message-ID: <000b01c28ff1$62b90c60$3abdf3d5@wli> I read in the ODE documentation that "10*0.1 not the same as 5*0.2". So, my guestion is, can I use frame processing time to scale the step? E.g.: dWorldStep(dWorldID, 0.05 * scaler); where scaler is somehow dependent of the frame processing time BTW, I was able to build ODE with Borland C++ Builder 6.0 Pro (+ CVS Tricollider & Opcode 1.2). One thing is still not clear to me: Which one is the newer version of tricollider - Erwin's base64 patch ('newstuff.gz') or the version in CVS? I wasn't able to build the contents of 'newstuff.gz', a function in dRay.cpp used Matrix3 and caused some access violations by accessing element at [3 * 4 + 2] (Matrix3 seems to have 4x3 elements). -- Niko From franjesus at medtelecom.net Tue Nov 19 16:06:01 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-1?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Tue Nov 19 16:06:01 2002 Subject: [ODE] os x compile probs Message-ID: <200211200001.37100.franjesus@medtelecom.net> El Mar 19 Nov 2002 09:03, ccos escribió: > hints very well appreciated. > has anybody here built ode on os x? try running ldconfig I believe OSX uses libtool, so you need to run ldconfig each time you add libraries to your system. -- Tienes mal la zona, sin embargo te marca bien la hora local, ergo tienes mal ambas. .: Bulmailing :. From coding at natew.com Tue Nov 19 22:48:01 2002 From: coding at natew.com (Nate W) Date: Tue Nov 19 22:48:01 2002 Subject: [ODE] Step size vs. frame rate + building ODE In-Reply-To: <000b01c28ff1$62b90c60$3abdf3d5@wli> Message-ID: On Tue, 19 Nov 2002, Niko Nevatie wrote: > Can I use frame processing time to scale the step? E.g.: > > dWorldStep(dWorldID, 0.05 * scaler); > > where scaler is somehow dependent of the frame processing time That's what I do in Juice, and I'm happy with the results. I also clamp the 'frame time' to within a minimum and maximum range, to avoid getting instabilities with large frame times or divide-by-zero with a zero frame time. If you check the archives, I wrote something a while back that goes into more detail. I like the variable time step approach for my app so far. Theoretically there are some potential problems with variable time steps, but in practice I'm happy with the way things work in Juice. If repeatability or consistency across network machines is important, you might want to use fixed time steps. -- Nate Waddoups Redmond WA USA http://www.natew.com From thomas_buehrmann at web.de Wed Nov 20 06:55:02 2002 From: thomas_buehrmann at web.de (Thomas Buehmann) Date: Wed Nov 20 06:55:02 2002 Subject: [ODE] dRay, c++ interface, khepera model? Message-ID: <200211201354.gAKDs3X30804@mailgate5.cinetic.de> hi, is it possible to get the c++ interface by martin c. martin and the dRay contribution without having to use cvs or copy and paste? apart from that, is anyone aware of a good khepera-style two-wheeled differential-steering model? if i use two wheels in front of my vehicle to drive and steer and an additional supporting wheel in the back, the latter tends to bend if the distance between front-wheels and supporting wheel is small (all use hinge2). is that model too simple or is it just a matter of tweaking cfm etc...? thanks, thomas. sorry if this mail got posted twice. i send it earlier from an unlisted address. ______________________________________________________________________________ Der Anrufbeantworter für Ihre E-Mail-Korrespondenz - WEB.DE FreeMail http://freemail.web.de/features/?mc=021137 From anselm at hook.org Wed Nov 20 14:12:02 2002 From: anselm at hook.org (Anselm Hook) Date: Wed Nov 20 14:12:02 2002 Subject: [ODE] dRay, c++ interface, khepera model? In-Reply-To: <200211201354.gAKDs3X30804@mailgate5.cinetic.de> Message-ID: > hi, > is it possible to get the c++ interface by martin c. martin and the dRay > contribution without having to use cvs or copy and paste? http://q12.org/cgi-bin/cvsweb.cgi/ode/ From henri at cs.sun.ac.za Thu Nov 21 02:48:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Thu Nov 21 02:48:02 2002 Subject: [ODE] Faster ODE Message-ID: <021b01c29143$46622a30$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_0218_01C29154.09E63F40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi ODE :) Please can somebody look at this and experiment with the file? LDLT decomposition is one of the primary computational activities in = ODE's physics engine. LDLT =3D Lower Diagonal Lower Transposed, meaning = a constraint matrix A (that describes the physics of a world) can be = decomposed into two matrices (L and D, where L is a lower triangular = matrix (all entries above the diagonal are zero) and D is a diagonal = matrix (all entries except the diagonal are zero)). Now A =3D L D L' = (A equals the lower matrix times the diagonal matrix times the = transposed lower matrix.) The A matrix varies in size and is typically = between 10x10 and 500x500 for ODE (depending on how many constraints/collisions/etc need to be solved for a given = simulation step). This LDLT decomposition needs to be solved with every step and is quite = computationally intensive. I've looked at the stldlt.c file that is part = of the ODE source and it looks to me like it could be improved upon. = Unforetunately I use Delphi, so I cannot test my suggested modifications = directly (though the Delphi version seems fine and considerably faster = then the original). The file http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a = replacement for fastldlt.c and should (barring errors) work flawlessly = and faster then the original. Let me know if it works, thanks :) Henri ------=_NextPart_000_0218_01C29154.09E63F40 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi ODE :)
 
Please can somebody look at this and experiment with the = file?
 
LDLT decomposition is one of the primary computational activities = in ODE's=20 physics engine. LDLT =3D Lower Diagonal Lower Transposed, meaning a = constraint=20 matrix A (that describes the physics of a world) can be decomposed into = two=20 matrices (L and D, where L is a lower triangular matrix (all entries = above the=20 diagonal are zero) and D is a diagonal matrix (all entries except = the=20 diagonal are zero)). Now  A =3D L D L'  (A equals the lower = matrix times=20 the diagonal matrix times the transposed lower matrix.) The A matrix = varies in=20 size and is typically between 10x10 and 500x500 for ODE (depending = on
how=20 many constraints/collisions/etc need to be solved for a given simulation = step).

This LDLT decomposition needs to be solved with every step = and is=20 quite computationally intensive. I've looked at the stldlt.c file that = is part=20 of the ODE source and it looks to me like it could be improved upon.=20 Unforetunately I use Delphi, so I cannot test my=20 suggested modifications directly (though the Delphi version = seems fine=20 and considerably faster then the original).

The file http://www.cs.su= n.ac.za/~henri/fastldlt_henri.c=20 is a replacement for fastldlt.c and should (barring errors) work = flawlessly and=20 faster then the original.
 
Let me know if it works, thanks :)
  Henri
 
------=_NextPart_000_0218_01C29154.09E63F40-- From ruud at marketgraph.nl Thu Nov 21 03:48:01 2002 From: ruud at marketgraph.nl (Ruud van Gaal) Date: Thu Nov 21 03:48:01 2002 Subject: [ODE] os x compile probs Message-ID: <20C09F811939D311BA694854E86C778233E42D@raptor> > El Mar 19 Nov 2002 09:03, ccos escribió: > > hints very well appreciated. > > has anybody here built ode on os x? > > try running ldconfig I just took the error's advice and did 'ranlib libode.a' and that worked. Ruud From jnilson_99 at yahoo.com Thu Nov 21 11:16:01 2002 From: jnilson_99 at yahoo.com (jnilson_99@yahoo.com) Date: Thu Nov 21 11:16:01 2002 Subject: [ODE] Faster ODE In-Reply-To: <021b01c29143$46622a30$45d4e892@temple> Message-ID: <20021121181503.47334.qmail@web40111.mail.yahoo.com> Hi, The mathematics behind what you're talking about sounds really cool but over my head. Do you know of any resource (web page or book) that provides a background on LDLT, Lower Diagonal Lower Transposed? thanks, john --- Henri Hakl wrote: > Hi ODE :) > > Please can somebody look at this and experiment with > the file? > > LDLT decomposition is one of the primary > computational activities in ODE's physics engine. > LDLT = Lower Diagonal Lower Transposed, meaning a > constraint matrix A (that describes the physics of a > world) can be decomposed into two matrices (L and D, > where L is a lower triangular matrix (all entries > above the diagonal are zero) and D is a diagonal > matrix (all entries except the diagonal are zero)). > Now A = L D L' (A equals the lower matrix times > the diagonal matrix times the transposed lower > matrix.) The A matrix varies in size and is > typically between 10x10 and 500x500 for ODE > (depending on > how many constraints/collisions/etc need to be > solved for a given simulation step). > > This LDLT decomposition needs to be solved with > every step and is quite computationally intensive. > I've looked at the stldlt.c file that is part of the > ODE source and it looks to me like it could be > improved upon. Unforetunately I use Delphi, so I > cannot test my suggested modifications directly > (though the Delphi version seems fine and > considerably faster then the original). > > The file > http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a > replacement for fastldlt.c and should (barring > errors) work flawlessly and faster then the > original. > > Let me know if it works, thanks :) > Henri > > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus – Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From henri at cs.sun.ac.za Thu Nov 21 11:53:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Thu Nov 21 11:53:01 2002 Subject: [ODE] Faster ODE References: <20021121181503.47334.qmail@web40111.mail.yahoo.com> Message-ID: <002701c2918f$77a973e0$45d4e892@temple> hmmm... no website springs to mind, but you can probably find one. The basic algorithm for factorizing A into LDL' runs as follows: initialize L and D to zero matrices for i = 1 to n do for j = 1 to i - 1 do Vj = LijDjj Dii = Aii - SUM(from j = 1 to i - 1): LijVj for j = i + 1 to n do Lji = (Aji - SUM(from k = 1 to i - 1)LjkVk) / Dii This creates matrices L and D such that: A = L D L' holds. ODE uses a similar approach, it still has the same big-O of n^3, but is still faster then the vanilla version from above. The original ODE version is in "fastldlt.c" of the ODE source; I've maintained the algorithm but modified the code executing it in "fastldlt_henri.c" (available at: http://www.cs.sun.ac.za/~henri/fastldlt_henri.c) in theory the replacement should be faster then the original. I cannot be sure until somebody verifies that it is correct and indeed faster. In ODE the "A" matrix is infact the Jacobian matrix that contains the current-step world constraint details. hope this helps to start off :) Henri >Hi, > >The mathematics behind what you're talking about >sounds really cool but over my head. > >Do you know of any resource (web page or book) that >provides a background on LDLT, Lower Diagonal Lower >Transposed? > >thanks, > >john From nnevatie at welho.com Thu Nov 21 12:00:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Thu Nov 21 12:00:02 2002 Subject: [ODE] Faster ODE References: <021b01c29143$46622a30$45d4e892@temple> Message-ID: <001001c29190$2c35d9c0$3abdf3d5@wli> I tried out the code in 'fastldlt_henri.c'. It works as expected. There was a small typo somewhere in the beginning of one function, but it caused no probs. I cannot say anything about the speed of the code, as I haven't benchmarked anything yet. But hey, if you say it's faster than the original, I'll take your word on it :) ----- Original Message ----- From: Henri Hakl To: ode@q12.org Sent: Thursday, November 21, 2002 11:49 AM Subject: [ODE] Faster ODE Hi ODE :) Please can somebody look at this and experiment with the file? LDLT decomposition is one of the primary computational activities in ODE's physics engine. LDLT = Lower Diagonal Lower Transposed, meaning a constraint matrix A (that describes the physics of a world) can be decomposed into two matrices (L and D, where L is a lower triangular matrix (all entries above the diagonal are zero) and D is a diagonal matrix (all entries except the diagonal are zero)). Now A = L D L' (A equals the lower matrix times the diagonal matrix times the transposed lower matrix.) The A matrix varies in size and is typically between 10x10 and 500x500 for ODE (depending on how many constraints/collisions/etc need to be solved for a given simulation step). This LDLT decomposition needs to be solved with every step and is quite computationally intensive. I've looked at the stldlt.c file that is part of the ODE source and it looks to me like it could be improved upon. Unforetunately I use Delphi, so I cannot test my suggested modifications directly (though the Delphi version seems fine and considerably faster then the original). The file http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a replacement for fastldlt.c and should (barring errors) work flawlessly and faster then the original. Let me know if it works, thanks :) Henri From henri at cs.sun.ac.za Thu Nov 21 13:24:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Thu Nov 21 13:24:02 2002 Subject: [ODE] Faster ODE References: <021b01c29143$46622a30$45d4e892@temple> <001001c29190$2c35d9c0$3abdf3d5@wli> Message-ID: <001301c2919c$37c07280$45d4e892@temple> Hey! :) you're right... I found the missing comma - the file on the website has been updated to reflect that as well. Please check the accuracy and speed using the testsuite provided with ODE. In the fbuild subdirectory there is a "test_ldlt.cpp" - compile it and run with parameter f ("test_ldlt f"). This should test both the speed and the accuracy of the factorizer. Try to compare both the original and the replacement version... - just because I think it is faster doesn't mean much - there may be compiler optimizations that I'm not aware of and other subtle issues that I'm not taking into account. thanks :) Henri ----- Original Message ----- From: "Niko Nevatie" To: Sent: Thursday, November 21, 2002 8:59 PM Subject: Re: [ODE] Faster ODE > I tried out the code in 'fastldlt_henri.c'. It works as expected. There was > a small typo somewhere in the beginning of one function, but it caused no > probs. I cannot say anything about the speed of the code, as I haven't > benchmarked anything yet. But hey, if you say it's faster than the original, > I'll take your word on it :) > > ----- Original Message ----- > From: Henri Hakl > To: ode@q12.org > Sent: Thursday, November 21, 2002 11:49 AM > Subject: [ODE] Faster ODE > > > Hi ODE :) > > Please can somebody look at this and experiment with the file? > > LDLT decomposition is one of the primary computational activities in ODE's > physics engine. LDLT = Lower Diagonal Lower Transposed, meaning a constraint > matrix A (that describes the physics of a world) can be decomposed into two > matrices (L and D, where L is a lower triangular matrix (all entries above > the diagonal are zero) and D is a diagonal matrix (all entries except the > diagonal are zero)). Now A = L D L' (A equals the lower matrix times the > diagonal matrix times the transposed lower matrix.) The A matrix varies in > size and is typically between 10x10 and 500x500 for ODE (depending on > how many constraints/collisions/etc need to be solved for a given simulation > step). > > This LDLT decomposition needs to be solved with every step and is quite > computationally intensive. I've looked at the stldlt.c file that is part of > the ODE source and it looks to me like it could be improved upon. > Unforetunately I use Delphi, so I cannot test my suggested modifications > directly (though the Delphi version seems fine and considerably faster then > the original). > > The file http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a replacement > for fastldlt.c and should (barring errors) work flawlessly and faster then > the original. > > Let me know if it works, thanks :) > Henri > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From mattias at cambrianlabs.com Thu Nov 21 13:36:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Thu Nov 21 13:36:02 2002 Subject: [ODE] Faster ODE In-Reply-To: <001001c29190$2c35d9c0$3abdf3d5@wli> References: <021b01c29143$46622a30$45d4e892@temple> <001001c29190$2c35d9c0$3abdf3d5@wli> Message-ID: > But hey, if you say it's faster than the original, > I'll take your word on it :) No chance you could time it? I'd be very interested to see what the differences are... cheers, m From nnevatie at welho.com Thu Nov 21 14:12:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Thu Nov 21 14:12:02 2002 Subject: [ODE] Faster ODE References: <021b01c29143$46622a30$45d4e892@temple> <001001c29190$2c35d9c0$3abdf3d5@wli> Message-ID: <001501c291a2$9f68a500$3abdf3d5@wli> Ok, why not, as soon as I have some spare hacking time. I'll post the results here... ----- Original Message ----- From: "Mattias Fagerlund" To: "Niko Nevatie" ; Sent: Thursday, November 21, 2002 10:31 PM Subject: Re: [ODE] Faster ODE > > But hey, if you say it's faster than the original, > > I'll take your word on it :) > > No chance you could time it? I'd be very interested to see what the > differences are... > > cheers, > m > > From duhprey at yahoo.com Thu Nov 21 14:13:01 2002 From: duhprey at yahoo.com (Daniel Duhprey) Date: Thu Nov 21 14:13:01 2002 Subject: [ODE] Faster ODE In-Reply-To: <001301c2919c$37c07280$45d4e892@temple> Message-ID: On Thu, 21 Nov 2002, Henri Hakl wrote: -->Please check the accuracy and speed using the testsuite provided with ODE. If I'm using the numbers from the test_ldlt correctly (as a raw time on some scale) then on my athlon its about 38% faster and on my celeron its roughly twice as slow :). -- ------------ email: duhprey@tosos.com www: http://paradox.tosos.com/~duhprey icq: 129354442 She's got a whole brood of kids, like Sendmail, and Postfix, and Apache, and Perl. And some of 'em die young, and some are mentally retarded. Sterling The European finds intercourse with Americans easy and agreeable. Einstein Not a shred of evidence exists in favor of the idea that life is serious. Gill From martin at metahuman.org Thu Nov 21 14:38:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 21 14:38:01 2002 Subject: [ODE] dRay, c++ interface, khepera model? References: <200211201354.gAKDs3X30804@mailgate5.cinetic.de> Message-ID: <3DDB966D.F1954CFB@metahuman.org> This is a multi-part message in MIME format. --------------AE4A85DEE0EE67C92AD2D7AE Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Here's the new C++ interface. It most likely won't compile out of the box with ODE 0.03, since it uses some of the newer features in the CVS version. But it shouldn't be hard to port, more or less just comment out lines that don't compile. - Martin Thomas Buehmann wrote: > > hi, > is it possible to get the c++ interface by martin c. martin and the dRay > contribution without having to use cvs or copy and paste? > apart from that, is anyone aware of a good khepera-style two-wheeled > differential-steering model? if i use two wheels in front of my vehicle to drive > and steer and an additional supporting wheel in the back, the latter tends to > bend if the distance between front-wheels and supporting wheel is small (all use > hinge2). is that model too simple or is it just a matter of tweaking cfm etc...? > > thanks, > thomas. > > sorry if this mail got posted twice. i send it earlier from an unlisted address. > ______________________________________________________________________________ > Der Anrufbeantworter für Ihre E-Mail-Korrespondenz - WEB.DE FreeMail > http://freemail.web.de/features/?mc=021137 > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode --------------AE4A85DEE0EE67C92AD2D7AE Content-Type: application/x-unknown-content-type-hfile; name="odecpp_new.h" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="odecpp_new.h" LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioNCiAqCQkJCQkJCQkJICoNCiAqIE9wZW4gRHluYW1pY3Mg RW5naW5lLCBDb3B5cmlnaHQgKEMpIDIwMDEsMjAwMiBSdXNzZWxsIEwuIFNtaXRoLgkgKg0K ICogQWxsIHJpZ2h0cyByZXNlcnZlZC4gIEVtYWlsOiBydXNzQHExMi5vcmcgICBXZWI6IHd3 dy5xMTIub3JnIAkgKg0KICoJCQkJCQkJCQkgKg0KICogVGhpcyBsaWJyYXJ5IGlzIGZyZWUg c29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vcgkgKg0KICogbW9kaWZ5 IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiBFSVRIRVI6IAkJCQkgKg0KICogICAoMSkgVGhlIEdO VSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZy ZWUgICoNCiAqCSBTb2Z0d2FyZSBGb3VuZGF0aW9uO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ChkU3BhY2VJRCBzcGFjZT0wKSB7DQogICAgaWYgKF9pZCkgZEdl b21EZXN0cm95IChfaWQpOw0KICAgIF9pZCA9IGRDcmVhdGVHZW9tVHJhbnNmb3JtIChzcGFj ZSk7DQogIH0NCg0KICB2b2lkIHNldEdlb20gKGRHZW9tSUQgZ2VvbSkNCiAgICB7IGRHZW9t VHJhbnNmb3JtU2V0R2VvbSAoX2lkLCBnZW9tKTsgfQ0KICBkR2VvbUlEIGdldEdlb20oKSBj b25zdA0KICAgIHsgcmV0dXJuIGRHZW9tVHJhbnNmb3JtR2V0R2VvbSAoX2lkKTsgfQ0KDQog IHZvaWQgc2V0Q2xlYW51cCAoaW50IG1vZGUpDQogICAgeyBkR2VvbVRyYW5zZm9ybVNldENs ZWFudXAgKF9pZCxtb2RlKTsgfQ0KICBpbnQgZ2V0Q2xlYW51cCAoZEdlb21JRCBnKQ0KICAg IHsgcmV0dXJuIGRHZW9tVHJhbnNmb3JtR2V0Q2xlYW51cCAoX2lkKTsgfQ0KfTsNCg0KDQoj ZW5kaWYNCiNlbmRpZg0K --------------AE4A85DEE0EE67C92AD2D7AE-- From tetron at interreality.org Thu Nov 21 15:00:02 2002 From: tetron at interreality.org (Peter Amstutz) Date: Thu Nov 21 15:00:02 2002 Subject: [ODE] Faster ODE In-Reply-To: Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I haven't looked any of the code involved, but there is one possible explanation for it being faster on one CPU and slower on another :-) It sounds like a cache-size issue. If the Athlon has a bigger L1/L2 cache then the algorithm might be faster overall but if uses more instructions or space than the current algorithm it could be too big and incur a large cache-miss penalty on the Celeron (which if I recall correctly was given a really wimpy L1/L2 cache to keep costs down). Such are the joys of modern CPU architechtures... There's been some work on "cache-oblivious" algorithms, which is essentially a technique of designing the algorithm to work on small, localized and usually recursive subsets of the total problem (this is especially useful for divide-and-conquor algorithms) so that once you have a subproblem which fits in cache, solving that subproblem is efficient without having to know a priori the size of the processor cache. Just something to think about -- as I said, I haven't looked at the code involved so I could completely off base :-) On Thu, 21 Nov 2002, Daniel Duhprey wrote: > On Thu, 21 Nov 2002, Henri Hakl wrote: > > -->Please check the accuracy and speed using the testsuite provided with ODE. > > If I'm using the numbers from the test_ldlt correctly (as a raw time on > some scale) then on my athlon its about 38% faster and on my celeron its > roughly twice as slow :). [ Peter Amstutz ][ amstutz@cs.umass.edu ][ tetron@interreality.org ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE93VdXaeHUyhjCHfcRAiRMAJ9DdwekLZIYJk0n/fAjtcd3aDG0vACfRze6 mcOSJYkj8/NzQXeW/qoia+k= =SJZQ -----END PGP SIGNATURE----- From martin at metahuman.org Thu Nov 21 17:12:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 21 17:12:02 2002 Subject: [ODE] eliminating all state Message-ID: <3DDD760D.CE7EF366@metahuman.org> Hey, So I'm evolving little virtual creatures with ODE, and after the evolution is done, I take the best ones and "play them back" with graphics and logging and other fun stuff. What I'd really like is for the simulation to go through exactly the same calculations with exactly the same roundoff errors, but at the moment there are small differences that creep up over time. Russ, you mentioned that ODE uses the correction at one timestep to estimate the size of the correction at the next timestep. Is there any way I can reset this between evaluations? Is there anywhere else state is stored? For the curious: I'm currently using the debug build with -ffloat-store, and using exactly the same executable in both cases, so it's guaranteed to have exactly the same compiler options, etc... Thanks, Martin From russ at q12.org Thu Nov 21 17:25:02 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 21 17:25:02 2002 Subject: [ODE] eliminating all state In-Reply-To: <3DDD760D.CE7EF366@metahuman.org> Message-ID: > Russ, you mentioned that ODE uses the correction at one timestep to > estimate the size of the correction at the next timestep. Is there any > way I can reset this between evaluations? Is there anywhere else state is > stored? i hope i didn't mention this, because its not true. each time step is completely independent from the last ... the only information that flows between time steps is the position, orientation and linear/angular velocity of the bodies. but of course all the ODE parameters will have effects that spread throughout time precisely because they affect the positions/velocities. if you're trying to reproduce exact behavior, there's one thing to watch out for when saving and restoring state: save and restore the quaternion, not the rotation matrix, as R is generated from Q not the other way around. saving and restoring R will result in some least-significants-bits errors in the restored state. russ. -- Russ Smith http://www.q12.org/ From martin at metahuman.org Thu Nov 21 18:27:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 21 18:27:02 2002 Subject: [ODE] eliminating all state References: Message-ID: <3DDD87C0.2E18DE49@metahuman.org> Russ Smith wrote: > > > Russ, you mentioned that ODE uses the correction at one timestep to > > estimate the size of the correction at the next timestep. Is there any > > way I can reset this between evaluations? Is there anywhere else state is > > stored? > > i hope i didn't mention this, because its not true. Sorry, I must be confused. But wasn't there some issue with radically changing the size of the time step? e.g. going from 0.01 sec to 1.0 sec or vice versa? - Martin From nnevatie at welho.com Thu Nov 21 22:16:01 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Thu Nov 21 22:16:01 2002 Subject: [ODE] Faster ODE References: Message-ID: <000f01c291e6$2f741ec0$3abdf3d5@wli> I benchmarked 'test_ldlt', here are the results. Configuration: - AMD Athlon TB 800MHz, 384MB RAM, Windows XP - ODE 0.03 built with Borland C++ Builder 6.0 (all optimizations on) Test: - ODE was built including first the original 'fastldlt.c' and then 'fastldlt_henri.c' - test_ldlt was on executed using all available parameters (f, s, t) Results: with 'fastldlt.c': ---- 3449 error = 1.625478e-03, size = 71 error = 2.011657e-04, size = 79 error = 4.785806e-04, size = 83 error = 5.344188e-02, size = 89 error = 3.189385e-03, size = 97 error = 2.305180e-03, size = 101 75 error = 4.673339e-04, size = 71 error = 2.476573e-04, size = 73 error = 1.307763e-03, size = 79 error = 1.248479e-03, size = 83 error = 1.030391e-02, size = 89 error = 1.046956e-03, size = 97 error = 7.226467e-04, size = 101 89 ---- with 'fastldlt_henri.c': ---- 2046 error = 1.625478e-03, size = 71 error = 2.011657e-04, size = 79 error = 4.785806e-04, size = 83 error = 5.344188e-02, size = 89 error = 3.189385e-03, size = 97 error = 2.305180e-03, size = 101 75 error = 4.673339e-04, size = 71 error = 2.476573e-04, size = 73 error = 1.307763e-03, size = 79 error = 1.248479e-03, size = 83 error = 1.030391e-02, size = 89 error = 1.046956e-03, size = 97 error = 7.226467e-04, size = 101 89 ---- Conclusions: - The outputs of the tests are identical. - 'fastldlt_henri.c' consumed ~59% of the time taken by 'fastldlt.c', on the described test configuration. - As mentioned earlier, the results may vary depending on the CPU and cache types. Cheers ----- Original Message ----- From: "Peter Amstutz" To: "Daniel Duhprey" Cc: Sent: Thursday, November 21, 2002 11:59 PM Subject: Re: [ODE] Faster ODE > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I haven't looked any of the code involved, but there is one possible > explanation for it being faster on one CPU and slower on another :-) It > sounds like a cache-size issue. If the Athlon has a bigger L1/L2 cache > then the algorithm might be faster overall but if uses more instructions > or space than the current algorithm it could be too big and incur a large > cache-miss penalty on the Celeron (which if I recall correctly was given a > really wimpy L1/L2 cache to keep costs down). Such are the joys of modern > CPU architechtures... There's been some work on "cache-oblivious" > algorithms, which is essentially a technique of designing the algorithm to > work on small, localized and usually recursive subsets of the total > problem (this is especially useful for divide-and-conquor algorithms) so > that once you have a subproblem which fits in cache, solving that > subproblem is efficient without having to know a priori the size of the > processor cache. > > Just something to think about -- as I said, I haven't looked at the code > involved so I could completely off base :-) > > On Thu, 21 Nov 2002, Daniel Duhprey wrote: > > > On Thu, 21 Nov 2002, Henri Hakl wrote: > > > > -->Please check the accuracy and speed using the testsuite provided with ODE. > > > > If I'm using the numbers from the test_ldlt correctly (as a raw time on > > some scale) then on my athlon its about 38% faster and on my celeron its > > roughly twice as slow :). > > [ Peter Amstutz ][ amstutz@cs.umass.edu ][ tetron@interreality.org ] > [Lead Programmer][Interreality Project][Virtual Reality for the Internet] > [ VOS: Next Generation Internet Communication][ http://interreality.org ] > [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.7 (GNU/Linux) > > iD8DBQE93VdXaeHUyhjCHfcRAiRMAJ9DdwekLZIYJk0n/fAjtcd3aDG0vACfRze6 > mcOSJYkj8/NzQXeW/qoia+k= > =SJZQ > -----END PGP SIGNATURE----- > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From chris.campbell at l8tech.com Thu Nov 21 22:55:02 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Thu Nov 21 22:55:02 2002 Subject: [ODE] eliminating all state Message-ID: > is done, I take the best ones and "play them back" with graphics and > logging and other fun stuff. What I'd really like is for the > simulation > to go through exactly the same calculations with exactly the > same roundoff > errors, but at the moment there are small differences that > creep up over > time. Russ, you mentioned that ODE uses the correction at Using fixed timestep? I am making a racing game using ODE for physics which records only keyboard and mouse inputs to make a replay. That is, to play the replay the entire simulation is recalculated. Initially I was a little worried that error might creep in after a while but after a LONG time experimenting I convinced myself that there was no state held by ODE, and that the idea should work. It does, but only with fixed timestep. Also, a recording made with the debug binary will not replay properly with the release binary and vice versa. Another thing which seems to be necessary is that the cpu should conform to IEEE floating point standards in order for replays to work deterministically on a different computer. ChrisC From dmcclurg at pandemicstudios.com.au Thu Nov 21 23:13:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 21 23:13:02 2002 Subject: [ODE] is ball and socket joint anchor relative to body1? Message-ID: >From the docs... --- void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z); Set the joint anchor point. --- it's not clear to me what coordinate frame the anchor point is in... --- For the parameter getting functions, if the system is out of alignment (i.e. there is some joint error) then the anchor/axis values will be correct with respect to body 1 only (or body 2 if you specified body 1 as zero in the dJointAttach() function). The default anchor for all joints is (0,0,0). The default axis for all joints is (1,0,0). --- does this mean the anchor point is relative to body1 ? From dmcclurg at pandemicstudios.com.au Thu Nov 21 23:53:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 21 23:53:02 2002 Subject: [ODE] stress testing and box stacking instability Message-ID: This is a multi-part message in MIME format. ------_=_NextPart_001_01C291F3.A8E1CEDE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm trying to use stacked boxes in my game and I ran into the box = stacking instability mentioned previously on this list. That got me to = reading the Gamasutra article "Product Review of Physics Engines, Part = One: The Stress Tests" and I thought it might be useful to put together = the stress test suite for ODE. It was easy to get tests 1-6 coded and the only one that did badly was = Test 2: "A slightly larger cube is dropped on a smaller cube. This was = a variation on the first test in that the difference between the cubes' = sizes was much smaller. This test was meant to be a "gimme" and should = just work." Expected result: cubes should drop straight on top of each = other and come to immediate rest. I attached a modified test_boxstack.cpp which shows what happens. The = top box dances around for a long time and eventually falls off the top = box. In Havok, i think they might be freezing/sleeping boxes in this = situation. Does the solution lie in proper detection of this situation = or in better contact generation? <>=20 ------_=_NextPart_001_01C291F3.A8E1CEDE Content-Type: application/octet-stream; name="test_boxstack.cpp" Content-Transfer-Encoding: base64 Content-Description: test_boxstack.cpp Content-Disposition: attachment; filename="test_boxstack.cpp" LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioNCiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNCiogT3BlbiBEeW5hbWljcyBFbmdp bmUsIENvcHlyaWdodCAoQykgMjAwMSwyMDAyIFJ1c3NlbGwgTC4gU21pdGguICAgICAgICoNCiog QWxsIHJpZ2h0cyByZXNlcnZlZC4gIEVtYWlsOiBydXNzQHExMi5vcmcgICBXZWI6IHd3dy5xMTIu b3JnICAgICAgICAgICoNCiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNCiogVGhpcyBsaWJyYXJ5IGlzIGZyZWUg c29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciAgICAgICAgICoNCiogbW9k aWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiBFSVRIRVI6ICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICoNCiogICAoMSkgVGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5z ZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgICoNCiogICAgICAgU29mdHdhcmUgRm91bmRhdGlv bjsgZWl0aGVyIHZlcnNpb24gMi4xIG9mIHRoZSBMaWNlbnNlLCBvciAoYXQgICoNCiogICAgICAg eW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiBUaGUgdGV4dCBvZiB0aGUgR05VIExlc3Nl ciAgICAgICoNCiogICAgICAgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBpcyBpbmNsdWRlZCB3aXRo IHRoaXMgbGlicmFyeSBpbiB0aGUgICAgICoNCiogICAgICAgZmlsZSBMSUNFTlNFLlRYVC4gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNCiogICAoMikgVGhl IEJTRC1zdHlsZSBsaWNlbnNlIHRoYXQgaXMgaW5jbHVkZWQgd2l0aCB0aGlzIGxpYnJhcnkgaW4g ICAgICoNCiogICAgICAgdGhlIGZpbGUgTElDRU5TRS1CU0QuVFhULiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICoNCiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNCiogVGhpcyBsaWJyYXJ5 IGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAg ICoNCiogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZO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3BhY2VDcmVhdGUgKDApOw0KICBjb250YWN0Z3JvdXAg PSBkSm9pbnRHcm91cENyZWF0ZSAoMCk7DQogIGRXb3JsZFNldEdyYXZpdHkgKHdvcmxkLDAsMCwt OS44Zik7DQogIGRXb3JsZFNldENGTSAod29ybGQsMWUtNSk7DQogIGRDcmVhdGVQbGFuZSAoc3Bh Y2UsMCwwLDEsMCk7DQogIG1lbXNldCAob2JqLDAsc2l6ZW9mKG9iaikpOw0KDQogIGNvbW1hbmQg KCdyJyk7DQoNCiAgLy8gcnVuIHNpbXVsYXRpb24NCiAgZHNTaW11bGF0aW9uTG9vcCAoYXJnYyxh cmd2LDM1MiwyODgsJmZuKTsNCg0KICBkSm9pbnRHcm91cERlc3Ryb3kgKGNvbnRhY3Rncm91cCk7 DQogIGRTcGFjZURlc3Ryb3kgKHNwYWNlKTsNCiAgZFdvcmxkRGVzdHJveSAod29ybGQpOw0KDQog IHJldHVybiAwOw0KfQ0K ------_=_NextPart_001_01C291F3.A8E1CEDE-- From Nguyen Binh Fri Nov 22 01:23:02 2002 From: Nguyen Binh (Nguyen Binh) Date: Fri Nov 22 01:23:02 2002 Subject: Re[2]: [ODE] Faster ODE In-Reply-To: <000f01c291e6$2f741ec0$3abdf3d5@wli> References: <000f01c291e6$2f741ec0$3abdf3d5@wli> Message-ID: <9822448108.20021122151447@glassegg.com> For me, P III 550 Mhz , XP SP1 ,VS.NET Latest CVS source. Optimize all enable. --------- Use Henri's code : 23805 error = 1.625478e-003, size = 71 error = 2.011657e-004, size = 79 error = 4.785806e-004, size = 83 error = 5.344188e-002, size = 89 error = 3.189385e-003, size = 97 error = 2.305180e-003, size = 101 485 error = 4.673339e-004, size = 71 error = 2.476573e-004, size = 73 error = 1.307763e-003, size = 79 error = 1.248479e-003, size = 83 error = 1.030391e-002, size = 89 error = 1.046956e-003, size = 97 error = 7.226467e-004, size = 101 707 --------- Original code: 23804 error = 1.625478e-003, size = 71 error = 2.011657e-004, size = 79 error = 4.785806e-004, size = 83 error = 5.344188e-002, size = 89 error = 3.189385e-003, size = 97 error = 2.305180e-003, size = 101 485 error = 4.673339e-004, size = 71 error = 2.476573e-004, size = 73 error = 1.307763e-003, size = 79 error = 1.248479e-003, size = 83 error = 1.030391e-002, size = 89 error = 1.046956e-003, size = 97 error = 7.226467e-004, size = 101 707 ------------- My conclusion : + Both exactly the same for my case. Hey Niko! Are you sure about your result? I see your PC run 10 times faster than mine. ( :-( ) . Nguyen Binh From nlin at nlin.net Fri Nov 22 03:15:02 2002 From: nlin at nlin.net (nlin@nlin.net) Date: Fri Nov 22 03:15:02 2002 Subject: ODE Debug behaves differently than ODE release (was Re: [ODE] eliminating all state) Message-ID: <20021122114259.GA29965@nlin.net> On Fri, Nov 22, 2002 at 03:02:44PM +0900, Chris Campbell wrote: > Also, a recording made with the debug binary will not replay > properly with the release binary and vice versa. Recently I have been investigating exactly this determinism problem and have come to the same conclusion as Chris: ODE's behavior can be deterministically reproduced with a fixed timestep, but the debug and release versions act differently. This is somewhat unsettling for me. I am reasonably certain that is is ODE itself which is behaving differently in debug and release modes, not my application. I don't have time to investigate this in detail now, but I wanted to add a second confirmation to Chris's: ODE debug behaves differently than ODE release. One more note which may provide a clue as to the source of the discrepancy. My app access ODE through custom wrapper classes (in file1.cpp), and I also declared a custom collision space (in file2.cpp). If I compile my entire app in debug mode, but compile file1.cpp and file2.cpp in release mode and link the app with the release ODE lib, then behavior of the entire debug app is identical with the behavior of the release app. If I compile file1.cpp in debug mode, OR compile file2.cpp in debug mode, OR link with the ODE debug library, then divergent behavior results. That merely recompiling my *interface* class to ODE causes divergent behavior seems to indicate this may be a data alignment, calling convention, or other subtle compiler flag issue. This is on MSVC 6. If I recall correctly, I believe that even the ODE demos acted differently in debug and release modes, so anyone wishing to reproduce this divergent behavior should be able to do so easily. -Norman From nlin at nlin.net Fri Nov 22 03:35:02 2002 From: nlin at nlin.net (nlin@nlin.net) Date: Fri Nov 22 03:35:02 2002 Subject: [ODE] eliminating all state Message-ID: <20021122120304.GA30898@nlin.net> On Thu, Nov 21, 2002 at 05:24:02PM -0700, Russ Smith wrote: > > Russ, you mentioned that ODE uses the correction at one timestep to > > estimate the size of the correction at the next timestep. Is there any > > way I can reset this between evaluations? Is there anywhere else state is > > stored? > > i hope i didn't mention this, because its not true. each time step is > completely independent from the last ... the only information that flows > between time steps is the position, orientation and linear/angular > velocity of the bodies. but of course all the ODE parameters will have > effects that spread throughout time precisely because they affect the > positions/velocities. Russ, The message from which you are being indirectly quoted is: http://q12.org/pipermail/ode/2002-April/001107.html The relevant passage: On Wed, Apr 10, 2002, Russ Smith wrote: > in the small-large > timestep case it fails, because the velocity correction is timestep > dependent (i.e. the small velocity correction calculated during the > small timestep becomes a much-too-large correction during the large > timestep). there is a good fix for this problem, which i will > eventually add to ODE (as time permits). there'll be a dWorld switch > to turn it on, as there is a slight performance cost. Has the "fix" mentioned above been implemented? What is the idea behind the fix? -Norman From p.terdiman at wanadoo.fr Fri Nov 22 03:57:01 2002 From: p.terdiman at wanadoo.fr (Pierre Terdiman) Date: Fri Nov 22 03:57:01 2002 Subject: ODE Debug behaves differently than ODE release (was Re: [ODE] eliminating all state) References: <20021122114259.GA29965@nlin.net> Message-ID: <00cb01c29215$84b94ca0$0e00000a@pierre> > This is somewhat unsettling for me. I am reasonably certain that is is > ODE itself which is behaving differently in debug and release modes, > not my application. I don't have time to investigate this in detail > now, but I wanted to add a second confirmation to Chris's: ODE debug > behaves differently than ODE release. Well, that's normal. Due to limited FPU precision,simply reordering some operations can produce slightly different results (and reordering happens a lot when the compiler optimizes the code, of course). Also, something like this : a = b / 2.0f; ...can be compiled with the divide in Debug mode, but actually be transformed into : a = b * 0.5f; ...in Release. Producing different results, that can add up quickly in a physics engine. You can try the following compiler option on VC++ : Project Settings -> C/C++ -> Optimizations ->Improve float consistency Sometimes it helps. But in some cases it can be very hard to get the exact same behaviours in Debug & Release. There was a Gamasutra article explaining related problems, when you try to record an animation and replay it in the same exact way. That's surprisingly difficult. Pierre From chris.campbell at l8tech.com Fri Nov 22 03:57:41 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Fri Nov 22 03:57:41 2002 Subject: [ODE] Debug vs Release floating point (MSVC) Message-ID: Hi Norman, > This is somewhat unsettling for me. I am reasonably certain that is is > ODE itself which is behaving differently in debug and release modes, Nah... I'm pretty sure it is to do with the optimizations (for speed) that occur when building for release. In release build floating point exceptions are not checked for, internal representation of the number is different etc - I don't really know the details. If you are using doubles, this might be relevant too: http://support.microsoft.com/default.aspx?scid=KB;en-us;q217033 > convention, or other subtle compiler flag issue. Apparently the /Op switch is supposed to stop optimizations in the release build as well, but whether you want to do that is the question isn't it... ChrisC From henri at cs.sun.ac.za Fri Nov 22 06:34:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Fri Nov 22 06:34:02 2002 Subject: [ODE] Faster ODE References: <000f01c291e6$2f741ec0$3abdf3d5@wli> Message-ID: <006b01c2922b$ec499710$45d4e892@temple> hmmm... the results are quite interesting. I can understand that in the case of Nguyen Binh there is no difference in resultant speed. This is likely to be due to the compiler that is in that case intelligent enough to produce all the optimizations I've set to it. In essence I just realized that there are alot of code redundancies that aren't guaranteed to be compiled away with optimal efficiency by most compilers. VS.NET has a pretty thorough compiler as far as I understand... ;) I have no idea why the Celeron results should be slower - but the 38-59% speed improvement by Niko and Daniel are what I expect from average systems. I'm quite happy with the results upto now then... ;) Henri ----- Original Message ----- From: "Niko Nevatie" To: Sent: Friday, November 22, 2002 7:15 AM Subject: Re: [ODE] Faster ODE > I benchmarked 'test_ldlt', here are the results. > > Configuration: > - AMD Athlon TB 800MHz, 384MB RAM, Windows XP > - ODE 0.03 built with Borland C++ Builder 6.0 (all optimizations on) > > Test: > - ODE was built including first the original 'fastldlt.c' and then > 'fastldlt_henri.c' > - test_ldlt was on executed using all available parameters (f, s, t) > > Results: > > with 'fastldlt.c': > ---- > 3449 > > error = 1.625478e-03, size = 71 > error = 2.011657e-04, size = 79 > error = 4.785806e-04, size = 83 > error = 5.344188e-02, size = 89 > error = 3.189385e-03, size = 97 > error = 2.305180e-03, size = 101 > 75 > > error = 4.673339e-04, size = 71 > error = 2.476573e-04, size = 73 > error = 1.307763e-03, size = 79 > error = 1.248479e-03, size = 83 > error = 1.030391e-02, size = 89 > error = 1.046956e-03, size = 97 > error = 7.226467e-04, size = 101 > 89 > ---- > > > with 'fastldlt_henri.c': > ---- > 2046 > > error = 1.625478e-03, size = 71 > error = 2.011657e-04, size = 79 > error = 4.785806e-04, size = 83 > error = 5.344188e-02, size = 89 > error = 3.189385e-03, size = 97 > error = 2.305180e-03, size = 101 > 75 > > error = 4.673339e-04, size = 71 > error = 2.476573e-04, size = 73 > error = 1.307763e-03, size = 79 > error = 1.248479e-03, size = 83 > error = 1.030391e-02, size = 89 > error = 1.046956e-03, size = 97 > error = 7.226467e-04, size = 101 > 89 > ---- > > > Conclusions: > - The outputs of the tests are identical. > - 'fastldlt_henri.c' consumed ~59% of the time taken by 'fastldlt.c', on the > described test configuration. > - As mentioned earlier, the results may vary depending on the CPU and cache > types. > > > Cheers > > ----- Original Message ----- > From: "Peter Amstutz" > To: "Daniel Duhprey" > Cc: > Sent: Thursday, November 21, 2002 11:59 PM > Subject: Re: [ODE] Faster ODE > > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > I haven't looked any of the code involved, but there is one possible > > explanation for it being faster on one CPU and slower on another :-) It > > sounds like a cache-size issue. If the Athlon has a bigger L1/L2 cache > > then the algorithm might be faster overall but if uses more instructions > > or space than the current algorithm it could be too big and incur a large > > cache-miss penalty on the Celeron (which if I recall correctly was given a > > really wimpy L1/L2 cache to keep costs down). Such are the joys of modern > > CPU architechtures... There's been some work on "cache-oblivious" > > algorithms, which is essentially a technique of designing the algorithm to > > work on small, localized and usually recursive subsets of the total > > problem (this is especially useful for divide-and-conquor algorithms) so > > that once you have a subproblem which fits in cache, solving that > > subproblem is efficient without having to know a priori the size of the > > processor cache. > > > > Just something to think about -- as I said, I haven't looked at the code > > involved so I could completely off base :-) > > > > On Thu, 21 Nov 2002, Daniel Duhprey wrote: > > > > > On Thu, 21 Nov 2002, Henri Hakl wrote: > > > > > > -->Please check the accuracy and speed using the testsuite provided with > ODE. > > > > > > If I'm using the numbers from the test_ldlt correctly (as a raw time on > > > some scale) then on my athlon its about 38% faster and on my celeron its > > > roughly twice as slow :). > > > > [ Peter Amstutz ][ amstutz@cs.umass.edu ][ etron@interreality.org ] > > [Lead Programmer][Interreality Project][Virtual Reality for the Internet] > > [ VOS: Next Generation Internet Communication][ http://interreality.org ] > > [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.0.7 (GNU/Linux) > > > > iD8DBQE93VdXaeHUyhjCHfcRAiRMAJ9DdwekLZIYJk0n/fAjtcd3aDG0vACfRze6 > > mcOSJYkj8/NzQXeW/qoia+k= > > =SJZQ > > -----END PGP SIGNATURE----- > > > > > > _______________________________________________ > > ODE mailing list > > ODE@q12.org > > http://q12.org/mailman/listinfo/ode > > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From martin at metahuman.org Fri Nov 22 09:47:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Fri Nov 22 09:47:01 2002 Subject: [ODE] eliminating all state References: <20021122120304.GA30898@nlin.net> Message-ID: <3DDE5F39.FFA325DC@metahuman.org> > The message from which you are being indirectly quoted is: > > http://q12.org/pipermail/ode/2002-April/001107.html Thanks Norman, I see where he says it's only positions and velocities. For those who are curious, I found the source of the problem: when I was printing out my doubles, I was only printing DBL_DIG many digits (= 15). It turns out, I need to print out 17 digits to be sure the values when read in are exactly the same as before. Thanks, Martin From jeffrey.palmer at acm.org Fri Nov 22 11:07:02 2002 From: jeffrey.palmer at acm.org (Jeffrey Palmer) Date: Fri Nov 22 11:07:02 2002 Subject: [ODE] Faster ODE In-Reply-To: <006b01c2922b$ec499710$45d4e892@temple> References: <000f01c291e6$2f741ec0$3abdf3d5@wli> <006b01c2922b$ec499710$45d4e892@temple> Message-ID: <200211221206.28464.jeffrey.palmer@acm.org> Hello all, I just thought I'd throw out a couple of references I've found useful while developing highly-efficient C++ code (I apologize if these have been brought up before): 1) Blitz++ (http://www.oonumerics.org/blitz) - A template-based C++ library for highly-efficient numerical development. Uses template-metaprogramming to produce code as fast or faster than FORTRAN, while maintaining an intuitive user model. 2) FFTW - The Fastest Fourier Transform in the West (http://www.fftw.org) - Although perhaps not directly applicable to ODE, their approach is a very interesting one if you're *really* concerned about cranking out performance on whatever platform you're running on. I only point these out because we're at a point where it's becoming increasingly difficult to implement a "correct" solution that is highly performant on all possible platforms. So, rather than search for the Holy Grail, these approaches can help to determine an approach that provides the best performance/platform tradeoff. Hope this helps/is interesting, - j -- The river is moving. The blackbird must be flying. From Sergei Eliseev Fri Nov 22 12:30:02 2002 From: Sergei Eliseev (Sergei Eliseev) Date: Fri Nov 22 12:30:02 2002 Subject: [ODE] Can't compile ODE :( Message-ID: <2620020157.20021122223434@cea.ru> Hello, Just downloaded latest ODE source via WinCVS and make.exe from this site, created file config/user-settings for msvc, but can't compile it. I always get the same error: make (e=2): The system cannot find the file specified. make.exe: *** [configurator.exe] Error 2 Moreover when I downloaded ready .lib, under VC++ 6.0 I always get another error during linking: ode.lib(misc.obj) : error LNK2001: unresolved external symbol __ftol2 How can avoid these nasty errors? Any help really appreciated. Best regards, Sergei mailto:sergey_eu@cea.ru From russ at q12.org Fri Nov 22 13:48:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 13:48:02 2002 Subject: [ODE] eliminating all state In-Reply-To: <3DDD81EB.9D7E5C55@metahuman.org> Message-ID: > Sorry, I must be confused. But wasn't there some issue with radically > changing the size of the time step? e.g. going from 0.01 sec to 1.0 sec > or vice versa? yes ... the issue is that the error correcting velocity would be artificially magnified when switching from a small to large time step (e.g. *10). this issue is on the fix-list. russ. -- Russ Smith http://www.q12.org/ From anselm at hook.org Fri Nov 22 14:41:01 2002 From: anselm at hook.org (Anselm Hook) Date: Fri Nov 22 14:41:01 2002 Subject: [ODE] stress testing and box stacking instability In-Reply-To: Message-ID: Hi Dave, I thought everybody knew about this defect by now? It's something that Russ has said he's going to fix for the next big release. If the bug hasn't changed then basically it is just that not enough contacts are being generated between two box surfaces - there needs to be at least 3 but there is only 1 right now. - a On Fri, 22 Nov 2002, David McClurg wrote: > I'm trying to use stacked boxes in my game and I ran into the box > stacking instability mentioned previously on this list. That got me > to reading the Gamasutra article "Product Review of Physics Engines, > Part One: The Stress Tests" and I thought it might be useful to put > together the stress test suite for ODE. > > It was easy to get tests 1-6 coded and the only one that did badly was > Test 2: "A slightly larger cube is dropped on a smaller cube. This > was a variation on the first test in that the difference between the > cubes' sizes was much smaller. This test was meant to be a "gimme" > and should just work." Expected result: cubes should drop straight on > top of each other and come to immediate rest. > > I attached a modified test_boxstack.cpp which shows what happens. The top box dances around for a long time and eventually falls off the top box. In Havok, i think they might be freezing/sleeping boxes in this situation. Does the solution lie in proper detection of this situation or in better contact generation? > <> > From russ at q12.org Fri Nov 22 15:05:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 15:05:02 2002 Subject: [ODE] Faster ODE In-Reply-To: <200211221206.28464.jeffrey.palmer@acm.org> Message-ID: > 1) Blitz++ (http://www.oonumerics.org/blitz) > 2) FFTW - The Fastest Fourier Transform in the West i have used blitz and have found their approach to be more clever than it is productive. the template meta-program idea results in exceptionally long compile times, and not all compilers have the right optimization strategies to take advantage of the generated code. gcc, for example, does not seem to do terribly well at optimizing away the numerous stack-based parameter-passing temporaries that such code generates. i considered blitz for ODE but gave up on it in favour of explicitly written for-loops and hand unrolling because (a) blitz is slower, (b) blitz increases the compile time hugely, (c) blitz syntax sometimes obscures the actual numerical operations that are being performed - and i like things to be obvious and out in the open. FFTW is new to me, thanks for the pointer. there's also ATLAS, http://math-atlas.sourceforge.net/ ODE's factorizer is generated using an ATLAS-like parameter-finding approach (look in the fbuild directory). that's why the fast-ldlt code looks really complicated when the same thing could be implemented using 3 for-loops in about 20 lines of code. ideally the build process for ODE should involve running the fbuild code to get the fastest factorizer on your platform. the 'default' fastldlt etc code is just what happens to work best on whatever platform i ran fbuild on. note that this default code should still be significantly faster than the 3 for-loops approach on all platforms (for matrices of greater than say 5x5 ?). russ. -- Russ Smith http://www.q12.org/ From kale at sagan.usc.edu Fri Nov 22 15:13:02 2002 From: kale at sagan.usc.edu (Kale Harbick) Date: Fri Nov 22 15:13:02 2002 Subject: [ODE] Vortex vs. ODE Message-ID: I started using MathEngine's dynamics toolkit in 2000, and continued with Vortex when they split up. It's time to renew our academic license but the price was increased a lot, so we're reluctant. I'm investigating alternatives and heard about ODE. I was hoping someone here could compare Vortex and ODE. My application is a simulation of a dynamically-stable hopping robot. Other people in my group are working on humanoid robot simulations. Accuracy is more important to me than speed, as it eases the migration of controllers from simulation to the physical robot. thanks very much Kale Harbick USC Robotics Lab From russ at q12.org Fri Nov 22 15:39:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 15:39:02 2002 Subject: [ODE] Vortex vs. ODE In-Reply-To: Message-ID: > Accuracy is more important to me than speed, as it eases the > migration of controllers from simulation to the physical robot. vortex and ODE both use 1st-order accurate implicit integrators. vortex may have a more accurate model of single-rigid-body tumbling, but this is probably not too relevant for robotics work. in my own experience, robot simulator accuracy is rather difficult to achieve because every piece must be accurate before the whole thing is ... not only the integrator but the friction models, the actuator models (hydraulics anyone? pneumatics?), the sensor models, etc. even getting accurate inertia tensors is tricky for lab robots that sometimes are sticky-taped together instead of being bolted. personally, i wouldn't worry about the numerical accuracy of my simulator unless i had all these other things sorted out. russ. -- Russ Smith http://www.q12.org/ From vbz at cs.ucr.edu Fri Nov 22 21:18:01 2002 From: vbz at cs.ucr.edu (Victor Zordan) Date: Fri Nov 22 21:18:01 2002 Subject: [ODE] joint torques Message-ID: <20021123031114.99CAF25A83@snap.cs.ucr.edu> Hello. Comment and a question... In regards to 11/21 USC comments, I too found vortex to be too expensive. Plus, I prefer having the code open and available for reading... (thanks Russ for that.) Also, I've played with Vortex and their contact models were not to my liking... I asked them if they would let me set up my own ground constraints and got a negative response, saying that was in a part of the program that was closed to the users. In a development environment, like mine or USC's, you want to be able to change as much as possible... Now, I have looked thru the archives and saw my question asked by Jon Klein back in June but I didn't find a reply to his question, so I figure I'll repeat the question. I too am trying to apply torques about joints and I built a controller that applied both torque at the body center and a computed force as an equivalent to applying a joint torque. The joint controller appears to move the body in the correct way, but I somehow don't think I am computing things properly b/c some unnatural forces appear at times and cause the body to spin out of control. The bottom-line question: is there a way in ODE to apply torques relative to a point on a body (the joint center), just as you would apply a force at a particular point? Or am I making this too difficult... Thanks much, Victor From russ at q12.org Fri Nov 22 21:25:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 21:25:02 2002 Subject: [ODE] joint torques In-Reply-To: <20021123031114.99CAF25A83@snap.cs.ucr.edu> References: <20021123031114.99CAF25A83@snap.cs.ucr.edu> Message-ID: <20021122202930.3a0a3adc.russ@q12.org> > is there a way in ODE to apply torques relative to a point on a body > (the joint center), just as you would apply a force at a particular > point? physics fact: any torque applied to a body will have the same effect on that body's motion regardless of the point at which it is applied, so there's no reason to specify a position in the dBodyAdd[Rel]Torque() functions. russ. -- Russell Smith http://www.q12.org From mama7121 at student.uu.se Sat Nov 23 05:43:02 2002 From: mama7121 at student.uu.se (Martin Magnusson) Date: Sat Nov 23 05:43:02 2002 Subject: [ODE] Robotics simulation Message-ID: <3DDF77B8.6080804@student.uu.se> Hello everybody. I'm new to this list and thought I'd say hi... Max Lungarella wrote: > my plan is to simulate a humanoid robot with a reduced number of degrees of > freedom, let's say 10. the simulation would have to be fairly accurate, since > i'd like to develop the control architecture in software and use this very > architecture for the control of a real robot in a second time step. That sounds very much like my project. I'm doing my master's thesis on reinforcement learning for balancing a humaoid robot, and I'm looking for a simulation environment to test my algorithms with. How has it turned out for you? Are you happy with ODE? Is Dymamechs any better? / Martin Magnusson From marinescuiulian at yahoo.com Sat Nov 23 06:56:02 2002 From: marinescuiulian at yahoo.com (Marinescu Iulian) Date: Sat Nov 23 06:56:02 2002 Subject: [ODE] Could I simulate a car with ODE ? Message-ID: <20021123135558.68015.qmail@web13007.mail.yahoo.com> --0-285632834-1038059758=:67118 Content-Type: text/plain; charset=us-ascii Hi to everyone! I am a complete beginner regarding ODE. But I would like to learn. I have to do this project of simulation of a car on different types of road, and different types of weather. I would have to input this: The dinamics of the car ( for wind simulation) Type of road ( with holes and stuff) The type tires Type of suspension The vibration of the engine And many other inputs that I didn't think of, yet. The question is if I could do a program, with ODE, to simulate this. Thank You !!! --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-285632834-1038059758=:67118 Content-Type: text/html; charset=us-ascii

Hi to everyone!

I am a complete beginner regarding ODE. But I would like to learn. I have to do this project of simulation of a car on different types of road, and different types of weather. I would have to input this:

  • The dinamics of the car ( for wind simulation)
  • Type of road ( with holes and stuff)
  • The type tires
  • Type of suspension
  • The vibration of the engine

And many other inputs that I didn't think of, yet. The question is if I could do a program, with ODE, to simulate this.

Thank You !!! 



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-285632834-1038059758=:67118-- From erwin at vo.com Sat Nov 23 06:59:01 2002 From: erwin at vo.com (Erwin de Vries) Date: Sat Nov 23 06:59:01 2002 Subject: [ODE] new ODE collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> Message-ID: <064201c292f8$55791ae0$73fefea9@athlon> > > - Should we add support for a user defined, or infinite AABB on demand > > for spaces? This is really useful for the quadtree space containing > > huge (10.000 for example) amounts of geoms. If i would remove a single > > geom it would need to do a lot of work. > > i don't understand this .. ? I'll explain my situation. In my app i have a lot of initially static scenery objects. I place these inside a quadtree space. Once upon a while the main player hits one (or more) of these objects. At this point i remove them from the quadtree, give them a body, and add them to my 'main space'. Now, as this quadtree essentially covers the whole game world i dont _need_ it to have a tight AABB since it is very large anyways. The point where i _require_ it NOT to have a tight AABB is when i change the structure of the quadtree (remove a geom). Imagine a 10.000 geom quadtree having to recompute its bounds. Even if it only involves recomputing the final aabb of 9999 cached and 1 new aabb, it still is a costly process that is essentially useless. Thats why i would like to add an option to spaces to simply return an infinite AABB instead of computing it. Hope this explains. I'm migrating to the new ODE collision detection today. Perhaps some other suggestions will come to my mind. Erwin From p.terdiman at wanadoo.fr Sat Nov 23 08:12:01 2002 From: p.terdiman at wanadoo.fr (Pierre Terdiman) Date: Sat Nov 23 08:12:01 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> Message-ID: <037501c29302$5bde2ce0$0e00000a@pierre> Hi, I was (finally) looking at Erwin's box-mesh collision today, when I noticed something weird : float DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - *ColTri.Vertices[0]); ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); Unless I'm missing something, the local variable DistSq is never used. On the other hand, ColTri.DistSq is used while probably not initialized. I guess the two lines should be : ColTri.DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - *ColTri.Vertices[0]); ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); ...unless, once again, I'm missing something. (I didn't trace it, I'm just browsing the CVS repository) There's also another version from Nolan Walker, based on Magic. Is this better / more recent ? (the question might already have been asked, but I can't remember the answer...) Pierre From facontidavide at hotmail.com Sat Nov 23 12:54:02 2002 From: facontidavide at hotmail.com (Edgard Oscuro) Date: Sat Nov 23 12:54:02 2002 Subject: [ODE] Robotics simulation Message-ID:

Hi!! I am Davide

>Max Lungarella wrote:

> > my plan is to simulate a humanoid robot with a reduced number of degrees of
> > freedom, let's say 10. the simulation would have to be fairly accurate, since
> > i'd like to develop the control architecture in software and use this very
> > architecture for the control of a real robot in a second time step.
>
>That sounds very much like my project. I'm doing my master's thesis on
>reinforcement learning for balancing a humaoid robot, and I'm looking
>for a simulation environment to test my algorithms with. How has it
>turned out for you? Are you happy with ODE? Is Dymamechs any better?
 
It seems that most of us is doing the same!!! As I said before I am going to simulate a humanoid robot as well (that soon we will build in real world). I will be grade to share (pretty soon) my results.
In this moment we are gonna use simulation to understand how strong motors must be (so that we can buy them!)
 
Davide


Comunica in un ’altra dimensione con MSN Extra Storage! Clicca qui From grubertm at hotmail.com Sat Nov 23 14:37:02 2002 From: grubertm at hotmail.com (Marco Grubert) Date: Sat Nov 23 14:37:02 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> <037501c29302$5bde2ce0$0e00000a@pierre> Message-ID: One thing about the Box-Tri collider I noticed is that it assumes the normal to be that of the triangle. This works fine for a box falling onto a triangle, but yields wrong results for a triangle falling onto a box. I am currently working on the tri-tri detection and pick the normal based on which object is moving and which one is static. This avoids some explosions but introduces other instabilities.. - Marco Grubert From coding at natew.com Sat Nov 23 21:26:02 2002 From: coding at natew.com (Nate W) Date: Sat Nov 23 21:26:02 2002 Subject: [ODE] is ball and socket joint anchor relative to body1? In-Reply-To: Message-ID: On Fri, 22 Nov 2002, David McClurg wrote: > void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z); > it's not clear to me what coordinate frame the anchor point is in... World coordinates. Or at least, I assumed world coordinates, and it works like I'd assumed it would, so I feel pretty good about that assumption. :-) -- Nate Waddoups Redmond WA USA http://www.natew.com From russ at q12.org Sun Nov 24 16:36:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 24 16:36:01 2002 Subject: [ODE] multiple box-box contacts Message-ID: <20021124154047.1ca8d686.russ@q12.org> i have just finished an update to the box-box contact generation code. now up to 8 contacts can be generated per box-box collision, although in practice a limit of 3 or 4 is more useful. the test_boxstack demo has been updated to show box stacking in action: press 'r' to drop boxes in a stack, then press b multiple times. press 't' to show the contact points that are generated. you can play with different numbers of contacts by changing the 3rd argument to dCollide() - the default is 4. note that you have to compile ODE *without* ODE_OLD_COLLISION in user-settings to get the new code. be careful in your own code to generate as few box-box contacts as you actually need, as each extra contact point will slow down the simulation some more. this new code contains a number of heuristics that should result in good contact choices - but these algorithms need some more real-world testing. please report any problems you come across. russ. -- Russell Smith http://www.q12.org From martin at metahuman.org Sun Nov 24 16:52:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Sun Nov 24 16:52:01 2002 Subject: [ODE] multiple box-box contacts References: <20021124154047.1ca8d686.russ@q12.org> Message-ID: <3DE165EB.9FC8D9A6@metahuman.org> Hey Russ, > i have just finished an update to the box-box contact generation code. Thanks, that rocks! Better box-box contacts is one of the major capabilities in the list for 0.035. It's been almost a year since 0.03 was released. Any idea when 0.035 will be out? Thanks again, Martin From dmcclurg at pandemicstudios.com.au Sun Nov 24 19:15:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Sun Nov 24 19:15:02 2002 Subject: [ODE] multiple box-box contacts Message-ID: very nice Russ! just a minor thing that my VC7 compiler doesn't like... collision_std.cpp collision_std.cpp(460) : error C2057: expected constant expression collision_std.cpp(460) : error C2466: cannot allocate an array of constant size 0 collision_std.cpp(460) : error C2133: 'avail' : unknown size if you could change int avail[n]; to int* avail = (int*)alloca(n*sizeof(int)); that would fix it. -----Original Message----- From: Russ Smith [mailto:russ@q12.org] Sent: Monday, 25 November 2002 6:41 AM To: ode@q12.org Subject: [ODE] multiple box-box contacts i have just finished an update to the box-box contact generation code. now up to 8 contacts can be generated per box-box collision, although in practice a limit of 3 or 4 is more useful. the test_boxstack demo has been updated to show box stacking in action: press 'r' to drop boxes in a stack, then press b multiple times. press 't' to show the contact points that are generated. you can play with different numbers of contacts by changing the 3rd argument to dCollide() - the default is 4. note that you have to compile ODE *without* ODE_OLD_COLLISION in user-settings to get the new code. be careful in your own code to generate as few box-box contacts as you actually need, as each extra contact point will slow down the simulation some more. this new code contains a number of heuristics that should result in good contact choices - but these algorithms need some more real-world testing. please report any problems you come across. russ. -- Russell Smith http://www.q12.org _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From russ at q12.org Sun Nov 24 19:58:02 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 24 19:58:02 2002 Subject: [ODE] multiple box-box contacts In-Reply-To: References: Message-ID: <20021124190259.4ef95df8.russ@q12.org> > if you could change > int avail[n]; ah yes ... this is now fixed. russ. -- Russell Smith http://www.q12.org From mal at candomultimedia.com Sun Nov 24 20:11:02 2002 From: mal at candomultimedia.com (Mal) Date: Sun Nov 24 20:11:02 2002 Subject: [ODE] OT: Physics based game beta... In-Reply-To: <20021124190259.4ef95df8.russ@q12.org> Message-ID: <000001c29430$209ac470$7600a8c0@MalLaptop> If any of you need a break from coding physics, check this out... http://www.candomultimedia.com/3dStressBall It's the beta of a new game we're developing in our spare time here at canDo, but it's quite fun already. It uses Shockwave 3D and Havok, but the basics could be implemented using any physics engine. You can post your levels to the new forum. The game will be modified a lot over the next 10 weeks or so. Enjoy, and if you like it, check this out too, it's an updated version of the Balls Up game that also uses Havok ( now 3D Balls Up, has a new novel mouse control, as well as joystick control, music, easier learning levels, feature removals ( bug fixes ) etc. http://www.candomultimedia.com/3dBallsUp As physics gurus it might be fun to get away from the compiler and get your hand to eye co-ordination back up to scratch! :) Mal From Nguyen Binh Sun Nov 24 23:08:02 2002 From: Nguyen Binh (Nguyen Binh) Date: Sun Nov 24 23:08:02 2002 Subject: Re[2]: [ODE] Faster ODE In-Reply-To: References: Message-ID: <130756758.20021125101120@glassegg.com> I think the best way to improve ODE speed is using CPU- specialized instructions like MMX,SIMD,SSE(2). The refs can be : http://LibSimd.sourceforge.net SML library of Intel. (Very nice!) -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media Me Linh Point Tower, 10th Floor 2 Ngo Duc Ke District 1, Ho Chi Minh City Vietnam Fax: (84.8)823-8392 www.glassegg.com --------------------------------------------------------------------- From Dominique at SavageSoftware.com.au Mon Nov 25 02:43:02 2002 From: Dominique at SavageSoftware.com.au (Dominique Louis) Date: Mon Nov 25 02:43:02 2002 Subject: [ODE] Silkworm... Message-ID: <3DE1F12E.6090306@SavageSoftware.com.au> Just thought others might be interested to know that todays ( 24th of November ) image of the day on FlipCode ( http://www.flipcode.com/iotd/ ) is an ODE demo called SilkWorm ( http://slickworm.sourceforge.net ). From tetron at interreality.org Mon Nov 25 11:25:02 2002 From: tetron at interreality.org (Peter Amstutz) Date: Mon Nov 25 11:25:02 2002 Subject: [ODE] multiple box-box contacts In-Reply-To: <20021124154047.1ca8d686.russ@q12.org> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Awesome! This is what I've been waiting for -- now I can use ODE for my VR simulation. Oh, and it's really fun to just play with the box stacking demo, to make a huge tower and then knock it down... Great work! Russ, you rule :-) It's amazing to have such excelent code freely available. On Sun, 24 Nov 2002, Russ Smith wrote: > > i have just finished an update to the box-box contact generation code. > now up to 8 contacts can be generated per box-box collision, although in > practice a limit of 3 or 4 is more useful. the test_boxstack demo has > been updated to show box stacking in action: press 'r' to drop boxes in > a stack, then press b multiple times. press 't' to show the contact > points that are generated. you can play with different numbers of > contacts by changing the 3rd argument to dCollide() - the default is 4. > > note that you have to compile ODE *without* ODE_OLD_COLLISION in > user-settings to get the new code. > > be careful in your own code to generate as few box-box contacts as you > actually need, as each extra contact point will slow down the simulation > some more. > > this new code contains a number of heuristics that should result in good > contact choices - but these algorithms need some more real-world > testing. please report any problems you come across. [ Peter Amstutz ][ amstutz@cs.umass.edu ][ tetron@interreality.org ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE94mrHaeHUyhjCHfcRApGmAJ0Rd0ssY0jsemvGVVaSDbqEW9YQbQCfTiWm 9pWajiZt1CU/KJjnff+AHk0= =Blf/ -----END PGP SIGNATURE----- From henri at cs.sun.ac.za Mon Nov 25 13:46:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Mon Nov 25 13:46:01 2002 Subject: Re[2]: [ODE] Faster ODE Message-ID: <032001c294c3$afa33ec0$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_031D_01C294D4.732027E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions for = ODE - and it is quite possible that it can bring about harmony and speed. But = one thing that is likely going to cause problems is the SSE(2) code. For optimal performance a number of details need to be implemented. = Vectors and matrices need to be of a horizontal size that is a factor of 4 (this = is implemented and the reason why, for example, a 3x3 matrix is defined as = a 12 TReal (3x4) structure. However, the structures also have to be aligned onto 16-byte boundaries. = To allow for optimal SSE(2) access (using movaps) each 128-bit memory = vector that is accessed has to be alligned on a 16-byte memory boundary. This = is a problem in ODE, as every math structure now is required to be 16-byte aligned; this is difficult to achieve because ODE calls/uses = sub-matrices of matrices, and it may be difficult to guarantee that every sub-matrix is >also< correctly 16-byte aligned. Additionally SSE2 primarily adds double-float functionality to the SIMD instructions. This can help somewhat for speed in the TReal =3D double = case, but isn't likely (just my guess) to have as tremendous a speed bonus as = 4 single floats that can be handled simultaneously for TReal =3D single. Anyway... ;) Henri ----- Original Message ----- From: "Nguyen Binh" To: ; "Russ Smith" Cc: "Jeffrey Palmer" ; Sent: Monday, November 25, 2002 5:11 AM Subject: Re[2]: [ODE] Faster ODE > > I think the best way to improve ODE speed is using CPU- > specialized instructions like MMX,SIMD,SSE(2). > > The refs can be : > http://LibSimd.sourceforge.net > SML library of Intel. (Very nice!) > > -- > Best regards, > > --------------------------------------------------------------------- > Nguyen Binh > Software Engineer > Glass Egg Digital Media > Me Linh Point Tower, 10th Floor > 2 Ngo Duc Ke > District 1, Ho Chi Minh City > Vietnam > Fax: (84.8)823-8392 > www.glassegg.com > --------------------------------------------------------------------- > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode ------=_NextPart_000_031D_01C294D4.732027E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions = for ODE=20 -
and it is quite possible that it can bring about harmony and speed. = But=20 one
thing that is likely going to cause problems is the SSE(2)=20 code.

For optimal performance a number of details need to be = implemented.=20 Vectors
and matrices need to be of a horizontal size that is a factor = of 4=20 (this is
implemented and the reason why, for example, a 3x3 matrix is = defined=20 as a 12
TReal (3x4) structure.

However, the structures also = have to be=20 aligned onto 16-byte boundaries. To
allow for optimal SSE(2) access = (using=20 movaps) each 128-bit memory vector
that is accessed has to be = alligned on a=20 16-byte memory boundary. This is a
problem in ODE, as every math = structure=20 now is required to be 16-byte
aligned; this is difficult to achieve = because=20 ODE calls/uses sub-matrices of
matrices, and it may be difficult to = guarantee=20 that every sub-matrix is
>also< correctly 16-byte=20 aligned.

Additionally SSE2 primarily adds double-float = functionality to=20 the SIMD
instructions. This can help somewhat for speed in the TReal = =3D double=20 case,
but isn't likely (just my guess) to have as tremendous a speed = bonus as=20 4
single floats that can be handled simultaneously for TReal =3D=20 single.

Anyway... ;)
  Henri


----- Original = Message=20 -----
From: "Nguyen Binh" <ngbinh@glassegg.com>
To: = <ode-admin@q12.org>; "Russ = Smith" <russ@q12.org>
Cc: "Jeffrey = Palmer" <jeffrey.palmer@acm.org>; = <ode@q12.org>
Sent: Monday, = November 25, 2002=20 5:11 AM
Subject: Re[2]: [ODE] Faster=20 ODE


>
>       &nbs= p; I=20 think the best way to improve ODE speed is using=20 CPU-
>         specialized = instructions like=20 MMX,SIMD,SSE(2).
>
>       = ; =20 The refs can be=20 :
>          &nbs= p; =20 http://LibSimd.sourceforge.net
>          &nbs= p; =20 SML library of Intel. (Very nice!)
>
> --
> Best=20 regards,
>
>=20 ---------------------------------------------------------------------
= >   =20 Nguyen Binh
>    Software=20 Engineer
>    Glass Egg Digital=20 Media
>    Me Linh Point Tower, 10th=20 Floor
>    2 Ngo Duc Ke
>    = District=20 1, Ho Chi Minh City
>    = Vietnam
>   =20 Fax:  (84.8)823-8392
>      www.glassegg.com
>=20 ---------------------------------------------------------------------
= >
>
>=20 _______________________________________________
> ODE mailing = list
>=20 ODE@q12.org
> http://q12.org/mailman/listi= nfo/ode
------=_NextPart_000_031D_01C294D4.732027E0-- From swmatthe at nps.navy.mil Mon Nov 25 14:37:02 2002 From: swmatthe at nps.navy.mil (Matthews, Steve) Date: Mon Nov 25 14:37:02 2002 Subject: [ODE] Help with setting and getting rotation Message-ID: <47D23CE95FD22E47B0C927B7F99DAD0C167A95@grasp.ad.nps.navy.mil> Could somebody please look at the following code? I am trying to set the position and rotation of a body from a 4*4 matrix of floats, and I also want to then be able to query that position and rotation. I seem to be able to set the position and retrieve it correctly, but the rotation comes back as garbage when I try to retrieve it and I don't know why. The code will compile as a standalone main with ode as the only dependency. The input matrix (inputMat) is just dummy numbers; if I'm imposing something or assuming something I shouldn't, please tell me. Thanks much, Steve ********************************************** #include "ode/ode.h" void setPhysicsPosition(dBodyID bodyID, float setMat[4][4]) { dBodySetPosition(bodyID, (dReal)setMat[3][0], (dReal)setMat[3][1], (dReal)setMat[3][2]); dMatrix3 R; R[0] = (dReal)setMat[0][0]; R[1] = (dReal)setMat[0][1]; R[2] = (dReal)setMat[0][2]; R[3] = 0.0; R[4] = (dReal)setMat[1][0]; R[5] = (dReal)setMat[1][1]; R[6] = (dReal)setMat[1][2]; R[7] = 0.0; R[8] = (dReal)setMat[2][0]; R[9] = (dReal)setMat[2][1]; R[10] = (dReal)setMat[2][2]; R[11] = 0.0; dBodySetRotation(bodyID, R); } void getPhysicsPosition(dBodyID bodyID, float getMat[4][4]) { const dReal *getPos; getPos = dBodyGetPosition(bodyID); const dReal *getRot; getRot = dBodyGetRotation(bodyID); getMat[0][0] = (float)getRot[0]; getMat[0][1] = (float)getRot[1]; getMat[0][2] = (float)getRot[2]; getMat[0][3] = (float)getRot[3]; getMat[1][0] = (float)getRot[4]; getMat[1][1] = (float)getRot[5]; getMat[1][2] = (float)getRot[6]; getMat[1][3] = (float)getRot[7]; getMat[2][0] = (float)getRot[8]; getMat[2][1] = (float)getRot[9]; getMat[2][2] = (float)getRot[10]; getMat[2][3] = (float)getRot[11]; getMat[3][0] = (float)getPos[0]; getMat[3][1] = (float)getPos[1]; getMat[3][2] = (float)getPos[2]; getMat[3][3] = 1.0f; } int main() { dWorldID worldID = dWorldCreate(); dBodyID bodyID = dBodyCreate(worldID); //create the input matrix float inputMat[4][4] = {{1.0f, 0.1f, 0.2f, 0.0f}, {0.3f, 1.0f, 0.4f, 0.0f}, {0.5f, 0.6f, 1.0f, 0.0f}, {1.0f, 2.0f, 3.0f, 1.0f}}; //set the position of the physics body setPhysicsPosition(bodyID, inputMat); //print the input to console printf("input matrix:\n\n"); printf("%f %f %f %f\n", inputMat[0][0], inputMat[0][1], inputMat[0][2], inputMat[0][3]); printf("%f %f %f %f\n", inputMat[1][0], inputMat[1][1], inputMat[1][2], inputMat[1][3]); printf("%f %f %f %f\n", inputMat[2][0], inputMat[2][1], inputMat[2][2], inputMat[2][3]); printf("%f %f %f %f\n\n", inputMat[3][0], inputMat[3][1], inputMat[3][2], inputMat[3][3]); //initialize the output matrix float outMat[4][4] = {0.f}; //return the position back to 4*4 matrix format in newPos getPhysicsPosition(bodyID, outMat); //print the output to console printf("output matrix:\n\n"); printf("%f %f %f %f\n", outMat[0][0], outMat[0][1], outMat[0][2], outMat[0][3]); printf("%f %f %f %f\n", outMat[1][0], outMat[1][1], outMat[1][2], outMat[1][3]); printf("%f %f %f %f\n", outMat[2][0], outMat[2][1], outMat[2][2], outMat[2][3]); printf("%f %f %f %f\n\n", outMat[3][0], outMat[3][1], outMat[3][2], outMat[3][3]); return 0; } From erwin at vo.com Mon Nov 25 14:52:01 2002 From: erwin at vo.com (Erwin de Vries) Date: Mon Nov 25 14:52:01 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> <037501c29302$5bde2ce0$0e00000a@pierre> Message-ID: <000201c294cc$c0908090$73fefea9@athlon> > Hi, > > I was (finally) looking at Erwin's box-mesh collision today, when I noticed > something weird : > > float DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - > *ColTri.Vertices[0]); > ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); > > Unless I'm missing something, the local variable DistSq is never used. On > the other hand, ColTri.DistSq is used while probably not initialized. I > guess the two lines should be : > > ColTri.DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - > *ColTri.Vertices[0]); > ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); > > ...unless, once again, I'm missing something. (I didn't trace it, I'm just > browsing the CVS repository) .... You're probably right. I cant quite see how this code is supposed to do anything useful. But its been so long since i've written this code, that i have doubts about the reason of existence of other stuff as well. :-) > There's also another version from Nolan Walker, based on Magic. Is this > better / more recent ? (the question might already have been asked, but I > can't remember the answer...) Yes it is better in some ways, but because of some bugs the end result is something not too great. I STILL need to fix this. I'm using the code in my projects and we're nearing the completion of it, so i would need to do it sometime soon. In case you want it. It is in the mail archives somewhere. Erwin From swmatthe at nps.navy.mil Mon Nov 25 15:09:01 2002 From: swmatthe at nps.navy.mil (Matthews, Steve) Date: Mon Nov 25 15:09:01 2002 Subject: [ODE] Help with setting and getting rotation Message-ID: <47D23CE95FD22E47B0C927B7F99DAD0C0DD9C0@grasp.ad.nps.navy.mil> Okay, next time I'll throw real data in. Apparently this does work; my dummy data was too dummy. sorry all. -----Original Message----- From: Matthews, Steve Sent: Monday, November 25, 2002 1:37 PM To: ode@q12.org Subject: [ODE] Help with setting and getting rotation Could somebody please look at the following code? I am trying to set the position and rotation of a body from a 4*4 matrix of floats, and I also want to then be able to query that position and rotation. I seem to be able to set the position and retrieve it correctly, but the rotation comes back as garbage when I try to retrieve it and I don't know why. The code will compile as a standalone main with ode as the only dependency. The input matrix (inputMat) is just dummy numbers; if I'm imposing something or assuming something I shouldn't, please tell me. Thanks much, Steve ********************************************** #include "ode/ode.h" void setPhysicsPosition(dBodyID bodyID, float setMat[4][4]) { dBodySetPosition(bodyID, (dReal)setMat[3][0], (dReal)setMat[3][1], (dReal)setMat[3][2]); dMatrix3 R; R[0] = (dReal)setMat[0][0]; R[1] = (dReal)setMat[0][1]; R[2] = (dReal)setMat[0][2]; R[3] = 0.0; R[4] = (dReal)setMat[1][0]; R[5] = (dReal)setMat[1][1]; R[6] = (dReal)setMat[1][2]; R[7] = 0.0; R[8] = (dReal)setMat[2][0]; R[9] = (dReal)setMat[2][1]; R[10] = (dReal)setMat[2][2]; R[11] = 0.0; dBodySetRotation(bodyID, R); } void getPhysicsPosition(dBodyID bodyID, float getMat[4][4]) { const dReal *getPos; getPos = dBodyGetPosition(bodyID); const dReal *getRot; getRot = dBodyGetRotation(bodyID); getMat[0][0] = (float)getRot[0]; getMat[0][1] = (float)getRot[1]; getMat[0][2] = (float)getRot[2]; getMat[0][3] = (float)getRot[3]; getMat[1][0] = (float)getRot[4]; getMat[1][1] = (float)getRot[5]; getMat[1][2] = (float)getRot[6]; getMat[1][3] = (float)getRot[7]; getMat[2][0] = (float)getRot[8]; getMat[2][1] = (float)getRot[9]; getMat[2][2] = (float)getRot[10]; getMat[2][3] = (float)getRot[11]; getMat[3][0] = (float)getPos[0]; getMat[3][1] = (float)getPos[1]; getMat[3][2] = (float)getPos[2]; getMat[3][3] = 1.0f; } int main() { dWorldID worldID = dWorldCreate(); dBodyID bodyID = dBodyCreate(worldID); //create the input matrix float inputMat[4][4] = {{1.0f, 0.1f, 0.2f, 0.0f}, {0.3f, 1.0f, 0.4f, 0.0f}, {0.5f, 0.6f, 1.0f, 0.0f}, {1.0f, 2.0f, 3.0f, 1.0f}}; //set the position of the physics body setPhysicsPosition(bodyID, inputMat); //print the input to console printf("input matrix:\n\n"); printf("%f %f %f %f\n", inputMat[0][0], inputMat[0][1], inputMat[0][2], inputMat[0][3]); printf("%f %f %f %f\n", inputMat[1][0], inputMat[1][1], inputMat[1][2], inputMat[1][3]); printf("%f %f %f %f\n", inputMat[2][0], inputMat[2][1], inputMat[2][2], inputMat[2][3]); printf("%f %f %f %f\n\n", inputMat[3][0], inputMat[3][1], inputMat[3][2], inputMat[3][3]); //initialize the output matrix float outMat[4][4] = {0.f}; //return the position back to 4*4 matrix format in newPos getPhysicsPosition(bodyID, outMat); //print the output to console printf("output matrix:\n\n"); printf("%f %f %f %f\n", outMat[0][0], outMat[0][1], outMat[0][2], outMat[0][3]); printf("%f %f %f %f\n", outMat[1][0], outMat[1][1], outMat[1][2], outMat[1][3]); printf("%f %f %f %f\n", outMat[2][0], outMat[2][1], outMat[2][2], outMat[2][3]); printf("%f %f %f %f\n\n", outMat[3][0], outMat[3][1], outMat[3][2], outMat[3][3]); return 0; } _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From franjesus at medtelecom.net Mon Nov 25 15:40:02 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-1?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Mon Nov 25 15:40:02 2002 Subject: [ODE] multiple box-box contacts In-Reply-To: References: Message-ID: <200211252337.39769.franjesus@medtelecom.net> El Lun 25 Nov 2002 19:24, Peter Amstutz escribió: > Oh, and it's really fun to just play with the box stacking > demo, to make a huge tower and then knock it down... Try it with spheres ;-) -- Linux: Esa panda de colgaos y piratas que te reprograman la lavadora desde rusia si usas un Windows pirata. .: Bulmailing :. From Nguyen Binh Mon Nov 25 18:49:03 2002 From: Nguyen Binh (Nguyen Binh) Date: Mon Nov 25 18:49:03 2002 Subject: Re[4]: [ODE] Faster ODE In-Reply-To: <032001c294c3$afa33ec0$45d4e892@temple> References: <032001c294c3$afa33ec0$45d4e892@temple> Message-ID: <751181058.20021126085017@glassegg.com> Hi , HH> I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions for ODE - HH> and it is quite possible that it can bring about harmony and speed. But one HH> thing that is likely going to cause problems is the SSE(2) code. HH> For optimal performance a number of details need to be implemented. Vectors HH> and matrices need to be of a horizontal size that is a factor of 4 (this is HH> implemented and the reason why, for example, a 3x3 matrix is defined as a 12 HH> TReal (3x4) structure. Take a look at Small Matrix Lib (SML) of Intel, you'll see that we have at least a way to solve this. HH> However, the structures also have to be aligned onto 16-byte boundaries. To HH> allow for optimal SSE(2) access (using movaps) each 128-bit memory vector HH> that is accessed has to be alligned on a 16-byte memory boundary. This is a HH> problem in ODE, as every math structure now is required to be 16-byte HH> aligned; this is difficult to achieve because ODE calls/uses sub-matrices of HH> matrices, and it may be difficult to guarantee that every sub-matrix is >>also< correctly 16-byte aligned. Also, SML solved these. But we may consider move all matrix, vector,... of ODE to the matrix, vector ,... of SML. I assure it'll not be hard cause right now vectors,matrixs of ODE are barely a typdef TReal* . Moreover, in SML we have a type of dimension-variable matrix that has built-in LU decomposition function. HH> Additionally SSE2 primarily adds double-float functionality to the SIMD HH> instructions. This can help somewhat for speed in the TReal = double case, HH> but isn't likely (just my guess) to have as tremendous a speed bonus as 4 HH> single floats that can be handled simultaneously for TReal = single. OK, just your guess. I'm SIMDing ODE, I'll put my benchmark when it finishes. -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media Me Linh Point Tower, 10th Floor 2 Ngo Duc Ke District 1, Ho Chi Minh City Vietnam Fax: (84.8)823-8392 www.glassegg.com --------------------------------------------------------------------- From nnevatie at welho.com Tue Nov 26 00:58:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Tue Nov 26 00:58:02 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> <037501c29302$5bde2ce0$0e00000a@pierre> <000201c294cc$c0908090$73fefea9@athlon> Message-ID: <001801c29521$72670a10$3abdf3d5@wli> Erwin, can you help me figure out what is wrong here. I tried the newstuff.gz (Base64 encoded new tricollider code) which you had posted to the list a while ago. I got it compiled OK. The problem is: when I tried the box stacking test, the program would always crash after the first collision. It seemed that the dRay.cpp was the cause of the crash. The function dGeomRaySet uses dMatrix3 to represent a rotatation. The function fills up the structure and tries to access element at [3 * 4 + 2], which causes an access violation (because dMatrix3 only has 12 elements?). Otherwise I'm using the code in ODE 0.03 release (I've tried CVS head too) + Opcode 1.2. I would greatly appreciate if you could enlighten me on this. ----- Original Message ----- From: "Erwin de Vries" To: Sent: Monday, November 25, 2002 1:29 AM Subject: Re: [ODE] Box-mesh collision > Yes it is better in some ways, but because of some bugs the end result is > something not too great. I STILL need to fix this. I'm using the code in my > projects and we're nearing the completion of it, so i would need to do it > sometime soon. > > In case you want it. It is in the mail archives somewhere. > > Erwin From tetron at interreality.org Tue Nov 26 01:34:10 2002 From: tetron at interreality.org (Peter Amstutz) Date: Tue Nov 26 01:34:10 2002 Subject: [ODE] box-box performance Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've tried out the new box-box collision code with the "phystut" program in Crystal Space. I first had to fix a problem with the crystal space use of ODE (it didn't use the dContactSoftCFM flag when generating contact joints, which caused terrible instability problems) but now that it works and is stable, I can't have more than ten or so boxes before the simulation bogs down to unusability. The environment consists of six static collision boxes which are walls of a room. The user can move a viewpoint around and toss a box or sphere, which hits the ground, tumbles (or rolls) a bit and comes to rest. As I said, once there are about 10 boxes in the room, the framerate drops precipitously and the simultion totally bogs down, even if all of the boxes have come to rest and arn't moving at all. My suspicion is that there are a lot of contact points being generated and evaluated every step despite the fact that nothing is moving (and in this case, the boxes are colliding with static geometry, which is never going to move). My question is whether this is something that can be fixed in ODE, or whether this is something that should be handled at a higher level? The specific case here is geometry which is occasionally dynamic. This means that most of the time it is sitting around with no forces acting upon it except gravity. The user should be able to interact with it, but most of the time it shouldn't be moving. If two bodies have collided recently (in the previous time step) then it should be possible to avoid re-calculating the collision and collision joints if neither body has moved more than an infintesimal amount since the previous step. How well would this work? [ Peter Amstutz ][ amstutz@cs.umass.edu ][ tetron@interreality.org ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE94zHNaeHUyhjCHfcRAsBzAJ9eESdKUJPIMcQsmGRoilesznHIrwCeIduH O3kRglgKyqjJByCajI8yOvc= =i2G+ -----END PGP SIGNATURE----- From Daniel.Groll at t-online.de Tue Nov 26 03:30:02 2002 From: Daniel.Groll at t-online.de (Daniel.Groll@t-online.de) Date: Tue Nov 26 03:30:02 2002 Subject: [ODE] box-box performance In-Reply-To: References: Message-ID: <1038306297.3de34bf91ea73@webmail.t-online.de> I have implemented this sort of thing on top of ODE. My bodies come to rest if their velocities went under a certain length. But be careful, there are situation where for example a box can stay on an edge. To avoid this you have to take time in concideration. I also have implemented this and it work great. My simulation has got a significant speed up. Nearly all my objects are "quiet" objects in most situations. This boosts the performance enormously! Daniel Groll From henri at cs.sun.ac.za Tue Nov 26 06:43:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Tue Nov 26 06:43:01 2002 Subject: Re[4]: [ODE] Faster ODE References: <032001c294c3$afa33ec0$45d4e892@temple> <751181058.20021126085017@glassegg.com> Message-ID: <03ad01c29552$032098c0$45d4e892@temple> Sounds good. I know Intel's SML - I used it (among other things) to write a small specialized matrix library of my own (only works on 3x1, 4x1 vectors and 3x3, 4x4 matrices. No LU decomposition or other "higher" functionality; but it has damn fast "basic" functionality (normalize, transpose, multiply, arithmetic, etc). If anybody is interested go look at: http://www.cs.sun.ac.za/~henri/aistuff.html You should know that the SML still has some room for improvement; for example their 4x4 matrix multiply can still gain another 10% speed with some clever use of SSE2 instructions. Nonetheless it is in some cases futile to implement SIMD algorithms, as FPU versions are as fast or faster - and less hassle to create. Unforetunately you have to do both before you can figure out which one is more suited... I've written a seperate LDLT decomposition using the "classic" approach (not the one used in ODE) and FPU optimization which is quite fast. And I wrote a seperate assembler FPU version of the replacement unit I provided, but it is only about 1% faster. (So I think the readability is more important in this case.) Oh yea... and don't forget that you should have seperate FPU, MMX, 3DNow, 3DNow!, SSE and SSE2 versions to keep everybody happy and working at the most efficient. (Oh... and don't use an SSE version for the Athlon processors - although they support SSE it is nowhere near as fast as the Intel equivalents.) Still :)) - I'll be happy to look at the code you develop for ODE and see if I can fit some additional speed in there. ;) Henri ----- Original Message ----- From: "Nguyen Binh" To: ; "Henri Hakl" Cc: Sent: Tuesday, November 26, 2002 3:50 AM Subject: Re[4]: [ODE] Faster ODE > Hi , > > HH> I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions for ODE - > HH> and it is quite possible that it can bring about harmony and speed. But one > HH> thing that is likely going to cause problems is the SSE(2) code. > > > HH> For optimal performance a number of details need to be implemented. Vectors > HH> and matrices need to be of a horizontal size that is a factor of 4 (this is > HH> implemented and the reason why, for example, a 3x3 matrix is defined as a 12 > HH> TReal (3x4) structure. > > Take a look at Small Matrix Lib (SML) of Intel, you'll see that we have > at least a way to solve this. > > HH> However, the structures also have to be aligned onto 16-byte boundaries. To > HH> allow for optimal SSE(2) access (using movaps) each 128-bit memory vector > HH> that is accessed has to be alligned on a 16-byte memory boundary. This is a > HH> problem in ODE, as every math structure now is required to be 16-byte > HH> aligned; this is difficult to achieve because ODE calls/uses sub-matrices of > HH> matrices, and it may be difficult to guarantee that every sub-matrix is > >>also< correctly 16-byte aligned. > > Also, SML solved these. > But we may consider move all matrix, vector,... of ODE to the > matrix, vector ,... of SML. I assure it'll not be hard cause right > now vectors,matrixs of ODE are barely a typdef TReal* . > Moreover, in SML we have a type of dimension-variable matrix that > has built-in LU decomposition function. > > HH> Additionally SSE2 primarily adds double-float functionality to the SIMD > HH> instructions. This can help somewhat for speed in the TReal = double case, > HH> but isn't likely (just my guess) to have as tremendous a speed bonus as 4 > HH> single floats that can be handled simultaneously for TReal = single. > > OK, just your guess. I'm SIMDing ODE, I'll put my benchmark when > it finishes. > > -- > Best regards, > > --------------------------------------------------------------------- > Nguyen Binh > Software Engineer > Glass Egg Digital Media > Me Linh Point Tower, 10th Floor > 2 Ngo Duc Ke > District 1, Ho Chi Minh City > Vietnam > Fax: (84.8)823-8392 > www.glassegg.com > --------------------------------------------------------------------- > > From pml_mrawls at yahoo.com Tue Nov 26 09:32:02 2002 From: pml_mrawls at yahoo.com (Mark Rawls) Date: Tue Nov 26 09:32:02 2002 Subject: [ODE] Latest CVS compiling with MSVC7 Message-ID: <20021126163136.28195.qmail@web40504.mail.yahoo.com> --0-1042572177-1038328296=:27505 Content-Type: text/plain; charset=us-ascii Hi. I am attempting to install the latest CVS version of CS. I have windows XP, and am using MSVC7 (the contrib/msvc7 solution however doesn't appear to be up to date; in any case, it isn't working for me). I downloaded the GNU make binary offered at q12.org, but I get problems when I do make ode-lib. In appears it may be a problem with the source code (or how my compiler treats the code more likely?). Here's what happens: make ode-lib cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= /c /GR- /GX- /W3 /GF /Oy /Iinclude /DdNODEBUG /O2 /Foode/src/step.obj ode/src/step.cpp cl : Command line warning D4029 : optimization is not available in the standard edition compiler step.cpp ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(731) : error C2664: 'dSetValue' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called make: *** [ode/src/step.obj] Error 2 Any help would be appreciated. Thanks, Mark Rawls --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-1042572177-1038328296=:27505 Content-Type: text/html; charset=us-ascii

Hi.

I am attempting to install the latest CVS version of CS.  I have windows XP, and am using MSVC7 (the contrib/msvc7 solution however doesn't appear to be up to date; in any case, it isn't working for me).  I downloaded the GNU make binary offered at q12.org, but I get problems when I do make ode-lib.  In appears it may be a problem with the source code (or how my compiler treats the code more likely?).  Here's what happens:

<prompt at ODE dir>make ode-lib <enter>
cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= /c /GR- /GX- /W3
 /GF /Oy /Iinclude  /DdNODEBUG /O2 /Foode/src/step.obj ode/src/step.cpp
cl : Command line warning D4029 : optimization is not available in the standard
edition compiler
step.cpp
ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi
s operator or a conversion to a type acceptable to the predefined operator
ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr
om 'dInfBytes' to 'dReal'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called
ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi
s operator or a conversion to a type acceptable to the predefined operator
ode\src\step.cpp(731) : error C2664: 'dSetValue' : cannot convert parameter 3 fr
om 'dInfBytes' to 'dReal'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called
make: *** [ode/src/step.obj] Error 2

Any help would be appreciated.  Thanks,

Mark Rawls



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-1042572177-1038328296=:27505-- From slipch Tue Nov 26 09:48:02 2002 From: slipch (slipch) Date: Tue Nov 26 09:48:02 2002 Subject: [ODE] using dCreateGeomClass in the last ode version Message-ID: <15831806395.20021126185038@gsc-game.kiev.ua> Hello ODE, Is it a bug? The problem accrues with setting pointer to a function for self collision because when calling dCreateGeomClass the integer class number is not set yet. So, collider function calling by dCreateGeomClass can not return right function pointer. -- Best regards, slipch mailto:slipch@gsc-game.kiev.ua From russ at q12.org Tue Nov 26 11:57:02 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 26 11:57:02 2002 Subject: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <15831806395.20021126185038@gsc-game.kiev.ua> Message-ID: > The problem accrues with setting pointer to a function for self > collision because when calling dCreateGeomClass the integer class > number is not set yet. So, collider function calling by dCreateGeomClass > can not return right function pointer. i don't know what problem you are talking about - can you describe it more precisely? but the new collision system uses constant class numbers, not variable class numbers, so this should not be a problem (except perhaps for user defined classes set up through the C API??). russ. -- Russ Smith http://www.q12.org/ From thomasharte at lycos.co.uk Tue Nov 26 12:40:02 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Tue Nov 26 12:40:02 2002 Subject: [ODE] My Latest Approach to Polyhedron Collision Management Message-ID: <1038339519025448@lycos-europe.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --=_NextPart_Lycos_0254481038339519_ID Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm continuing to make progress in my pursuit of the perfect arbitrary polyhedron on arbitrary polyhedron collision management. I am looking for comments or suggestions regarding my current approach, from those on this list who must have worked on, or be working on, the same thing. In particular, I am worried about the efficiently of my constraint generation calculations. My driving physics engine is fairly typical. It is assumed that at the start of a time step, no objects are inter-penetrating. If, at the end of the time step, there continue to be no objects inter-penetrating, then the time step is complete. If objects do inter-penetrate, then a binary search reveals something very close to the last time before inter-penetration occurred, at which point the relevant constraints are added to prevent that from happening, and the whole process repeats, this time considering only the remaining portion of the time step after the penetration. Therefore, two discrete binary operations are supported on polyhedron types - an overlap test and a constraint calculation. All polyhedron's have BSP trees and hierarchical bounding sphere sets for : - their vertices - their edges In my hierarchy, every sphere has (at most) 8 children. Obviously the number of children represents a balance between hierarchy depth and bredth, and all the related factors when it comes to eliminating possible edge on polygon tests. I picked 8 to match up with the natural geographical division that occurs under an octree. I understand that a sphere probably models the shape of sets of edges and vertices terribly, but on the other hand it is really cheap to test one against a plane. The overlap test can be achieved using the edge and related bounding sphere information from one object with the BSP tree of another. For any given BSP node, if a particular sphere is entirely on one particular side of the plane, then its tests head that way down the tree. If it sits on the plane, then its children are considered. If a leaf node is found to be intersecting a plane, then complete edge on polygon tests are done. If any edge intersects a polygon, then the two objects are said to overlap, and no further tests are carried out. Obviously a first 'quick throwaway' test on distance between the highest level bounding spheres of both objects is performed, but in my simulation there is already a higher order octree related means to calculating which objects are 'near' which other objects, so that test isn't as useful as it might otherwise be. This BSP approach is a smarter version of testing every polygon of one object against every polygon of the other. It therefore is fooled by the same problems, such as one object being totally enclosed by another object - but these are a result of using a discrete model of time, and things my simulation will simply be built to deal with. Most tests performed by my engine when two objects begin contact will be overlap tests due to the binary search for collision time, and the constraint calculation will only occur once. When two objects start a time step rubbing up against each other, the focus will be the constraint calculation, but still this should only be required once per time step. Therefore, in my engine where objects will frequently change what they are rubbing against, it is the overlap test that needs be most optimal. The constraint calculation needs to detect when vertices on one object are very close to polygons on the other, and when edges on one object are very close to edges on the other. My engine attempts to keep all objects seperated by an invisibly small border, negating the need for the binary search for collision time to be desperately accurate, and generally helping smooth numerical accuracy problems. The edges problem isn't hard. Its more or less like the overlap test, but this time edges which are close to a plane in the BSP are tested in addition to those that cross the plane, and all are tested only against original edges that lie on that plane, not against the edges of the polygons used to construct the BSP tree - the distinction being that I am not interested in the artificial edges generated when splitting polygons for BSP purposes. Vertices on planes is slightly more difficult. My current solution is to push each object's vertices down the BSP tree of the other object. But this means that I have to do two BSP traversals per constraint calculation - which I am sure could probably be only 1 if it weren't for some gross thickness on my part. Is there any way to do this more efficiently? -Thomas BA flight sale now at http://www.lycos.co.uk Caracas, =A3129 rtn. including tax, Tues, 11am --=_NextPart_Lycos_0254481038339519_ID-- From jeffrey.palmer at acm.org Tue Nov 26 15:30:02 2002 From: jeffrey.palmer at acm.org (Jeffrey Palmer) Date: Tue Nov 26 15:30:02 2002 Subject: [ODE] ODE/Tricollider on linux? Message-ID: <200211261629.14222.jeffrey.palmer@acm.org> Hello all, I was wondering if anyone has gotten ODE and the tricollider code (I tried the stuff in the NewStuff email to no avail) working under Linux? Alternatively, I understand that the tri code is currently being integrated with ODE - is that in the CVS version yet? If not, is it bothersome to ask for an ETA? I guess I'm just lazy - I'm sort of unwilling to port everything to linux if it's *about* to be released. ;) Thanks, - j -- The river is moving. The blackbird must be flying. From anselm at hook.org Tue Nov 26 15:45:02 2002 From: anselm at hook.org (Anselm Hook) Date: Tue Nov 26 15:45:02 2002 Subject: [ODE] operator new undefined link cygwin gcc In-Reply-To: <200211261629.14222.jeffrey.palmer@acm.org> Message-ID: For some bizarre reason I had to use g++ instead of gcc with my (very recent) version of cygwin and todays verson of ode. I was getting an "operator new undefined" error at the link phase. Anybody else notice the same thing? I had to modify the configurator code a bit to build under g++ also. - a From mama7121 at student.uu.se Tue Nov 26 16:28:02 2002 From: mama7121 at student.uu.se (Martin Magnusson) Date: Tue Nov 26 16:28:02 2002 Subject: [ODE] operator new undefined link cygwin gcc References: Message-ID: <3DE40356.8010604@student.uu.se> I'm having trouble compiling under Cygwin as well. Then again, it could be a Cygwin problem too, since I'm new to Cygwin as well. Anyway, as far as I can understand I've set the user-settings file correctly, and after that a simple 'make' should be enough, right? Using g++ didn't seem to help. My results are posted below. The problem seems to be with lib/libode.a. I don't have a directory called 'lib', and there's no 'libode.a' anywhere on my HDD. Help, comments or flames are appreciated :) / Martin Magnusson ====================================================================== == Contents of ./config/user-settings: =============================== # ODE user settings: the following variables must be set by the user # (1) the platform to use. this name should have a corresponding # makefile.PLATFORM file. currently supported platforms are: # msvc microsoft visual C/C++ # mingw minimalist GNU for windows # cygwin cygnus GNU for windows # unix-gcc GNU gcc on windows # unix-generic generic unix compiler. you may need to edit the CC # variable in makefile.unix-generic # osx Mac OS-X, with the gnu compiler. PLATFORM=cygwin # (2) the floating point precision to use (either "SINGLE" or "DOUBLE") #PRECISION=SINGLE PRECISION=DOUBLE # (3) the library type to build (either "debug" if you are doing development, # or "release" for the optimized library) #BUILD=debug BUILD=release ===================================================================== == Result of make with gcc: ========================================= /home/martin!/ode-0.03> make gcc -DdDOUBLE -DdNODEBUG -o configurator.exe configurator.c ./configurator.exe include/ode/config.h "gcc -DdNODEBUG -o " "rm -f" ./ rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.c rm -f ctest.exe is this a pentium on a gcc-based platform? ... rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.c rm -f ctest.exe integer types (we assume int >= 32 bits) ... select the base floating point type ... the floating point infinity ... rm -f data gcc -DdNODEBUG -o ctest.exe ctest.c ctest.c:5: initializer element is not constant ./ctest.exe ./ctest.exe: not found rm -f data gcc -DdNODEBUG -o ctest.exe ctest.c ./ctest.exe rm -f data gcc -DdNODEBUG -o ctest.exe ctest.c ./ctest.exe rm -f ctest.c rm -f ctest.exe rm -f data *** configurator succeeded *** gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/array.o ode/src/array.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/error.o ode/src/error.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/memory.o ode/src/memory.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/obstack.o ode/src/obstack.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/odemath.o ode/src/odemath.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/matrix.o ode/src/matrix.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/misc.o ode/src/misc.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/rotation.o ode/src/rotation.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/mass.o ode/src/mass.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/ode.o ode/src/ode.cpp ode/src/ode.cpp: In function `void dJointAttach(dxJoint*, dxBody*, dxBody*)': ode/src/ode.cpp:922: warning: unused variable `dxWorld*world' gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/step.o ode/src/step.cpp ode/src/step.cpp:701:5: warning: multi-line comment ode/src/step.cpp:704:5: warning: multi-line comment gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/lcp.o ode/src/lcp.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/joint.o ode/src/joint.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/space.o ode/src/space.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/geom.o ode/src/geom.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/timer.o ode/src/timer.cpp ode/src/timer.cpp:109:17: warning: multi-line string literals are deprecated ode/src/timer.cpp:119:17: warning: multi-line string literals are deprecated gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/mat.o ode/src/mat.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/testing.o ode/src/testing.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastldlt.o ode/src/fastldlt.c gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastlsolve.o ode/src/fastlsolve.c gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastltsolve.o ode/src/fastltsolve. c gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastdot.o ode/src/fastdot.c ar rc lib/libode.a ode/src/array.o ode/src/error.o ode/src/memory.o ode/src/obst ack.o ode/src/odemath.o ode/src/matrix.o ode/src/misc.o ode/src/rotation.o ode/s rc/mass.o ode/src/ode.o ode/src/step.o ode/src/lcp.o ode/src/joint.o ode/src/spa ce.o ode/src/geom.o ode/src/timer.o ode/src/mat.o ode/src/testing.o ode/src/fast ldlt.o ode/src/fastlsolve.o ode/src/fastltsolve.o ode/src/fastdot.o ar: lib/libode.a: No such file or directory make: *** [lib/libode.a] Error 1 ===================================================================== == Result of make with g++: ========================================= /home/martin!/ode-0.03> make g++ -DdDOUBLE -DdNODEBUG -o configurator.exe configurator.c configurator.c: In function `void fatal_error(char*)': configurator.c:112: `exit' undeclared (first use this function) configurator.c:112: (Each undeclared identifier is reported only once for each function it appears in.) configurator.c: In function `void delete_file(char*)': configurator.c:167: `system' undeclared (first use this function) make: *** [configurator.exe] Error 1 From harleybl at hotmail.com Tue Nov 26 16:53:01 2002 From: harleybl at hotmail.com (Harley Blumenfeld) Date: Tue Nov 26 16:53:01 2002 Subject: [ODE] Unhandled exception - access violation Message-ID:
Has anyone else been getting an Unhandled exception - access violation,when calling dGeomDestroy? I got the latest from cvs this morning and have run into this problem when my application closes.
 
All I did was make a sub folder under test, and created a project which contains a copy of the buggy_test.cpp. The program runs fine, except when the window is closed I get an access violation. It seems to be happening when the box is destroyed in the line dGeomDestroy( box[0] );
 
When I look up the call stack it is failing at this place in the chain dxGeom::bodyRemove( void ).
 
Here is my configuration:
msvc version 6.0
Ode from this morning compiled with build=debug
Windows 2000 SP 2
 
Is there a setting that I am missing in my project? I noticed that there was a warning about a conflicting library and the linker said that I should be using /NODEFAULTLIB: libc.
Which library should I be using instead?
 
Thanks,
-Harley Blumenfeld
 


Tired of spam? Get advanced junk mail protection with MSN 8. From russ at q12.org Tue Nov 26 19:56:02 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 26 19:56:02 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: References: Message-ID: <20021126190026.00c5f3ed.russ@q12.org> > It seems to be happening when the box is destroyed in the line > dGeomDestroy( box[0] ); is the error happening within dGeomDestroy() or within main(). are you using an unaltered copy of test_buggy? russ. -- Russell Smith http://www.q12.org From Nguyen Binh Tue Nov 26 20:32:02 2002 From: Nguyen Binh (Nguyen Binh) Date: Tue Nov 26 20:32:02 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <20021126190026.00c5f3ed.russ@q12.org> References: <20021126190026.00c5f3ed.russ@q12.org> Message-ID: <931545011.20021127103524@glassegg.com> >> It seems to be happening when the box is destroyed in the line >> dGeomDestroy( box[0] ); It's the same for me. I'm using the latest test_buggt.cpp in CVS. RS> is the error happening within dGeomDestroy() or within main(). are you RS> using an unaltered copy of test_buggy? I solved it by bring the dGeomDestroy()... to front like this: dGeomDestroy (box[0]); dGeomDestroy (sphere[0]); dGeomDestroy (sphere[1]); dGeomDestroy (sphere[2]); dJointGroupDestroy (contactgroup); dSpaceDestroy (space); dWorldDestroy (world); -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media E.Town Building 7th Floor, 364 CongHoa Street Tan Binh District, HoChiMinh City, VietNam, Phone : +84 8 8109018 Fax : +84 8 8109013 www.glassegg.com --------------------------------------------------------------------- From anselm at hook.org Tue Nov 26 20:43:01 2002 From: anselm at hook.org (Anselm Hook) Date: Tue Nov 26 20:43:01 2002 Subject: [ODE] operator new undefined link cygwin gcc In-Reply-To: <3DE40356.8010604@student.uu.se> Message-ID: For the default compiler in makefile.cygwin to be g++ you have to wrap extern "C" { } around your includes in the configurator source. Also just remove exit() - it isn't important. The configurator could be generalized to support this overall but I guess it's pretty obvious. As for your bug with not being able to link - I did see some comment about that earlier on the list. Try cvs to head revision and see if it is fixed. Otherwise try see if your cygwin is older... - a > ===================================================================== > == Result of make with g++: ========================================= > > /home/martin!/ode-0.03> make > g++ -DdDOUBLE -DdNODEBUG -o configurator.exe configurator.c > configurator.c: In function `void fatal_error(char*)': > configurator.c:112: `exit' undeclared (first use this function) > configurator.c:112: (Each undeclared identifier is reported only once > for each > function it appears in.) > configurator.c: In function `void delete_file(char*)': > configurator.c:167: `system' undeclared (first use this function) > make: *** [configurator.exe] Error 1 > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From g.r.vansickle at worldnet.att.net Tue Nov 26 23:53:02 2002 From: g.r.vansickle at worldnet.att.net (Gary R. Van Sickle) Date: Tue Nov 26 23:53:02 2002 Subject: [ODE] box-box performance In-Reply-To: <1038306297.3de34bf91ea73@webmail.t-online.de> Message-ID: > I have implemented this sort of thing on top of ODE. My bodies come to > rest if their velocities went under a certain length. But be careful, > there are situation where for example a box can stay on an edge. To > avoid this you have to take time in concideration. Instead of time, could this take "stability" into account instead? e.g. something like this: if( (body.KineticEnergy() < epsilon) // i.e. velocity ~= 0 && (body.PotentialEnergyRelativeTo(body_it_is_contacting) < epsilon) // i.e. it isn't going to change on us on its own. ) { // "Freeze" body until something hits it etc. // ... } Seems to me that this would be pretty much foolproof, and better yet instantaneously-acting; there'd be no need to wait until you were reasonably sure the body had "really" stopped moving, you could lock the body down as soon as these conditions became true and know you were doing the right thing. Or is there a conceptual or implementational issue here I'm missing? -- Gary R. Van Sickle Brewer. Patriot. From muellerptr at kimweb.de Wed Nov 27 00:19:02 2002 From: muellerptr at kimweb.de (=?iso-8859-1?Q?Patrik_M=FCller?=) Date: Wed Nov 27 00:19:02 2002 Subject: [ODE] Collision detection Message-ID: Hi all, I'm observing the list some times now and it seems ODE is the tool I need. Now my question: I want to include the collision test to a modeller I write at the moment. But the problem are my input files: CAD data. That means I get huge triangle objects. Do you think I can use it with the tri-collider? Or has anyone a better idea (physics is not my world!)? Do i still need Opcode for the actual tri-collider code? Best regards, Patrik Müller From chris.campbell at l8tech.com Wed Nov 27 00:23:02 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Wed Nov 27 00:23:02 2002 Subject: [ODE] box-box performance Message-ID: Like Daniel says you might find that for example as a rolling box (dice maybe?) comes to a stop, it might teeter on one edge for a second before deciding which face it will eventually fall onto. At that point the kinetic energy would be near to zero. Also consider if you threw a body straight up. At some point it will have near zero kinetic energy, then start coming down. With an extremely small epsilon it might work out most of the time but I think it's safer to judge by distance travelled/over a few consecutive time steps. ChrisC > > there are situation where for example a box can stay on an edge. To > > avoid this you have to take time in concideration. > > Instead of time, could this take "stability" into account instead? > > e.g. something like this: > > if( > (body.KineticEnergy() < epsilon) // i.e. velocity ~= 0 > && > (body.PotentialEnergyRelativeTo(body_it_is_contacting) < epsilon) > // i.e. it isn't going to change on us on its own. > ) > { > // "Freeze" body until something hits it etc. > // ... > } > > Seems to me that this would be pretty much foolproof, and better yet > instantaneously-acting; there'd be no need to wait until you > were reasonably > sure the body had "really" stopped moving, you could lock the > body down as soon > as these conditions became true and know you were doing the > right thing. Or is > there a conceptual or implementational issue here I'm missing? From russ at q12.org Wed Nov 27 01:23:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 01:23:02 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <931545011.20021127103524@glassegg.com> References: <20021126190026.00c5f3ed.russ@q12.org> <931545011.20021127103524@glassegg.com> Message-ID: <20021127002815.74167e9e.russ@q12.org> > It's the same for me. I'm using the latest test_buggt.cpp in CVS. i've tried a fresh checked out CVS head under both linux and windows (cygwin) and i don't see any problem. could one of you track this problem down further so that it can be fixed?? russ. -- Russell Smith http://www.q12.org From g.r.vansickle at worldnet.att.net Wed Nov 27 01:54:02 2002 From: g.r.vansickle at worldnet.att.net (Gary R. Van Sickle) Date: Wed Nov 27 01:54:02 2002 Subject: [ODE] box-box performance In-Reply-To: Message-ID: > Like Daniel says you might find that for example as a rolling box > (dice maybe?) comes to a stop, it might teeter on one edge for > a second before deciding which face it will eventually fall onto. > At that point the kinetic energy would be near to zero. Right, but the *potential* energy will not be zero. It can still move to a lower total energy state. > Also > consider if you threw a body straight up. At some point it will > have near zero kinetic energy, then start coming down. Again though, potential energy != 0. > With an extremely small epsilon it might work out most of the > time but I think it's safer to judge by distance travelled/over a > few consecutive time steps. But that's where the "lockups" tend to come from; whether it's every step or a number of steps (and how do you chose that number?), you can get into a wildly wrong physical situation. E.g., the "body straight up" problem. How long is your rocket going to sit at its apogee, say over a low-gravity planet, with velocity ~= 0, before starting to fall back? Pick a just-too-long max time before you lock it down, and the rocket stays up there forever. If it's possible to base the lockdown decision on potential energy, you will at least never get into wildly wrong situations like that; they'd at worst be "epsilon-total-energy-is-still-left wrong", which should always be less than any velocity-only-based solution. All that said, I can't offhand come up with an algorithm to do the potential-energy measurement, which would be the key to have this work at all. I would think it would involve some relation between the center of mass, any contacts, and the total forces & torques applied at each timestep. But as is all too often the case, more thinking required.... -- Gary R. Van Sickle Brewer. Patriot. > > > there are situation where for example a box can stay on an edge. To > > > avoid this you have to take time in concideration. > > > > Instead of time, could this take "stability" into account instead? > > > > e.g. something like this: > > > > if( > > (body.KineticEnergy() < epsilon) // i.e. velocity ~= 0 > > && > > (body.PotentialEnergyRelativeTo(body_it_is_contacting) < epsilon) > > // i.e. it isn't going to change on us on its own. > > ) > > { > > // "Freeze" body until something hits it etc. > > // ... > > } > > > > Seems to me that this would be pretty much foolproof, and better yet > > instantaneously-acting; there'd be no need to wait until you > > were reasonably > > sure the body had "really" stopped moving, you could lock the > > body down as soon > > as these conditions became true and know you were doing the > > right thing. Or is > > there a conceptual or implementational issue here I'm missing? > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From slipch Wed Nov 27 01:55:01 2002 From: slipch (slipch) Date: Wed Nov 27 01:55:01 2002 Subject: Re[2]: [ODE] using dCreateGeomClass in the last ode version Message-ID: <1044162224.20021127105729@gsc-game.kiev.ua> Hello Russ, Tuesday, November 26, 2002, 8:55:31 PM, you wrote: RS> i don't know what problem you are talking about - can you describe it more RS> precisely? but the new collision system uses constant class numbers, not RS> variable class numbers, so this should not be a problem (except perhaps RS> for user defined classes set up through the C API??). Yes, I mean user definite classes. When I create geometry class ////////////////////////////////////////////// dGeomClass c; c.bytes = sizeof (dxCylinder); c.collider = &dMyClassColliderFn; c.aabb = &dMyClassAABB; c.aabb_test = 0; c.dtor = 0; dMyClass=dCreateGeomClass (&c); ////////////////////////////////////////// static dColliderFn * dMyClassColliderFn (int num) { if (num == dBoxClass) return (dColliderFn *) &dCollideMyClassBox; if (num == dSphereClass) return (dColliderFn *) &dCollideMyClasSphere; if (num == dMyClass) return (dColliderFn *)&dCollideMyClassMyClass; if (num == dPlaneClass) return (dColliderFn *) &dCollideMyClassPlane; return 0; } dMyClassColliderFn do not return dCollideMyClassMyClass in dCreateGeomClass because dMyClass is not set until it return and dCollideMyClassMyClass do not set in colliders array. It is not a bug but I do not know how to set collider for MyClass - MyClass collision. -- Best regards, Konstantin Slipchenko mailto:slipch@gsc-game.kiev.ua Sorry for sometimes I use reply button by mistake :). From slipch Wed Nov 27 02:18:02 2002 From: slipch (slipch) Date: Wed Nov 27 02:18:02 2002 Subject: [ODE] unresolved external symbol __ftol2 Message-ID: <95565933.20021127112053@gsc-game.kiev.ua> Hello ODE, I can not build last ode version with MS VC 6.0. C:\SDK\odeLast\!new-ode_lib!>make link /dll /nologo /SUBSYSTEM:WINDOWS /LIBPATH:"C:\Programme\Micros~2\VC98\Lib" / def:config/msvcdefs.def Comctl32.lib kernel32.lib user32.lib gdi32.lib OpenGL32. lib Glu32.lib /OUT:lib/ode.dll ode/src/array.obj ode/src/error.obj ode/src/memor y.obj ode/src/obstack.obj ode/src/odemath.obj ode/src/matrix.obj ode/src/misc.ob j ode/src/rotation.obj ode/src/mass.obj ode/src/ode.obj ode/src/step.obj ode/src /lcp.obj ode/src/joint.obj ode/src/timer.obj ode/src/mat.obj ode/src/testing.obj ode/src/collision_kernel.obj ode/src/collision_util.obj ode/src/collision_std.o bj ode/src/collision_space.obj ode/src/collision_transform.obj ode/src/fastldlt. obj ode/src/fastlsolve.obj ode/src/fastltsolve.obj ode/src/fastdot.obj Creating library lib/ode.lib and object lib/ode.exp LINK : warning LNK4049: locally defined symbol "_dInfinityValue" imported misc.obj : error LNK2001: unresolved external symbol __ftol2 collision_space.obj : error LNK2001: unresolved external symbol __ftol2 lib/ode.dll : fatal error LNK1120: 1 unresolved externals make: *** [lib/ode.lib] Error 1120 I also can not find any reference on even occurrence of "__ftol2". I will very appreciate any suggestion. -- Best regards, slipch mailto:slipch@gsc-game.kiev.ua From slipch Wed Nov 27 02:21:02 2002 From: slipch (slipch) Date: Wed Nov 27 02:21:02 2002 Subject: [ODE] unresolved external symbol __ftol2 In-Reply-To: <95565933.20021127112053@gsc-game.kiev.ua> References: <95565933.20021127112053@gsc-game.kiev.ua> Message-ID: <835760062.20021127112407@gsc-game.kiev.ua> Hello ODE, I can not build last ode version with MS VC 6.0. C:\SDK\odeLast\!new-ode_lib!>make link /dll /nologo /SUBSYSTEM:WINDOWS /LIBPATH:"C:\Programme\Micros~2\VC98\Lib" / def:config/msvcdefs.def Comctl32.lib kernel32.lib user32.lib gdi32.lib OpenGL32. lib Glu32.lib /OUT:lib/ode.dll ode/src/array.obj ode/src/error.obj ode/src/memor y.obj ode/src/obstack.obj ode/src/odemath.obj ode/src/matrix.obj ode/src/misc.ob j ode/src/rotation.obj ode/src/mass.obj ode/src/ode.obj ode/src/step.obj ode/src /lcp.obj ode/src/joint.obj ode/src/timer.obj ode/src/mat.obj ode/src/testing.obj ode/src/collision_kernel.obj ode/src/collision_util.obj ode/src/collision_std.o bj ode/src/collision_space.obj ode/src/collision_transform.obj ode/src/fastldlt. obj ode/src/fastlsolve.obj ode/src/fastltsolve.obj ode/src/fastdot.obj Creating library lib/ode.lib and object lib/ode.exp LINK : warning LNK4049: locally defined symbol "_dInfinityValue" imported misc.obj : error LNK2001: unresolved external symbol __ftol2 collision_space.obj : error LNK2001: unresolved external symbol __ftol2 lib/ode.dll : fatal error LNK1120: 1 unresolved externals make: *** [lib/ode.lib] Error 1120 I also can not find any reference or even occurrence of "__ftol2". I will very appreciate any suggestion. -- Best regards, slipch mailto:slipch@gsc-game.kiev.ua From anselm at hook.org Wed Nov 27 04:21:02 2002 From: anselm at hook.org (Anselm Hook) Date: Wed Nov 27 04:21:02 2002 Subject: [ODE] networking demo In-Reply-To: <20021127002815.74167e9e.russ@q12.org> Message-ID: Hi all, I'm playing around with a little networking demo that is gradually getting better. Now it networks all the state of the little cars including the user events - this makes it fairly smooth. Also it uses udp - although I still have a defect in that area which will prevent more than 2 connections at a time (you can turn off udp though and have an arbitrary number of clients). http://hook.org/anselm/test_buggy.cpp Next I have to do compression, blending, distance attenuation and a few things like that... In any case some of you may find it interesting. - a From mama7121 at student.uu.se Wed Nov 27 04:28:01 2002 From: mama7121 at student.uu.se (Martin Magnusson) Date: Wed Nov 27 04:28:01 2002 Subject: [ODE] operator new undefined link cygwin gcc References: Message-ID: <3DE4AC0E.3070304@student.uu.se> OK, thanks for your help everybody. After creating lib/ manually both configurator and ode-lib compile properly (although with a couple of warnings about multi line strings and one or two unused variables), but when it comes to ode-test and drawstuff-test I get undefined references to new[] (when I compile with gcc in Cygwin/Windows). lib/libdrawstuff.a(drawstuff.o)(.text+0x393):drawstuff.cpp: undefined reference to `operator new[](unsigned)' Anselm Hook wrote: > For the default compiler in makefile.cygwin to be g++ you have to wrap > extern "C" { } around your includes in the configurator source. Also just > remove exit() - it isn't important. The configurator could be generalized > to support this overall but I guess it's pretty obvious. I wrapped the entire configurator.c in #ifdef __cplusplus extern "C" { #endif ... #ifdef __cplusplus } #endif #endif and commented out the exit() line, but that didn't help (g++ complained about the system() calls in configurator.c and lots of other stuff as well). I installed Cygwin a couple of days ago, so it should be recent enough. My ./include/ode/config.h looks like this - if that matters: == config.h: ========================================================= /* per-machine configuration. this file is automatically generated. */ #ifndef _ODE_CONFIG_H_ #define _ODE_CONFIG_H_ /* shared lib definitions */ #ifndef SHAREDLIBIMPORT #define SHAREDLIBIMPORT #endif #ifndef SHAREDLIBEXPORT #define SHAREDLIBEXPORT #endif /* standard system headers */ #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* is this a pentium on a gcc-based platform? */ #define PENTIUM 1 /* integer types (we assume int >= 32 bits) */ typedef char int8; typedef unsigned char uint8; typedef int int32; typedef unsigned int uint32; /* an integer type that we can safely cast a pointer to and * from without loss of bits. */ typedef unsigned int intP; /* select the base floating point type */ #define dDOUBLE 1 /* the floating point infinity */ #define DINFINITY_DECL SHAREDLIBEXPORT union dInfBytes dInfinityValue = {{0,0,0,0,0,0,0xf0,0x7f}}; #if defined SHARED_CONFIG_H_INCLUDED_FROM_DEFINING_FILE #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBEXPORT #else #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBIMPORT #endif union dInfBytes { unsigned char c[8]; double d; }; extern GLOBAL_SHAREDLIB_SPEC union dInfBytes dInfinityValue; #define dInfinity (dInfinityValue.d) #undef GLOBAL_SHAREDLIB_SPEC /* ODE feature configuration */ #ifdef __cplusplus } #endif #endif ====================================================================== / Martin Magnusson From harleybl at hotmail.com Wed Nov 27 08:51:02 2002 From: harleybl at hotmail.com (Harley Blumenfeld) Date: Wed Nov 27 08:51:02 2002 Subject: [ODE] Unhandled exception - access violation Message-ID:


Yes I am using an unaltered version of test_buggy.cpp. I just recopied it from test to make sure.

Yes the error is happening within dGeomDestroy( box[ 0 ] );

Here is what the stack looks like when it happens ( from MSVC Context: bar )

MYBUGGY! dxGeom::bodyRemove( void )

MYBUGGY! dxGeom::~dxGeom( void )

MYBUGGY! dxBox::~dxBox( void )

MYBUGGY! dxBox: `vector deleting destructor'(unsigned int )

MYBUGGY! dxGeomDestroy

I tried the solution of moving the dGeomDestroy code to the first line after dsSimulationLoop and that seemed to work... is there a specific ordering in which things should be deleted?

-Harley Blumenfeld

 

 


 

>From: Russ Smith
>To: "Harley Blumenfeld"
>CC: ode@q12.org
>Subject: Re: [ODE] Unhandled exception - access violation
>Date: Tue, 26 Nov 2002 19:00:26 -0500
>
>
> > It seems to be happening when the box is destroyed in the line
> > dGeomDestroy( box[0] );
>
>is the error happening within dGeomDestroy() or within main(). are you
>using an unaltered copy of test_buggy?
>
>russ.
>
>--
>Russell Smith
>http://www.q12.org


Protect your PC - Click here for McAfee.com VirusScan Online From thomas_buehrmann at web.de Wed Nov 27 09:31:02 2002 From: thomas_buehrmann at web.de (Thomas Buehmann) Date: Wed Nov 27 09:31:02 2002 Subject: [ODE] drawstuff problems: "pulsating" spheres Message-ID: <200211271630.gARGULX20996@mailgate5.cinetic.de> hi, i get some weird looking spheres if i encapsulate my models as well as the world and space in c++ classes. The first object(consisting of several bodies and spheres) looks fine, but if i add another object to the world its spheres look as if there are shadows rotating around them. the speed of that rotatiion is somehow depend on the first object in the world. is that anything i got wrong about drawstuff? thanks for help, thomas. ______________________________________________________________________________ Schon wieder Viren-Alarm? Bei WEB.DE FreeMail ist das kein Problem, hier ist der Virencheck inklusive! http://freemail.web.de/features/?mc=021158 From tirobu at gmx.de Wed Nov 27 10:22:01 2002 From: tirobu at gmx.de (Tim) Date: Wed Nov 27 10:22:01 2002 Subject: [ODE] compiling CVS Message-ID: <003b01c29639$5a4886c0$0200a8c0@P4> This is a multi-part message in MIME format. ------=_NextPart_000_0038_01C29641.BBA6B2E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello. I want to use ODE - but I don=B4t get it compiled... I am using Windows (msvc) and modified the user-settings.example file as it is explained in the howto. For sure I made a copy of this file and renamed it to user-settings. Now I wanted to use the just downloaded GNU make for windows file to compile as it is explained in the manual. But when I try "make configure" I get the following error message: cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT=3D /DSHAREDLIBIMPORT=3D = /DdDOUBLE /DdDE BUG_ALLOC /DODE_OLD_COLLISION /Feconfigurator.exe configurator.c process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT =3D /DSHAREDLIBIMPORT=3D /DdDOUBLE /DdDEBUG_ALLOC /DODE_OLD_COLLISION /Feconfigurato r.exe configurator.c, ...) failed. make (e=3D2): The system can not find the specifed file make: *** [configurator.exe] Error 2 I tried several things but nothing helped! Hope someone can help me! Thanks a lot, Tim. ------=_NextPart_000_0038_01C29641.BBA6B2E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello.

I want to use ODE - but I don=B4t get it = compiled...
I am=20 using Windows (msvc) and modified the user-settings.example
file as = it is=20 explained in the howto. For sure I made a copy of this
file and = renamed it to=20 user-settings.

Now I wanted to use the just downloaded GNU make = for=20 windows file
to compile as it is explained in the manual. But when I=20 try
"make configure"
I get the following error message:

cl = /nologo=20 /DWIN32 /DMSVC /DSHAREDLIBEXPORT=3D /DSHAREDLIBIMPORT=3D=20 /DdDOUBLE
/DdDE
BUG_ALLOC /DODE_OLD_COLLISION /Feconfigurator.exe=20 configurator.c
process_begin: CreateProcess((null), cl /nologo = /DWIN32=20 /DMSVC
/DSHAREDLIBEXPORT
=3D /DSHAREDLIBIMPORT=3D /DdDOUBLE = /DdDEBUG_ALLOC=20 /DODE_OLD_COLLISION
/Feconfigurato
r.exe configurator.c, ...)=20 failed.
make (e=3D2): The system can not find the specifed = file
make: ***=20 [configurator.exe] Error 2

I tried several things but nothing=20 helped!
Hope someone can help me!
Thanks a lot, = Tim.
------=_NextPart_000_0038_01C29641.BBA6B2E0-- From leaf at tataput.com Wed Nov 27 10:39:02 2002 From: leaf at tataput.com (Leaf Garland) Date: Wed Nov 27 10:39:02 2002 Subject: [ODE] compiling CVS In-Reply-To: <003b01c29639$5a4886c0$0200a8c0@P4> Message-ID: <001c01c2963b$da7b0f50$8e130750@mumu> I noticed this same problem when compiling on one pc, but not on another. Strange. Anyway I fixed it by adding the ode dir to the path. Eg. PATH=%PATH%;c:\dev\ode I also had to create the ode/lib dir, as mentioned in a previous post, and change a line in test_boxstack.cpp where there were two "for(int i..." in the same function, which msvc6 can't handle. Cheers, Leaf. -----Original Message----- From: ode-admin@q12.org [mailto:ode-admin@q12.org] On Behalf Of Tim Sent: 27 November 2002 17:21 To: ode@q12.org Subject: [ODE] compiling CVS Hello. I want to use ODE - but I don´t get it compiled... I am using Windows (msvc) and modified the user-settings.example file as it is explained in the howto. For sure I made a copy of this file and renamed it to user-settings. Now I wanted to use the just downloaded GNU make for windows file to compile as it is explained in the manual. But when I try "make configure" I get the following error message: cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= /DdDOUBLE /DdDE BUG_ALLOC /DODE_OLD_COLLISION /Feconfigurator.exe configurator.c process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT = /DSHAREDLIBIMPORT= /DdDOUBLE /DdDEBUG_ALLOC /DODE_OLD_COLLISION /Feconfigurato r.exe configurator.c, ...) failed. make (e=2): The system can not find the specifed file make: *** [configurator.exe] Error 2 I tried several things but nothing helped! Hope someone can help me! Thanks a lot, Tim. From baas at ira.uka.de Wed Nov 27 10:57:01 2002 From: baas at ira.uka.de (Matthias Baas) Date: Wed Nov 27 10:57:01 2002 Subject: [ODE] compiling CVS In-Reply-To: <003b01c29639$5a4886c0$0200a8c0@P4> Message-ID: <5.1.0.14.0.20021127184821.00cdaa68@i31i33mail.informatik.uni-karlsruhe.de> At 18:20 27.11.2002 +0100, you wrote: >r.exe configurator.c, ...) failed. >make (e=2): The system can not find the specifed file >make: *** [configurator.exe] Error 2 Looks like the same problem I had, too. It can be fixed with a little modification in the Makefile. Change the line CONFIGURATOR_SRC=configurator.c into the following: CONFIGURATOR_SRC=./configurator.c BTW, would it be possible to do this small modification in the cvs tree? (I hope it won't break any other build processes...) - Matthias - From tirobu at gmx.de Wed Nov 27 11:17:02 2002 From: tirobu at gmx.de (Tim) Date: Wed Nov 27 11:17:02 2002 Subject: [ODE] compiling CVS Message-ID: <007b01c29641$03084730$0200a8c0@P4> This is a multi-part message in MIME format. ------=_NextPart_000_0078_01C29649.645890A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi. Thanks for your answers! Using MSVC7 I get the following error: d:\ode\ode\src\dcTriListCollider.h(4): fatal error C1083: Cannot open = include file: 'Opcode.h': No such file or directory The problem is, that there is no file named Opcode.h at all! So what about that? Thanks Tim. ------=_NextPart_000_0078_01C29649.645890A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi.
 
Thanks for your answers!
Using MSVC7 I get the following = error:
 
d:\ode\ode\src\dcTriListCollider.h(4): = fatal error=20 C1083: Cannot open include file: 'Opcode.h': No such file or=20 directory
 
The problem is, that there is no file = named=20 Opcode.h at all!
So what about that?
Thanks Tim.

------=_NextPart_000_0078_01C29649.645890A0-- From thomasharte at lycos.co.uk Wed Nov 27 11:25:02 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Wed Nov 27 11:25:02 2002 Subject: [ODE] My Latest Approach to Polyhedron Collision Management Message-ID: <1038421390011900@lycos-europe.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --=_NextPart_Lycos_0119001038421390_ID Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit >First a question/suggestion regarding the type of BSP tree - have you
>considered (or are you using) a solid-BSP tree? I would imagine that several
>vertexoverlapping tests would become unnecessary as it is sufficient to find
>a vertex that is in a "solid" (illegal) region of the tree to determine that
>a collision must have occured (thus only requiring single point tests
>against the BSP tree).

I'm no BSP expert, but I have the unfortunate problem (unavoidably so) that some of my
models include two sided polygons - i.e. infinitely flat sections of model. This means that
a vertex may penetrated a model but never be inside the model, and is why I am using
edge through polygon tests to detect when intersection has occurred, and applying
constraints to prevent any interpenetration _before_ it occurs. I believe this means that
solid BSPs wouldn't help me much?

>Regarding the vertices on planes problem (and sending the data down bo th BSP
>trees, twice) - won't the one traversal of a BSP tree just yield the
>inverted result of the other BSP traversal? (i.e: case 1: point penetrates
>plane; case 2: plane is penetrated by point)

If I were sending polygons down either BSP tree, this would be true, but if I send
polygons down then I usually have a worse set of bounding hierarchies, leading to
greater inefficiency that way, and it is also more work to make sure I am not testing my
vertices many times. Therefore I send down just the vertices. In doing so, 1 BSP
traversal only checks for when the vertices of one model are rubbing against the
polygons of the other, and in fact I care about when vertices from either model are
rubbing against polygons from the other, leading me to do two traversals in the current
implementation.

This is all based on 'gut feeling' rather than actual practical investigation and comparison,
and I am open to other opinions so - do you think that sending groups of polygons down
the BSP tree, and checking edges/vertices as they are implicitly defined by virtue of the
polygons in question and not worrying too much about doing the same tests multiple
times, or indeed implementing a safeguard against repeated testing, would yield a better
implementation given that I'd save a BSP traversal? My models tend to be 'simple'.

-Thomas

------------------------------------------------------
BA flight sale now at www.lycos.co.uk
Boston, £129 rtn. including tax, Wednesday, 1pm --=_NextPart_Lycos_0119001038421390_ID-- From nnevatie at welho.com Wed Nov 27 11:39:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Wed Nov 27 11:39:02 2002 Subject: [ODE] compiling CVS References: <007b01c29641$03084730$0200a8c0@P4> Message-ID: <001201c29642$bc6b9410$3abdf3d5@wli> Go to: http://www.codercorner.com/Opcode.htm Opcode is an external package specializing in collision detection. I have succesfully used the version 1.2. Compile Opcode to another lib and link with ODE. Cheers ----- Original Message ----- From: "Tim" To: Sent: Wednesday, November 27, 2002 8:15 PM Subject: [ODE] compiling CVS Hi. Thanks for your answers! Using MSVC7 I get the following error: d:\ode\ode\src\dcTriListCollider.h(4): fatal error C1083: Cannot open include file: 'Opcode.h': No such file or directory The problem is, that there is no file named Opcode.h at all! So what about that? Thanks Tim. From thomasharte at lycos.co.uk Wed Nov 27 11:39:44 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Wed Nov 27 11:39:44 2002 Subject: [ODE] Contact Constraints: First Order Slip? Message-ID: <1038421837001983@lycos-europe.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --=_NextPart_Lycos_0019831038421837_ID Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Can anyone explain to me the purpose of the first order slip variables within the dSurfaceParameters structure contained within the dContact structre, used when establishing a contact constraint? My understanding of slip is that it is the difference between the linear velocity a particle wants to travel at by virtue of the body it is attached to, and the speed at which it is travelling over a surface. In the general case, the coefficient of friction is a function of slip - although often it isn't related to slip at all. E.g. if we have a box scraping along a surface, the slip is simply the linear velocity of the body. However, if we are talking about a car wheel, then the slip is the difference between the linear velocity of the outside of the tyre and the speed at which the wheel is moving along the ground. This is important for rubber tyres because the coefficient of friction for rubber is most certainly a function of slip, and a fairly interesting one at that. Anyway, I therefore don't see why I must express 'first order slip', surely ODE already has enough information to calculate it internally? I notice the paramter is described next to the relevant contact flag simply as 'slip', and only later by the corresponding dReal as 'first order slip'. It therefore strikes me that it is probably not asking me for the first order differential of slip (e.g. if the motor attached to my car wheel is changing speed) in order to help with numerical accuracy regarding the discrete model of time. But perhaps that is exactly what it is asking me for? One thing I can understand from the documentation : "this needs more description". -Thomas ------------------------------------------------------ BA flight sale now at http://www.lycos.co.uk. Boston, =A3129 rtn. including tax, Wednesday, 1pm --=_NextPart_Lycos_0019831038421837_ID-- From maddocks at metservice.com Wed Nov 27 12:45:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Wed Nov 27 12:45:02 2002 Subject: [ODE] ODE/Tricollider on linux? Message-ID: <8C058A1A-0240-11D7-92B8-00039394FB86@metservice.com> I did some initial work on a port to gcc (MAC OS X) based on Opcode from the F4 engine. It should work for linux without much hassle. I asked for feedback but no one seemed interested. You can download what I did from... http://homepages.paradise.net.nz/henryj/code/index.html Tricollider has been updated since then, but I'm not going to do anymore until tricollider is integrated because the VCC code is a nightmare. Henry On Wednesday, November 27, 2002, at 11:29 AM, Jeffrey Palmer wrote: > Hello all, > > I was wondering if anyone has gotten ODE and the tricollider code (I > tried the stuff in the NewStuff email to no avail) working under Linux? > > Alternatively, I understand that the tri code is currently being > integrated with ODE - is that in the CVS version yet? If not, is it > bothersome to ask for an ETA? > > I guess I'm just lazy - I'm sort of unwilling to port everything to > linux if it's *about* to be released. ;) > > Thanks, > > - j > > -- > The river is moving. > The blackbird must be flying. > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From russ at q12.org Wed Nov 27 20:55:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 20:55:02 2002 Subject: Re[2]: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <1044162224.20021127105729@gsc-game.kiev.ua> References: <1044162224.20021127105729@gsc-game.kiev.ua> Message-ID: <20021127195951.0c303209.russ@q12.org> > dMyClassColliderFn do not return dCollideMyClassMyClass in > dCreateGeomClass because dMyClass is not set until it return and > dCollideMyClassMyClass do not set in colliders array. ah yes ... i see the problem. i have fixed the code in collision_kernel.cpp. but i don't have a good test case for this right now - i would appreciate if you can try it out and report any problems. russ. -- Russell Smith http://www.q12.org From russ at q12.org Wed Nov 27 21:15:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 21:15:02 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: References: Message-ID: <20021127202012.0ef3615c.russ@q12.org> > Yes the error is happening within dGeomDestroy( box[ 0 ] ); > Here is what the stack looks like when it happens ( from MSVC Context: > bar ) okay, i've found the issue i think. when dBodyDestroy() is being called it was not notifying any attached geoms that it is going to disappear, so when those geoms are destroyed they try to remove themselves from nonexistant linked lists. it's a classic 'accessing freed memory' bug. update from CVS and try it again. let me know what happens. russ. -- Russell Smith http://www.q12.org From nnevatie at welho.com Wed Nov 27 23:13:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Wed Nov 27 23:13:02 2002 Subject: [ODE] Tricollider status clarification Message-ID: <000901c296a5$2bd0f540$3abdf3d5@wli> I'm trying to figure out which one of the many triangle collider combinations associated with ODE is the newest, the fastest or otherwise the best one currently: - ODE 0.03 release package (ODE 0.03 + tricollider in contrib/tri-collider directory) - Current CVS head version (ODE in CVS or ODE 0.0.3 + tricollider in contrib/tri-collider CVS directory) - Erwin's newstuff.gz + patch sent later (both sent to mailing list August-September) (ODE in CVS or ODE 0.0.3) Future development of the triangle collider? How about Opcode? Does the newest version 1.2 work OK with the triangle colliders? If you have tested some or all of these combinations, please share your experiences. Keep up the good work! Cheers From russ at q12.org Wed Nov 27 23:29:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 23:29:02 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: <1038421837001983@lycos-europe.com> References: <1038421837001983@lycos-europe.com> Message-ID: <20021127223342.4a68a6cc.russ@q12.org> > One thing I can understand from the documentation : "this needs more > description". i started to write a long email reply about this then realized that was dumb - i updated the documentation instead. look at the latest userguide, section "7.3.7. Contact" - there a bigger description of the slip parameters. in hindsight calling these numbers 'slip' was a mistake because 'slip' is such an overloaded word in ODE - i should have called them 'FDS' or something else. there's no pictures to accompany the description although there should be ... unfortunately drawing pictures takes a lot of time that i don't have :( russ. -- Russell Smith http://www.q12.org From Nguyen Binh Wed Nov 27 23:35:03 2002 From: Nguyen Binh (Nguyen Binh) Date: Wed Nov 27 23:35:03 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <20021127202012.0ef3615c.russ@q12.org> References: <20021127202012.0ef3615c.russ@q12.org> Message-ID: <6311874734.20021128133956@glassegg.com> Hi , RS> okay, i've found the issue i think. when dBodyDestroy() is being called RS> it was not notifying any attached geoms that it is going to disappear, so RS> when those geoms are destroyed they try to remove themselves from RS> nonexistant linked lists. it's a classic 'accessing freed memory' bug. I think we should follow the FIFO-style in new / delete . We create World first so destroy it last. Then if we move the DestroyGeom to front, everything's OK. RS> update from CVS and try it again. let me know what happens. RS> russ. -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media E.Town Building 7th Floor, 364 CongHoa Street Tan Binh District, HoChiMinh City, VietNam, Phone : +84 8 8109018 Fax : +84 8 8109013 www.glassegg.com --------------------------------------------------------------------- From russ at q12.org Wed Nov 27 23:39:01 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 23:39:01 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <6311874734.20021128133956@glassegg.com> References: <20021127202012.0ef3615c.russ@q12.org> <6311874734.20021128133956@glassegg.com> Message-ID: <20021127224341.55bb6de6.russ@q12.org> > I think we should follow the FIFO-style in new / delete . > We create World first so destroy it last. Then if we move the > DestroyGeom to front, everything's OK. sure, but geoms and bodys can be created/destroyed independently of each other, so ODE should handle whatever order you chose to destroy geoms in. russ. -- Russell Smith http://www.q12.org From russ at q12.org Wed Nov 27 23:44:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 23:44:02 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: <20021127223342.4a68a6cc.russ@q12.org> References: <1038421837001983@lycos-europe.com> <20021127223342.4a68a6cc.russ@q12.org> Message-ID: <20021127224824.3a373168.russ@q12.org> it has just occured to me ... i can't think of any ODE base vehicle sim that actually takes full advantage of ODE's contact modeling capabilities to model different road surfaces. asphalt, concrete, gravel, ice and mud will all have different mu, slip(FDS), soft_cfm and soft_erp parameters. there's potential here for somebody to do a really good job... russ. -- Russell Smith http://www.q12.org From anselm at hook.org Thu Nov 28 00:46:02 2002 From: anselm at hook.org (Anselm Hook) Date: Thu Nov 28 00:46:02 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: <20021127224824.3a373168.russ@q12.org> Message-ID: Hi Russ, What about finding a way to generalize material properties such that contacts could be generated automatically? I'd sure enjoy finding a way to remove the collision callback. In your opinion is this really such a difficult problem or is there some way that the intersection of material properties could be computed reasonably - say as a third party contrib item? One would have to be able to say that a surface is ice, or velcro, or rubber, or gravel and then calculate reasonable mu, slip, soft_cfm, soft_erp out of the intersection of each pair. Even if this can't be automated maybe common intersections could be manually defined by the community and added or maintained as a contribs lib...? - a On Wed, 27 Nov 2002, Russ Smith wrote: > > it has just occured to me ... i can't think of any ODE base vehicle sim > that actually takes full advantage of ODE's contact modeling > capabilities to model different road surfaces. asphalt, concrete, > gravel, ice and mud will all have different mu, slip(FDS), soft_cfm and > soft_erp parameters. there's potential here for somebody to do a really > good job... > > russ. > > -- > Russell Smith > http://www.q12.org > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From slipch Thu Nov 28 02:56:02 2002 From: slipch (slipch) Date: Thu Nov 28 02:56:02 2002 Subject: Re[4]: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <20021127195951.0c303209.russ@q12.org> References: <1044162224.20021127105729@gsc-game.kiev.ua> <20021127195951.0c303209.russ@q12.org> Message-ID: <1086558160.20021128115858@gsc-game.kiev.ua> Hello Russ, Thursday, November 28, 2002, 2:59:51 AM, you wrote: RS> ah yes ... i see the problem. i have fixed the code in RS> collision_kernel.cpp. but i don't have a good test case RS> for this right now - i would appreciate if you can try RS> it out and report any problems. RS> russ. Seems it works all right. But one problem still remains for user definite geometry classes. If I have some user definite classes it always necessary to support right sequence of their creating or colliders would not be set in colliders array again. Of course I can register all user classes in right order before start my simulation. But if I want to support ode stile of creating geometry classes when creating geometries, it is very inconvenient. Why not open setCollider function? It may be useful to have a possibility even reset colliders for all classes. -- Best regards, Konstantin Slipchenko mailto:slipch@gsc-game.kiev.ua From jon_lgridge at hotmail.com Thu Nov 28 06:35:02 2002 From: jon_lgridge at hotmail.com (Jonathan Langridge) Date: Thu Nov 28 06:35:02 2002 Subject: [ODE] Re: Contact Constraints: First Order Slip? Message-ID: As far as I can tell from experimentation, "slip" as defined in the ODE interface is sort of fudge factor. Instead of trying to pull the relative velocities of touching surfaces towards zero by friction, the system will only pull them towards a relative velocity of "slip". In other words, a sliding box will be slowed down until it reaches slip velocity, then it will continue to slide at that velocity forever. I guess this helps simplify constraint calculations. (note: somebody scream if this explanation is rubbish!) On the topic of contacts, I've thought of a couple of things that would help a fair bit in the usual car game that everyone makes with ODE. Since I find the source code fairly impenetrable (Jacobian matrix??) I can't yet implement this stuff myself, but perhaps others will agree that: + it would be nice to have an accurate (conical) friction model available, even if this caused a big performance hit. When objects are near the friction force limit, dependance on friction axes can be quite noticeable. + some feedback from contact joints would be good. For example, the normal force that has been used to correct object velocities (or would normal impulse be more appropriate?) in order to choose appropriate impact sound effect volume. Also, an indication of how much friction force was used (two applications: switching to dynamic friction, and again sound effects depending on the amount of "scraping") Maybe I'll eventually understand how ODE works and be able to code this for my lazy self ;) In the mean time however, ODE is a godsend, and great fun too! Many thanks to Russ & contributors for this masterpiece. Colas, Jon _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From ruud at marketgraph.nl Thu Nov 28 12:23:01 2002 From: ruud at marketgraph.nl (Ruud van Gaal) Date: Thu Nov 28 12:23:01 2002 Subject: [ODE] Contact Constraints: First Order Slip? Message-ID: <20C09F811939D311BA694854E86C778233E4B5@raptor> ... > it has just occured to me ... i can't think of any ODE base > vehicle sim > that actually takes full advantage of ODE's contact modeling > capabilities to model different road surfaces. asphalt, concrete, > gravel, ice and mud will all have different mu, slip(FDS), > soft_cfm and > soft_erp parameters. there's potential here for somebody to > do a really > good job... Actually, mu changes quite considerably with load, slip ratio, temperature etc. :) You would get somewhere with the above, but nothing like a Pacejka model. Ruud (www.racer.nl) From russ at q12.org Thu Nov 28 13:43:01 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 13:43:01 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: References: <20021127224824.3a373168.russ@q12.org> Message-ID: <20021128124744.1d9badff.russ@q12.org> > What about finding a way to generalize material properties such that > contacts could be generated automatically? the trouble is, there are many schemes for generating contact parameters from material properties, and most of the useful schemes are rather ad-hoc. it's impossible to come up with a single scheme that will please everybody. the near-callback provides a convenient place to compute contact parameters, and this is also where contact culling decisions can be made. the alternative to a near-callback is a "get list of all potentially colliding objects" function - but then you have the problem of the caller having to allocate a maximum size return array. consider the case where only 10% of near object-object cases will lead to contacts - the user is required to allocate an array of 10 times the potential maximum number of object-object intersections - not always an easy thing to do. russ. -- Russell Smith http://www.q12.org From c.haarmeijer at keepitsimple.nl Thu Nov 28 13:48:02 2002 From: c.haarmeijer at keepitsimple.nl (Chris Haarmeijer) Date: Thu Nov 28 13:48:02 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <20021127224341.55bb6de6.russ@q12.org> Message-ID: Why not use reference counting on objects? This way, objects are freed whenever they're not in use anymore.... Chris -----Original Message----- From: ode-admin@q12.org [mailto:ode-admin@q12.org]On Behalf Of Russ Smith Sent: donderdag 28 november 2002 4:44 To: Nguyen Binh Cc: ode@q12.org Subject: Re: Re[2]: [ODE] Unhandled exception - access violation > I think we should follow the FIFO-style in new / delete . > We create World first so destroy it last. Then if we move the > DestroyGeom to front, everything's OK. sure, but geoms and bodys can be created/destroyed independently of each other, so ODE should handle whatever order you chose to destroy geoms in. russ. -- Russell Smith http://www.q12.org _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From russ at q12.org Thu Nov 28 13:56:01 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 13:56:01 2002 Subject: [ODE] Re: Contact Constraints: First Order Slip? In-Reply-To: References: Message-ID: <20021128130045.24a94b37.russ@q12.org> > In other words, a sliding box will be slowed down until it reaches > slip velocity, then it will continue to slide at that velocity > forever. I guess this helps simplify constraint calculations. ermmm ... it might look that way, but this is the wrong way to interpret things. see the recently updated documentation. > + it would be nice to have an accurate (conical) friction model yes it would be nice - but it's rather hard to implement the way that ODE is designed right now. but for most applications the friction pyramid approximation model is visually indistinguishable from the real thing. > + some feedback from contact joints would be good. this is not so hard to implement, there is already a dJointSetFeedback() function that provides some information, but this is not exactly what you want. it's on my to-do list to extend dJointSetFeedback() to provide the computed force values *before* they are applied to bodies, so that you can get contact normal force, motor force, etc. russ. -- Russell Smith http://www.q12.org From russ at q12.org Thu Nov 28 13:58:02 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 13:58:02 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: References: <20021127224341.55bb6de6.russ@q12.org> Message-ID: <20021128130304.7cef8101.russ@q12.org> > Why not use reference counting on objects? This way, objects are freed > whenever they're not in use anymore.... this is not the point. we *want* be able to forcibly remove a body when it's still referenced by a geom. russ. -- Russell Smith http://www.q12.org From russ at q12.org Thu Nov 28 14:05:02 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 14:05:02 2002 Subject: Re[4]: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <1086558160.20021128115858@gsc-game.kiev.ua> References: <1044162224.20021127105729@gsc-game.kiev.ua> <20021127195951.0c303209.russ@q12.org> <1086558160.20021128115858@gsc-game.kiev.ua> Message-ID: <20021128130914.3a2ad978.russ@q12.org> > Seems it works all right. good. > But one problem still remains for user definite geometry classes. > If I have some user definite classes it always necessary to support > right sequence of their creating or colliders would not be set in > colliders array again. Of course I can register all user classes in > right order before start my simulation. But if I want to support > ode stile of creating geometry classes when creating geometries, it is > very inconvenient. can you show me a situation that fails? - because i thought i had allowed for arbitrary creation order. dCreateGeomClass() sets a default collider (dCollideUserGeomWithGeom) and does not call the supplied colliders function. it returns the geom class number. the collider function is only referenced by dCollideUserGeomWithGeom() ... so i don't see how creation order makes any difference. > Why not open setCollider function? this is not a good option, because this function exposes some of the internals of the way dCollide() works. exposing this will prevent any further major overhaul of the collision system (not that i have one planned). russ. -- Russell Smith http://www.q12.org From dmcclurg at pandemicstudios.com.au Thu Nov 28 17:35:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 28 17:35:02 2002 Subject: [ODE] new ODE collision Message-ID: should it be allowable to have an empty space in another space? it is convenient for my application because i add/remove geoms to/from groups on the fly to optimize collisions. if it's ok and i'm pretty sure it used to work with an empty group inside a hash space, then i think there is a problem. currently, i get a floating point invalid operation in findLevel() because q=dInfinity frexp (q,&level); this is because the AABB for an empty group (ie, simple space) is set to infinities in dxSpace::computeAABB() in collision_space.cpp From dmcclurg at pandemicstudios.com.au Thu Nov 28 17:44:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 28 17:44:02 2002 Subject: [ODE] new ODE collision Message-ID: In findLevel(), just check for -dInfinity too because... bounds[0] == dInfinity; bounds[1] == -dInfinity; (bounds[1] - bounds[0]) => -dInfinity Here's the patch to findLevel(): static int findLevel (dReal bounds[6]) { // compute q dReal q,q2; q = bounds[1] - bounds[0]; // x bounds q2 = bounds[3] - bounds[2]; // y bounds if (q2 > q) q = q2; q2 = bounds[5] - bounds[4]; // z bounds if (q2 > q) q = q2; if (q == dInfinity || q == -dInfinity) return MAXINT; // find level such that 0.5 * 2^level < q <= 2^level int level; frexp (q,&level); // q = (0.5 .. 1.0) * 2^level (definition of frexp) return level; } -----Original Message----- From: David McClurg Sent: Friday, 29 November 2002 10:34 AM To: ode@q12.org Subject: RE: [ODE] new ODE collision should it be allowable to have an empty space in another space? it is convenient for my application because i add/remove geoms to/from groups on the fly to optimize collisions. if it's ok and i'm pretty sure it used to work with an empty group inside a hash space, then i think there is a problem. currently, i get a floating point invalid operation in findLevel() because q=dInfinity frexp (q,&level); this is because the AABB for an empty group (ie, simple space) is set to infinities in dxSpace::computeAABB() in collision_space.cpp _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From coding at natew.com Fri Nov 29 00:33:01 2002 From: coding at natew.com (Nate W) Date: Fri Nov 29 00:33:01 2002 Subject: [ODE] Contacts and materials In-Reply-To: Message-ID: On Thu, 28 Nov 2002, Anselm Hook wrote: > What about finding a way to generalize material properties such that > contacts could be generated automatically? I'd sure enjoy finding a way > to remove the collision callback. As would I - probably because I've been having fun with C# and I'm eager to put your wrappers to work. :-) Here's how I was thinking the problem might be approached: The wrapper (your C# wrapper, or probably any wrapper) would define a material data structure, something like: typedef struct { void *pUserData; dReal Mu; dReal Bounce; dReal SoftERP; dReal SoftCFM; // etc } Material; All geom objects would have Material pointers in their dGeomGetData / dGeomSetData members, and the wrapper would implement those methods as follows: // GetData implementation return ((Material*) dGeomGetData())->m_Data; // SetData implementation ((Material*) dGeomGetData())->m_Data = p; Then, a wrapper-defined collision callback would work something like this: void Callback (void *, dGeomID o1, dGeomID o2) { int iCount = dCollide (o1, o2, iContacts, &contact[0].geom, sizeof (dContact)); if (iCount) { int iMax = min (iCount, iContacts); for (int iContact = 0; iContact < iMax; iContact++) { Material *pMaterial1 = null; Material *pMaterial2 = null; if (o1) pMaterial1 = dGeomGetData (o1); if (o2) pMaterial2 = dGeomGetData (o2); SetContactParameters (&contact[iContact], pMaterial1, pMaterial2); dJointID ContactJoint = dJointCreateContact (WorldID, CollisionJointGroupID, &contact[iContact]); dJointAttach (ContactJoint, Body1, Body2); } } } The implementation of SetContactParameters is left as an exercise for the reader. :-) But, as Anselm suggested, I think it would make a nice contrib. It would make the C# wrapper considerably more useful, and would probably be helpful for most non-C/C++ applications that want to use ODE, since there would no longer be a need for a callback into the application language. Instead, applications would just set material properties for all of the Geoms, and the SetContactParameters method would take care of material interactions. Comments? -- Nate Waddoups Redmond WA USA http://www.natew.com From russ at q12.org Fri Nov 29 00:37:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 29 00:37:02 2002 Subject: [ODE] new ODE collision In-Reply-To: References: Message-ID: <20021128234118.0f966fb5.russ@q12.org> > In findLevel(), just check for -dInfinity too because... fixed. i also fixed the root of the problem, which is that an empty space was giving a 'backwards infinite' AABB. now it gives a zero AABB. russ. -- Russell Smith http://www.q12.org From slipch Fri Nov 29 01:20:02 2002 From: slipch (slipch) Date: Fri Nov 29 01:20:02 2002 Subject: Re[6]: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <20021128130914.3a2ad978.russ@q12.org> References: <1044162224.20021127105729@gsc-game.kiev.ua> <20021127195951.0c303209.russ@q12.org> <1086558160.20021128115858@gsc-game.kiev.ua> <20021128130914.3a2ad978.russ@q12.org> Message-ID: <992103885.20021129102325@gsc-game.kiev.ua> Hello Russ, Thursday, November 28, 2002, 8:09:14 PM, you wrote: >> Seems it works all right. RS> good. >> But one problem still remains for user definite geometry classes. >> If I have some user definite classes it always necessary to support >> right sequence of their creating or colliders would not be set in >> colliders array again. Of course I can register all user classes in >> right order before start my simulation. But if I want to support >> ode stile of creating geometry classes when creating geometries, it is >> very inconvenient. RS> can you show me a situation that fails? - because i thought i had RS> allowed for arbitrary creation order. dCreateGeomClass() sets a default RS> collider (dCollideUserGeomWithGeom) and does not call the supplied RS> colliders function. it returns the geom class number. the collider RS> function is only referenced by dCollideUserGeomWithGeom() ... so i don't RS> see how creation order makes any difference. I am sorry. It seems to be my fault. I have currently two user classes - tri-mesh and cylinders. When I move creating of tri-mesh before creating cylinders they fall through while all other things remain on tri-mesh. Before this I try cylinder - cylinder collision and it works. Now I try to create tri-mesh before cylinders again and everything works. I is a puzzle for me how it may happen before, maybe I mixed lib ang dll somehow. Now it works grate. -- Best regards, Konstantin Slipchenko mailto:slipch@gsc-game.kiev.ua From franjesus at medtelecom.net Fri Nov 29 12:35:02 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-15?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Fri Nov 29 12:35:02 2002 Subject: [ODE] CVS not working Message-ID: <200211292033.10697.franjesus@medtelecom.net> Having some problems with the access violation/dGeomDestroy issue, i tried to update, but: fran@avalon fran $ cd develop/ode/ fran@avalon ode $ cvs up cvs [update aborted]: connect to q12.org(209.115.250.14):2401 failed: Connection refused -- En fin... que me estoy quitando, ya sólo me pongo de vez en cuando. .: Bulmailing :. From mborigin at hotmail.com Fri Nov 29 16:33:02 2002 From: mborigin at hotmail.com (Malcolm Burton) Date: Fri Nov 29 16:33:02 2002 Subject: [ODE] Opcode and Win32.cpp Message-ID: Hi this is Malcolm... I have WinCVS working fine and have downloaded the latest CVS, I also downloaded the 0.03 tgz. I cannot find Opcode.h, or the Win32.cpp files. VC++7, and Visual Studio .NET compile is working as per the notes for vs7 but complains about opcode.h not found, Win32.cpp not found - and halts. I do not seem to have all the files! Malcolm _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From coding at natew.com Fri Nov 29 23:09:02 2002 From: coding at natew.com (Nate W) Date: Fri Nov 29 23:09:02 2002 Subject: [ODE] Opcode and Win32.cpp In-Reply-To: Message-ID: On Fri, 29 Nov 2002, Malcolm Burton wrote: > downloaded the 0.03 tgz. I cannot find Opcode.h, or the Win32.cpp files. Opcode comes separately: http://www.codercorner.com/Opcode.htm Win32.cpp is not needed. Just delete it from the project and all will be well. I removed it from mine, but apparently not until after I uploaded the contrib. Sorry about that. -- Nate Waddoups Redmond WA USA http://www.natew.com From pml_mrawls at yahoo.com Sat Nov 30 14:28:02 2002 From: pml_mrawls at yahoo.com (Mark Rawls) Date: Sat Nov 30 14:28:02 2002 Subject: [ODE] cvs compiling issues Message-ID: <20021130212752.13403.qmail@web40504.mail.yahoo.com> --0-2059245022-1038691672=:12812 Content-Type: text/plain; charset=us-ascii Hi. I've attempted to compile the cvs version of ODE using msvc7 and also GNU make. MSVC7 complained about external ref to dInfinityValue (maybe this was meant to be dInfinity which I see is used in the code several times, but not dInifnityValue?), and some other things; I got the impression it wasn't up to date with the latest cvs version: is this true? Because of this, I tried to use GNU make. Using GNU make, I get these errors which I believe might be problems with the source code... step.cpp ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(731) : error C2664: 'dSet! Value' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called make: *** [ode/src/step.obj] Error 2 Also, I tried to get a more recent version of cvs to see if this has been fixed, but WinCVS gives me this message: connect to q12.org(q12.org):2401 failed: No connection could be made because the target machine actively refused it. Is there something going on with the server that connections are being refused for a certain amount of time, or is this something wrong with my configuration (which worked before)? --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-2059245022-1038691672=:12812 Content-Type: text/html; charset=us-ascii

Hi.

I've attempted to compile the cvs version of ODE using msvc7 and also GNU make.  MSVC7 complained about external ref to dInfinityValue (maybe this was meant to be dInfinity which I see is used in the code several times, but not dInifnityValue?), and some other things; I got the impression it wasn't up to date with the latest cvs version: is this true?   Because of this, I tried to use GNU make.

Using GNU make, I get these errors which I believe might be problems with the source code...

step.cpp
ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi
s operator or a conversion to a type acceptable to the predefined operator

ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr
om 'dInfBytes' to 'dReal'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called

ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi
s operator or a conversion to a type acceptable to the predefined operator

ode\src\step.cpp(731) : error C2664: 'dSet! Value' : cannot convert parameter 3 fr
om 'dInfBytes' to 'dReal'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called
make: *** [ode/src/step.obj] Error 2

Also, I tried to get a more recent version of cvs to see if this has been fixed, but WinCVS gives me this message:

connect to q12.org(q12.org):2401 failed: No connection could be made because the target machine actively refused it.

Is there something going on with the server that connections are being refused for a certain amount of time, or is this something wrong with my configuration (which worked before)?



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-2059245022-1038691672=:12812-- From coding at natew.com Sat Nov 30 14:56:01 2002 From: coding at natew.com (Nate W) Date: Sat Nov 30 14:56:01 2002 Subject: [ODE] cvs compiling issues In-Reply-To: <20021130212752.13403.qmail@web40504.mail.yahoo.com> Message-ID: On Sat, 30 Nov 2002, Mark Rawls wrote: > I've attempted to compile the cvs version of ODE using msvc7 [...] I > got the impression it wasn't up to date with the latest cvs version: > is this true? Because of this, I tried to use GNU make. That's true. I submitted the msvc7 project quite a while ago, and I know there have been a number of changes to ODE since then. I'll update the msvc7 contrib as soon as I get around up updating my local ODE code... unless someone else gets to it first (hint, hint). -- Nate Waddoups Redmond WA USA http://www.natew.com From russ at q12.org Sat Nov 30 16:21:01 2002 From: russ at q12.org (Russ Smith) Date: Sat Nov 30 16:21:01 2002 Subject: [ODE] cvs compiling issues In-Reply-To: <20021130212752.13403.qmail@web40504.mail.yahoo.com> References: <20021130212752.13403.qmail@web40504.mail.yahoo.com> Message-ID: <20021130152618.6e6dc902.russ@q12.org> > Also, I tried to get a more recent version of cvs to see if this has > been fixed, but WinCVS gives me this message: > > connect to q12.org(q12.org):2401 failed: No connection could be made > because the target machine actively refused it. the CVS server is down, i'm hoping to get it fixed shortly. russ. -- Russell Smith http://www.q12.org From russ at q12.org Sat Nov 30 17:00:02 2002 From: russ at q12.org (Russ Smith) Date: Sat Nov 30 17:00:02 2002 Subject: [ODE] cvs compiling issues In-Reply-To: <20021130152618.6e6dc902.russ@q12.org> References: <20021130212752.13403.qmail@web40504.mail.yahoo.com> <20021130152618.6e6dc902.russ@q12.org> Message-ID: <20021130160426.4dcd1863.russ@q12.org> > the CVS server is down, i'm hoping to get it fixed shortly. the CVS server is up again. russ. -- Russell Smith http://www.q12.org From stephan at eisscholle.de Fri Nov 1 02:09:02 2002 From: stephan at eisscholle.de (Stephan Heigl) Date: Fri Nov 1 02:09:02 2002 Subject: [ODE] Tri-Collider code and OpCode 1.2? Message-ID: <000c01c28187$268650e0$0411a8c0@tonline> This is a multi-part message in MIME format. ------=_NextPart_000_0009_01C2818F.88079560 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, how does opcode 1.2 support for the tri-collider come along? I am = looking forward to it since opcode 1.0 isn't available for Unix. Thanks. - Stephan ------=_NextPart_000_0009_01C2818F.88079560 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
how does opcode 1.2 support for the = tri-collider=20 come along? I am looking forward to it since opcode 1.0 isn't available = for=20 Unix.
 
Thanks.
- Stephan
------=_NextPart_000_0009_01C2818F.88079560-- From Remko at act-3d.com Fri Nov 1 06:16:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Fri Nov 1 06:16:02 2002 Subject: [ODE] GTA3 and Physics Message-ID: <278777570.1387675341.98@server> Hi, We implemented ODE in our real-time 3D authoring tool. I created a demo called 'Monster Mayhem' that demonstrates the vehicle simulation capabilities of ODE. You get to drive around in stunt level with ramps, loopings and jumps. There are power-ups spread trough the level that change the car into a monster truck, reduce gravity, speed up time, or give the car a turbo engine. The results are just as good as the physics in GTA3. The capabilities of ODE really amazed me. To be honest, the results are better than I expected. To get everything working, we added several extensions to ODE. We made the collision routine work with our binary partitioning tree and we implemented better polygon collision. We also build in a feature so you can pin the simulation down to a certain frequency. This is VERY important because this ensures your perfectly tweaked simulation will run the same way on any system. The source is available in our SDK. The SDK is downloadable in our support section. Another important feature we added is angular velocity damping. We simply reduce the angular velocity each step so rotating objects can come to a halt (simulated rotational friction). This feature is very important to get stable vehicles. By applying an angular velocity damping to the body of the car, you prevent it from tipping over too quickly (keeping the simulation fun). These are the bottlenecks of ODE I found during a month of full time testing: - Lack of certain collision shapes (cylinder, cone, pyramid) - Stack overflow when there are too many collisions (because of a recursive function) If this occurs, the simulation is too slow anyway. - Box stacking problem (a lot of info about this in the mailing list) - 'Bending wheels' when the wheel rotate extremely fast (this can be prevented by tweaking the simulation) - Except for the hinge2 joint, the joints are not really usable, they are very un-rigid and they have a hard time keeping bodies together. The joints can only keep bodies together if the bodies are not too heavy.(Maybe we did something wrong here but I can't get a regular hinge to behave as you would expect. At first, I planned a bridge in the demo but the hinge could not keep the bridge into its place. Tweaking the CFM and ERP values made some improvements but they did not solve the problem.) - The way ODE works, makes heavy objects or objects that are under a lot of stress behave in a spongy way. This is not a real problem because you can solve it by tweaking the simulation and it is the reason why ODE is so very stable. You can see this effect at the beginning of the demo where you see the balls squash into each other because the ball at the bottom is under so much stress. In some cases, this is actually a nice side effect. - It is impossible to prevent bodies from rotating. This is important if you want to make a 1st person camera using ODE. Now, the character will always roll down a shallow slope. Maybe this is solvable now, suggestions are welcome. In the end, I must say ODE does a great job. The lack of certain collision shapes can be solved by coding them yourself and there already is a cylinder shape in development. The box-stacking problem is not an ODE problem but just a problem in the collision detection routine. This problem can be solved with not to much effort it is just a matter of waiting until someone finds some time to fix it. I do not have a clue about the hinges but there is a lot you can do without using hinges :) ODE is very forgiving when it comes to errors. I can throw in random objects and ODE solves the physics perfectly. ODE is a great alternative to commercial physics engines although it is more limited of course. Hey, its free and it works like a charm so why should you complain about it? Have a look: http://www.quest3d.com You can download the demo version of Quest3D and experiment with ODE yourself. -Remko (P.S. Russ, If you read this, can you put our page on your community list? http://www.quest3d.com/index.php3?id=116) -----Original Message----- From: Aanand Narayanan.P.P [mailto:aanand@milestoneindia.com] Sent: Wednesday, October 30, 2002 10:05 AM To: ode@q12.org; Remko Jacobs (act-3d.com) Subject: [ODE] GTA3 and Physics Does anybody know which method (direct LCP, iterative LCP, penalty etc) was used in the (vehicle) physics for GTA3? Is it possible to achieve the same level of stability with ODE? I would like to hear from other people who have used ODE for full fledged physics simulations. Thanks AN --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/2002 _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From martin at metahuman.org Fri Nov 1 06:33:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Fri Nov 1 06:33:02 2002 Subject: [ODE] GTA3 and Physics References: <278777570.1387675341.98@server> Message-ID: <3DC28266.C376AC14@metahuman.org> "Remko Jacobs (act-3d.com)" wrote: > > Hi, > > - Except for the hinge2 joint, the joints are not really usable, ... > I do not have a clue > about the hinges but there is a lot you can do without using hinges :) When you say "the joints are not really usable," did you mean hinges? Or, for example, do you consider the ball and socket joints to also be usable? > - The way ODE works, makes heavy objects or objects that are under a lot > of stress behave in a spongy way. I wonder whether this could be reduced by adding a constraint a timestep early, to help prevent objects from penetrating in the first place. From mattias at cambrianlabs.com Fri Nov 1 11:14:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Fri Nov 1 11:14:02 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> References: <278777570.1387675341.98@server> Message-ID: > (P.S. Russ, If you read this, can you put our page on your community > list? http://www.quest3d.com/index.php3?id=116) Excellent game! cheers, m From russ at q12.org Fri Nov 1 12:11:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 1 12:11:02 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: > We implemented ODE in our real-time 3D authoring tool. I created a demo > called 'Monster Mayhem' that demonstrates the vehicle simulation nice! > - Stack overflow when there are too many collisions (because of a > recursive function) If this occurs, the simulation is too slow anyway. what recursive function do you mean? perhaps you mean a stack overflow in the main ODE solver function - because too many collisions = too many contacts = a big matrix that is slow to solve. if ODE moves to an iterative LCP method then this problem might go away (lots of experiments to do here). > - 'Bending wheels' when the wheel rotate extremely fast (this can be > prevented by tweaking the simulation) yes ... when i get all the other things on the TO-DO out of the way, i'd like to try some solutions for this problem (i.e. 'glue the wheels back on'). > - Except for the hinge2 joint, the joints are not really usable, they are > very un-rigid and they have a hard time keeping bodies together. this is surprising ... but i can think of two ways this could happen. (1) if the vehicle is rotating quickly through the air, errors in the simulation may cause the wheels to pull apart. (2) if you are directly setting the velocity of individual bodies to implement damping, the joints will certainly pull apart, as the velocities at the joint points will no longer match up. also on the TO-DO list is stable rotational damping. > - The way ODE works, makes heavy objects or objects that are under a lot > of stress behave in a spongy way. this should only be the case if that CFM number is high. > (P.S. Russ, If you read this, can you put our page on your community > list? http://www.quest3d.com/index.php3?id=116) sure, this might take until after the weekend though. russ. -- Russ Smith http://www.q12.org/ From gazza at shaw.ca Fri Nov 1 17:10:02 2002 From: gazza at shaw.ca (Gazza) Date: Fri Nov 1 17:10:02 2002 Subject: [ODE] How do I code my own constraints ? Message-ID: <000a01c281be$11650e40$03324c18@vf.shawcable.net> This is a multi-part message in MIME format. --Boundary_(ID_1JqNyQXxqSfOhiMWDfjTSQ) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Hi, I'm trying to understand how to compute the constraints matrix for a particular constraint. I'm of the understanding that a 'contact' constraint would remove a DOF along the contact normal, thus requiring 1 value. When solved, the force/impulse is applied along the normal. For a ball joint, 3 DOF's are removed - x,y,z translations, and for a hinge, 5 DOF's are removed - x,y,z translation and say x,y rotation. Am I correct in these assumptions ? What I don't understand (or can find any documentation/papers on) is how the value(s) are computed for the A(n*n) matrix and b(n*1) for each constraint, which tell the system to remove these DOF's. Any help given is most appreciated. Thanks in advance. Gazza --Boundary_(ID_1JqNyQXxqSfOhiMWDfjTSQ) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: 7BIT
Hi,
 
I'm trying to understand how to compute the constraints matrix for a particular constraint.
 
I'm of the understanding that a 'contact' constraint would remove a DOF along the contact normal, thus requiring 1 value.  When solved, the force/impulse is applied along the normal.  For a ball joint, 3 DOF's are removed - x,y,z translations,  and for a hinge, 5 DOF's are removed - x,y,z translation and say x,y rotation.  Am I correct in these assumptions ?
 
What I don't understand (or can find any documentation/papers on) is how the value(s) are computed for the A(n*n) matrix and b(n*1) for each constraint, which tell the system to remove these DOF's.
 
Any help given is most appreciated.
 
Thanks in advance.
  Gazza
--Boundary_(ID_1JqNyQXxqSfOhiMWDfjTSQ)-- From aanand_pp at myrealbox.com Fri Nov 1 17:11:44 2002 From: aanand_pp at myrealbox.com (Aanand Narayanan.P.P) Date: Fri Nov 1 17:11:44 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: <000001c281cd$f6ae6be0$4ac1c0cb@digitalcrusher> Hi Thanks for all that info from everyone. > The source is available in our SDK. The SDK > is downloadable in our support section. Is it freely downloadable? > - The way ODE works, makes heavy objects or objects that are under a lot > of stress behave in a spongy way. ... I guess that's the reason why it is safer to limit the mass of objects between 1.0 and 10.0. Am I right, Russ? Thanks for the info, it was really useful and I should watch out for that stack overflow problem :). Cheers AN From coding at natew.com Fri Nov 1 18:10:02 2002 From: coding at natew.com (Nate W) Date: Fri Nov 1 18:10:02 2002 Subject: [ODE] msvc dlls? In-Reply-To: Message-ID: On Thu, 31 Oct 2002, Anselm Hook wrote: > Using msvc 7.0 I think that I have to have __dllexport... defined - but > none of the methods in objects.h have SHAREDLIBEXPORT as a prefix. [...] > > But I am a bit baffled about how I did it last time - I don't think I was > using cygwin... maybe these define prefixes were removed? Did you run the configurator? SHAREDLIBEXPORT is my my config.h, which if I recall correctly is generated by the configurator program. I haven't actually generated my config.h in a long time since I've just been copying that file from previous build trees. > Also I noticed that there's an include of alloca.h - msdev doesn't have > that. I think that may be another configurator/config.h thing. -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Fri Nov 1 22:13:01 2002 From: coding at natew.com (Nate W) Date: Fri Nov 1 22:13:01 2002 Subject: [ODE] slider trouble In-Reply-To: <20021031221053.291c8cac.russ@q12.org> Message-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --1363170581-1279554879-1036185734=:7964 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 31 Oct 2002, Russ Smith wrote: > nate, can you verify the fix? Unfortunately, no... I've attached another test that bounces things off the ground a bit differently, and you can watch two blocks bounce skyward and then gradually spin up to an explosion. How's this for an alternate approach: apply the linear force created by the joint stop at each body's center of mass, but apply it in the direction of the other body's center of mass, rather than along the slider axis (project the force vector along the direction of the other body's center of mass). Would that also cancel out the torque effect, without adding torques to the bodies explicitly? Also, could this problem be related to the problem where a single flying spinning body also gains angular momentum? I actually saw the slider-limit acceleration problem months ago, but I mistook it for the explicit integration problem described in the FAQ in 11.12. -- Nate Waddoups Redmond WA USA http://www.natew.com --1363170581-1279554879-1036185734=:7964 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="test_sliderstops.cpp" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="test_sliderstops.cpp" LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioNDQogKiAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKg0NCiAqIE9wZW4gRHluYW1pY3MgRW5naW5lLCBD b3B5cmlnaHQgKEMpIDIwMDEsMjAwMiBSdXNzZWxsIEwuIFNtaXRoLiAgICAg ICAqDQ0KICogQWxsIHJpZ2h0cyByZXNlcnZlZC4gIEVtYWlsOiBydXNzQHEx Mi5vcmcgICBXZWI6IHd3dy5xMTIub3JnICAgICAgICAgICoNDQogKiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKg0NCiAqIFRoaXMgbGlicmFyeSBpcyBm cmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3Ig ICAgICAgICAqDQ0KICogbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiBF SVRIRVI6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNDQog KiAgICgxKSBUaGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNl IGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSAgKg0NCiAqICAgICAgIFNvZnR3 YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIuMSBvZiB0aGUgTGlj ZW5zZSwgb3IgKGF0ICAqDQ0KICogICAgICAgeW91ciBvcHRpb24pIGFueSBs YXRlciB2ZXJzaW9uLiBUaGUgdGV4dCBvZiB0aGUgR05VIExlc3NlciAgICAg ICoNDQogKiAgICAgICBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGlzIGluY2x1 ZGVkIHdpdGggdGhpcyBsaWJyYXJ5IGluIHRoZSAgICAgKg0NCiAqICAgICAg IGZpbGUgTElDRU5TRS5UWFQuICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAqDQ0KICogICAoMikgVGhlIEJTRC1zdHls ZSBsaWNlbnNlIHRoYXQgaXMgaW5jbHVkZWQgd2l0aCB0aGlzIGxpYnJhcnkg aW4gICAgICoNDQogKiAgICAgICB0aGUgZmlsZSBMSUNFTlNFLUJTRC5UWFQu ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKg0NCiAq ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAqDQ0KICogVGhpcyBsaWJyYXJ5 IGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1 c2VmdWwsICAgICAgICoNDQogKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7 IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAg Kg0NCiAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJ Q1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBmaWxlcyAgICAqDQ0KICogTElDRU5T RS5UWFQgYW5kIExJQ0VOU0UtQlNELlRYVCBmb3IgbW9yZSBkZXRhaWxzLiAg ICAgICAgICAgICAgICAgICAgICoNDQogKiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKg0NCiAqKioqKioqKioqKioqKioqKio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R1cm4gMDsNDQp9DQ0K --1363170581-1279554879-1036185734=:7964-- From russ at q12.org Fri Nov 1 23:46:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 1 23:46:02 2002 Subject: [ODE] slider trouble In-Reply-To: References: <20021031221053.291c8cac.russ@q12.org> Message-ID: <20021101225009.53deb28e.russ@q12.org> > > nate, can you verify the fix? > > Unfortunately, no... I've attached another test that bounces things off > the ground a bit differently, and you can watch two blocks bounce skyward > and then gradually spin up to an explosion. i'll check this out after the weekend. russ. -- Russell Smith http://www.q12.org From jeffreyweber at hotmail.com Sat Nov 2 08:07:01 2002 From: jeffreyweber at hotmail.com (Jeff Weber) Date: Sat Nov 2 08:07:01 2002 Subject: [ODE] GTA3 and Physics Message-ID: Quick question. What "geometry" are you using for you wheels? Are you using one of the built in ode geometries, or your own? ----Original Message Follows---- From: "Remko Jacobs (act-3d.com)" To: "ODE@q12.org" Subject: RE: [ODE] GTA3 and Physics Date: Fri, 1 Nov 2002 14:13:00 +0100 Hi, We implemented ODE in our real-time 3D authoring tool. I created a demo called 'Monster Mayhem' that demonstrates the vehicle simulation capabilities of ODE. You get to drive around in stunt level with ramps, loopings and jumps. There are power-ups spread trough the level that change the car into a monster truck, reduce gravity, speed up time, or give the car a turbo engine. The results are just as good as the physics in GTA3. The capabilities of ODE really amazed me. To be honest, the results are better than I expected. To get everything working, we added several extensions to ODE. We made the collision routine work with our binary partitioning tree and we implemented better polygon collision. We also build in a feature so you can pin the simulation down to a certain frequency. This is VERY important because this ensures your perfectly tweaked simulation will run the same way on any system. The source is available in our SDK. The SDK is downloadable in our support section. Another important feature we added is angular velocity damping. We simply reduce the angular velocity each step so rotating objects can come to a halt (simulated rotational friction). This feature is very important to get stable vehicles. By applying an angular velocity damping to the body of the car, you prevent it from tipping over too quickly (keeping the simulation fun). These are the bottlenecks of ODE I found during a month of full time testing: - Lack of certain collision shapes (cylinder, cone, pyramid) - Stack overflow when there are too many collisions (because of a recursive function) If this occurs, the simulation is too slow anyway. - Box stacking problem (a lot of info about this in the mailing list) - 'Bending wheels' when the wheel rotate extremely fast (this can be prevented by tweaking the simulation) - Except for the hinge2 joint, the joints are not really usable, they are very un-rigid and they have a hard time keeping bodies together. The joints can only keep bodies together if the bodies are not too heavy.(Maybe we did something wrong here but I can't get a regular hinge to behave as you would expect. At first, I planned a bridge in the demo but the hinge could not keep the bridge into its place. Tweaking the CFM and ERP values made some improvements but they did not solve the problem.) - The way ODE works, makes heavy objects or objects that are under a lot of stress behave in a spongy way. This is not a real problem because you can solve it by tweaking the simulation and it is the reason why ODE is so very stable. You can see this effect at the beginning of the demo where you see the balls squash into each other because the ball at the bottom is under so much stress. In some cases, this is actually a nice side effect. - It is impossible to prevent bodies from rotating. This is important if you want to make a 1st person camera using ODE. Now, the character will always roll down a shallow slope. Maybe this is solvable now, suggestions are welcome. In the end, I must say ODE does a great job. The lack of certain collision shapes can be solved by coding them yourself and there already is a cylinder shape in development. The box-stacking problem is not an ODE problem but just a problem in the collision detection routine. This problem can be solved with not to much effort it is just a matter of waiting until someone finds some time to fix it. I do not have a clue about the hinges but there is a lot you can do without using hinges :) ODE is very forgiving when it comes to errors. I can throw in random objects and ODE solves the physics perfectly. ODE is a great alternative to commercial physics engines although it is more limited of course. Hey, its free and it works like a charm so why should you complain about it? Have a look: http://www.quest3d.com You can download the demo version of Quest3D and experiment with ODE yourself. -Remko (P.S. Russ, If you read this, can you put our page on your community list? http://www.quest3d.com/index.php3?id=116) -----Original Message----- From: Aanand Narayanan.P.P [mailto:aanand@milestoneindia.com] Sent: Wednesday, October 30, 2002 10:05 AM To: ode@q12.org; Remko Jacobs (act-3d.com) Subject: [ODE] GTA3 and Physics Does anybody know which method (direct LCP, iterative LCP, penalty etc) was used in the (vehicle) physics for GTA3? Is it possible to achieve the same level of stability with ODE? I would like to hear from other people who have used ODE for full fledged physics simulations. Thanks AN --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/2002 _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp From filipe.dias at mind.pt Sat Nov 2 08:51:01 2002 From: filipe.dias at mind.pt (Filipe Dias) Date: Sat Nov 2 08:51:01 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: <200211021550.gA2FoSu02059@hook.org> I liked it much! the only criticism I have is that I find the car to stable... What are you doing to make the car always stand up? My guess is you have a "weight" under the wheels of the car.. Oh, and it is nearly impossible to make the loop.. Fil. -----Original Message----- From: "Remko Jacobs (act-3d.com)" To: "ODE@q12.org" Date: Fri, 1 Nov 2002 14:13:00 +0100 Subject: RE: [ODE] GTA3 and Physics > Hi, > > We implemented ODE in our real-time 3D authoring tool. I created a demo > > called 'Monster Mayhem' that demonstrates the vehicle simulation > capabilities of ODE. You get to drive around in stunt level with ramps, > > loopings and jumps. There are power-ups spread trough the level that > change the car into a monster truck, reduce gravity, speed up time, or > > give the car a turbo engine. The results are just as good as the > physics > in GTA3. The capabilities of ODE really amazed me. To be honest, the > results are better than I expected. > > To get everything working, we added several extensions to ODE. We made > > the collision routine work with our binary partitioning tree and we > implemented better polygon collision. We also build in a feature so you > > can pin the simulation down to a certain frequency. This is VERY > important because this ensures your perfectly tweaked simulation will > run > the same way on any system. The source is available in our SDK. The SDK > > is downloadable in our support section. > > Another important feature we added is angular velocity damping. We > simply > reduce the angular velocity each step so rotating objects can come to a > > halt (simulated rotational friction). This feature is very important to > > get stable vehicles. By applying an angular velocity damping to the > body > of the car, you prevent it from tipping over too quickly (keeping the > simulation fun). > > These are the bottlenecks of ODE I found during a month of full time > testing: > > - Lack of certain collision shapes (cylinder, cone, pyramid) > - Stack overflow when there are too many collisions (because of a > recursive function) If this occurs, the simulation is too slow anyway. > - Box stacking problem (a lot of info about this in the mailing list) > - 'Bending wheels' when the wheel rotate extremely fast (this can be > prevented by tweaking the simulation) > - Except for the hinge2 joint, the joints are not really usable, they > are > very un-rigid and they have a hard time keeping bodies together. The > joints can only keep bodies together if the bodies are not too > heavy.(Maybe we did something wrong here but I can't get a regular > hinge > to behave as you would expect. At first, I planned a bridge in the demo > > but the hinge could not keep the bridge into its place. Tweaking the > CFM > and ERP values made some improvements but they did not solve the > problem.) > - The way ODE works, makes heavy objects or objects that are under a > lot > of stress behave in a spongy way. This is not a real problem because > you > can solve it by tweaking the simulation and it is the reason why ODE is > > so very stable. You can see this effect at the beginning of the demo > where you see the balls squash into each other because the ball at the > > bottom is under so much stress. In some cases, this is actually a nice > > side effect. > - It is impossible to prevent bodies from rotating. This is important > if > you want to make a 1st person camera using ODE. Now, the character will > > always roll down a shallow slope. Maybe this is solvable now, > suggestions > are welcome. > > In the end, I must say ODE does a great job. The lack of certain > collision shapes can be solved by coding them yourself and there > already > is a cylinder shape in development. The box-stacking problem is not an > > ODE problem but just a problem in the collision detection routine. This > > problem can be solved with not to much effort it is just a matter of > waiting until someone finds some time to fix it. I do not have a clue > about the hinges but there is a lot you can do without using hinges :) > > ODE is very forgiving when it comes to errors. I can throw in random > objects and ODE solves the physics perfectly. ODE is a great > alternative > to commercial physics engines although it is more limited of course. > Hey, > its free and it works like a charm so why should you complain about it? > > Have a look: > http://www.quest3d.com > > You can download the demo version of Quest3D and experiment with ODE > yourself. > > -Remko > > (P.S. Russ, If you read this, can you put our page on your community > list? http://www.quest3d.com/index.php3?id=116) > > > -----Original Message----- > From: Aanand Narayanan.P.P [mailto:aanand@milestoneindia.com] > Sent: Wednesday, October 30, 2002 10:05 AM > To: ode@q12.org; Remko Jacobs (act-3d.com) > Subject: [ODE] GTA3 and Physics > > > > > Does anybody know which method (direct LCP, iterative LCP, penalty etc) > was used in the (vehicle) physics for GTA3? > Is it possible to achieve the same level of stability with ODE? I would > like to hear from other people who have used ODE for full fledged > physics simulations. > > Thanks > AN > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/2002 > > > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From ander_taylor at hotmail.com Sat Nov 2 16:21:02 2002 From: ander_taylor at hotmail.com (Ander Taylor) Date: Sat Nov 2 16:21:02 2002 Subject: [ODE] Complie to a Lib Message-ID: Hi, I am new to ODE and C++. I am working on a wrapper to allow the use of ODE from .Net, extending the work already done by Jeff Weber. Anyway, my qestion, how should I complie ODE to a Lib from VC++7? Does anyone know the settings I should use? Cheers, Ander _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From coding at natew.com Sat Nov 2 23:49:02 2002 From: coding at natew.com (Nate W) Date: Sat Nov 2 23:49:02 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: On Sat, 2 Nov 2002, Ander Taylor wrote: > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > from .Net, extending the work already done by Jeff Weber. Have a look at Anselm Hook's work too, if you haven't seen it yet: http://p2pmap.org/cgi-bin/cvsweb.cgi/p2pmap/src/ode/ode.cs?rev=1.3&content-type=text/x-cvsweb-markup > Anyway, my qestion, how should I compile ODE to a Lib from VC++7? Does > anyone know the settings I should use? If you want to build a DLL, have a look at the contrib/msvc7/ CVS folder, it's got .sln files for regular ODE and ODE with the tri-collider extension. -- Nate Waddoups Redmond WA USA http://www.natew.com From ps_yumemi at yahoo.com Sun Nov 3 02:10:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sun Nov 3 02:10:02 2002 Subject: [ODE] rotation matrix Message-ID: <20021103090928.66813.qmail@web40509.mail.yahoo.com> hello, i have a simple question: how do you access the contents of the rotation matrix that the function dGeomGetRotation or dBodyGetRotation give out? I know that the pointer is only a dReal and the matrix i need is a dMatrix3. How do you resolve this? i really need to pass that info somehow. thanks pia __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From coding at natew.com Sun Nov 3 03:10:02 2002 From: coding at natew.com (Nate W) Date: Sun Nov 3 03:10:02 2002 Subject: [ODE] rotation matrix In-Reply-To: <20021103090928.66813.qmail@web40509.mail.yahoo.com> Message-ID: On Sun, 3 Nov 2002, pia dalusong wrote: > i have a simple question: how do you access the > contents of the rotation matrix that the function > dGeomGetRotation or dBodyGetRotation give out? > I know that the pointer is only a dReal and the matrix > i need is a dMatrix3. How do you resolve this? > i really need to pass that info somehow. Have a look at the setTransform function in drawstuff.cpp, around line 325. This shows how to use the array of values returned by a dBodyGetRotation call to populate a matrix for OpenGL. Note that dBodyGetRotation returns a 4x3 matrix, so every fourth scalar is ignored during the conversion. -- Nate Waddoups Redmond WA USA http://www.natew.com From kaffiene at xtra.co.nz Sun Nov 3 12:31:01 2002 From: kaffiene at xtra.co.nz (Peter) Date: Sun Nov 3 12:31:01 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: <001301c2836f$78a17190$5c02a8c0@peter> > - 'Bending wheels' when the wheel rotate extremely fast (this can be > prevented by tweaking the simulation) Can I ask which tweaks you used? Peter. From anselm at hook.org Sun Nov 3 20:12:02 2002 From: anselm at hook.org (Anselm Hook) Date: Sun Nov 3 20:12:02 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: > On Sat, 2 Nov 2002, Ander Taylor wrote: > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > from .Net, extending the work already done by Jeff Weber. Cool! > Have a look at Anselm Hook's work too, if you haven't seen it yet: I recently moved my version here - you'll want this copy if you use this: http://p2pmap.org/cgi-bin/cvsweb.cgi/p2pmap/src/ode/contrib/csharp/ > > Anyway, my qestion, how should I compile ODE to a Lib from VC++7? Does > > anyone know the settings I should use? > > If you want to build a DLL, have a look at the contrib/msvc7/ CVS folder, > it's got .sln files for regular ODE and ODE with the tri-collider > extension. Some misc thoughts re C# ODE bindings: I think it's a good idea to do a C# wrapper. I have one that you can grab pieces from as Nate pointed out - although I simply haven't had time to finish it up. There might be some merit in my approach however - regardless of if you do your own or not: 1) I made C# methods that directly bind to all DLL methods. All of the raw dll methods I stuck into a single class - and made them static. (so effectively I have a big bucket of static methods) 2) Then - separately - I made C# classes that called the static methods. 3) I used no-arg constructors so that it was easier to manufacture my ODE objects using an XML notation. The factory methods that discover the ODE objects (using the C# type reflection) are easier to deal with if you can invoke no-arg constructors on them... This *is* a bit of a hassle; it means that you have to 'late submit' ODE bodies to the world... my code does that. Oh, one other reason for no-arg constructors - it allows out of order instantiation of objects. The reason for the two stage approach is that it allows other developers to build their own class abstraction layer on top of the ODE API. ...um... otherwise I think the only thing that I did that (while actually pretty lame and pretty incomplete) was to try to keep the collision callback in C. I slightly extended the ODE DLL to have a new self managing callback method for collision. [ The reason that Russ makes us normally handle collision ourselves is because collision is subjective to the application. There are many ways two surfaces can interact. Imagine sandpaper and granite, or granite and granite, or gummy bears and ceramic tile... It turns out that finding ways to abstract surface properties in the general case is not easy to solve.] In the case of C# you really don't want to have an inner loop like this being exposed to C# - my own tests and others show that it is slow: http://www.tempest-sw.com/benchmark/ http://www.kuro5hin.org/story/2002/6/25/122237/078 (although I expect that this will be untrue soon) It might be possible to build intersection tables that are exposed to C# - you could define the intersection of material properties. Finally... I just gave a little talk recently on using C# for games - I will post my notes somewhere on my website - I'll make a link at: http://p2pmap.org/technology/csharp.html for now. Basically I think binding ODE to C# is good but I wouldn't use C# for the mainloop if you want performance... - a From anselm at hook.org Sun Nov 3 22:30:02 2002 From: anselm at hook.org (Anselm Hook) Date: Sun Nov 3 22:30:02 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: There is one good reason not to use my C# binding - I am relying on a class based Vector and Matrix math library (that I ported from an open source clone of Java3D). I strongly suggest using a struct based Vector and Matrix library such as http://www.exocortex.org/3dengine or others (his starting point is BSD licenced). I'll bet Jeff Weber has solved this correctly - where is Jeff's site? Jeff? - a > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > > from .Net, extending the work already done by Jeff Weber. From ps_yumemi at yahoo.com Mon Nov 4 00:31:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Mon Nov 4 00:31:02 2002 Subject: [ODE] rotation matrix Message-ID: <20021104073051.52060.qmail@web40507.mail.yahoo.com> hello, first of all thanks for replying. i tried to pass the values to the dMatrix3 the same way in the setTransform function in the drawstuff.cpp file. unfortunately, my mobot is heading towards the opposite direction now. what i did was this : const dReal *mobot_pos; const dReal *mobot_rot; mobot_rot = dBodyGetRotation (mobot.chassis.body); mobot_pos = dBodyGetPosition (mobot.chassis.body); mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[4]; mobotdata.rota[2]=mobot_rot[8]; mobotdata.rota[3]=0; mobotdata.rota[4]=mobot_rot[1]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[9]; mobotdata.rota[7]=0; mobotdata.rota[8]=mobot_rot[2]; mobotdata.rota[9]=mobot_rot[6]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=0; i also tried this mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[1]; mobotdata.rota[2]=mobot_rot[2]; mobotdata.rota[3]=mobot_rot[3]; mobotdata.rota[4]=mobot_rot[4]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[6]; mobotdata.rota[7]=mobot_rot[7]; mobotdata.rota[8]=mobot_rot[8]; mobotdata.rota[9]=mobot_rot[9]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=mobot_rot[11]; __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From ps_yumemi at yahoo.com Mon Nov 4 00:33:01 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Mon Nov 4 00:33:01 2002 Subject: [ODE] rotation matrix Message-ID: <20021104073214.21133.qmail@web40509.mail.yahoo.com> hello, first of all thanks for replying. i tried to pass the values to the dMatrix3 the same way in the setTransform function in the drawstuff.cpp file. unfortunately, my mobot is heading towards the opposite direction now. what i did was this : const dReal *mobot_pos; const dReal *mobot_rot; mobot_rot = dBodyGetRotation (mobot.chassis.body); mobot_pos = dBodyGetPosition (mobot.chassis.body); mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[4]; mobotdata.rota[2]=mobot_rot[8]; mobotdata.rota[3]=0; mobotdata.rota[4]=mobot_rot[1]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[9]; mobotdata.rota[7]=0; mobotdata.rota[8]=mobot_rot[2]; mobotdata.rota[9]=mobot_rot[6]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=0; i also tried this mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[1]; mobotdata.rota[2]=mobot_rot[2]; mobotdata.rota[3]=mobot_rot[3]; mobotdata.rota[4]=mobot_rot[4]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[6]; mobotdata.rota[7]=mobot_rot[7]; mobotdata.rota[8]=mobot_rot[8]; mobotdata.rota[9]=mobot_rot[9]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=mobot_rot[11]; and the mobot went 90 degrees away from the rotation it was suppose to have. it only works when the values are 1 0 0 0 0 1 0 0 0 0 1 0 and that's it. what else can i do? pia __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From ps_yumemi at yahoo.com Mon Nov 4 04:55:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Mon Nov 4 04:55:02 2002 Subject: [ODE] rotation matrix In-Reply-To: <3DC64BDF.8070505@oracle.com> Message-ID: <20021104115420.48967.qmail@web40506.mail.yahoo.com> hello, ummm, what did you use to set the rotation and position of the mobots? did you still use dBodySetRotation and dBodySetPosition? or settransform? and how did you do it exactly? sorry. got confused. pia --- Ed Jones wrote: > Hiya, > > I've done exactly the same and just pinched (ahem, > "reused") this code > from drawstuff. > > As far as I know; if you define "mobotdata.rota" as > "GLfloat rota[16]" > (something like "mobotdata.transform" would probably > make more sense) > then you just need to do exactly what you've already > done, plus; > > mobotdata.rota[12] = mobot_pos[0]; > mobotdata.rota[13] = mobot_pos[1]; > mobotdata.rota[14] = mobot_pos[2]; > mobotdata.rota[15] = 1; > > ...and that works fine for me. > > I hope I'm right in saying that if things are going > in the wrong > direction then there's probably just some signs > wrong somewhere. > > Cheers, > Ed. > __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From jeffreyweber at hotmail.com Mon Nov 4 05:29:02 2002 From: jeffreyweber at hotmail.com (Jeff Weber) Date: Mon Nov 4 05:29:02 2002 Subject: [ODE] Complie to a Lib Message-ID: I just made my own vector and matrix structs. One other thing that is different about my approach is I used a "Managed C++" wrapper rather than the PInvoke method. It seemed to work great considering my lack of any true C++ experience. I'll be getting back to it eventually, but currently I'm busy "faking" some vehicle physics for a demo that is due in december. I didn't want to chance using ode as I wasn't sure I'd be able to get things running correctly by then and still have time to work on the other things that need to be in the demo. -jeff ----Original Message Follows---- From: Anselm Hook To: Nate W CC: Subject: Re: [ODE] Complie to a Lib Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) There is one good reason not to use my C# binding - I am relying on a class based Vector and Matrix math library (that I ported from an open source clone of Java3D). I strongly suggest using a struct based Vector and Matrix library such as http://www.exocortex.org/3dengine or others (his starting point is BSD licenced). I'll bet Jeff Weber has solved this correctly - where is Jeff's site? Jeff? - a > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > > from .Net, extending the work already done by Jeff Weber. _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode _________________________________________________________________ Unlimited Internet access -- and 2 months free!  Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.asp From ander_taylor at hotmail.com Mon Nov 4 06:17:02 2002 From: ander_taylor at hotmail.com (Ander Taylor) Date: Mon Nov 4 06:17:02 2002 Subject: [ODE] Complie to a Lib Message-ID: I just worked out that I dont need the lib. I can compile the whole lot, managed bits and everything, to a DLL. Finished Space, AMotor and Geom, also added Params to JointHinge. Works great. Ander ----Original Message Follows---- From: "Jeff Weber" To: ode@q12.org I just made my own vector and matrix structs. One other thing that is different about my approach is I used a "Managed C++" wrapper rather than the PInvoke method. It seemed to work great considering my lack of any true C++ experience. I'll be getting back to it eventually, but currently I'm busy "faking" some vehicle physics for a demo that is due in december. I didn't want to chance using ode as I wasn't sure I'd be able to get things running correctly by then and still have time to work on the other things that need to be in the demo. -jeff ----Original Message Follows---- From: Anselm Hook To: Nate W CC: Subject: Re: [ODE] Complie to a Lib Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) There is one good reason not to use my C# binding - I am relying on a class based Vector and Matrix math library (that I ported from an open source clone of Java3D). I strongly suggest using a struct based Vector and Matrix library such as http://www.exocortex.org/3dengine or others (his starting point is BSD licenced). I'll bet Jeff Weber has solved this correctly - where is Jeff's site? Jeff? - a > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > > from .Net, extending the work already done by Jeff Weber. _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp From ed.jones at oracle.com Mon Nov 4 08:55:02 2002 From: ed.jones at oracle.com (Ed Jones) Date: Mon Nov 4 08:55:02 2002 Subject: [ODE] CVS is Scary Message-ID: <3DC6981D.5080408@oracle.com> Hi Folks, I've been fiddling about with ODE v0.03 for a while yet, and I think it's probably best if I get my head around CVS, so I can get the latest stuff, specifically to do with the recent "dContactApprox1 mode" updates. Not having used CVS before I've tried to get the latest version of everything using WinCVS and it seems to have worked. I set the CVSROOT in the Preferences, set authentication to the "passwd" option, logged in, and used the Admin->Command Line option to type in "cvs co ode". That seemed to copy everything out of CVS and it all builds fine. Presumably, I now just need to do "cvs update" in future to pick up any changes? I assume that the "anonymous" user I logged in as doesn't have permissions to lock or change any files within CVS? So there's no danger that me being crap at using WinCVS can cause any damage to the code tree? I've seen other CVS based projects that produce a "nightly tarball" from their repositories. Is this something that's been considered for ODE? To save me worrying about accidentally deleting all the code. Or something. ;-) Cheers, Ed. From wristy_j at yahoo.com Mon Nov 4 09:00:02 2002 From: wristy_j at yahoo.com (Jason Gott) Date: Mon Nov 4 09:00:02 2002 Subject: [ODE] How do I code my own constraints ? In-Reply-To: <000a01c281be$11650e40$03324c18@vf.shawcable.net> Message-ID: <20021104155943.53446.qmail@web40804.mail.yahoo.com> Hello, The best paper I've found for describing the A matrix and B (right hand side) vector is "Linear-Time Dynamics Using Lagrange Multipliers" by David Baraff. It was in Siggraph '96. Search for it by name and you'll find .pdf's. "Fast Contact Force Computation for Nonpenetrating Rigid Bodies", also by Baraff (Siggraph '94) is also helpful. It talks about LCP's and Dantzig's algorithm. As far as figuring out what to put in J (the constraint matrices), look at ODE's source code for the different joint types. Hope that helps! J --- Gazza wrote: > Hi, > > I'm trying to understand how to compute the > constraints matrix for a particular constraint. > > I'm of the understanding that a 'contact' constraint > would remove a DOF along the contact normal, thus > requiring 1 value. When solved, the force/impulse > is applied along the normal. For a ball joint, 3 > DOF's are removed - x,y,z translations, and for a > hinge, 5 DOF's are removed - x,y,z translation and > say x,y rotation. Am I correct in these assumptions > ? > > What I don't understand (or can find any > documentation/papers on) is how the value(s) are > computed for the A(n*n) matrix and b(n*1) for each > constraint, which tell the system to remove these > DOF's. > > Any help given is most appreciated. > > Thanks in advance. > Gazza > __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From anselm at hook.org Mon Nov 4 09:33:01 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 4 09:33:01 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: do you have a site for your stuff or is it something you're not sharing yet? just curious because i'd like to see your approach. -a On Mon, 4 Nov 2002, Ander Taylor wrote: > I just worked out that I dont need the lib. > > I can compile the whole lot, managed bits and everything, to a DLL. > > Finished Space, AMotor and Geom, also added Params to JointHinge. > > Works great. > > Ander > > > ----Original Message Follows---- > From: "Jeff Weber" > To: ode@q12.org > > > I just made my own vector and matrix structs. > > One other thing that is different about my approach is I used a "Managed > C++" wrapper rather than the PInvoke method. > > It seemed to work great considering my lack of any true C++ experience. > I'll be getting back to it eventually, but currently I'm busy "faking" some > vehicle physics for a demo that is due in december. I didn't want to chance > using ode as I wasn't sure I'd be able to get things running correctly by > then and still have time to work on the other things that need to be in the > demo. > > -jeff > > > ----Original Message Follows---- > From: Anselm Hook > To: Nate W > CC: > Subject: Re: [ODE] Complie to a Lib > Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) > > > There is one good reason not to use my C# binding - I am relying on a > class based Vector and Matrix math library (that I ported from an open > source clone of Java3D). I strongly suggest using a struct based Vector > and Matrix library such as http://www.exocortex.org/3dengine or others > (his starting point is BSD licenced). > > I'll bet Jeff Weber has solved this correctly - where is Jeff's site? > Jeff? > > - a > > > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > > I am new to ODE and C++. I am working on a wrapper to allow the use > of ODE > > > > from .Net, extending the work already done by Jeff Weber. > > > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From anselm at hook.org Mon Nov 4 09:43:01 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 4 09:43:01 2002 Subject: [ODE] CVS is Scary In-Reply-To: <3DC6981D.5080408@oracle.com> Message-ID: > Presumably, I now just need to do "cvs update" in future to pick up any > changes? Yup. > I assume that the "anonymous" user I logged in as doesn't have > permissions to lock or change any files within CVS? So there's no danger > that me being crap at using WinCVS can cause any damage to the code tree? Right - there's no way you can cause any damage. It's totally safe. > I've seen other CVS based projects that produce a "nightly tarball" from > their repositories. Is this something that's been considered for ODE? To > save me worrying about accidentally deleting all the code. Or something. ;-) Russ has to answer that. I suppose once it moves to sourceforge this will happen. - a From adam.moravanszky at novodex.com Mon Nov 4 10:19:02 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [Novodex]) Date: Mon Nov 4 10:19:02 2002 Subject: [ODE] Joint Naming Message-ID: <00ae01c28425$ebdb2820$17a08481@nxcommanche> Hi, while working on improving joint support for an app that will support both ODE and Nx physics back ends, it occurred to me that there is a good opportunity for misunderstandings regarding joint naming. In particular, I think the picture for slider joint in the ODE user's guide is misleading. The joint has a circular shaft, which makes one think that rotation around the shaft may be possible. However, when one considers that such a joint would need an additional anchor parameter, it becomes clear that rotation around the axis is in fact not possible. It says this too in section 3.5, though not later in the section on slider: "... a slider joint that constraints the ``piston'' and ``socket'' to line up, and additionally constraints the two bodies to have the same orientation." We call such a joint a Prismatic joint, and draw it in the manual with a square shaft. We also have joints called sliders, with circular shafts, which is what can be created in ODE by combining a slider and a hinge through a proxy body. Obviously it is inconvenient to do any sort of renaming, but I would suggest changing the picture in ODE. --Adam -- Adam Moravanszky /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From coding at natew.com Mon Nov 4 13:18:01 2002 From: coding at natew.com (Nate W) Date: Mon Nov 4 13:18:01 2002 Subject: [ODE] CVS is Scary In-Reply-To: <3DC6981D.5080408@oracle.com> Message-ID: On Mon, 4 Nov 2002, Ed Jones wrote: > Not having used CVS before I've tried to get the latest version of > everything using WinCVS and it seems to have worked. I was using WinCVS myself until a couple weeks ago when someone suggested I try this instead: http://www.tortoisecvs.org/ It's MUCH more user-friendly. WinCVS GUI just made me want to learn the command line syntax so I wouldn't have to be confronted with all those cryptic buttons. :-) Tortoise is probably not as powerful, but all I need is to stay current with ODE and one other project I'm peripherally involved with, so I'm happy with it. It's also implemented as a shell extension, which is kind of neat. -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Mon Nov 4 13:38:02 2002 From: coding at natew.com (Nate W) Date: Mon Nov 4 13:38:02 2002 Subject: [ODE] Joint Naming In-Reply-To: <00ae01c28425$ebdb2820$17a08481@nxcommanche> Message-ID: On Mon, 4 Nov 2002, Adam Moravanszky [Novodex] wrote: > The joint has a circular shaft, which makes one think that rotation > around the shaft may be possible. [.....] We call such a joint a > Prismatic joint, and draw it in the manual with a square shaft. FWIW, I feel the same way. I use the "prismatic" term in the XML generated by Juice. It's called "slider" in the UI, but I think that was a mistake, as the term is ambiguous. > We also have joints called sliders, with circular shafts [....] So long as we're talking about naming, how about "cylindrical joint" for those? -- Nate Waddoups Redmond WA USA http://www.natew.com From adam.moravanszky at novodex.com Mon Nov 4 14:22:02 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [NovodeX]) Date: Mon Nov 4 14:22:02 2002 Subject: [ODE] Joint Naming References: Message-ID: <004001c28440$1ca4a200$f311da50@powerhouse> > > We also have joints called sliders, with circular shafts [....] > > So long as we're talking about naming, how about "cylindrical joint" for > those? > Perhaps -- I like it because it describes a shape like 'spherical' and 'prismatic' do. I'd have to ask someone with a robotics background what the 'official' term is. Not that I insist on using those -- sometimes they are confusing to novices: For example "prismatic" isn't exactly intuitive: most people will think of optics when they hear that. We still use it to avoid ambiguity. -- Adam /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From ander_taylor at hotmail.com Mon Nov 4 14:35:02 2002 From: ander_taylor at hotmail.com (Ander Taylor) Date: Mon Nov 4 14:35:02 2002 Subject: [ODE] Complie to a Lib Message-ID: No I don't have a site. I will ask Jeff if I can put it on his. I will keep you posted. Ander ----Original Message Follows---- From: Anselm Hook To: Ander Taylor do you have a site for your stuff or is it something you're not sharing yet? just curious because i'd like to see your approach. -a On Mon, 4 Nov 2002, Ander Taylor wrote: > I just worked out that I dont need the lib. > > I can compile the whole lot, managed bits and everything, to a DLL. > > Finished Space, AMotor and Geom, also added Params to JointHinge. > > Works great. > > Ander > > > ----Original Message Follows---- > From: "Jeff Weber" > To: ode@q12.org > > > I just made my own vector and matrix structs. > > One other thing that is different about my approach is I used a "Managed > C++" wrapper rather than the PInvoke method. > > It seemed to work great considering my lack of any true C++ experience. > I'll be getting back to it eventually, but currently I'm busy "faking" some > vehicle physics for a demo that is due in december. I didn't want to chance > using ode as I wasn't sure I'd be able to get things running correctly by > then and still have time to work on the other things that need to be in the > demo. > > -jeff > > > ----Original Message Follows---- > From: Anselm Hook > To: Nate W > CC: > Subject: Re: [ODE] Complie to a Lib > Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) > > > There is one good reason not to use my C# binding - I am relying on a > class based Vector and Matrix math library (that I ported from an open > source clone of Java3D). I strongly suggest using a struct based Vector > and Matrix library such as http://www.exocortex.org/3dengine or others > (his starting point is BSD licenced). > > I'll bet Jeff Weber has solved this correctly - where is Jeff's site? > Jeff? > > - a > > > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > > I am new to ODE and C++. I am working on a wrapper to allow the use > of ODE > > > > from .Net, extending the work already done by Jeff Weber. > > > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > _________________________________________________________________ Internet access plans that fit your lifestyle -- join MSN. http://resourcecenter.msn.com/access/plans/default.asp From p.terdiman at wanadoo.fr Mon Nov 4 15:09:02 2002 From: p.terdiman at wanadoo.fr (Pierre Terdiman) Date: Mon Nov 4 15:09:02 2002 Subject: [ODE] Joint Naming References: <004001c28440$1ca4a200$f311da50@powerhouse> Message-ID: <001d01c2844e$76582980$0e00000a@pierre> "Cylindrical" seems nice : http://www.solid-dynamics.com/mwfunctionalities/index.htm Pierre > > > We also have joints called sliders, with circular shafts [....] > > > > So long as we're talking about naming, how about "cylindrical joint" for > > those? > > > > Perhaps -- I like it because it describes a shape like 'spherical' and > 'prismatic' do. I'd have to ask someone with a robotics background what the > 'official' term is. Not that I insist on using those -- sometimes they are > confusing to novices: For example "prismatic" isn't exactly intuitive: most > people will think of optics when they hear that. We still use it to avoid > ambiguity. > > -- Adam > > /*================*\ > |Chief Software Architect > |NovodeX AG > |physics middleware > |www.novodex.com > \*================*/ > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From adam.moravanszky at novodex.com Mon Nov 4 15:46:01 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [NovodeX]) Date: Mon Nov 4 15:46:01 2002 Subject: [ODE] Joint Naming References: <004001c28440$1ca4a200$f311da50@powerhouse> <001d01c2844e$76582980$0e00000a@pierre> Message-ID: <019101c2844b$df61fdf0$f311da50@powerhouse> Cool site. Too bad the tiny pictures don't always make sense. So "cylindrical" it is, then. -- Adam Moravanszky /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From henri at cs.sun.ac.za Mon Nov 4 15:46:50 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Mon Nov 4 15:46:50 2002 Subject: [ODE] Optimization maybe? Message-ID: <012801c28454$367ee3c0$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_0125_01C28464.FA0087D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi everybody :) I'm your newest newcomer... *grinZ* I've been very impressed with what I've seen of ODE upto now (not that = I've had much exposure yet) - enough to consider porting the entire code = to Delphi just to understand it better (but after looking at that = whirlwind that is the code for ODE I decided to be less ambitious for = the time being... ;) Nonetheless, I'd like to see if I can help a little; one of the things I = have some experience in is low-level programming. I'd appreciate if = somebody could show me to the part of the ODE code that is the most CPU = intensive (presumably the big Jacobian matrix solving) I'd like to give = a crack at optimizing the code (not the algorithm!!) manually. Maybe its = possible to wring a couple of speed increases out of it. hmmm... and maybe somebody should tell me how the matrix would typically = look (random values all over, mostly just a diagonal, or whatever) so I = can setup test cases. And what would a suitable matrix size be for = testing purposes? (50x50, 200x200, smaller, bigger?) Anything else I should know? (Maybe give-up now, before its too late?) thanks :) Henri ------=_NextPart_000_0125_01C28464.FA0087D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi everybody :)
 
I'm your newest newcomer... = *grinZ*
 
I've been very impressed with what I've = seen of ODE=20 upto now (not that I've had much exposure yet) - enough to consider = porting the=20 entire code to Delphi just to understand it better (but after looking at = that=20 whirlwind that is the code for ODE I decided to be less ambitious for = the time=20 being... ;)
 
Nonetheless, I'd like to see if I can = help a=20 little; one of the things I have some experience in is low-level = programming.=20 I'd appreciate if somebody could show me to the part of the ODE code = that is the=20 most CPU intensive (presumably the big Jacobian matrix solving) I'd like = to give=20 a crack at optimizing the code (not the algorithm!!) manually. Maybe its = possible to wring a couple of speed increases out of it.
 
hmmm... and maybe somebody should tell = me how the=20 matrix would typically look (random values all over, mostly just a = diagonal, or=20 whatever) so I can setup test cases. And what would a suitable matrix = size be=20 for testing purposes? (50x50, 200x200, smaller, bigger?)
 
Anything else I should know? (Maybe = give-up now,=20 before its too late?)
 
thanks :)
  Henri
------=_NextPart_000_0125_01C28464.FA0087D0-- From jeffreyweber at hotmail.com Mon Nov 4 16:59:02 2002 From: jeffreyweber at hotmail.com (Jeff Weber) Date: Mon Nov 4 16:59:02 2002 Subject: [ODE] Complie to a Lib Message-ID: My site is at www.farseer.com. The ode stuff is in the downloads section. It's not finished, but Ander Taylor has picked up where I left off. He's going to send me his code and I'll post it on my site. -jeff ----Original Message Follows---- From: Anselm Hook To: Ander Taylor CC: Subject: Re: [ODE] Complie to a Lib Date: Mon, 4 Nov 2002 09:32:30 -0700 (MST) do you have a site for your stuff or is it something you're not sharing yet? just curious because i'd like to see your approach. -a On Mon, 4 Nov 2002, Ander Taylor wrote: > I just worked out that I dont need the lib. > > I can compile the whole lot, managed bits and everything, to a DLL. > > Finished Space, AMotor and Geom, also added Params to JointHinge. > > Works great. > > Ander > > > ----Original Message Follows---- > From: "Jeff Weber" > To: ode@q12.org > > > I just made my own vector and matrix structs. > > One other thing that is different about my approach is I used a "Managed > C++" wrapper rather than the PInvoke method. > > It seemed to work great considering my lack of any true C++ experience. > I'll be getting back to it eventually, but currently I'm busy "faking" some > vehicle physics for a demo that is due in december. I didn't want to chance > using ode as I wasn't sure I'd be able to get things running correctly by > then and still have time to work on the other things that need to be in the > demo. > > -jeff > > > ----Original Message Follows---- > From: Anselm Hook > To: Nate W > CC: > Subject: Re: [ODE] Complie to a Lib > Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) > > > There is one good reason not to use my C# binding - I am relying on a > class based Vector and Matrix math library (that I ported from an open > source clone of Java3D). I strongly suggest using a struct based Vector > and Matrix library such as http://www.exocortex.org/3dengine or others > (his starting point is BSD licenced). > > I'll bet Jeff Weber has solved this correctly - where is Jeff's site? > Jeff? > > - a > > > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > > I am new to ODE and C++. I am working on a wrapper to allow the use > of ODE > > > > from .Net, extending the work already done by Jeff Weber. > > > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode _________________________________________________________________ Get a speedy connection with MSN Broadband.  Join now! http://resourcecenter.msn.com/access/plans/freeactivation.asp From russ at q12.org Mon Nov 4 17:30:02 2002 From: russ at q12.org (Russ Smith) Date: Mon Nov 4 17:30:02 2002 Subject: [ODE] Optimization maybe? In-Reply-To: <012801c28454$367ee3c0$45d4e892@temple> Message-ID: > Nonetheless, I'd like to see if I can help a little; one of the things > I have some experience in is low-level programming. I'd appreciate if > somebody could show me to the part of the ODE code that is the most CPU > intensive there are two things right now: (A) the factorization of large matrices (fast_ldlt.c) and solving right hand sides (fast_lsolve.c) and (B) the formation of that matrix in the first place (parts of step.cpp). problem (A) can be made faster by rewriting the factorizer/solver functions to use SIMD assembly, for various platforms (XMM, altivec, whatever). problem (B) is harder because it's a mix of detailed algorithm and many small matrix multiplies - probably implementing XMM versions of the small matrix multiplies would make it faster. note that there has been some talk about using some other, faster (but less precise) dynamics algorithms instead of the big-matrix-factorizing technique (e.g. iterative LCP), but there are still plenty of reasons to optimize the big-matrix algorithms: - they're faster for systems less than N*N, where N is maybe around 20. - they're more precise, and will give good answers in some cases where iterative LCP might fail. - the work done (and experience gained) optimizing the big-matrix algorithms will also apply to optimizing the other algorithms that come along later. - they'll probably be easier to optimize this way. > hmmm... and maybe somebody should tell me how the matrix would > typically look (random values all over, mostly just a diagonal, or > whatever) the big system matrix 'A' is block-sparse. get some test cases by printing out A at the entry to dSolveLCP() in lcp.cpp. > And what would a suitable matrix > size be for testing purposes? (50x50, 200x200, smaller, bigger?) it depends - you can optimize for large or small problems. i would optimize for 20x20 to 50x50 sizes, as systems larger than this will benefit (eventually) from other solver algorithms. > Anything else I should know? (Maybe give-up now, before its too late?) don't give up just yet! search the archive of this mailing list for messages of mine that mention SIMD, XMM or the factorizer, because i've written about this topic before. you'll also want to look at the factorizer builder code in ode/fbuild for an idea of how the current code is constructed. also reading a good book on numerical code will help, e.g. "numerical recipes in C, 2nd ed". (before someone retorts that NRC is not a good book ... on the subject of factorizers it has a good introduction and coverage of the basic issues, even though the code examples they provide are either lame, broken or both). russ. -- Russ Smith http://www.q12.org/ From ps_yumemi at yahoo.com Tue Nov 5 02:15:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Tue Nov 5 02:15:02 2002 Subject: [ODE] rotation Message-ID: <20021105091356.64536.qmail@web40510.mail.yahoo.com> hello, again... sorry people. i really don't get what i'm doing wrong or why my rotation matrix doesn't work. i have two variables: dMatrix3 mobot_rotation const dReal *mobot_rot i use the following code to pass the rotation matrix mobot_rot = dBodyGetRotation(bodyID) mobot_rotation[0]=mobot_rot[0] ... mobot_rotation[11]=mobot_rot[11] dBodySetRotation(bodyID, mobot_rotation) it doesn't work? the bodies end up rotated wrong. i also tried to use the same technique as the settransform function in drawstuff.cpp mobot_rotation[0]=mobot_rot[0] mobot_rotation[1]=mobot_rot[4] ... mobot_rotation[11]=0 and it still didn't turn out right. please help. i really need to solve this problem. __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From ed.jones at oracle.com Tue Nov 5 03:22:01 2002 From: ed.jones at oracle.com (Ed Jones) Date: Tue Nov 5 03:22:01 2002 Subject: [ODE] rotation References: <20021105091356.64536.qmail@web40510.mail.yahoo.com> Message-ID: <3DC79BC2.6050402@oracle.com> Hi, So you are doing this; Get the rotation of "bodyID". Copy that into another matrix. Use that matrix to set the rotation of "bodyID" I think I'm misunderstanding what you're trying to do. My example code, which was nabbed directly from drawstuff does this; Gets the rotation of a body according to ODE Copies that ODE flavoured matrix to an OpenGL matrix Sets the OpenGL transform so that the box (or whatever) gets drawn in its "correct" place, according to ODE What is the effect you're trying to achieve? Cheers, Ed. pia dalusong wrote: >hello, > >again... sorry people. i really don't get what i'm >doing wrong or why my rotation matrix doesn't work. > >i have two variables: >dMatrix3 mobot_rotation >const dReal *mobot_rot > >i use the following code to pass the rotation matrix > >mobot_rot = dBodyGetRotation(bodyID) >mobot_rotation[0]=mobot_rot[0] >... >mobot_rotation[11]=mobot_rot[11] > >dBodySetRotation(bodyID, mobot_rotation) > >it doesn't work? the bodies end up rotated wrong. > >i also tried to use the same technique as the >settransform function in drawstuff.cpp > >mobot_rotation[0]=mobot_rot[0] >mobot_rotation[1]=mobot_rot[4] >... >mobot_rotation[11]=0 > >and it still didn't turn out right. > >please help. i really need to solve this problem. > > >__________________________________________________ >Do you Yahoo!? >HotJobs - Search new jobs daily now >http://hotjobs.yahoo.com/ >_______________________________________________ >ODE mailing list >ODE@q12.org >http://q12.org/mailman/listinfo/ode > > From paul.chavent at fnac.net Tue Nov 5 03:52:02 2002 From: paul.chavent at fnac.net (Chavent Paul) Date: Tue Nov 5 03:52:02 2002 Subject: [ODE] Can i access each geom of a space? Message-ID: <3DC7956A.6040608@fnac.net> Can i access each geom of a space? Yes, it seams possible. But i need to do : dGeomGroupGetNumGeoms() dGeomGroupGetGeom() i wonder if it couldn't be fastest to access geoms with the "first" pointer that is in the "space" structure. Unfortunately, the structure isn't declared in the includes. Is there someone that can say to me if my idea is wrong and/or if there is a solution to access "geoms" without having to do a geomgroup containing all my scene ? From n_di_leva at hotmail.com Tue Nov 5 05:49:02 2002 From: n_di_leva at hotmail.com (Nicola Di Leva) Date: Tue Nov 5 05:49:02 2002 Subject: [ODE] bending wheels again? Message-ID: Hi everybody, done enough RDTL, so don't complain about the overused topic;) Just to be original, I've started my own car simulator using ODE, stealing code..ehm, taking inspiration from the freefall buggy demo ( very stable and smooth indeed ). When it's just a matter of going back and forth, the car behaves quite well, but as soon as it starts turning, the wheels progressively lose their alignment with the relative joint axes. Previous posts mentioned high rotation speeds and friction coefficients, but this is not the case ( i won't list the details of the simulation since they are the same of the freefall buggy demo ). I've read something about problems using directx with ODE too, can someone tell me more? ps. ODE is great, keep up the good work Russ! _________________________________________________________________ Unlimited Internet access for only $21.95/month.  Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp From Remko at act-3d.com Tue Nov 5 07:32:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Tue Nov 5 07:32:02 2002 Subject: [ODE] bending wheels again? Message-ID: <279127752.1737917222.98@server> Maybe you have set the ERP value of the hinge2 to 0.0? We are using ODE with DirectX 8.1 for quite a while now and I do not know of any problems :) -----Original Message----- From: Nicola Di Leva [mailto:n_di_leva@hotmail.com] Sent: Tuesday, November 05, 2002 12:48 PM To: ode@q12.org; Remko Jacobs (act-3d.com) Subject: [ODE] bending wheels again? Hi everybody, done enough RDTL, so don't complain about the overused topic;) Just to be original, I've started my own car simulator using ODE, stealing code..ehm, taking inspiration from the freefall buggy demo ( very stable and smooth indeed ). When it's just a matter of going back and forth, the car behaves quite well, but as soon as it starts turning, the wheels progressively lose their alignment with the relative joint axes. Previous posts mentioned high rotation speeds and friction coefficients, but this is not the case ( i won't list the details of the simulation since they are the same of the freefall buggy demo ). I've read something about problems using directx with ODE too, can someone tell me more? ps. ODE is great, keep up the good work Russ! _________________________________________________________________ Unlimited Internet access for only $21.95/month.á Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From marco.koegler at web.de Tue Nov 5 07:38:02 2002 From: marco.koegler at web.de (=?ISO-8859-2?Q?Marco_K=F6gler?=) Date: Tue Nov 5 07:38:02 2002 Subject: [ODE] Tri-Collider ... confused Message-ID: <3DC7D7A7.7010507@web.de> Hi! I was wondering whether somebody on the list would be kind enough to shed some light regarding the tricollider. There is a tricollider in the CVS repository, but it seems 'oldish' ... is that still the tricollider to use? I'm using Opcode 1.2 in my project and fear that this will conflict with the tricollider in the CVS (as it needs Opcode 1.0). Erwin posted an update to the list sometime in August (newstuff.gz). This uses Opcode 1.2, so that should solve that problem. A bit later Erwin posted something about this code having problems with large triangles and other issues ... he also said that he was glad he didn't commit the changes in the CVS. So, I don't know which code to use :( Should I use the version in the CVS or the one posted in August? Is there a possibility of a more stable/current version in the near future? Questions over questions *sigh* Anyways, ODE rocks ... -Marco From n_di_leva at hotmail.com Tue Nov 5 10:14:01 2002 From: n_di_leva at hotmail.com (Nicola Di Leva) Date: Tue Nov 5 10:14:01 2002 Subject: [ODE] bending wheels again? Message-ID: >Maybe you have set the ERP value of the hinge2 to 0.0? We are using ODE >with DirectX 8.1 for quite a while now and I do not know of any problems >:) No, joint erp and cfm are always set. I've tried several combinations of values for them, but the bending is still there. _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From russ at q12.org Tue Nov 5 11:54:01 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 5 11:54:01 2002 Subject: [ODE] Can i access each geom of a space? In-Reply-To: <3DC7956A.6040608@fnac.net> Message-ID: > Can i access each geom of a space? Yes, it seams possible. the new collision code i'm working on will allow this (and many other things). it'll be checked into CVS hopefully by the end of this week (gotta work the bugs out first). russ. -- Russ Smith http://www.q12.org/ From coding at natew.com Tue Nov 5 12:04:01 2002 From: coding at natew.com (Nate W) Date: Tue Nov 5 12:04:01 2002 Subject: [ODE] bending wheels again? In-Reply-To: Message-ID: On Tue, 5 Nov 2002, Nicola Di Leva wrote: > When it's just a matter of going back and forth, the car behaves quite > well, but as soon as it starts turning, the wheels progressively lose their > alignment with the relative joint axes. > Previous posts mentioned high rotation speeds and friction coefficients, but > this is not the case [...]/ I think you're describing something that I also noticed with the freefall demo on my machine, and my guess is that it could be corrected by tweaking the CFM. Try making it an order of magnitude smaller... e.g. if it's 0.001, change it to 0.0001 (more zeroes). I didn't actually test this theory, but it looks similar to what simulations in Juice do when the CFM is too high, so I think it could be the same thing. The catch is that turning down the CFM makes the simulation more rigid, thus less forgiving, thus more prone to instability or explosion. It's a compromise. It may well be possible to stiffen it a bit before any problems appear, it's impossible to say without trying. -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Tue Nov 5 12:35:02 2002 From: coding at natew.com (Nate W) Date: Tue Nov 5 12:35:02 2002 Subject: [ODE] bending wheels again? In-Reply-To: Message-ID: On Tue, 5 Nov 2002, Nicola Di Leva wrote: > >Maybe you have set the ERP value of the hinge2 to 0.0? > > No, joint erp and cfm are always set. I've tried several combinations of > values for them, but the bending is still there. That reminds me, I should have been more clear in my last message... when I suggested changing CFM, I was referring to the world CFM (set with dWorldSetCFM()). -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Tue Nov 5 17:20:02 2002 From: coding at natew.com (Nate W) Date: Tue Nov 5 17:20:02 2002 Subject: [ODE] LMotor? Message-ID: While talking off-list with Adam M about motors, I had an idea that I want to share here, in hopes of elongating Russ' to-do list. ODE has angular motors, but how about linear motors? I'd like to be able to define an 'anchor' body and one to three axes relative to that body, and then constrain the position of a second body along those axes... sorta like the angular motors do now, but with position rather than orientation. The thing I like about this approach to motorization is that AMotors and LMotors together will allow me to create gaits for walking creatures using a higher-level "language." It's basically a way to use ODE's solver to do reverse kinematics. For example, rather than commanding the hip to flex 5 degrees, the knee to bend 10 degrees, and the ankle to flex 5 degrees, the control system could just attach the foot to the hip via an LMotor and command the foot to move up a couple inches. It should allow creature motions to be controlled in a more intuitive way - and in a way that should still work with little or tuning even if the creature's limbs get lengthened or shortened or placed at different angles. From the user's perspective, it turns the problem of foot or hand placement from a nonlinear problem with as many variables as there are joints in the limb, to a linear problem with only as many variables as the user wants to bother with. Comments? Volunteers? I started trying to implement this myself, but couldn't shake the feeling that I was getting in way over my head and would have no idea how to debug what I was writing. Math is hard. :-) -- Nate Waddoups Redmond WA USA http://www.natew.com From n_di_leva at hotmail.com Tue Nov 5 19:31:01 2002 From: n_di_leva at hotmail.com (Nicola Di Leva) Date: Tue Nov 5 19:31:01 2002 Subject: [ODE] bending wheels again? Message-ID: A weird demo is better than 1000 words, so if you want take a look at http://ndileva.250free.com/ToyCar.zip. Any suggestion will be appreciated ( especially on turning the car, which is still a hard task ). ps. i noticed that the freefall demo does not set world's cfm and erp at all, shouldn't it blow up? _________________________________________________________________ Broadband? Dial-up? Get reliable MSN Internet Access. http://resourcecenter.msn.com/access/plans/default.asp From russ at q12.org Tue Nov 5 23:41:01 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 5 23:41:01 2002 Subject: [ODE] slider trouble In-Reply-To: References: <20021031221053.291c8cac.russ@q12.org> Message-ID: <20021105224532.446b7061.russ@q12.org> > I've attached another test that bounces things off > the ground a bit differently, and you can watch two blocks bounce > skyward and then gradually spin up to an explosion. i'm chalking this one up to integrator error - if you lower the timestep, the effect disappears. i'm pretty sure that there are no non-physical forces being applied to the system (as was the case with your previous slider-stop problem). unfortunately this kind of thing (integrator error) is unavoidable with ODE's current integrator in some situations where you have rapidly rotating bodies. > Also, could this problem be related to the problem where a single > flying spinning body also gains angular momentum? yes, it's the same kind of thing. i'll do some more experiments and see if something can be done about this. in the meantime, use a smaller timestep, or less bounce, or larger mass - anything to reduce the amount of rotation experienced per time step. russ. -- Russell Smith http://www.q12.org From adam.moravanszky at novodex.com Wed Nov 6 01:46:01 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [Novodex]) Date: Wed Nov 6 01:46:01 2002 Subject: [ODE] bending wheels again? References: Message-ID: <003201c28570$8c555870$17a08481@nxcommanche> From: "Nicola Di Leva" > Any suggestion will be appreciated ( especially on turning the car, > which is still a hard task ). Automobile manufacturers have tried in the past to make cars with four wheel steering, but it did not turn out to be a good idea. I would recommend sticking to front wheel steering only when making virtual cars as well. Not sure why the primary ODE buggy demo has this absolutely undriveable configuration either. I tried setting "turnable" to false in your car config file for the rear wheels, but it didn't make a difference. Also: I can still drive the car when it is flipped over! -- Adam Moravanszky /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From max.lungarella at aist.go.jp Wed Nov 6 02:21:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 02:21:02 2002 Subject: [ODE] joint friction Message-ID: <20021106181905.203257ac.max.lungarella@aist.go.jp> hi there, i may be asking something that is documented somewhere. but anyhow ... is there a way to enable friction in the joints? in ball and socket joints, for instance? or do i need to implement my own friction model? or do i need to play around with the joint related ERP and CFM? the API does not feature a dJointSetBallAndSocketParam() though! thanks a lot for any sort of feedback! cheers, max From mattias at cambrianlabs.com Wed Nov 6 02:32:01 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Wed Nov 6 02:32:01 2002 Subject: [ODE] bending wheels again? In-Reply-To: <003201c28570$8c555870$17a08481@nxcommanche> References: <003201c28570$8c555870$17a08481@nxcommanche> Message-ID: You must reduce friction if you don't want the car to turn over. cheers, m From Daniel.Groll at t-online.de Wed Nov 6 03:42:02 2002 From: Daniel.Groll at t-online.de (Daniel.Groll@t-online.de) Date: Wed Nov 6 03:42:02 2002 Subject: [ODE] bending wheels again? In-Reply-To: References: <003201c28570$8c555870$17a08481@nxcommanche> Message-ID: <1036578694.3dc8ef864be07@webmail.t-online.de> Hi! I made the wheel bending problem go away by adjusting the rotation of the steering wheels every 6-10th timestep. I calculate which direction they should have and set it with dBodySetQuaternion (or dBodySetRotation). To prevent the car from turning over, I check if all four wheels have contact with the ground. If yes, I apply small forces to them as a "glue" and I reduce the angular velocity of the car body. On an even surface it's almost impossible to tip over now. The behaviour of the car when jumping or flying around seems to be ok because the the tweaks are only applied when the car touches the ground as said before. From neo-nb at gmx.de Wed Nov 6 07:01:01 2002 From: neo-nb at gmx.de (Stefan Werner) Date: Wed Nov 6 07:01:01 2002 Subject: [ODE] Suddenly Disappearing ODE Objects Message-ID: <002401c2859c$f2cba560$1701a8c0@cion> Hello, I've created a simple car sim with ODE and everything works fine. I can drive through my landscape and can jump over other objects. But there is still one problem. If my car doesn't move, then after a few seconds it completely disappears. I get my position out of const dReal *pos; pos = dBodyGetPosition(carbody[0]); I've also noticed, that when my car disappears, "pos" is not a number anymore, it contains a string: "QNAN". I programm with MS VC++ .Net. What does this mean? Does anyone knows this problem? I can't explain it because everything works fine when my car moves around, it happens only when the car doesn't move. I hope someone can help me. Karl Koch From russ at q12.org Wed Nov 6 12:12:01 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 6 12:12:01 2002 Subject: [ODE] joint friction In-Reply-To: <20021106181905.203257ac.max.lungarella@aist.go.jp> Message-ID: > i may be asking something that is documented somewhere. > but anyhow ... is there a way to enable friction in the joints? there is a good and simple way to do this. set the joint 'fmax' parameter to some (positive) value. set the desired velocity parameter to 0. now the joint will exert a force up to fmax to bring the joint velocity down to 0. this is actually a pretty good model of coulomb friction for a joint. changing fmax to be higher will give more friction - and there's no stability problem with choosing any value of fmax >= 0. russ. -- Russ Smith http://www.q12.org/ From neo-nb at gmx.de Wed Nov 6 15:01:01 2002 From: neo-nb at gmx.de (Stefan Werner) Date: Wed Nov 6 15:01:01 2002 Subject: [ODE] Suddenly Disappearing ODE Objects Message-ID: <001201c285df$ec009ea0$1701a8c0@cion> I found out that when my object disappears, the dJointGetHinge2Angle1(Joints[0]) retrieves exactly PI or -PI. When my car move this value lies between -0.5 and 0.5; I think that the reason why dBodyGetPosition retrieves a wrong value. Now does anyone know why suddenly the value jumps to "PI"? And what's about "single" and "double" ODE? What shall I use and how can I switch between both precisions in C++? > Hello, > > I've created a simple car sim with ODE and everything works fine. I can > drive through my landscape and can jump over other objects. But there is > still one problem. If my car doesn't move, then after a few seconds it > completely disappears. I get my position out of > const dReal *pos; > pos = dBodyGetPosition(carbody[0]); > I've also noticed, that when my car disappears, "pos" is not a number > anymore, it contains a string: "QNAN". I programm with MS VC++ .Net. > What does this mean? Does anyone knows this problem? I can't explain it > because everything works fine when my car moves around, it happens only when > the car doesn't move. > I hope someone can help me. > Karl Koch From max.lungarella at aist.go.jp Wed Nov 6 17:07:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 17:07:02 2002 Subject: [ODE] joint friction In-Reply-To: References: <20021106181905.203257ac.max.lungarella@aist.go.jp> Message-ID: <20021107090532.54d375b5.max.lungarella@aist.go.jp> hi russ, yes, your model sounds perfectly reasonable to me. thank you very much. but what about ball and socket joints? is there a way to set something similar to an "fmax" parameter for them? was not able to figure out any function dealing with it. thanks a lot! cheers, max > > i may be asking something that is documented somewhere. > > but anyhow ... is there a way to enable friction in the joints? > > there is a good and simple way to do this. set the joint 'fmax' parameter > to some (positive) value. set the desired velocity parameter to 0. now the > joint will exert a force up to fmax to bring the joint velocity down to 0. > this is actually a pretty good model of coulomb friction for a joint. > changing fmax to be higher will give more friction - and there's no > stability problem with choosing any value of fmax >= 0. > > russ. > > -- > Russ Smith > http://www.q12.org/ > From russ at q12.org Wed Nov 6 17:35:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 6 17:35:02 2002 Subject: [ODE] joint friction In-Reply-To: <20021107090532.54d375b5.max.lungarella@aist.go.jp> Message-ID: friction can be applied to ball and socket joints using the amotor joint - again setting fmax=something and vel=0 for the three axes. note that this is not as general as for the hinge and slider joints - for three free axes there are many ways to derive three (or one or two) friction forces to get various effects. the amotor joint will implement friction as though there were three hinge-type linkages connecting the two bodies - but this is different from what you would get if there was an actual ball fitting into an actual socket, for example. russ. -- Russ Smith http://www.q12.org/ From max.lungarella at aist.go.jp Wed Nov 6 17:43:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 17:43:02 2002 Subject: [ODE] joint friction In-Reply-To: References: <20021107090532.54d375b5.max.lungarella@aist.go.jp> Message-ID: <20021107094110.1651031d.max.lungarella@aist.go.jp> thank you very much for the hint. i'll give it a try right away. keep up the good work! max > friction can be applied to ball and socket joints using the amotor joint - > again setting fmax=something and vel=0 for the three axes. note that this > is not as general as for the hinge and slider joints - for three free axes > there are many ways to derive three (or one or two) friction forces to get > various effects. the amotor joint will implement friction as though there > were three hinge-type linkages connecting the two bodies - but this > is different from what you would get if there was an actual ball fitting > into an actual socket, for example. > > russ. > > -- > Russ Smith > http://www.q12.org/ > From erickt at andrew.cmu.edu Wed Nov 6 18:42:01 2002 From: erickt at andrew.cmu.edu (Erick Tryzelaar) Date: Wed Nov 6 18:42:01 2002 Subject: [ODE] Slip friction coefficient In-Reply-To: Message-ID: Hello all, I was just wondering if the slip friction coefficient corresponds to one to one with dynamic friction. Or is it something else? -Erick From thomas_buehrmann at web.de Wed Nov 6 19:09:02 2002 From: thomas_buehrmann at web.de (Thomas Buehmann) Date: Wed Nov 6 19:09:02 2002 Subject: [ODE] Message-ID: <200211070208.gA728bX26148@mailgate5.cinetic.de> Hi, i'm new to ODE and just tried to install the last release on WinXP. Unfortunately, the make just fails displaying following error code: D:\Development\ODE\ode-0.03>make cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC /Feconfigurator.exe configur ator.c process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBU G_ALLOC /Feconfigurator.exe configurator.c, ...) failed. make (e=2): Das System kann die angegebene Datei nicht finden. make: *** [configurator.exe] Error 2 (sorry for the german stuff in the line before the last; it just means the system wasn't able to find the specified file). i have to admit i'm a make dummy, but it seems as if make fails while trying to build the configurator.exe, right? is there supposed to be a config.h file somewhere (e.g. in include\ode), cause there is none? at least in the doc it's saying you could as well just set the condiguration yourself in that file. or am i just too stupid? any help would be great. thanks, thomas. ________________________________________________________________ Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 From max.lungarella at aist.go.jp Wed Nov 6 19:28:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 19:28:02 2002 Subject: [ODE] In-Reply-To: <200211070208.gA728bX26148@mailgate5.cinetic.de> References: <200211070208.gA728bX26148@mailgate5.cinetic.de> Message-ID: <20021107112605.294d406e.max.lungarella@aist.go.jp> you've got to properly set your "path" environment variable, i guess. apparently your makefile is not able to find "Feconfigurator.exe". try to type "path" in the console (if winXP's got one) and check the output. the directory where "Feconfigurator.exe" is installed should be there. if not, add it to "path". hope this works. cheers, max > Hi, > i'm new to ODE and just tried to install the last release on WinXP. > Unfortunately, the make just fails displaying following error code: > > D:\Development\ODE\ode-0.03>make > cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC > /Feconfigurator.exe configur ator.c > process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC > /DdDOUBLE /DdDEBU G_ALLOC /Feconfigurator.exe configurator.c, ...) > failed. make (e=2): Das System kann die angegebene Datei nicht finden. > make: *** [configurator.exe] Error 2 > > (sorry for the german stuff in the line before the last; it just means > the system wasn't able to find the specified file). > > i have to admit i'm a make dummy, but it seems as if make fails while > trying to build the configurator.exe, right? is there supposed to be a > config.h file somewhere (e.g. in include\ode), cause there is none? at > least in the doc it's saying you could as well just set the > condiguration yourself in that file. > > or am i just too stupid? > any help would be great. > > thanks, > thomas. > > ________________________________________________________________ > Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! > Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From max.lungarella at aist.go.jp Wed Nov 6 19:36:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 19:36:02 2002 Subject: [ODE] : update In-Reply-To: <200211070208.gA728bX26148@mailgate5.cinetic.de> References: <200211070208.gA728bX26148@mailgate5.cinetic.de> Message-ID: <20021107113406.7b685a55.max.lungarella@aist.go.jp> i'm sorry ... thomas, you should be looking for "cl.exe"'s (the compiler's) directory and NOT for "configurator.exe"'s! cheers, max > Hi, > i'm new to ODE and just tried to install the last release on WinXP. Unfortunately, the make just fails displaying following error code: > > D:\Development\ODE\ode-0.03>make > cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC /Feconfigurator.exe configur > ator.c > process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBU > G_ALLOC /Feconfigurator.exe configurator.c, ...) failed. > make (e=2): Das System kann die angegebene Datei nicht finden. > make: *** [configurator.exe] Error 2 > > (sorry for the german stuff in the line before the last; it just means the system > wasn't able to find the specified file). > > i have to admit i'm a make dummy, but it seems as if make fails while trying to build > the configurator.exe, right? is there supposed to be a config.h file somewhere (e.g. in > include\ode), cause there is none? at least in the doc it's saying you could as well just > set the condiguration yourself in that file. > > or am i just too stupid? > any help would be great. > > thanks, > thomas. > > ________________________________________________________________ > Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! > Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From gene at erachampion.com Wed Nov 6 22:31:02 2002 From: gene at erachampion.com (Gene Ruebsamen) Date: Wed Nov 6 22:31:02 2002 Subject: [ODE] Thesis on Evolving Virtual Creatures Message-ID: <1036656107.5212.7.camel@aludra.eranet.com> Hello Everybody, Just finished my thesis on evolving intelligent behaviors in embodied agents. I've updated my page with new videos and information at: http://www.erachampion.com/ai/ I am very happy I selected to use ODE as the physics engine, and I wanted to thank all of you who have offered your input over the past year. Now that I have more time, I will try and make further optimizations and improvements to my work, and hopefully release the code soon (have to clean it up first!). For those of you that are not familiar with my work, I have been evolving locomotive strategies in virtual creatures in a 3D environment. The creatures try to "survive" by evolving faster and more efficient means of locomotion. I am utilizing the ANN/GA paradigm that several of you have discussed in earlier posts. Thanks again! Gene Ruebsamen From coding at natew.com Wed Nov 6 23:23:02 2002 From: coding at natew.com (Nate W) Date: Wed Nov 6 23:23:02 2002 Subject: [ODE] Thesis on Evolving Virtual Creatures In-Reply-To: <1036656107.5212.7.camel@aludra.eranet.com> Message-ID: On 7 Nov 2002, Gene Ruebsamen wrote: > Just finished my thesis on evolving intelligent behaviors in embodied > agents. [...] Nice work! -- Nate Waddoups Redmond WA USA http://www.natew.com From minorlogic at yahoo.com Thu Nov 7 01:16:02 2002 From: minorlogic at yahoo.com (Michael Norel) Date: Thu Nov 7 01:16:02 2002 Subject: [ODE] Optimization again Message-ID: <20021107081527.91338.qmail@web11703.mail.yahoo.com> Have a look at ODE sources, and have a quest : code such this is not very important but calculated every step and for every object: ............ for (i=0; ifacc[0] += body[i]->mass.mass * world->gravity[0]; body[i]->facc[1] += body[i]->mass.mass * world->gravity[1]; body[i]->facc[2] += body[i]->mass.mass * world->gravity[2]; } ............. Is this possible to ilolate such a code and optimaze it ? I think it will not change often ? ............ // some example for C like style code for (i=0; ifacc; dReal mass = body[i]->mass.mass; dReal * gravity = world->gravity; // some isolated performance primitives MULTYPLY_BLOCK( facc, gravity, mass, 3 ); // MULTYPLY_BLOCK( dest, src, multer, counter ); } } __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ed.jones at oracle.com Thu Nov 7 03:11:02 2002 From: ed.jones at oracle.com (Ed Jones) Date: Thu Nov 7 03:11:02 2002 Subject: [ODE] References: <200211070208.gA728bX26148@mailgate5.cinetic.de> <20021107112605.294d406e.max.lungarella@aist.go.jp> Message-ID: <3DCA3C01.4020800@oracle.com> Hi, I don't know which compiler you're using, but for Visual C/C++ 6.0 I type something like; "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat" ...(including the quotes) at the command prompt, before typing "make", and that seems to work just fine. In the olden days you'd probably be able to call this script from your autoexec.bat file, but I'm not sure if recent versions of Windows have such a thing. Alternatively, when I install VC there's an option which says something like "Register the environment variables" which I guess sets the environment properly within Windows, so you don't have to type this everytime. Alternatively (again), you could look in that script and register all environment variables manually, with Windows, yourself. Mind you, that's on Win2k and VC6, dunno about XP. ;-) Hope that's useful. Cheers, Ed. Max Lungarella wrote: >you've got to properly set your "path" environment variable, i guess. >apparently your makefile is not able to find "Feconfigurator.exe". try >to type "path" in the console (if winXP's got one) and check the output. >the directory where "Feconfigurator.exe" is installed should be there. >if not, add it to "path". > >hope this works. > >cheers, > max > > > > >>Hi, >>i'm new to ODE and just tried to install the last release on WinXP. >>Unfortunately, the make just fails displaying following error code: >> >>D:\Development\ODE\ode-0.03>make >>cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC >>/Feconfigurator.exe configur ator.c >>process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC >>/DdDOUBLE /DdDEBU G_ALLOC /Feconfigurator.exe configurator.c, ...) >>failed. make (e=2): Das System kann die angegebene Datei nicht finden. >>make: *** [configurator.exe] Error 2 >> >>(sorry for the german stuff in the line before the last; it just means >>the system wasn't able to find the specified file). >> >>i have to admit i'm a make dummy, but it seems as if make fails while >>trying to build the configurator.exe, right? is there supposed to be a >>config.h file somewhere (e.g. in include\ode), cause there is none? at >>least in the doc it's saying you could as well just set the >>condiguration yourself in that file. >> >>or am i just too stupid? >>any help would be great. >> >>thanks, >>thomas. >> >>________________________________________________________________ >>Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! >>Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 >> >> >>_______________________________________________ >>ODE mailing list >>ODE@q12.org >>http://q12.org/mailman/listinfo/ode >> >> >_______________________________________________ >ODE mailing list >ODE@q12.org >http://q12.org/mailman/listinfo/ode > > From ps_yumemi at yahoo.com Thu Nov 7 08:55:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Thu Nov 7 08:55:02 2002 Subject: [ODE] rotation Message-ID: <20021107155451.29271.qmail@web40506.mail.yahoo.com> hello, ok, i finally got my variables right. i have another question though. i got my rotation matrix using const dReal dBodyGetRotation(bodyID) and then i got the values using a dReal matrix[12]; i then to transfer it to a dMatrix3 rotation_matrix and use dBodySetRotation(bodyID,rotation_matrix) however, i'm not getting the result i want. is there any way to get the euler angles from the matrix? if i'm using it on a car just on the chassis body after i attach everything else is that ok? is there any reason for this not to work? pia __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From coding at natew.com Thu Nov 7 10:27:01 2002 From: coding at natew.com (Nate W) Date: Thu Nov 7 10:27:01 2002 Subject: [ODE] rotation In-Reply-To: <20021107155451.29271.qmail@web40506.mail.yahoo.com> Message-ID: On Thu, 7 Nov 2002, pia dalusong wrote: > is there any way to get the euler angles from the > matrix? I'm not sure, but a google search on "euler angle matrix conversion" does turn up a bunch of pages that I think show how to extract euler angles from a quaternion. I only skimmed the results, but it looks promising. > if i'm using it on a car just on the chassis body > after i attach everything else is that ok? > is there any reason for this not to work? If "it" refers to dBodySetRotation, then I think you're going to get some weird behavior if you're rotating the body more than a tiny amount. ODE will try to bring the wheels back into alignment during the next timestep, and that could take huge forces, and that could lead to explosive behavior. At the very least I would expect the car to wiggle a lot during the first few timesteps. -- Nate Waddoups Redmond WA USA http://www.natew.com From erwin at vo.com Thu Nov 7 11:05:02 2002 From: erwin at vo.com (Erwin de Vries) Date: Thu Nov 7 11:05:02 2002 Subject: [ODE] Tri-Collider ... confused References: <3DC7D7A7.7010507@web.de> Message-ID: <000201c28688$0983c4e0$73fefea9@athlon> You should try both and see which works best for you. Both are very similar, and its pretty trivial to convert the CVS version to Opcode 1.2. If you need your trilist to be transformed dynamically, you can only use the one posted on this list. The tricollider will be integrated into ODE at some point in the future. I will fix the issues i reported to this list earlier, sometime soon. I've been saying this for a while.. Busy.. :-( But it will happen this year! :-P Erwin ----- Original Message ----- From: "Marco Kögler" To: Sent: Tuesday, November 05, 2002 15:37 Subject: [ODE] Tri-Collider ... confused > Hi! > > I was wondering whether somebody on the list would be kind enough to > shed some light regarding the tricollider. > > There is a tricollider in the CVS repository, but it seems 'oldish' ... > is that still the tricollider to use? > > I'm using Opcode 1.2 in my project and fear that this will conflict with > the tricollider in the CVS (as it needs Opcode 1.0). Erwin posted an > update to the list sometime in August (newstuff.gz). This uses Opcode > 1.2, so that should solve that problem. A bit later Erwin posted > something about this code having problems with large triangles and other > issues ... he also said that he was glad he didn't commit the changes in > the CVS. > > So, I don't know which code to use :( > > Should I use the version in the CVS or the one posted in August? Is > there a possibility of a more stable/current version in the near future? > > Questions over questions *sigh* > > Anyways, ODE rocks ... > > -Marco > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > > From mattias at cambrianlabs.com Thu Nov 7 11:32:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Thu Nov 7 11:32:02 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: <000201c28688$0983c4e0$73fefea9@athlon> References: <3DC7D7A7.7010507@web.de> <000201c28688$0983c4e0$73fefea9@athlon> Message-ID: > The tricollider will be integrated into ODE at some point > in the future. If I recall correctly, the tri-collider requires ODE to be compiled in single precision - will this change for the integration, or will tri- collider not be available when compiling to double precision? cheers, m From stephan at eisscholle.de Thu Nov 7 12:19:02 2002 From: stephan at eisscholle.de (Stephan Heigl) Date: Thu Nov 7 12:19:02 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: <000201c28688$0983c4e0$73fefea9@athlon> References: <3DC7D7A7.7010507@web.de> <000201c28688$0983c4e0$73fefea9@athlon> Message-ID: <200211072018.29994.stephan@eisscholle.de> Since i haven't been subscribed that long to that list, what patches are you refering to? I've searched through the the ml archive of August, but i haven't found the mentioned patch. Thanks alot. - Stephan On Wednesday 06 November 2002 22:58, Erwin de Vries wrote: > You should try both and see which works best for you. Both are very > similar, and its pretty trivial to convert the CVS version to Opcode 1.2. > If you need your trilist to be transformed dynamically, you can only use > the one posted on this list. The tricollider will be integrated into ODE at > some point in the future. > > I will fix the issues i reported to this list earlier, sometime soon. I've > been saying this for a while.. Busy.. :-( > > But it will happen this year! :-P > > Erwin > > ----- Original Message ----- > From: "Marco Kögler" > To: > Sent: Tuesday, November 05, 2002 15:37 > Subject: [ODE] Tri-Collider ... confused > > > Hi! > > > > I was wondering whether somebody on the list would be kind enough to > > shed some light regarding the tricollider. > > > > There is a tricollider in the CVS repository, but it seems 'oldish' ... > > is that still the tricollider to use? > > > > I'm using Opcode 1.2 in my project and fear that this will conflict with > > the tricollider in the CVS (as it needs Opcode 1.0). Erwin posted an > > update to the list sometime in August (newstuff.gz). This uses Opcode > > 1.2, so that should solve that problem. A bit later Erwin posted > > something about this code having problems with large triangles and other > > issues ... he also said that he was glad he didn't commit the changes in > > the CVS. > > > > So, I don't know which code to use :( > > > > Should I use the version in the CVS or the one posted in August? Is > > there a possibility of a more stable/current version in the near future? > > > > Questions over questions *sigh* > > > > Anyways, ODE rocks ... > > > > -Marco > > > > _______________________________________________ > > ODE mailing list > > ODE@q12.org > > http://q12.org/mailman/listinfo/ode > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From erickt at andrew.cmu.edu Thu Nov 7 12:25:02 2002 From: erickt at andrew.cmu.edu (Erick Tryzelaar) Date: Thu Nov 7 12:25:02 2002 Subject: [ODE] rotation In-Reply-To: Message-ID: Sure there is: This is from David Eberly's (chief architect behind the netimmerse engine) webpage: http://www.magic-software.com/Documentation/EulerAngles.pdf Also, if you're interested, the rest of that site has an amazing amount of useful information. Its good stuff. -Erick On Thu, 7 Nov 2002, Nate W wrote: > On Thu, 7 Nov 2002, pia dalusong wrote: > > > is there any way to get the euler angles from the > > matrix? > > I'm not sure, but a google search on "euler angle matrix conversion" does > turn up a bunch of pages that I think show how to extract euler angles > from a quaternion. I only skimmed the results, but it looks promising. > > > if i'm using it on a car just on the chassis body > > after i attach everything else is that ok? > > is there any reason for this not to work? > > If "it" refers to dBodySetRotation, then I think you're going to get some > weird behavior if you're rotating the body more than a tiny amount. ODE > will try to bring the wheels back into alignment during the next timestep, > and that could take huge forces, and that could lead to explosive > behavior. At the very least I would expect the car to wiggle a lot during > the first few timesteps. > > -- > > Nate Waddoups > Redmond WA USA > http://www.natew.com > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > > From marco.koegler at web.de Thu Nov 7 13:09:02 2002 From: marco.koegler at web.de (=?ISO-8859-2?Q?Marco_K=F6gler?=) Date: Thu Nov 7 13:09:02 2002 Subject: [ODE] Tri-Collider ... confused References: <3DC7D7A7.7010507@web.de> <000201c28688$0983c4e0$73fefea9@athlon> <200211072018.29994.stephan@eisscholle.de> Message-ID: <3DCAC82E.8020404@web.de> Stephan Heigl wrote: > Since i haven't been subscribed that long to that list, what patches are you > refering to? I've searched through the the ml archive of August, but i > haven't found the mentioned patch. You can find it here: http://q12.org/pipermail/ode/2002-August/001646.html I had to copy/paste the base64 encoded stuff into a file and then decode it with the 'base64' command-line tool. Should be standard on Linux/Unix ... a Windows version can be found here: http://www.fourmilab.ch/webtools/base64/ -Marco From coding at natew.com Thu Nov 7 13:49:01 2002 From: coding at natew.com (Nate W) Date: Thu Nov 7 13:49:01 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: Message-ID: On Thu, 7 Nov 2002, Mattias Fagerlund wrote: > > The tricollider will be integrated into ODE at some point > > in the future. > > If I recall correctly, the tri-collider requires ODE to be compiled in > single precision - will this change for the integration, or will tri- > collider not be available when compiling to double precision? I am using tri-collider with single-precision ODE right now with good results. I tried compiling both with double-precision and although the build worked I couldn't get it work at run time. I think the run-time problem was caused by pointer confusion - something expecting an arry of single-precision values received an array of doubles, or vice versa. I really don't think it would take much effort to get it work with doubles, but at the time this happened the CRCRLF bug in VS.Net was making some of the tri-collider source files impossible for me to work with. FWIW, my app doesn't behave noticably different when built with dSINGLE vs dDOUBLE. Juice started out in dDOUBLE mode, but has been released in dSINGLE mode since I integrated Demeter and the tri collider. If anyone noticed the change they haven't mentioned it to me. -- Nate Waddoups Redmond WA USA http://www.natew.com From mattias at cambrianlabs.com Thu Nov 7 14:03:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Thu Nov 7 14:03:02 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: References: Message-ID: > > > The tricollider will be integrated into ODE at some point > > > in the future. > > > > If I recall correctly, the tri-collider requires ODE to be compiled > in > > single precision - will this change for the integration, or will tri- > > collider not be available when compiling to double precision? > > I am using tri-collider with single-precision ODE right now with good > results. I tried compiling both with double-precision and although the > build worked I couldn't get it work at run time. My evolved demos exploded spectacularly when I used single precision. I mean, my hopper left for saturn or something. I haven't seen it since. In double precision, things work just fine. That could be some bug on my part, but nothing I could track down. > I really don't think it would take much effort to get > it > work with doubles, but at the time this happened the CRCRLF bug in > VS.Net > was making some of the tri-collider source files impossible for me to > work with. I made a small util that loads all files that match a pattern and re- saves them, fixing all lines with CrLf (i recurses into subdirs as well). Let me know if you're interested. cheers, m From russ at q12.org Fri Nov 8 00:58:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 8 00:58:02 2002 Subject: [ODE] new ODE collision Message-ID: <20021108000235.5bc25ca1.russ@q12.org> if you're curious, the source files for the new collision infrastructure have been checked into CVS (collision_*.h, collision_*.cpp). it has not been hooked up to the rest of ODE yet, so the only reason i mention it is for the curious. note that there's still a bunch of stuff to do, in particular to hook up the ray, trimesh and cylinder classes, and to convert the hash table space to use an incremental approach ... but you can get an idea of the new layout. the new collision infrastructure is 99% API compatible with the old, but i'll provide an ODE 'legacy' collision option so that existing code is guaranteed not to break - but all new collision development will go on the new infrastructure. russ. -- Russell Smith http://www.q12.org From ps_yumemi at yahoo.com Fri Nov 8 08:12:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Fri Nov 8 08:12:02 2002 Subject: [ODE] missing function Message-ID: <20021108151058.35692.qmail@web40510.mail.yahoo.com> hello, do these functions exist and what do they do? dStopwatchReset dStopwatchStop dStopwatchStart i know they probably work the way they sound but are they in ode? pia __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From espmiii at yahoo.com Fri Nov 8 10:26:03 2002 From: espmiii at yahoo.com (James Myers) Date: Fri Nov 8 10:26:03 2002 Subject: [ODE] Pool table physics Message-ID: <20021108172523.74417.qmail@web11303.mail.yahoo.com> Hello all, new user here... Is ODE appropriate for simulating a game of pool? I ask because I'm either modifying the wrong parameters or barking up the wrong library. There are two big problems I'm having: The first problem is that the balls are not "rolling". The friction from the table should put torque on the ball and cause angular acceleration until the ball reaches natural rolling. The balls orientation as returned by dBodyGetRotation doesn't reflect this. Eventually the balls' orientation does change a little, but only after a lot of playing. I'm using dBodyAddForce, so there shouldn't be any english applied to the cue ball. The second problem is that as the balls start to slow down, they will not travel in a straight line. This is hard to describe but if I apply a small force at about a 35 degree angle around the y axis parallel to the xz plane, the cue ball will travel straight for a bit, then start to curve in the +x direction, then roll straight along +x until it stops. The same happens if I hit on an angle closer to + or - z, it will start to head along that axis. It also happens on say, a break shot, where all the balls will eventually be traveling in + or - x or z near the end of the shot. I'm guessing there's just something wrong with my surface parameters. I am only using the dContactBounce flag and changing the mu and bounce parameters based on the type of collision (bumper-ball, ball-floor, ball-ball). I'm not a real physics genius, which is why I switched to ODE in the first place. I am using my own collision functions right now, perhaps there should be more than a single contact joint where the ball meets the table? They tend to jitter a bit every 50 frames (which is about 200 world ticks). Maybe that's due to using the double precision ode and performing my collision detection with single precision? It does happen in both the 0.03 release and whatever was in cvs wednesday afternoon. Any advice would be appreciated greatly. Is more information needed? Thanks much, James __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ps_yumemi at yahoo.com Sat Nov 9 02:27:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sat Nov 9 02:27:02 2002 Subject: [ODE] need to understand this Message-ID: <20021109092556.77275.qmail@web40507.mail.yahoo.com> hello, after a lot of digging, i saw this void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal theta, dReal psi) { dReal sphi,cphi,stheta,ctheta,spsi,cpsi; dAASSERT (R); sphi = dSin(phi); cphi = dCos(phi); stheta = dSin(theta); ctheta = dCos(theta); spsi = dSin(psi); cpsi = dCos(psi); _R(0,0) = cpsi*ctheta; _R(0,1) = spsi*ctheta; _R(0,2) =-stheta; _R(1,0) = cpsi*stheta*sphi - spsi*cphi; _R(1,1) = spsi*stheta*sphi + cpsi*cphi; _R(1,2) = ctheta*sphi; _R(2,0) = cpsi*stheta*cphi + spsi*sphi; _R(2,1) = spsi*stheta*cphi - cpsi*sphi; _R(2,2) = ctheta*cphi; } i'm a little confused as to how you put values into a dMatrix and how do you call it? if i have a variable const dReal *R and dMatrix3 M is R[0]=m[0,0] ? i'm sorry but i don't understand what happens when you write _R(2,1) is it an 2d array matrix[3][3] or a 1d matrix[12]? thanks __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ps_yumemi at yahoo.com Sat Nov 9 04:42:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sat Nov 9 04:42:02 2002 Subject: [ODE] speed control Message-ID: <20021109114122.66919.qmail@web40508.mail.yahoo.com> hi, how do you best control the speed and orientation of your mobot when you have specific values in mind? how can i control the time it stays that way? is using dbodysetlinearvel and dbodysetangular vel during a simloop wrong? what else can i use? thanks __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From erwin at vo.com Sat Nov 9 05:37:02 2002 From: erwin at vo.com (Erwin de Vries) Date: Sat Nov 9 05:37:02 2002 Subject: [ODE] new ODE collision References: <20021108000235.5bc25ca1.russ@q12.org> Message-ID: <000401c287ec$8c862b70$73fefea9@athlon> Looking good. Some comments: - Remember to add dGeomMoved() calls inside of all Set functions of a geom. Also SetRadius, etc. - I think the destructor of a geom needs to tell the body it might be attached to that it wants to remove itself. Otherwise the body will use this geom in its linked list after it has been destroyed, which crashes. - When adding the ray class we should think about what the 'penetration depth' should be. Do you have any thoughts on this? - Why do you memcopy inside the dxSpace::computeAABB() function? - Should we add support for a user defined, or infinite AABB on demand for spaces? This is really useful for the quadtree space containing huge (10.000 for example) amounts of geoms. If i would remove a single geom it would need to do a lot of work. Its very nice to see how you transformed parts of my code to work with your (existing) code, resulting in the best of both worlds. Great job. Erwin ----- Original Message ----- From: "Russ Smith" To: Sent: Friday, November 08, 2002 06:02 Subject: [ODE] new ODE collision > > if you're curious, the source files for the new collision infrastructure > have been checked into CVS (collision_*.h, collision_*.cpp). it has not > been hooked up to the rest of ODE yet, so the only reason i mention it > is for the curious. note that there's still a bunch of stuff to do, in > particular to hook up the ray, trimesh and cylinder classes, and to > convert the hash table space to use an incremental approach ... but you > can get an idea of the new layout. > > the new collision infrastructure is 99% API compatible with the old, but > i'll provide an ODE 'legacy' collision option so that existing code is > guaranteed not to break - but all new collision development will go on > the new infrastructure. > > russ. > > -- > Russell Smith > http://www.q12.org > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > > From Daniel.Groll at t-online.de Sat Nov 9 07:19:02 2002 From: Daniel.Groll at t-online.de (Daniel.Groll@t-online.de) Date: Sat Nov 9 07:19:02 2002 Subject: [ODE] rate for fixed timesteps Message-ID: <1036851471.3dcd190fc0ebf@webmail.t-online.de> I use fixed timesteps to run my car simulation game. With a rate of 60 Hz the simulation runs smooth and seemed to be stable but now with further testing I encountered some stability problems when cars or objects move fast. Sometimes they seem to break through geometry or "caught" in geometry. Is this the cause of a relatively low rate of world timesteps? Or are there other reasons for instability? At which rates run phyiscs simulations in common? From ps_yumemi at yahoo.com Sat Nov 9 10:35:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sat Nov 9 10:35:02 2002 Subject: [ODE] no rotation Message-ID: <20021109173403.55406.qmail@web40513.mail.yahoo.com> hello, i called a dBodySetRotation and the program doesn't go through it. all the other functions work but that particular pair. i called dRFromEulerAngles before i called dbodysetrotation before i joined the wheels to my chassis but the chassis doesn't rotate at all. i even put different values to check dRFromEulerAngles (bodyID,0,0,270) and it still doesn't turn? what could possibly wrong with it? btw this is the second mobot in the system can that affect it? thanks __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ps_yumemi at yahoo.com Sun Nov 10 10:03:01 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sun Nov 10 10:03:01 2002 Subject: [ODE] matrix Message-ID: <20021110170253.68888.qmail@web40508.mail.yahoo.com> is the rotation matrix unique for ANY combination of theta, phi and psi? or do they have their drawbacks? are the linear and angular velocities related to euler angles? __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From thomasharte at lycos.co.uk Sun Nov 10 15:51:02 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Sun Nov 10 15:51:02 2002 Subject: [ODE] matrix Message-ID: <1036968557010081@lycos-europe.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --=_NextPart_Lycos_0100811036968557_ID Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit >is the rotation matrix unique for ANY combination of >theta, phi and psi? or do they have their drawbacks? The rotation matrix is unique for any particular orientation. However, the three angle orientation system has singularities, which more or less just means that not all unique combinations of theta, phi and psi produce unique orientations. Therefore the rotation matrix for a unique theta/phi/psi is not necessarily unique. However, the rotation matrix method of storing orientations has drawbacks in this sense. It is the three angle description that is limited. In fact, ODE is unlikely to be using the rotation matrix form internally at all, but intead using quaternions internally then converting to orientation matrices when requested because that form is more useful for object display. Were it solely using rotation matrices however, the drawbacks would include relatively costly rotations (due mostly to having to deal with precision issues) and larger than necessary data size. >are the linear and angular velocities related to euler angles? No. Linear velocity is exactly the same as if an object could not rotation. So, e.g. a velocity vector of (a, b, c) will always mean a units along the global 'x axis', b along the global 'y' and c along the global 'z', regardless of object orientation. Angular velocity has a different meaning again. It is a 3 component vector, which may therefore be thought of as describing a direction and a magnitude. The rotation it describes is a rotation around the axis described by its rotation of n radians, where n is equal to the vector's magnitude. This is a very useful form for calculating how applied impulses and forces affect rotation. -Thomas

______________________________________________________
The making of Brazillian football

--=_NextPart_Lycos_0100811036968557_ID-- From russ at q12.org Sun Nov 10 18:54:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 18:54:01 2002 Subject: [ODE] ODE's new collision system Message-ID: <20021110175837.73e010cb.russ@q12.org> ODE's new collision system has been hooked up to the rest of ODE. here's the docs for the new API, as well as a porting guide. http://q12.org/ode/ode-docs.html note that the user can activate either the old or new collision API when ODE is compiled, by setting the ODE_OLD_COLLISION variable in config/user-settings. BUT NOTE, even if the old ODE collision code is used, spaces must still be created with the new API, using a parent argument or 0. work is continuing on adding features to the new collision code. russ. -- Russell Smith http://www.q12.org From russ at q12.org Sun Nov 10 19:09:02 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 19:09:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <000401c287ec$8c862b70$73fefea9@athlon> References: <20021108000235.5bc25ca1.russ@q12.org> <000401c287ec$8c862b70$73fefea9@athlon> Message-ID: <20021110181315.7c8dcc2e.russ@q12.org> > - Remember to add dGeomMoved() calls inside of all Set functions of a > geom. Also SetRadius, etc. yup, i'm on it. > - I think the destructor of a geom needs to tell the body it might be > attached to that it wants to remove itself. Otherwise the body will > use this geom in its linked list after it has been destroyed, which > crashes. quite right - i'll do this too. > - When adding the ray class we should think about what the > 'penetration depth' should be. Do you have any thoughts on this? i'm not sure that dRay will ever be attached to a body, in which case penetration depth does not have much use for the dynamics. perhaps you can think of a non-dynamics use/definition for the penetration depth? > - Why do you memcopy inside the dxSpace::computeAABB() function? no good reason. it may actually be marginally faster because the g->recomputeAABB() call will cause a reload of the class aabb pointer, but not the stack aabb buffer. it's an optimization, but i doubt anyone would notice the extra cycles. > - Should we add support for a user defined, or infinite AABB on demand > for spaces? This is really useful for the quadtree space containing > huge (10.000 for example) amounts of geoms. If i would remove a single > geom it would need to do a lot of work. i don't understand this .. ? russ. -- Russell Smith http://www.q12.org From russ at q12.org Sun Nov 10 20:44:02 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 20:44:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <000401c287ec$8c862b70$73fefea9@athlon> References: <20021108000235.5bc25ca1.russ@q12.org> <000401c287ec$8c862b70$73fefea9@athlon> Message-ID: <20021110194819.0b0957de.russ@q12.org> > - Remember to add dGeomMoved() calls inside of all Set functions of a > geom. Also SetRadius, etc. done. > - I think the destructor of a geom needs to tell the body it might be > attached to that it wants to remove itself. Otherwise the body will > use this geom in its linked list after it has been destroyed, which > crashes. done. also the previous dGeomSetBody(0) code was completely broken, this is fixed too (hopefully). russ. -- Russell Smith http://www.q12.org From mein at cs.umn.edu Sun Nov 10 20:54:01 2002 From: mein at cs.umn.edu (Kent Mein) Date: Sun Nov 10 20:54:01 2002 Subject: [ODE] another small patch to the ode source Message-ID: <20021105201649.A4038@cs.umn.edu> At the end of the build: My machine is trying to link the following with gcc, it should be g++. (I'm on a Sparc running SunOS5.8 useing gcc-3.2) Example: gcc -o ode/test/test_chain2.exe ode/test/test_chain2.o lib/libode.a lib/libdrawstuff.a -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib/X11R6 -L/usr/lib/X11 -lX11 -lGL -lGLU -lm Kent -- mein@cs.umn.edu http://www.cs.umn.edu/~mein From si at sjbrown.co.uk Sun Nov 10 21:02:35 2002 From: si at sjbrown.co.uk (Si Brown) Date: Sun Nov 10 21:02:35 2002 Subject: [ODE] bending wheels again? Message-ID: <200211061355.gA6DtVu11493@hook.org> Hi, >I've read something about problems using directx with ODE too, can someone >tell me more? The only problem I had was with getting DirectX to preserve the FPU exception behaviour, which can be achieved by creating the device with the D3DCREATE_FPU_PRESERVE flag set. Failing to do so broke some of the ODE internals (in the version I was using). Ta, Si From maddocks at metservice.com Sun Nov 10 21:15:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Sun Nov 10 21:15:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <20021110194819.0b0957de.russ@q12.org> Message-ID: <1B6F5262-F52C-11D6-8ACD-00039394FB86@metservice.com> Does all this mean that tricollider is now part of the core distribution? Henry On Monday, November 11, 2002, at 01:48 PM, Russ Smith wrote: > > russ. > From russ at q12.org Sun Nov 10 21:38:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 21:38:01 2002 Subject: [ODE] credit Message-ID: <20021110204247.41e37209.russ@q12.org> in the spirit of giving credit where it is due, i've created a list of ODE contributors and their contributions: http://q12.org/cgi-bin/wiki.pl?ContributorsToODE if i forgot your name or what you did, can you edit this page accordingly? (it's a wiki, so everyone can edit it). i'll move this list to the ODE main page when it's accurate. russ. -- Russell Smith http://www.q12.org From russ at q12.org Sun Nov 10 21:47:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 21:47:01 2002 Subject: [ODE] new ODE collision In-Reply-To: <1B6F5262-F52C-11D6-8ACD-00039394FB86@metservice.com> References: <20021110194819.0b0957de.russ@q12.org> <1B6F5262-F52C-11D6-8ACD-00039394FB86@metservice.com> Message-ID: <20021110204313.0f068550.russ@q12.org> > Does all this mean that tricollider is now part of the core > distribution? not quite yet, but it will be. russ. -- Russell Smith http://www.q12.org From maddocks at metservice.com Sun Nov 10 21:56:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Sun Nov 10 21:56:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <20021110204313.0f068550.russ@q12.org> Message-ID: kewl...I can't wait:) On Monday, November 11, 2002, at 02:43 PM, Russ Smith wrote: > not quite yet, but it will be. From dmcclurg at pandemicstudios.com.au Sun Nov 10 22:04:43 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Sun Nov 10 22:04:43 2002 Subject: [ODE] rate for fixed timesteps Message-ID: To avoid breaking through geometry or generating large collision penetration depths, you'll need use a step value which scales to your velocity. step = 1/60 speed = length(vel) if (speed * step) > max_depth then step = max_depth / speed endif dWorldStep(world, step) just make sure max_depth is less than the radius of your moving vehicle. ideally, it would be small enough not to visually notice either (eg. radius * 0.1f) if you really want to use a fixed time step, step = max_depth / max_speed -----Original Message----- From: Daniel.Groll@t-online.de [mailto:Daniel.Groll@t-online.de] Sent: Sunday, 10 November 2002 12:18 AM To: ode@q12.org Subject: [ODE] rate for fixed timesteps I use fixed timesteps to run my car simulation game. With a rate of 60 Hz the simulation runs smooth and seemed to be stable but now with further testing I encountered some stability problems when cars or objects move fast. Sometimes they seem to break through geometry or "caught" in geometry. Is this the cause of a relatively low rate of world timesteps? Or are there other reasons for instability? At which rates run phyiscs simulations in common? From chris.campbell at l8tech.com Sun Nov 10 22:38:01 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Sun Nov 10 22:38:01 2002 Subject: [ODE] bang! Message-ID: Sometimes having explosions in a physics simulation is a good thing :) http://oscar.lincmedia.co.jp:58080/bang.zip Press h to get some instructions - you should really be inside the room to throw the dynamite properly. This is from the final (?) tutorial on how to use a game engine I have been working on which has a small amount of integration with ODE. I'm hoping to get my website organised and up sometime in the next few weeks. ChrisC From coding at natew.com Mon Nov 11 01:44:02 2002 From: coding at natew.com (Nate W) Date: Mon Nov 11 01:44:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <20021110181315.7c8dcc2e.russ@q12.org> Message-ID: On Sun, 10 Nov 2002, Russ Smith wrote: > > - When adding the ray class we should think about what the > > 'penetration depth' should be. Do you have any thoughts on this? > > i'm not sure that dRay will ever be attached to a body, in which case > penetration depth does not have much use for the dynamics. perhaps you > can think of a non-dynamics use/definition for the penetration depth? The first thing that came to my mind when I heard about the ray class was sensors for the critters I'm making in Juice, sort of like IR or ultrasonic rangefinders in robots, or like whiskers on cats. I'd want to know the distance from the ray's origin to the first object it collides with. Second, I think they might be useful for fast-moving objects - if you project a ray forward along a missile's direction of travel, you could get "collision" info in cases where the missile would otherwise teleport around an object due to its position changing by a distance greater than its length. In that case, could the ray intersection be used to generate a contact joint, to stop the missile from penetrating? -- Nate Waddoups Redmond WA USA http://www.natew.com From Remko at act-3d.com Mon Nov 11 03:33:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Mon Nov 11 03:33:02 2002 Subject: [ODE] Universal joint Message-ID: <279631823.2242109102.98@server> Is it possible to include parameters that limit the rotation of a universal joint? This way you could create a rag doll with ODE. This is very useful in games, like Doom 3 where a character drops of the stairs after dying instead of playing a standard animation. From ed.jones at oracle.com Mon Nov 11 04:11:02 2002 From: ed.jones at oracle.com (Ed Jones) Date: Mon Nov 11 04:11:02 2002 Subject: [ODE] need to understand this References: <20021109092556.77275.qmail@web40507.mail.yahoo.com> Message-ID: <3DCF9028.4040402@oracle.com> Hi, From "common.h"... typedef dReal dMatrix3[4*3]; and from the top of "rotation.cpp"... #define _R(i,j) R[(i)*4+(j)] ;-) Cheers, Ed. pia dalusong wrote: >hello, > >after a lot of digging, i saw this >void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal >theta, dReal psi) >{ > dReal sphi,cphi,stheta,ctheta,spsi,cpsi; > dAASSERT (R); > sphi = dSin(phi); > cphi = dCos(phi); > stheta = dSin(theta); > ctheta = dCos(theta); > spsi = dSin(psi); > cpsi = dCos(psi); > _R(0,0) = cpsi*ctheta; > _R(0,1) = spsi*ctheta; > _R(0,2) =-stheta; > _R(1,0) = cpsi*stheta*sphi - spsi*cphi; > _R(1,1) = spsi*stheta*sphi + cpsi*cphi; > _R(1,2) = ctheta*sphi; > _R(2,0) = cpsi*stheta*cphi + spsi*sphi; > _R(2,1) = spsi*stheta*cphi - cpsi*sphi; > _R(2,2) = ctheta*cphi; >} >i'm a little confused as to how you put values into a >dMatrix and how do you call it? >if i have a variable >const dReal *R >and >dMatrix3 M > >is R[0]=m[0,0] ? >i'm sorry but i don't understand what happens when you >write _R(2,1) > >is it an 2d array matrix[3][3] or a 1d matrix[12]? > >thanks > > > >__________________________________________________ >Do you Yahoo!? >U2 on LAUNCH - Exclusive greatest hits videos >http://launch.yahoo.com/u2 >_______________________________________________ >ODE mailing list >ODE@q12.org >http://q12.org/mailman/listinfo/ode > > From dominicmorris2 at yahoo.com Mon Nov 11 07:32:01 2002 From: dominicmorris2 at yahoo.com (Dominic Morris) Date: Mon Nov 11 07:32:01 2002 Subject: [ODE] Car handling - Overturning too easily Message-ID: <20021111143146.93605.qmail@web80305.mail.yahoo.com> Hello all, I'm sure that there must be a simple solution to this, so if anybody can advise me I'd be very grateful. I've got my car driving over my terrain mesh using the contrib tri-collider, and the one remaining problem I have is that when I steer the car when it's travelling quickly, it overturns much too easily. I've based my code on the buggy example, so the geoms are four spheres and a box. Is this down to the use of spheres for the wheels? If so, what is the solution? Capped Cylinders don't seem any better, as they don't seem to fit the geometery of wheels any better than spheres, and I'm not sure of a user tri-collider for CCylinders. I've played about with masses, and friction models etc, and I can tune down the overturning tendancy, at the expense of the car's grip by using the Slip1 and Slip2 parameters (not that I fully understand these either!) Any help is appreciated, DM. __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From henri at cs.sun.ac.za Mon Nov 11 08:35:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Mon Nov 11 08:35:02 2002 Subject: [ODE] Faster replacement for fastldlt.c Message-ID: <000d01c28997$fcabf4f0$39d4e892@shrine> This is a multi-part message in MIME format. ------=_NextPart_000_000A_01C289A8.C02B4F10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi ODE fans and perpetrators :) I've been looking into various ways to optimize the LDLT factorization = which is one of the computationally intensive tasks in ODE. = Unforetunately I cannot directly test alot of my results due to not = having a C(++) compiler around. Nonetheless, I've restructured the = original "fastldlt.c" file which should be functionally equivalent to = the original but considerably faster. (Russ... the version I send you = had a bug in it - this version here should be correct.) I hope the = version I provide is correct, this is difficult to ascertain just by = inspection though, as the code is heavily interdependent. Please can somebody that is "in the know" test the replacement file for = correctness and speed. If it gets the thumbs-up I'd be happy to see it = integrated into the ODE package. You can find the file at: = http://www.cs.sun.ac.za/~henri/fastldlt_henri.c thanks Henri ------=_NextPart_000_000A_01C289A8.C02B4F10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi ODE fans and = perpetrators :)
 
I've been looking into various ways to optimize = the LDLT=20 factorization which is one of the computationally intensive = tasks in ODE.=20 Unforetunately I cannot directly test alot of my results due to not = having a=20 C(++) compiler around. Nonetheless, I've restructured the original = "fastldlt.c"=20 file which should be functionally equivalent to the original but=20 considerably faster. (Russ... the version I send you had a bug in it - = this=20 version here should be correct.) I hope the version I provide is = correct, this=20 is difficult to ascertain just by inspection though, as the code is = heavily=20 interdependent.
 
Please can somebody that is "in the know" test = the=20 replacement file for correctness and speed. If it gets the thumbs-up I'd = be=20 happy to see it integrated into the ODE package. You can find the file = at: http://www.cs.sun.ac.za/~henri/fastldlt_henri.c
 
thanks
  Henri
------=_NextPart_000_000A_01C289A8.C02B4F10-- From anselm at hook.org Mon Nov 11 09:54:02 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 11 09:54:02 2002 Subject: [ODE] Car handling - Overturning too easily In-Reply-To: <20021111143146.93605.qmail@web80305.mail.yahoo.com> Message-ID: Hi Dominic, You can put a weight far below the car's chassis - the Monster Mayhem demo does this. - a On Mon, 11 Nov 2002, Dominic Morris wrote: > Hello all, > > I'm sure that there must be a simple solution to this, > so if anybody can advise me I'd be very grateful. > > I've got my car driving over my terrain mesh using the > contrib tri-collider, and the one remaining problem I > have is that when I steer the car when it's travelling > quickly, it overturns much too easily. > > I've based my code on the buggy example, so the geoms > are four spheres and a box. Is this down to the use of > spheres for the wheels? If so, what is the solution? > Capped Cylinders don't seem any better, as they don't > seem to fit the geometery of wheels any better than > spheres, and I'm not sure of a user tri-collider for > CCylinders. > > I've played about with masses, and friction models > etc, and I can tune down the overturning tendancy, at > the expense of the car's grip by using the Slip1 and > Slip2 parameters (not that I fully understand these > either!) > > Any help is appreciated, > > DM. > > __________________________________________________ > Do you Yahoo!? > New DSL Internet Access from SBC & Yahoo! > http://sbc.yahoo.com > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From coding at natew.com Mon Nov 11 11:30:02 2002 From: coding at natew.com (Nate W) Date: Mon Nov 11 11:30:02 2002 Subject: [ODE] Car handling - Overturning too easily In-Reply-To: <20021111143146.93605.qmail@web80305.mail.yahoo.com> Message-ID: On Mon, 11 Nov 2002, Dominic Morris wrote: > I'm sure that there must be a simple solution to this, > so if anybody can advise me I'd be very grateful. > > I've got my car driving over my terrain mesh using the > contrib tri-collider, and the one remaining problem I > have is that when I steer the car when it's travelling > quickly, it overturns much too easily. I ran into this as well. I've mostly just been tuning the tire-ground friction, so it is more likely to slide sideways than flip onto its roof. You might also want to try lowering the car's center of gravity, either by changing the chassis' inertial tensor or by reducing the 'ride height' of the suspension. I think you have to expect a certain amount of rollover, since it's a problem with real off-road racing as well. Also, are you steering with a joystick, or are you using the keyboard? If the latter, you might want to try slowing down the steering response, or reducing the steering angle as the car gains speed. > Capped Cylinders don't seem any better, as they don't > seem to fit the geometery of wheels any better than > spheres, and I'm not sure of a user tri-collider for > CCylinders. I'm using spheres for driving over terrain, and flat-ended cylinders for driving over ground planes. I've been wondering if it might be useful to have a "tire" collision hull - something similar to a cylinder but simplified. For example, just the ends of a flat-end cylinder, or just the middle section of a capped cylinder (not the caps). It might be more trouble than it's worth, but then again it might be possible to save some clock cycles by using a shape that is correct 99% of the time. -- Nate Waddoups Redmond WA USA http://www.natew.com From erwin at vo.com Mon Nov 11 12:04:02 2002 From: erwin at vo.com (Erwin de Vries) Date: Mon Nov 11 12:04:02 2002 Subject: [ODE] new ODE collision References: Message-ID: <004401c289b5$109f81d0$73fefea9@athlon> > On Sun, 10 Nov 2002, Russ Smith wrote: > > > > - When adding the ray class we should think about what the > > > 'penetration depth' should be. Do you have any thoughts on this? > > > > i'm not sure that dRay will ever be attached to a body, in which case > > penetration depth does not have much use for the dynamics. perhaps you > > can think of a non-dynamics use/definition for the penetration depth? > > The first thing that came to my mind when I heard about the ray class was > sensors for the critters I'm making in Juice, sort of like IR or > ultrasonic rangefinders in robots, or like whiskers on cats. I'd want to > know the distance from the ray's origin to the first object it collides > with. Thats also what i'm thinking of. Its not what it currently does, but i believe this would be more useful than the current version. > Second, I think they might be useful for fast-moving objects - if you > project a ray forward along a missile's direction of travel, you could get > "collision" info in cases where the missile would otherwise teleport > around an object due to its position changing by a distance greater than > its length. In that case, could the ray intersection be used to generate > a contact joint, to stop the missile from penetrating? I'd say it would be more appropriate to use a ccylinder here. Unless you want it to bounce off of course. Erwin From maddocks at metservice.com Mon Nov 11 12:50:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Mon Nov 11 12:50:02 2002 Subject: Fwd: [ODE] Car handling - Overturning too easily Message-ID: On Tuesday, November 12, 2002, at 03:31 AM, Dominic Morris wrote: > I've got my car driving over my terrain mesh using the > contrib tri-collider, and the one remaining problem I > have is that when I steer the car when it's travelling > quickly, it overturns much too easily. > I had this problem too. > I've based my code on the buggy example, so the geoms > are four spheres and a box. I didn't base my code on the buggy but I've got a box and four spheres. > > I've played about with masses, and friction models > etc, and I can tune down the overturning tendancy, at > the expense of the car's grip by using the Slip1 and > Slip2 parameters (not that I fully understand these > either!) > That's how I fixed it. It took a while to get a good balance between too much grip (overturning) and not enough (skidding). My car still over turns sometimes which I think is because my centre of gravity is too high. And anyway, cars do turn over in real life, I know:) henry From Filipe Dias" Message-ID: <001601c289bd$21d47070$4601a8c0@mind.pt> I don't know how many turning wheels you guys have (assuming the front 2), but shifting the center of gravity forward or backwards will also affect the turning... more weight on the front wheels will turn more (the back slips easyer), but I like to place more wieght on the back wheels.. But don't exagerate!! Fil. From dmcclurg at pandemicstudios.com.au Mon Nov 11 16:55:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Mon Nov 11 16:55:02 2002 Subject: [ODE] new ODE collision Message-ID: >>> - When adding the ray class we should think about what the 'penetration depth' should be. Do you have any thoughts on this? The way a ray works is that you get one contact point where the ray first hits something. Penetration depth doesn't mean anything but it is very convenient to know the distance from the origin of the ray to the contact position. Storing that in the 'depth' field would make alot of sense for rays. >> i'm not sure that dRay will ever be attached to a body, in which case penetration depth does not have much use for the dynamics. perhaps you can think of a non-dynamics use/definition for the penetration depth? I'm finding two uses for rays in my game. 1) Ground Height Detection 2) LOS - line of sight The rays are almost always associated with a moving body! Perhaps some examples will clarify... - cameras: i don't want the chase camera going under the ground or perhaps i want to look at the ground point under the puppet so i don't have to head bob when he jumps. two rays are useful here-- one for the target and one for the eye. also the camera will need to cast a LOS ray to determine if there is an obstruction. - floating prizes: i detect the ground height so that prizes can automatically find a convenient home position where the player can grab them. in this situation, the ray is used for one HIT and then the ray is destroyed. Hope that helps! From claytonious at cox.net Mon Nov 11 18:02:02 2002 From: claytonious at cox.net (Clay Fowler) Date: Mon Nov 11 18:02:02 2002 Subject: [ODE] Weird collision/force problem Message-ID: <006a01c289e6$fe384860$0500a8c0@angus> This is a multi-part message in MIME format. ------=_NextPart_000_0067_01C289AC.51C413A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, everyone. I have a problem with forces being applied to my rigid body. My = vehicle's "front" is along the positive Y-Axis, its "right" is along the = positive X-axis and it's "up" is positive-Z. When I call = dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"), = specifying the rear-right of the vehicle as the point (so it's, for = example, an X of 1 and a Y of -1), for some reason the FRONT LEFT of the = vehicle gets pushed up into the air. This is the opposite corner of the = point I am specifying! When I swap the coordinates and apply an upward = force at the point (-1,1), the REAR RIGHT of the vehicle gets pushed up. = I have verified that ODE and my app both have the same idea of what the = world coordinate axes are by applying forces to the center of mass to = move the vehicle along the world's X, Y, and Z axes and these all behave = exactly as I would expect. But when I apply a force at a point, it seems = like the point I'm passing is "mirrored" on the axes. I am specifying = the mass of the vehicle with a simple dMassSetBox() and I have visually = verified that the box is a very good fit to the vehicle. Any ideas on = why the axes are "mirrored" this way for applying forces? The reason this is such a big problem is because I am doing my own = collision detection with the terrain beneath the vehicle by creating my = own Contact joints where the vehicle touches the terrain. Of course, the = vehicle responds incorrectly to these points because of the mirroring = problem. Thanks for any help! - Clay ------=_NextPart_000_0067_01C289AC.51C413A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello, everyone.
 
I have a problem with forces being = applied to my=20 rigid body. My vehicle's "front" is along the positive Y-Axis, its = "right" is=20 along the positive X-axis and it's "up" is positive-Z. When I call=20 dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"), = specifying=20 the rear-right of the vehicle as the point (so it's, for example, an X = of 1 and=20 a Y of -1), for some reason the FRONT LEFT of the vehicle gets pushed up = into=20 the air. This is the opposite corner of the point I am specifying! When = I swap=20 the coordinates and apply an upward force at the point (-1,1), the REAR = RIGHT of=20 the vehicle gets pushed up. I have verified that ODE and my app both = have the=20 same idea of what the world coordinate axes are by applying forces to = the center=20 of mass to move the vehicle along the world's X, Y, and Z axes and these = all=20 behave exactly as I would expect. But when I apply a force at a point, = it seems=20 like the point I'm passing is "mirrored" on the axes. I am specifying = the mass=20 of the vehicle with a simple dMassSetBox() and I have visually verified = that the=20 box is a very good fit to the vehicle. Any ideas on why the axes are = "mirrored"=20 this way for applying forces?
 
The reason this is such a big problem = is because I=20 am doing my own collision detection with the terrain beneath the vehicle = by=20 creating my own Contact joints where the vehicle touches the terrain. Of = course,=20 the vehicle responds incorrectly to these points because of the = mirroring=20 problem.
 
Thanks for any help!
 
- Clay
 
------=_NextPart_000_0067_01C289AC.51C413A0-- From mal at candomultimedia.com Tue Nov 12 05:54:02 2002 From: mal at candomultimedia.com (Mal) Date: Tue Nov 12 05:54:02 2002 Subject: [ODE] ODE / Blender news... In-Reply-To: <006a01c289e6$fe384860$0500a8c0@angus> Message-ID: <000101c28a4a$7c2f1ab0$b000a8c0@MalLaptop> Here's some ODE related news regarding Blender... http://www.blender.org/modules.php?op=modload&name=News&file=article&sid =15&mode=thread&order=0&thold=0 " No new functionality is added in Blender, with one exception: ODE. Commits in this part of Blender should be aimed at getting Blender not crashing, and preferably running (some) of the old demos again. The current Blender physics system (nicked SUMO) will be entirely replaced with ODE later. That might give a compatibility problem, but at least it will provide quite some cool new features." Sounds like things are flying along! Norman, do you have any binary beta files with ODE support that we can test out? :) I'm just recovering from a pretty bad PC crash, and have lost all my old eMails, so I don't have your direct eMail anymore! Mal From anselm at hook.org Tue Nov 12 12:11:01 2002 From: anselm at hook.org (Anselm Hook) Date: Tue Nov 12 12:11:01 2002 Subject: [ODE] irc? In-Reply-To: <000101c28a4a$7c2f1ab0$b000a8c0@MalLaptop> Message-ID: Where was that irc channel again for ode? Which server? - a From Alan_Gordie at payformance.com Tue Nov 12 12:39:02 2002 From: Alan_Gordie at payformance.com (Alan Gordie) Date: Tue Nov 12 12:39:02 2002 Subject: [ODE] irc? Message-ID: It's #ode on EFNet Alan -----Original Message----- From: Anselm Hook [mailto:anselm@hook.org] Sent: Tuesday, November 12, 2002 2:11 PM To: ode@q12.org Subject: [ODE] irc? Where was that irc channel again for ode? Which server? - a _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From colire02 at noa.nintendo.com Wed Nov 13 11:32:02 2002 From: colire02 at noa.nintendo.com (Colin Reed) Date: Wed Nov 13 11:32:02 2002 Subject: [ODE] Convex hulls Message-ID: How difficult would it be to get convex hulls working as a more general collision type as opposed to box collisions? For me this would be really helpfull, I was just wondering how much work it would be. Colin From dmcclurg at pandemicstudios.com.au Wed Nov 13 17:51:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Wed Nov 13 17:51:02 2002 Subject: [ODE] Convex hulls Message-ID: > if you're curious, the source files for the new collision infrastructure have been checked into CVS (collision_*.h, collision_*.cpp). it has not been hooked up to the rest of ODE yet, so the only reason i mention it is for the curious. note that there's still a bunch of stuff to do, in particular to hook up the ray, trimesh and cylinder classes, and to convert the hash table space to use an incremental approach ... but you can get an idea of the new layout. i think the trimesh, when completed, should work for you. -----Original Message----- From: Colin Reed [mailto:colire02@noa.nintendo.com] Sent: Wednesday, 13 November 2002 1:53 PM To: ode@q12.org Subject: [ODE] Convex hulls How difficult would it be to get convex hulls working as a more general collision type as opposed to box collisions? For me this would be really helpfull, I was just wondering how much work it would be. Colin From claytonious at cox.net Wed Nov 13 18:45:02 2002 From: claytonious at cox.net (Clay Fowler) Date: Wed Nov 13 18:45:02 2002 Subject: [ODE] Weird collision/force problem References: <006a01c289e6$fe384860$0500a8c0@angus> Message-ID: <003d01c28b7f$50820180$0500a8c0@angus> This is a multi-part message in MIME format. ------=_NextPart_000_003A_01C28B44.A40C1F10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable In case anyone else runs into this, here is the solution... The axes seemed inverted because I was incorrectly copying the = transformation matrix from ODE into OSG. I finally looked at the code in = the drawstuff lib to see how to fill an OpenGL-style 4x4 matrix with = values, and I was doing it backwards. Now that I'm filling xform = matrices properly, everything works wonderfully. ----- Original Message -----=20 From: Clay Fowler=20 To: ode@q12.org=20 Sent: Monday, November 11, 2002 6:01 PM Subject: [ODE] Weird collision/force problem Hello, everyone. I have a problem with forces being applied to my rigid body. My = vehicle's "front" is along the positive Y-Axis, its "right" is along the = positive X-axis and it's "up" is positive-Z. When I call = dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"), = specifying the rear-right of the vehicle as the point (so it's, for = example, an X of 1 and a Y of -1), for some reason the FRONT LEFT of the = vehicle gets pushed up into the air. This is the opposite corner of the = point I am specifying! When I swap the coordinates and apply an upward = force at the point (-1,1), the REAR RIGHT of the vehicle gets pushed up. = I have verified that ODE and my app both have the same idea of what the = world coordinate axes are by applying forces to the center of mass to = move the vehicle along the world's X, Y, and Z axes and these all behave = exactly as I would expect. But when I apply a force at a point, it seems = like the point I'm passing is "mirrored" on the axes. I am specifying = the mass of the vehicle with a simple dMassSetBox() and I have visually = verified that the box is a very good fit to the vehicle. Any ideas on = why the axes are "mirrored" this way for applying forces? The reason this is such a big problem is because I am doing my own = collision detection with the terrain beneath the vehicle by creating my = own Contact joints where the vehicle touches the terrain. Of course, the = vehicle responds incorrectly to these points because of the mirroring = problem. Thanks for any help! - Clay ------=_NextPart_000_003A_01C28B44.A40C1F10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
In case anyone else runs into this, = here is the=20 solution...
 
The axes seemed inverted because I was = incorrectly=20 copying the transformation matrix from ODE into OSG. I finally looked at = the=20 code in the drawstuff lib to see how to fill an OpenGL-style 4x4 matrix = with=20 values, and I was doing it backwards. Now that I'm filling xform = matrices=20 properly, everything works wonderfully.
----- Original Message -----
From:=20 Clay Fowler=20
Sent: Monday, November 11, 2002 = 6:01=20 PM
Subject: [ODE] Weird = collision/force=20 problem

Hello, everyone.
 
I have a problem with forces being = applied to my=20 rigid body. My vehicle's "front" is along the positive Y-Axis, its = "right" is=20 along the positive X-axis and it's "up" is positive-Z. When I call=20 dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"),=20 specifying the rear-right of the vehicle as the point (so it's, for = example,=20 an X of 1 and a Y of -1), for some reason the FRONT LEFT of the = vehicle gets=20 pushed up into the air. This is the opposite corner of the point I am=20 specifying! When I swap the coordinates and apply an upward force at = the point=20 (-1,1), the REAR RIGHT of the vehicle gets pushed up. I have verified = that ODE=20 and my app both have the same idea of what the world coordinate axes = are by=20 applying forces to the center of mass to move the vehicle along the = world's X,=20 Y, and Z axes and these all behave exactly as I would expect. But when = I apply=20 a force at a point, it seems like the point I'm passing is "mirrored" = on the=20 axes. I am specifying the mass of the vehicle with a simple = dMassSetBox() and=20 I have visually verified that the box is a very good fit to the = vehicle. Any=20 ideas on why the axes are "mirrored" this way for applying=20 forces?
 
The reason this is such a big problem = is because=20 I am doing my own collision detection with the terrain beneath the = vehicle by=20 creating my own Contact joints where the vehicle touches the terrain. = Of=20 course, the vehicle responds incorrectly to these points because of = the=20 mirroring problem.
 
Thanks for any help!
 
- Clay
 
------=_NextPart_000_003A_01C28B44.A40C1F10-- From claytonious at cox.net Wed Nov 13 22:42:01 2002 From: claytonious at cox.net (Clay Fowler) Date: Wed Nov 13 22:42:01 2002 Subject: [ODE] slip1 and slip2 Message-ID: <000e01c28ba0$7f74e270$0500a8c0@angus> This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C28B65.D2F478B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable What do the slip1 and slip2 parameters in a contact structure do? ------=_NextPart_000_000B_01C28B65.D2F478B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
What do the slip1 and slip2 parameters = in a contact=20 structure do?
------=_NextPart_000_000B_01C28B65.D2F478B0-- From Tony.Peguero at xtra.co.nz Wed Nov 13 23:53:01 2002 From: Tony.Peguero at xtra.co.nz (Tony Peguero) Date: Wed Nov 13 23:53:01 2002 Subject: [ODE] more physics In-Reply-To: Message-ID: >Costs in what way? It does say memory usage and how much of >the cpu per frame the physics system takes. What other costs >are there? He he. You must have been working with open source projects for quite a while to have forgotten that some things cost money. Some physics engines cost a LOT of money. >Also is it just me or do the chain and hinge behave strangly? >If you continue to force it upwards it starts to wobble. Like >a snake or something. Maybe it's just me and thats how it >should behave. I noticed that too. I think it's because of the way the keyboard controls were written, rather than a problem with the engine. When you press the lift key, it applies a momentary impulse to the end of the chain. When you hold the button down it applies repeated impulses, not a constant force, so the end of the chain is basically being shaken up and down. -----Original Message----- From: ode-admin@q12.org [mailto:ode-admin@q12.org]On Behalf Of Joakim Eriksson Sent: Friday, 1 November 2002 10:27 a.m. To: ode@q12.org Subject: SV: [ODE] more physics > > looks like another physics engine... > > > > www.tokamakphysics.com > > interesting. yet another mention of iterative constraint > solving methods here. the demos are kind of bare bones >(i.e., like ODE's bare bones demos). no mention of the cost. Costs in what way? It does say memory usage and how much of the cpu per frame the physics system takes. What other costs are there? > the box stack demo has an interesting flaw: a nudged stack > will tip over, then freeze part of the way down. this suggests > that 'stable' box stacking is achieved through simply turning >off the phisics for a stationary stack Yes, seems like the objects sleep VERY quickly. After just a few tries I manage to get it to sleep in a physicly impossible position. (If the simulation had run for just a few ticks more the boxes would have fallen over) but they quickly froze in place. > the collision looks like it allows penetration, like ODE. if > you collapse the chain on top of itself it will squish into > itself a bit then expand out. It does indeed allow penetration. Just move closer to a object and spawn a sphere or something. You can see that even if the object is inside another object he can handle it. Its also a dead give away that he for the moment only handles primitives vs primitives and primitives vs static triangle meshes. It seems to be able to handle quite a lot. It does use a bit of memory 500Kb in some cases but they do contain quite a lot of objects. Too bad they dont have any more information on thier method. Also is it just me or do the chain and hinge behave strangly? If you continue to force it upwards it starts to wobble. Like a snake or something. Maybe it's just me and thats how it should behave. /Joakim E. - www.planestate.net _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From Remko at act-3d.com Thu Nov 14 03:54:01 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Thu Nov 14 03:54:01 2002 Subject: [ODE] Universal joint Message-ID: <279892225.2502571807.98@server> I noticed that two bodies that are connected by a joint do not have collision with each other. Am I missing something here? The ODE examples show the same behavior between connected bodies. -----Original Message----- From: Martin C. Martin [mailto:martin@metahuman.org] Sent: Monday, November 11, 2002 8:58 AM To: Remko Jacobs (act-3d.com) Subject: Re: [ODE] Universal joint Hi, The way I do it is to use collisions with the body to limit the rotation. That looks pretty natural... - Martin "Remko Jacobs (act-3d.com)" wrote: > > Is it possible to include parameters that limit the rotation of a > universal joint? This way you could create a rag doll with ODE. This is > very useful in games, like Doom 3 where a character drops of the stairs > after dying instead of playing a standard animation. > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From Remko at act-3d.com Thu Nov 14 04:00:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Thu Nov 14 04:00:02 2002 Subject: [ODE] rate for fixed timesteps Message-ID: <279892645.2502991882.98@server> Using a fixed time step is the way to go. The problem is that the frame rate is not constant. We solved this by using a constant update rate (in Hz) for ODE that is independent of the program updates. CFM and ERP values work differently with different time steps so you should avoid using more than one different time step for one project. Using a constant update frequency means that for some frames there might be 10 time steps calculated for ODE and other frames ODE does not update at all. From: David McClurg [mailto:dmcclurg@pandemicstudios.com.au] >To avoid breaking through geometry or generating large collision >penetration depths, you'll need use a step value which scales to your >velocity. > > step = 1/60 > speed = length(vel) > if (speed * step) > max_depth then > step = max_depth / speed > endif > dWorldStep(world, step) > >just make sure max_depth is less than the radius of your moving vehicle. >ideally, it would be small enough not to visually notice either (eg. radius * 0.1f) >if you really want to use a fixed time step, > > step = max_depth / max_speed From martin at metahuman.org Thu Nov 14 06:41:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 14 06:41:02 2002 Subject: [ODE] Universal joint References: <279892225.2502571807.98@server> Message-ID: <3DD3A7AB.4A2594E9@metahuman.org> "Remko Jacobs (act-3d.com)" wrote: > > I noticed that two bodies that are connected by a joint do not have > collision with each other. They do in my application. Does your near callback create collision constraints for them? Are you sure the size/location/orientation/shape that you're drawing are the same as ODE is using? - Martin From ykhun at singnet.com.sg Thu Nov 14 08:23:02 2002 From: ykhun at singnet.com.sg (ykhun) Date: Thu Nov 14 08:23:02 2002 Subject: [ODE] Help for beginners Message-ID: <000a01c28bf2$1cf993a0$889f15a5@dune> This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C28C35.2ADC9650 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, i'm very new to ODE and rigid body physics. I found that there isn't = much stuff to help newbies like me to kickstart using ODE. Read the docs = and learn much about how ODE works but not how to use it! Is there any resource to help beginners up and running with ODE in a = short time?? Cheers! ykhun ------=_NextPart_000_0007_01C28C35.2ADC9650 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
i'm very new to ODE and rigid body = physics. I found=20 that there isn't much stuff to help newbies like me to kickstart using = ODE. Read=20 the docs and learn much about how ODE works but not how to use = it!
 
Is there any resource to help beginners = up and=20 running with ODE in a short time??
Cheers!
 
ykhun
------=_NextPart_000_0007_01C28C35.2ADC9650-- From martin at metahuman.org Thu Nov 14 08:43:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 14 08:43:02 2002 Subject: [ODE] Help for beginners References: <000a01c28bf2$1cf993a0$889f15a5@dune> Message-ID: <3DD3C44B.1F9A8A9C@metahuman.org> You can take a look at the examples included with ODE, especially the boxstack and buggy demos. - Martin > ykhun wrote: > > Hi, > i'm very new to ODE and rigid body physics. I found that there isn't > much stuff to help newbies like me to kickstart using ODE. Read the docs > and learn much about how ODE works but not how to use it! > > Is there any resource to help beginners up and running with ODE in a > short time?? > Cheers! > > ykhun From max.lungarella at aist.go.jp Thu Nov 14 08:59:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Thu Nov 14 08:59:02 2002 Subject: [ODE] Help for beginners In-Reply-To: <000a01c28bf2$1cf993a0$889f15a5@dune> References: <000a01c28bf2$1cf993a0$889f15a5@dune> Message-ID: <20021115005725.5ff946cb.max.lungarella@aist.go.jp> hi, you can also learn a lot by browsing through the archives of this mailing list. cheerio, max > i'm very new to ODE and rigid body physics. I found that there isn't > much stuff to help newbies like me to kickstart using ODE. Read the > docs and learn much about how ODE works but not how to use it! > > Is there any resource to help beginners up and running with ODE in a > short time?? Cheers! > > ykhun From christian.verbeek at ais.fraunhofer.de Thu Nov 14 10:57:01 2002 From: christian.verbeek at ais.fraunhofer.de (Christian Verbeek) Date: Thu Nov 14 10:57:01 2002 Subject: [ODE] test_buggy with 13 buggys Message-ID: <3DD3E3E6.C600B51@ais.fraunhofer.de> dear ode-users, i am quite new to ode. but it took me half a day to write a program that will crash. you can find it under http://ais.gmd.de/~verbeek/ode/ this is the test_buggy example modularised. for the buggy i made a class RBuggy where i am deriving 13 objects from. when the buggys collide the program crashes. when i do the same with 12 buggys, everthing is ok. i tested it with ode-0.03 and the latest cvs-version under cygwin and windowsXP. dont blame me, but linux does not support the graficsadapter of my laptop. compiling this with linux works, but execution of the program is really really slow. i used gdb to find out, where the program crashes. i think it is somewhere in the collision detection routines. at least these are called right before the program crashes. help needed, c. -- -__________________________________________ Dr. rer. nat. Dipl.-Phys. C. Verbeek email: christian.verbeek@ais.fraunhofer.de room: C2-214 http://www.ais.fraunhofer.de/~verbeek phone: +49 2241 14 2057 fax : +49 2241 14 2384 From ericc at xenopi.com Thu Nov 14 11:08:02 2002 From: ericc at xenopi.com (Eric Cha) Date: Thu Nov 14 11:08:02 2002 Subject: [ODE] test_buggy with 13 buggys In-Reply-To: <3DD3E3E6.C600B51@ais.fraunhofer.de> Message-ID: <005701c28c09$37a798c0$6401a8c0@donald> Sounds like stack overflow to me... I could see that happening with 13 buggies rolling around.. > -----Original Message----- > From: ode-admin@q12.org [mailto:ode-admin@q12.org] On Behalf > Of Christian Verbeek > Sent: Thursday, November 14, 2002 9:57 AM > To: ode@q12.org > Subject: [ODE] test_buggy with 13 buggys > > > dear ode-users, > > i am quite new to ode. but it took me half a day to write a > program that will crash. you can find it under > http://ais.gmd.de/~verbeek/ode/ this is the test_buggy example modularised. for the buggy i made a class RBuggy where i am deriving 13 objects from. when the buggys collide the program crashes. when i do the same with 12 buggys, everthing is ok. i tested it with ode-0.03 and the latest cvs-version under cygwin and windowsXP. dont blame me, but linux does not support the graficsadapter of my laptop. compiling this with linux works, but execution of the program is really really slow. i used gdb to find out, where the program crashes. i think it is somewhere in the collision detection routines. at least these are called right before the program crashes. help needed, c. -- -__________________________________________ Dr. rer. nat. Dipl.-Phys. C. Verbeek email: christian.verbeek@ais.fraunhofer.de room: C2-214 http://www.ais.fraunhofer.de/~verbeek phone: +49 2241 14 2057 fax : +49 2241 14 2384 _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.410 / Virus Database: 231 - Release Date: 10/31/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.410 / Virus Database: 231 - Release Date: 10/31/2002 From coding at natew.com Thu Nov 14 11:42:02 2002 From: coding at natew.com (Nate W) Date: Thu Nov 14 11:42:02 2002 Subject: [ODE] test_buggy with 13 buggys In-Reply-To: <3DD3E3E6.C600B51@ais.fraunhofer.de> Message-ID: On Thu, 14 Nov 2002, Christian Verbeek wrote: > this is the test_buggy example modularised. for the buggy i made a class > RBuggy where i am deriving 13 objects from. when the buggys collide the > program crashes. when i do the same with 12 buggys, everthing is ok. > > i tested it with ode-0.03 and the latest cvs-version under cygwin and > windowsXP. Try doubling the size of the stack. There should be a linker option for that. Windows doesn't grow the stack automatically, and ODE uses a lot of stack for complex worlds. -- Nate Waddoups Redmond WA USA http://www.natew.com From christian.verbeek at ais.fraunhofer.de Fri Nov 15 03:35:02 2002 From: christian.verbeek at ais.fraunhofer.de (Christian Verbeek) Date: Fri Nov 15 03:35:02 2002 Subject: [ODE] test_buggy with 13 buggys References: Message-ID: <3DD4CD9A.4BCA2A58@ais.fraunhofer.de> i did not find out how to increase the stack size with cygwin. but i compiled the program on linux and there it works. i tried 100 buggys. no crash, but simulation goes very slow, when all 100 buggys collide. when are the first THz processors coming out? does anyone know how to increase the stack size under cygwin? something like gcc -Wl,--stack,4096 does not help. c. Nate W wrote: > On Thu, 14 Nov 2002, Christian Verbeek wrote: > > > this is the test_buggy example modularised. for the buggy i made a class > > RBuggy where i am deriving 13 objects from. when the buggys collide the > > program crashes. when i do the same with 12 buggys, everthing is ok. > > > > i tested it with ode-0.03 and the latest cvs-version under cygwin and > > windowsXP. > > Try doubling the size of the stack. There should be a linker option for > that. Windows doesn't grow the stack automatically, and ODE uses a lot of > stack for complex worlds. > > -- > > Nate Waddoups > Redmond WA USA > http://www.natew.com > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode -- -__________________________________________ Dr. rer. nat. Dipl.-Phys. C. Verbeek email: christian.verbeek@ais.fraunhofer.de room: C2-214 http://www.ais.fraunhofer.de/~verbeek phone: +49 2241 14 2057 fax : +49 2241 14 2384 From hans at tat.physik.uni-tuebingen.de Fri Nov 15 06:30:02 2002 From: hans at tat.physik.uni-tuebingen.de (Torsten Hans) Date: Fri Nov 15 06:30:02 2002 Subject: [ODE] what integration method is used ? In-Reply-To: <200211151243.gAFCh2u15455@hook.org> Message-ID: hello, i recently came across ode. its seems like an interesting project. however i couldn't find out an important information: what basic integration scheme does ODE use ? is it an explicit or implicit integration method ? does it use runge kutta or something else ? is it possible to use a different integration scheme ? any information would be appreciated. kind regards, torsten hans From henri at cs.sun.ac.za Fri Nov 15 08:30:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Fri Nov 15 08:30:02 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? Message-ID: <00ba01c28cbc$227f17d0$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_00B7_01C28CCC.E600BBE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi :) I've played with the hinge-joint recently and figured out how to use lo = and hi stops to limit rotations. My problem now is to have a similar system for ball-socket joints. The = idea is to have limited range of motions similar to (for example) the = joint holding arm and shoulder together. It should have some degree of = mobility to rotate around an arbitrary axis of motion, and it should be = able to deviate from the initial axis of rotation to some degree. Essentially it should be able to move inside a cone-of-freedom (plus it = is only allowed to twist to a certain extend). Help please. Henri ------=_NextPart_000_00B7_01C28CCC.E600BBE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi :)
 
I've played with the hinge-joint = recently and=20 figured out how to use lo and hi stops to limit rotations.
 
My problem now is to have a similar = system for=20 ball-socket joints. The idea is to have limited range of motions similar = to (for=20 example) the joint holding arm and shoulder together. It should have = some degree=20 of mobility to rotate around an arbitrary axis of motion, and it should = be able=20 to deviate from the initial axis of rotation to some = degree.
 
Essentially it should be able to move = inside a=20 cone-of-freedom (plus it is only allowed to twist to a certain=20 extend).
 
Help please.
  Henri
------=_NextPart_000_00B7_01C28CCC.E600BBE0-- From pete_graves at hotmail.com Fri Nov 15 14:21:01 2002 From: pete_graves at hotmail.com (Pete Graves) Date: Fri Nov 15 14:21:01 2002 Subject: [ODE] Problems installing ODE 0.03 Message-ID: I'm new to ODE, and inexperienced with C++ and the Microsoft Visual C/C++ 6.0 IDE, so please bear with me. I wanted to try out ODE and some of the test programs. I downloaded ODE 0.03, and followed the installation instructions in the User Guide. I set MSVC's path variables during its installation, downloaded the GNU make tool from the ODE web site, left the user-settings with PLATFORM=msvc and PRECISION=DOUBLE, and ran make in the ODE directory. This is some clips of the results: ... ctest.c(1) : fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory ... ctest.c(2) : error C2143: syntax error : missing ')' before ':' ctest.c(2) : error C2059: syntax error : ')' ... *** configurator succeeded *** ... cl /nologo /DWIN32 /DMSVC /c /GR- /GX- /W3 /GF /Oy /Iinclude /DdNODEBUG /O2 /Fo ode/src/array.obj ode/src/array.cpp Command line warning D4002 : ignoring unknown option '/Oy' (this is shown loads of times} ... LIB : fatal error LNK1104: cannot open file "lib/ode.lib" MAKE: *** [lib/ode.lib] Error 1104 I don't appear to have a lib/ directory at all. Am I missing something? Could anyone suggest what I am doing wrong? Thanks, Pete. _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From coding at natew.com Fri Nov 15 21:29:01 2002 From: coding at natew.com (Nate W) Date: Fri Nov 15 21:29:01 2002 Subject: [ODE] Problems installing ODE 0.03 In-Reply-To: Message-ID: On Fri, 15 Nov 2002, Pete Graves wrote: > ctest.c(1) : fatal error C1083: Cannot open include file: 'alloca.h': No > such file or directory Change that to "malloc.h" instead. I'm not sure about the rest though. -- Nate Waddoups Redmond WA USA http://www.natew.com From pete_graves at hotmail.com Sat Nov 16 08:49:01 2002 From: pete_graves at hotmail.com (Pete Graves) Date: Sat Nov 16 08:49:01 2002 Subject: [ODE] Re: Problems installing ODE 0.03 Message-ID: The only file I can find that contains 'alloca.h' is 'configurator.c': 229: char *header[7] = {"stdio.h", "stdlib.h", "math.h", "string.h", 330: "stdarg.h", "malloc.h", "alloca.h"}; ~~~~~~~~ Can I just remove this? 'malloc.h' is already there? Am I looking in the right place? _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From martin at metahuman.org Sat Nov 16 09:06:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Sat Nov 16 09:06:01 2002 Subject: [ODE] Re: Problems installing ODE 0.03 References: Message-ID: <3DD66C9A.B8FA8884@metahuman.org> You don't need to replace alloca with anything. What the configurator does is see how your computer is set up by compiling a bunch of programs. So the fact that some of them fail is normal. It said "configurator succeeded" so you can ignore all messages above that. Try making an empty "lib" directory. I think that's your only problem. - Martin Pete Graves wrote: > > The only file I can find that contains 'alloca.h' is 'configurator.c': > > 229: char *header[7] = {"stdio.h", "stdlib.h", "math.h", "string.h", > 330: "stdarg.h", "malloc.h", "alloca.h"}; > ~~~~~~~~ > > Can I just remove this? 'malloc.h' is already there? Am I looking in the > right place? > > _________________________________________________________________ > The new MSN 8: smart spam protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From coding at natew.com Sat Nov 16 11:24:01 2002 From: coding at natew.com (Nate W) Date: Sat Nov 16 11:24:01 2002 Subject: [ODE] Re: Problems installing ODE 0.03 In-Reply-To: Message-ID: On Sat, 16 Nov 2002, Pete Graves wrote: > The only file I can find that contains 'alloca.h' is 'configurator.c': > > 229: char *header[7] = {"stdio.h", "stdlib.h", "math.h", "string.h", > 330: "stdarg.h", "malloc.h", "alloca.h"}; > > Can I just remove this? 'malloc.h' is already there? Am I looking in the > right place? When configurator gets run, it creates a header file called config.h. Once I got a working config.h (I may have edited this file by hand, I don't recall as it was quite a while ago), I took the configurator out of my build process. -- Nate Waddoups Redmond WA USA http://www.natew.com From henri at cs.sun.ac.za Sat Nov 16 11:30:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Sat Nov 16 11:30:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? References: <00ba01c28cbc$227f17d0$45d4e892@temple> Message-ID: <004701c28d9e$70bd7990$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_0044_01C28DAF.34418EA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Anybody??? ----- Original Message -----=20 From: Henri Hakl=20 To: ode@q12.org=20 Sent: Friday, November 15, 2002 5:31 PM Subject: [ODE] Lo/Hi Stops for ball-sockets? Hi :) I've played with the hinge-joint recently and figured out how to use = lo and hi stops to limit rotations. My problem now is to have a similar system for ball-socket joints. The = idea is to have limited range of motions similar to (for example) the = joint holding arm and shoulder together. It should have some degree of = mobility to rotate around an arbitrary axis of motion, and it should be = able to deviate from the initial axis of rotation to some degree. Essentially it should be able to move inside a cone-of-freedom (plus = it is only allowed to twist to a certain extend). Help please. Henri ------=_NextPart_000_0044_01C28DAF.34418EA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Anybody???
 
----- Original Message -----
From:=20 Henri = Hakl=20
Sent: Friday, November 15, 2002 = 5:31=20 PM
Subject: [ODE] Lo/Hi Stops for=20 ball-sockets?

Hi :)
 
I've played with the hinge-joint = recently and=20 figured out how to use lo and hi stops to limit = rotations.
 
My problem now is to have a similar = system for=20 ball-socket joints. The idea is to have limited range of motions = similar to=20 (for example) the joint holding arm and shoulder together. It should = have some=20 degree of mobility to rotate around an arbitrary axis of motion, and = it should=20 be able to deviate from the initial axis of rotation to some=20 degree.
 
Essentially it should be able to move = inside a=20 cone-of-freedom (plus it is only allowed to twist to a certain=20 extend).
 
Help please.
 =20 Henri
------=_NextPart_000_0044_01C28DAF.34418EA0-- From coding at natew.com Sat Nov 16 11:46:01 2002 From: coding at natew.com (Nate W) Date: Sat Nov 16 11:46:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? In-Reply-To: <004701c28d9e$70bd7990$45d4e892@temple> Message-ID: On Sat, 16 Nov 2002, Henri Hakl wrote: > Essentially it should be able to move inside a cone-of-freedom (plus > it is only allowed to twist to a certain extend). > > Anybody??? Have you tried using an AMotor to set the limits? I haven't tried this myself, but looking at 7.5.1. of the documentation it seem like it should be possible to apply an AMotor to the two bodies and set limits using dParamSetHiStopN where N is empty, 2 or 3 for each of the AMotor's axes. Especially look at the last part of 7.5.1, below the table of parameters. Like I said, I haven't tried it, but from a quick look at the docs I think it might do what you want. -- Nate Waddoups Redmond WA USA http://www.natew.com From henri at cs.sun.ac.za Sat Nov 16 17:44:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Sat Nov 16 17:44:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? References: Message-ID: <006901c28dd2$ab7efcf0$45d4e892@temple> hmmmm... thanks Nate... - it looks like something that might work. :) It would help to see an example or something that uses the AMotorJoint (prefably with limits and everything) - can anybody point me to some simple program that makes use of it? None of the examples seem to make use of it (I'm using the DelphiODE). ----- Original Message ----- From: "Nate W" To: Sent: Saturday, November 16, 2002 8:46 PM Subject: Re: [ODE] Lo/Hi Stops for ball-sockets? > On Sat, 16 Nov 2002, Henri Hakl wrote: > > > Essentially it should be able to move inside a cone-of-freedom (plus > > it is only allowed to twist to a certain extend). > > > > Anybody??? > > Have you tried using an AMotor to set the limits? I haven't tried this > myself, but looking at 7.5.1. of the documentation it seem like it should > be possible to apply an AMotor to the two bodies and set limits using > dParamSetHiStopN where N is empty, 2 or 3 for each of the AMotor's axes. > Especially look at the last part of 7.5.1, below the table of parameters. > > Like I said, I haven't tried it, but from a quick look at the docs I think > it might do what you want. > > -- > > Nate Waddoups > Redmond WA USA > http://www.natew.com > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From mattias at cambrianlabs.com Sun Nov 17 03:44:01 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Sun Nov 17 03:44:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? In-Reply-To: <006901c28dd2$ab7efcf0$45d4e892@temple> References: <006901c28dd2$ab7efcf0$45d4e892@temple> Message-ID: > It would help to see an example or something that uses the AMotorJoint > (prefably with limits and everything) - can anybody point me to some > simple > program that makes use of it? None of the examples seem to make use of > it (I'm using the DelphiODE). I was going to say "I have some examples, but they're built using delphi", but now that's not a problem; // Create a AMotor AMotor := dJointCreateAMotor(world, 0); dJointAttach(AMotor, MainBody, UpperLeg); BallLimit := pi*0.15; dJointSetAMotorNumAxes (AMotor,2); dJointSetAMotorAxis (AMotor, 0, 1, 1,0,0); dJointSetAMotorAxis (AMotor, 1, 1, 0,0,1); // AUTO AXIS BY EULER MOTOR dJointSetAMotorAxis (AMotor, 2, 2, 0,1,0); dJointSetAMotorParam (AMotor, dParamLoStop, -BallLimit); dJointSetAMotorParam (AMotor, dParamHiStop, BallLimit); dJointSetAMotorParam (AMotor, dParamFudgeFactor, 0.01);//} // This axis of the motor isn't used with EULER (?) dJointSetAMotorParam (AMotor, dParamLoStop2, -0.01); dJointSetAMotorParam (AMotor, dParamHiStop2, 0.01); dJointSetAMotorParam (AMotor, dParamFudgeFactor2, 0.01);//} dJointSetAMotorParam (AMotor, dParamLoStop3, -BallLimit); dJointSetAMotorParam (AMotor, dParamHiStop3, BallLimit); dJointSetAMotorParam (AMotor, dParamFudgeFactor3, 0.01);//} dJointSetAMotorMode (AMotor, dAMotorEuler); cheers, m From laury.michel at free.fr Sun Nov 17 17:42:02 2002 From: laury.michel at free.fr (Laury MICHEL) Date: Sun Nov 17 17:42:02 2002 Subject: [ODE] Collision problem with geomGroups Message-ID: <016c01c28e9b$5b79cfe0$9cdc933e@hal9000> Hello! I'm quite new to ODE, but I did a little "buggy-like" program that works! The problem is that when I want to use a geomGroup for my buggy, it does not collide with the "world geometry" anymore... My "world geometry" consists of a large box with a smaller rotated box in the middle playing the role of a ramp... The buggy geometry is created in space 0 then added to a geomGroup wich is created in the same space as the world geometry. But, when running the program the buggy falls through the "world"! Before, without geomGroups, it worked well beside the fact that I couldn't put the vehicle wheels too close from the chassis as they collided resulting in strange behavior as soon as the sim started... I'm using ode v0.03, I've read the doc and I think I understood the part on geomGroups so I don't see what I've missed :-( Please help! Here is part of the code I use: void odeBox::InitOde(dWorldID _worldID, dSpaceID _spaceID, dReal _fMass) { m_bodyID = dBodyCreate(_worldID); dBodySetPosition(m_bodyID, 0, 0, 0); const dReal fDensity = 1.0f; dMassSetBox(&m_mass, fDensity, m_fLength, m_fWidth, m_fHeight); dMassAdjust (&m_mass, _fMass); dBodySetMass(m_bodyID, &m_mass); m_geomID = dCreateBox(_spaceID, m_fLength, m_fWidth, m_fHeight); dGeomSetBody(m_geomID, m_bodyID); } void odeCar::CreateChassis(float _fWidth, float _fLength, float _fHeight) { m_geomGroupID = dCreateGeomGroup (m_spaceID); m_pChassis = new odeBox; dReal fMass = 10.0f; ((odeBox*) m_pChassis)->InitBox(_fWidth, _fLength, _fHeight); m_pChassis->InitOde(m_worldID, 0, fMass); // 0 for space as it is added to a geomGroup m_pChassis->SetPosition(5,0,35); dGeomGroupAdd (m_geomGroupID, m_pChassis->GetGeomID()); } void odeWheel::InitOde(dWorldID _worldID, dSpaceID _spaceID, dReal _fMass) { m_bodyID = dBodyCreate(_worldID); dBodySetPosition(m_bodyID, 0, 0, 0); const dReal fDensity = 1.0f; dMassSetSphere(&m_mass, fDensity, m_fRadius); dMassAdjust (&m_mass, _fMass); dBodySetMass(m_bodyID, &m_mass); m_geomID = dCreateSphere(_spaceID, m_fRadius); dGeomSetBody(m_geomID, m_bodyID); } void odeCar::AddWheel(dReal _posX, dReal _posY, dReal _posZ, float _fRadius, float _fWidth) { // odeWheel odeWheel* pWheel = new odeWheel; pWheel->InitWheel(_fRadius, _fWidth); pWheel->InitOde(m_worldID, 0, m_fDefaultWheelMass); // 0 for space as it is added to a geomGroup const dReal *a = dBodyGetPosition(m_pChassis->GetBodyID()); dBodySetPosition(pWheel->GetBodyID(), a[0] + _posX, a[1] + _posY, a[2] + _posZ); m_vpWheel.push_back(pWheel); // Joint dJointID jointID = dJointCreateHinge2(m_worldID, 0); dJointAttach(jointID, m_pChassis->GetBodyID(), pWheel->GetBodyID()); dJointSetHinge2Anchor(jointID, a[0] + _posX, a[1] + _posY, a[2] + _posZ); dJointSetHinge2Axis1(jointID, 0, 0, 1); dJointSetHinge2Axis2(jointID, 1, 0, 0); dJointSetHinge2Param(jointID, dParamSuspensionERP, 0.6f); dJointSetHinge2Param(jointID, dParamSuspensionCFM, 0.08f); dJointSetHinge2Param(jointID, dParamLoStop, 0); dJointSetHinge2Param(jointID, dParamHiStop, 0); m_vJoint.push_back(jointID); m_vPowered.push_back(false); m_vSteered.push_back(false); dGeomGroupAdd (m_geomGroupID, pWheel->GetGeomID()); } From Nguyen Binh Sun Nov 17 21:23:03 2002 From: Nguyen Binh (Nguyen Binh) Date: Sun Nov 17 21:23:03 2002 Subject: [ODE] what integration method is used ? In-Reply-To: References: Message-ID: <301716267.20021118105438@glassegg.com> Hi , TH> what basic integration scheme does ODE use ? is it an TH> explicit or implicit integration method ? does it use TH> runge kutta or something else ? Refer to the 0.3 docs, you'll see that ODE curently use basic Euler integration. TH> is it possible to use a different integration scheme ? Sure, But maybe you'll have to do it yourself or waiting for future ODE release. -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media Me Linh Point Tower, 10th Floor 2 Ngo Duc Ke District 1, Ho Chi Minh City Vietnam Fax: (84.8)823-8392 www.glassegg.com --------------------------------------------------------------------- From franjesus at medtelecom.net Mon Nov 18 02:59:02 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-15?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Mon Nov 18 02:59:02 2002 Subject: [ODE] Bug in documentation? Message-ID: <200211181055.20531.franjesus@medtelecom.net> In section 3.2 documentation states: - Position of the center of mass with respect to the point of reference. In the current implementation the center of mass and the point of reference must coincide. But later, in section 8.2: void dMassTranslate (dMass *, dReal x, dReal y, dReal z); Given mass parameters for some object, adjust them to represent the object displaced by (x,y,z) relative to the body frame. void dMassRotate (dMass *, const dMatrix3 R); Given mass parameters for some object, adjust them to represent the object rotated by R relative to the body frame. So, can the center of mass be displaced wrt. the body frame or I'm missing something? -- "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989 From nlin at nlin.net Mon Nov 18 03:35:02 2002 From: nlin at nlin.net (nlin@nlin.net) Date: Mon Nov 18 03:35:02 2002 Subject: [ODE] what integration method is used ? Message-ID: <20021118120342.GA1863@nlin.net> Nguyen Binh wrote: > On Fri, Nov 15, 2002 at 02:28:59PM +0100, Torsten Hans wrote: > TH> what basic integration scheme does ODE use ? is it an > TH> explicit or implicit integration method ? does it use > TH> runge kutta or something else ? > > Refer to the 0.3 docs, you'll see that ODE curently use basic Euler > integration. Not quite. Somewhere in the docs is mentioned that ODE uses a _time_ _stepping_ Euler integration scheme. This is a bit more hairy to extend to higher order schemes. For the gory details and some links to research papers see the thread started in April 2002 at http://q12.org/pipermail/ode/2002-April/001175.html > TH> is it possible to use a different integration scheme ? > Sure, But maybe you'll have to do it yourself or waiting for future > ODE release. A discussion on this topic in March 2002: nlin> The problem with all of this ... is the interplay of all of this nlin> with the time-stepping scheme. russ>actually i'm not sure what a higher order time stepping scheme russ>will look like in this case. i'd have to sit down and read some russ>papers and write some equations. it's not a problem i have russ>considered yet. Don't let this stop you - I'd also be interested in seeing the performance and accuracy of higher-order integration schemes with ODE - but be aware that this isn't a completely trivial thing to do because of the time-stepping (rather than instantaneous) view of the equations to be solved. -Norman From Dominique at SavageSoftware.com.au Mon Nov 18 03:49:02 2002 From: Dominique at SavageSoftware.com.au (Dominique Louis) Date: Mon Nov 18 03:49:02 2002 Subject: [ODE] Rag Doll Demo? Message-ID: <3DD8C604.8000203@SavageSoftware.com.au> I was recently playing the Unreal Tournament demo and was impressed by the rag doll physics they used, though it still did not look 100% realistic. I beleive they used the MathEngine for their physics. It is still a very cool game. I was wondering if anyone has used ODE to create a rag doll type demo, and also if anyone knows where I can get or find information on the UT model format. Thanks, Dominique. From mattias at cambrianlabs.com Mon Nov 18 03:56:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Mon Nov 18 03:56:02 2002 Subject: [ODE] Rag Doll Demo? In-Reply-To: <3DD8C604.8000203@SavageSoftware.com.au> References: <3DD8C604.8000203@SavageSoftware.com.au> Message-ID: Have a look at this site; http://taat.fi/taat/porrasturvat/ cheers, m -----Original Message----- From: Dominique Louis To: ode@q12.org Date: Mon, 18 Nov 2002 10:50:44 +0000 Subject: [ODE] Rag Doll Demo? > I was recently playing the Unreal Tournament demo and was impressed by > the rag doll physics they used, though it still did not look 100% > realistic. I beleive they used the MathEngine for their physics. It is > still a very cool game. > > I was wondering if anyone has used ODE to create a rag doll type demo, > and also if anyone knows where I can get or find information on the UT > model format. > > Thanks, > > > > Dominique. > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From Dominique at SavageSoftware.com.au Mon Nov 18 05:22:02 2002 From: Dominique at SavageSoftware.com.au (Dominique Louis) Date: Mon Nov 18 05:22:02 2002 Subject: [ODE] Rag Doll Demo? References: <3DD8C604.8000203@SavageSoftware.com.au> Message-ID: <3DD8DBE5.4040506@SavageSoftware.com.au> That is an excellent demo! Will a similar type demo be included as part of the "standard" demos that ship with ODE? Thanks again, Dominique. Mattias Fagerlund wrote: > Have a look at this site; http://taat.fi/taat/porrasturvat/ > > cheers, > m > > -----Original Message----- > From: Dominique Louis > To: ode@q12.org > Date: Mon, 18 Nov 2002 10:50:44 +0000 > Subject: [ODE] Rag Doll Demo? > > >>I was recently playing the Unreal Tournament demo and was impressed by >>the rag doll physics they used, though it still did not look 100% >>realistic. I beleive they used the MathEngine for their physics. It is >>still a very cool game. >> >>I was wondering if anyone has used ODE to create a rag doll type demo, >>and also if anyone knows where I can get or find information on the UT >>model format. >> >>Thanks, >> >> >> >>Dominique. >> >>_______________________________________________ >>ODE mailing list >>ODE@q12.org >>http://q12.org/mailman/listinfo/ode > > > From anselm at hook.org Mon Nov 18 12:06:02 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 18 12:06:02 2002 Subject: [ODE] ode networking code snippet In-Reply-To: <301716267.20021118105438@glassegg.com> Message-ID: Here's a small hack to network a couple of ODE cars together. I had a couple of hours and I was thinking about a comment somebody asked earlier - so I threw this together... I'll probably improve it later since it is really crude right now. It really just hammers on objects positions and it doesn't network all of the state of each object so it doesn't look very good - although this could be improved. The networking layer itself might be useful as a test-bench for people to explore other more effacious networking strategies. The theory is that even if object physics state is hammered on, one will still get the appearance of reasonably believable physical interaction simply because of the way each machine will simulate forward the whole system. But in practice since not all state is networked properly, the first pass at least looks pretty poor - however I do think the theory is still sound. If this theory doesn't pan out then (if I have time) I may modify the code to try out a variety of other approaches. For example the simplest approach is simply to integrate everything on the server. To build it replace the test_buggy.cpp code with the below, and compile ODE as usual under cygwin. It doesn't build under msvc because I haven't bothered fully implementing the berkeley sockets for msvc. To run a server type: test_buggy To run a client type: test_buggy be a client It networks on 127.0.0.1:8000 so you can run multiple instances on one machine to fiddle with it... BTW I *really* like the geomgroups stuff now... way better! Have fun! - a /* "bangup" - a small testbed for ode networking. The code is broken up into a number of pieces, 1) NetSocket - a network abstraction layer (runs under cygwin only - not ported to windows) 2) SimObject - a generic type of simulation object 3) Dynamics - the basic ODE dynamics (world, space, ground ) 4) Car - a car 5) Main - handles network traffic and overall event stuff In general the networking scheme here is: 1) There is a server and a number of clients. 2) A server is similar to a client in that it also has a window and a pov 3) Each machine is locally authoritative for some objects 4) Other objects on a machine are considered to be driven by some remote authority 5) In the tests so far the clients are authoritative for the local participants pov. 6) In the tests so far the server is authoritative for its pov 7) The clients and server echo to each other any state that they are authoritative for. 8) The server additionally re-echoes out all state so that other clients can be advised of changes. 9) Rather than publishing a database on new client connections; clients dynamically create missing objects. This is extremely crude... and one will see that it does not behave well. Not much state is networked so things tend to jump around and misbehave terribly. It may improve over time. */ /**************************************************************/ // network stuff /**************************************************************/ //#if defined( WIN32 ) || defined( __CYGWIN32__ ) //#include //#else #include #include #include #include #define _USE_BSD #include #include #include #include #include #include #include #include #include #include #include typedef int SOCKET; //#endif #include class NetSocket { public: struct sockaddr_in sa; struct hostent *hp; SOCKET sock; FILE* sockin; FILE* sockout; NetSocket* next; #define MAXHOSTNAME 64 char myname[MAXHOSTNAME+1]; int isserver; int key; void error_fail(char* str,...) { puts(str); } void init() { isserver = 0; sock = 0; next = 0; sockin = 0; sockout = 0; myname[0] = 0; key = 0; } NetSocket() { init(); } NetSocket(SOCKET _s) { init(); attach(_s); } ~NetSocket() { disconnect(); // xxx remove from list } void attach(SOCKET _s) { sock = _s; int opts = fcntl(sock,F_GETFL); opts = opts | O_NONBLOCK; fcntl(sock,F_SETFL,opts); sockin = fdopen(sock,"r"); sockout = fdopen(sock,"w"); } void disconnect() { if( sockout ) { fflush(sockout); fclose(sockout); sockout = 0; } if( sockin ) { fclose(sockin); sockin = 0; } if( sock ) { #ifdef USEWIN32 closesocket(sock); #else close(sock); #endif sock = 0; } } bool serve(int portnum = 8700 ) { isserver = 1; #ifdef USEWIN32 WSAData ws; if( WSAStartup(0x0101,&ws) < 0 ) { error_fail("TcpServer: tcp does not seem to be supported"); return 0; } #endif struct protoent *tcp_prot = getprotobyname("tcp"); if(!tcp_prot) { error_fail("TcpServer: tcp does not seem to be supported"); return 0; } sock = socket(AF_INET,SOCK_STREAM,tcp_prot->p_proto); if( sock < 0 ) { error_fail(" can't make server socket: %s", strerror(errno)); return 0; } int one = 1; if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(int)) < 0) { error_fail("failed on setsockopt(): %s", strerror(errno)); return 0; } gethostname(myname, MAXHOSTNAME); if ((hp= gethostbyname(myname)) == NULL) { disconnect(); return 0; } memset(&sa, 0, sizeof(struct sockaddr_in)); sa.sin_family= hp->h_addrtype; sa.sin_port= htons(portnum); sa.sin_family = AF_INET; sa.sin_addr.s_addr = htonl(INADDR_ANY); if( bind(sock,(struct sockaddr *)&sa,sizeof(sa)) == -1 ) { error_fail("server count not bind"); disconnect(); return 0; } #ifdef USEWIN32 WSAAsyncSelect(sock,GetForegroundWindow(),WM_USER+1,FD_ACCEPT | FD_CLOSE | FD_READ | FD_WRITE ); #endif if( listen(sock,100) < 0 ) { disconnect(); return 0; } return 1; } void update() { if( !isserver ) { return; } if( !sock ) { return; } timeval tv; tv.tv_sec = 0; tv.tv_usec = 10; fd_set readmask,writemask,exceptmask; FD_ZERO( &readmask ); FD_ZERO( &writemask ); FD_ZERO( &exceptmask ); FD_SET( sock, &readmask ); int results = select( FD_SETSIZE, &readmask, &writemask, &exceptmask, &tv ); if( !results ) { return; } int conn; if( (conn = accept(sock,NULL,NULL)) < 0 ) { printf("failed conn\n"); return; } printf("new conn\n"); NetSocket* cl = new NetSocket( conn ); cl->next = next; next = cl; } void client(const char* hostname = "localhost", unsigned short portnum = 8700 ) { isserver = 0; if ((hp= gethostbyname(hostname)) == NULL) { return; } printf("got localhost\n"); memset(&sa, 0, sizeof(struct sockaddr_in)); memcpy((char *)&sa.sin_addr,hp->h_addr,hp->h_length); sa.sin_family= hp->h_addrtype; sa.sin_port= htons((u_short)portnum); if ((sock= socket(hp->h_addrtype,SOCK_STREAM,0)) < 0) { return; } if (connect(sock,(struct sockaddr *)&sa,sizeof sa) < 0) { disconnect(); return; } attach( sock ); printf("conned %x,%x,%x\n",sock,(int)sockin,(int)sockout); } void publish(char* str) { if( sockout ) { fputs(str,sockout); fflush(sockout); } } }; #if 0 /* // some inactivated code - idea here was to run 2 sims, one at present moment, and one in past that is synced. // but i am concerned that ode is not deterministic between machines; there might be strange rounding errors. // non deterministic input event structure class ndi_event { public: struct ndi_event* next; struct ndi_event* prev; time_t timenow; int key; int cmd; ndi_event( int key, int cmd) { next = prev = 0; time(&timenow); this->key = key; this->cmd = cmd; } }; // data structures static ndi_event* ndi_head = 0; static ndi_event* ndi_tail = 0; // insert event into temporally sorted queue void ndi_hold_event(ndi_event* event) { event->next = event->prev = 0; for( ndi_event* cursor = ndi_tail ; cursor ; cursor = cursor->prev ) { if( cursor->time < event->time ) { event->next = cursor->next; event->prev = cursor; if( cursor->next ) cursor->next->prev = event; cursor->next = event; return; } } event->next = ndi_head; ndi_head = event; } void system_command( int key, int cmd ); // do all events up to the current time void ndi_advance(int current_time) { for( ndi_event* cursor = ndi_head ; cursor ; ) { if( cursor->time > current_time ) { return; } ndi_head = cursor->next; system_command(cursor->key, cursor->cmd ); cursor = cursor->next free cursor->prev; } } void network_publish_event(int key, int cmd) { // ndi_hold_event( new ndi_event(key,cmd) ); // - send over net now also - except maybe updates // for updates we want to do this general bookkeeping // accept new pending connections and fire off a copy of my objects once only as well as pending state // get current time // ndi_advance( to current time - 1 ); // and do a local command update too... or heart beated } */ #endif /**********************************************************************/ // game stuff /**********************************************************************/ #ifdef USE_WIN32 #define __USE_W32_SOCKETS 1 #include #include #ifdef MSVC #pragma warning(disable:4244 4305) // for VC++, no precision loss complaints #endif #endif #include #include // select correct drawing functions #ifdef dDOUBLE #define dsDrawBox dsDrawBoxD #define dsDrawSphere dsDrawSphereD #define dsDrawCylinder dsDrawCylinderD #define dsDrawCappedCylinder dsDrawCappedCylinderD #endif /**********************************************************************/ // simobject - game object management /**********************************************************************/ class SimObject { public: SimObject* next; int key; static class SimObject* objects; SimObject() { next = objects; objects = this; } virtual ~SimObject() { for(SimObject** obj = &objects; *obj; obj = &((*obj)->next)) { if( *obj == this ) { *obj = (*obj)->next; break; } } } virtual void draw() {} virtual void update() {} virtual void command(char *cmd) {} }; SimObject* SimObject::objects = 0; /**********************************************************************/ // a dynamics object /**********************************************************************/ class Dynamics { public: dWorldID world; dSpaceID space; dGeomID ground; dJointGroupID contactgroup; Dynamics* next; // this is called by dSpaceCollide when two objects in space are potentially colliding. void nearCallback2 (void *data, dGeomID o1, dGeomID o2) { int i,n; const int N = 10; dContact contact[N]; n = dCollide (o1,o2,N,&contact[0].geom,sizeof(dContact)); if (n > 0) { for (i=0; inearCallback2(0,o1,o2); } Dynamics() { world = dWorldCreate(); space = dHashSpaceCreate(); contactgroup = dJointGroupCreate (0); dWorldSetGravity (world,0,0,-0.5); ground = dCreatePlane (space,0,0,1,0); } void draw() {} void update() { dSpaceCollide (space,this,&nearCallback); dWorldStep (world,0.05); dJointGroupEmpty (contactgroup); } void command(char* cmd) {} ~Dynamics() { dJointGroupDestroy (contactgroup); dSpaceDestroy (space); dWorldDestroy (world); } }; /**********************************************************************/ // a car /**********************************************************************/ class Car: public SimObject { public: // some constants #define LENGTH 0.7 // chassis length #define WIDTH 0.5 // chassis width #define HEIGHT 0.2 // chassis height #define RADIUS 0.18 // wheel radius #define STARTZ 0.5 // starting height of chassis #define CMASS 1 // chassis mass #define WMASS 0.2 // wheel mass // dynamics and collision objects (chassis, 3 wheels ) dBodyID body[4]; dJointID joint[3]; // joint[0] is the front wheel dGeomID geom_group; dGeomID box[1]; dGeomID sphere[3]; double speed,steer; Dynamics* parent; Car(Dynamics* parent, dReal x, dReal y, dReal z); virtual ~Car(); virtual void update(); virtual void draw(); virtual void command(char *); }; Car::Car(Dynamics* parent, dReal x, dReal y, dReal z): SimObject() { this->parent = parent; int i; dMass m; // chassis body body[0] = dBodyCreate (parent->world); dBodySetPosition (body[0],x+0,y+0,z+STARTZ); dMassSetBox (&m,1,LENGTH,WIDTH,HEIGHT); dMassAdjust (&m,CMASS); dBodySetMass (body[0],&m); box[0] = dCreateBox (0,LENGTH,WIDTH,HEIGHT); dGeomSetBody (box[0],body[0]); // wheel bodies for (i=1; i<=3; i++) { body[i] = dBodyCreate ( parent->world); dQuaternion q; dQFromAxisAndAngle (q,1,0,0,M_PI*0.5); dBodySetQuaternion (body[i],q); dMassSetSphere (&m,1,RADIUS); dMassAdjust (&m,WMASS); dBodySetMass (body[i],&m); sphere[i-1] = dCreateSphere (0,RADIUS); dGeomSetBody (sphere[i-1],body[i]); } dBodySetPosition (body[1],x+ 0.5*LENGTH,y+ 0,z + STARTZ-HEIGHT*0.5); dBodySetPosition (body[2],x+ -0.5*LENGTH,y+ WIDTH*0.5,z + STARTZ-HEIGHT*0.5); dBodySetPosition (body[3],x+ -0.5*LENGTH,y+ -WIDTH*0.5,z + STARTZ-HEIGHT*0.5); // front and back wheel hinges for (i=0; i<3; i++) { joint[i] = dJointCreateHinge2 (parent->world,0); dJointAttach (joint[i],body[0],body[i+1]); const dReal *a = dBodyGetPosition (body[i+1]); dJointSetHinge2Anchor (joint[i],a[0],a[1],a[2]); dJointSetHinge2Axis1 (joint[i],0,0,1); dJointSetHinge2Axis2 (joint[i],0,1,0); } // set joint suspension for (i=0; i<3; i++) { dJointSetHinge2Param (joint[i],dParamSuspensionERP,0.4); dJointSetHinge2Param (joint[i],dParamSuspensionCFM,0.8); } // lock back wheels along the steering axis for (i=1; i<3; i++) { // set stops to make sure wheels always stay in alignment dJointSetHinge2Param (joint[i],dParamLoStop,0); dJointSetHinge2Param (joint[i],dParamHiStop,0); // the following alternative method is no good as the wheels may get out // of alignment: // dJointSetHinge2Param (joint[i],dParamVel,0); // dJointSetHinge2Param (joint[i],dParamFMax,dInfinity); } // create geometry group and add it to the space geom_group = dCreateGeomGroup ( parent->space ); dGeomGroupAdd (geom_group,box[0]); dGeomGroupAdd (geom_group,sphere[0]); dGeomGroupAdd (geom_group,sphere[1]); dGeomGroupAdd (geom_group,sphere[2]); speed = 0; steer = 0; } Car::~Car() { // destroy body xxx dGeomDestroy (box[0]); dGeomDestroy (sphere[0]); dGeomDestroy (sphere[1]); dGeomDestroy (sphere[2]); } void Car::update() { // motor dJointSetHinge2Param (joint[0],dParamVel2,-speed); dJointSetHinge2Param (joint[0],dParamFMax2,0.1); // steering dReal v = steer - dJointGetHinge2Angle1 (joint[0]); if (v > 0.1) v = 0.1; if (v < -0.1) v = -0.1; v *= 10.0; dJointSetHinge2Param (joint[0],dParamVel,v); dJointSetHinge2Param (joint[0],dParamFMax,0.2); dJointSetHinge2Param (joint[0],dParamLoStop,-0.75); dJointSetHinge2Param (joint[0],dParamHiStop,0.75); dJointSetHinge2Param (joint[0],dParamFudgeFactor,0.1); } void Car::draw() { dsSetColor (0,1,1); dsSetTexture (DS_WOOD); dReal sides[3] = {LENGTH,WIDTH,HEIGHT}; dsDrawBox (dBodyGetPosition(body[0]),dBodyGetRotation(body[0]),sides); dsSetColor (1,1,1); int i; for (i=1; i<=3; i++) dsDrawCylinder (dBodyGetPosition(body[i]),dBodyGetRotation(body[i]),0.02f,RADIUS); } void Car::command(char* command) { int cmd; float x,y,z; sscanf(command,"%d %f %f %f",&cmd,&x,&y,&z); switch( cmd ) { case 'a': case 'A': speed += 0.3; break; case 'z': case 'Z': speed -= 0.3; break; case ',': steer -= 0.5; break; case '.': steer += 0.5; break; case ' ': speed = 0.0; steer = 0.0; default: break; } } /**************************************************************************************/ // main /**************************************************************************************/ static NetSocket network; static Dynamics* dynamics; static int local_sim_key_code = 0x00010000; static int remote_machine_code = 0x00010000; static void network_command(NetSocket* s,char* buffer) { if(!strncmp(buffer,"login",5)) { // remote has logged into me; accept their login printf("got login\n"); remote_machine_code += 0x00010000; if( s ) { fprintf(s->sockout,"id %x\n",remote_machine_code); // tell client to make an obj fprintf(s->sockout,"new %x %d %f %f %f\n",remote_machine_code + 1, 0, 0.0f,0.0f,0.0f); fflush(s->sockout); s->key = remote_machine_code; } } else if(!strncmp(buffer,"id",2)) { // remote sent us our own unique id sscanf(buffer+2,"%x",&local_sim_key_code); printf("local is is now %x\n",local_sim_key_code); remote_machine_code = local_sim_key_code; } else if(!strncmp(buffer,"new",3)) { // remote has asked us to make something at location xyz int id,type; float x,y,z; sscanf(buffer+3,"%x %d %f %f %f",&id,&type,&x,&y,&z); printf("got new request: 0x%x,%d,%f,%f,%f\n",id,type,x,y,z); Car* car = new Car(dynamics,x,y,z); car->key = id; } else if(!strncmp(buffer,"update",3)) { int key; float x,y,z; float rotf[12]; double rot[12]; sscanf(buffer+6,"%x %f %f %f\n",&key,&x,&y,&z); sscanf(buffer+6,"%x %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f\n", &key,&x,&y,&z, &rotf[0],&rotf[1],&rotf[2],&rotf[3], &rotf[4],&rotf[5],&rotf[6],&rotf[7], &rotf[8],&rotf[9],&rotf[10],&rotf[11] ); rot[0] = rotf[0]; rot[1] = rotf[1]; rot[2] = rotf[2]; rot[3] = rotf[3]; rot[4] = rotf[4]; rot[5] = rotf[5]; rot[6] = rotf[6]; rot[7] = rotf[7]; rot[8] = rotf[8]; rot[9] = rotf[9]; rot[10] = rotf[10]; rot[11] = rotf[11]; for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { if( obj->key == key ) { Car* car = (Car*)obj; dBodySetPosition( car->body[0],x,y,z); dBodySetRotation( car->body[0], rot ); return; } } // if not found then add Car* car = new Car(dynamics,x,y,z); car->key = key; } } static void network_input_events() { // handle incoming traffic from any port for(NetSocket* s = &network; s ; s = s->next ) { if(! s->sockin ) continue; char buffer[2048]; while( fgets(buffer,2040,s->sockin) ) { network_command(s,buffer); } } } static void network_output_events() { // for all machines that have observers here, tell them about all objects we are responsible for static int counter = 0; if( counter++ < 16 ) { return; } counter = 0; for(NetSocket* s = &network; s ; s = s->next ) { if( !s->sockout ) continue; for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { if(network.sockout) { // if we are a client then emit information about our objects only - else emit all if( (obj->key & 0xffff0000) != (local_sim_key_code & 0xffff0000) ) { continue; } } else { // if we are a server - emit all objects to all machines except real owners if( (obj->key & 0xffff0000) == ( s->key & 0xffff0000) ) { continue; } } Car* car = (Car*)obj; const dReal* pos = dBodyGetPosition( car->body[0] ); const dReal* rot = dBodyGetRotation( car->body[0] ); float x = pos[0]; float y = pos[1]; float z = pos[2]; fprintf(s->sockout,"update %x %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f\n", obj->key,x,y,z, (float)rot[0],(float)rot[1],(float)rot[2],(float)rot[3], (float)rot[4],(float)rot[5],(float)rot[6],(float)rot[7], (float)rot[8],(float)rot[9],(float)rot[10],(float)rot[11] ); fflush(s->sockout); } } } static void mainLoop (int pause) { // for server only - look for new socket connections network.update(); // for servers and clients - deal with any remote commands network_input_events(); // for servers and clients - emit anything anybody else might be interested in network_output_events(); // update... could be done before outputting state for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { obj->update(); } if( dynamics ) { dynamics->update(); } // redraw... best done after updating state for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { obj->draw(); } } void key_events(int cmd ) { switch(cmd) { default: int key = ( local_sim_key_code & 0xffff0000 ) + 1; for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { printf("%x %x\n",obj->key,key); if( obj->key == key ) { char buffer[512]; sprintf(buffer,"%d 0 0 0\n",cmd); obj->command(buffer); return; } } } } void start() { printf ("Press:\t'a' to increase speed.\n" "\t'z' to decrease speed.\n" "\t',' to steer left.\n" "\t'.' to steer right.\n" "\t' ' to reset speed and steering.\n"); // move camera somewhere useful { //const dReal* pos = dBodyGetPosition(body[0]); float pos[3] = { 3,-3,2 }; // xxx move viewpoint behind car - xxx wrong - do dynamically static float xyz[3] = {0.8317f,-0.9817f,0.8000f}; static float hpr[3] = {121.0000f,-27.5000f,0.0000f}; xyz[0] = pos[0] + 0.8317f; xyz[1] = pos[1] - 0.9817f; xyz[2] = pos[2] + 0.8000f; dsSetViewpoint (xyz,hpr); } } int main (int argc, char **argv) { dynamics = new Dynamics(); if( argc < 2 ) { // be a server - server will always start up one dynamics engine and always add one car to kickstart itself. printf("server\n"); network.serve(); network_command(0,"id 0x00010000\n"); // server id network_command(0,"new 0x00010001 0 2.0 0 0\n"); // server car location } else { // be a client - client explicitly logs in and waits for reply with an id before doing anything network.client(); if( network.sockout ) { network.publish("login joe\n"); printf("client: network up - logging in\n"); } else { printf("client: no network :-(\n"); } } // setup pointers to drawstuff callback functions and run forever dsFunctions fn; fn.version = DS_VERSION; fn.start = &start; fn.step = &mainLoop; fn.command = &key_events; fn.stop = 0; fn.path_to_textures = "../../drawstuff/textures"; dsSimulationLoop (0,0,352,288,&fn); // exit... network.disconnect(); } From ccos at bigpond.com Tue Nov 19 01:07:01 2002 From: ccos at bigpond.com (ccos) Date: Tue Nov 19 01:07:01 2002 Subject: [ODE] os x compile probs Message-ID: <6FC6A94D-FB95-11D6-9679-000393722276@bigpond.com> hello everybody, i'm trying to build ode on os x 10.1.5 and this is what i'm doing (from the docs): > Step 1: Unpack the ODE archive. done > Step 2: Get the GNU make tool. Many Unix platforms come with this, > although sometimes it is called gmake. I have provided a version of GNU > make for windows here. done, ( default os x make ) > Step 3: Edit the settings in the file config/user-settings. The list of > supported platforms is given in that file. done, set it to osx > Step 4: Run make to configure and build ODE and the graphical test > programs. > Be sure you are using the correct version of GNU make. which is the correct version? > The make targets for building the parts of ODE are: > * make configure : Create the configuration file include/ode/config.h. i get: *** configurator succeeded *** > * make ode-lib : Build the core ODE library. seems to work these are all i can make because i don't have X11, but i don't really need to run the drawing library, so i should be fine right? > Step 5: To install the ODE library onto your system you should copy the > lib/ and include/ directories to a suitable place, e.g. on Unix: > > * include/ode/ --> /usr/local/include/ode/ > * lib/libode.a --> /usr/local/lib/libode.a done ok, so everything seems alright, but when i try to compile with #include i get: /usr/bin/ld: archive: /usr/local/lib/libode.a has no table of contents, add one with ranlib(1) (can't load from it) hints very well appreciated. has anybody here built ode on os x? thanks much, c From nnevatie at welho.com Tue Nov 19 10:31:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Tue Nov 19 10:31:02 2002 Subject: [ODE] Step size vs. frame rate + building ODE Message-ID: <000b01c28ff1$62b90c60$3abdf3d5@wli> I read in the ODE documentation that "10*0.1 not the same as 5*0.2". So, my guestion is, can I use frame processing time to scale the step? E.g.: dWorldStep(dWorldID, 0.05 * scaler); where scaler is somehow dependent of the frame processing time BTW, I was able to build ODE with Borland C++ Builder 6.0 Pro (+ CVS Tricollider & Opcode 1.2). One thing is still not clear to me: Which one is the newer version of tricollider - Erwin's base64 patch ('newstuff.gz') or the version in CVS? I wasn't able to build the contents of 'newstuff.gz', a function in dRay.cpp used Matrix3 and caused some access violations by accessing element at [3 * 4 + 2] (Matrix3 seems to have 4x3 elements). -- Niko From franjesus at medtelecom.net Tue Nov 19 16:06:01 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-1?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Tue Nov 19 16:06:01 2002 Subject: [ODE] os x compile probs Message-ID: <200211200001.37100.franjesus@medtelecom.net> El Mar 19 Nov 2002 09:03, ccos escribió: > hints very well appreciated. > has anybody here built ode on os x? try running ldconfig I believe OSX uses libtool, so you need to run ldconfig each time you add libraries to your system. -- Tienes mal la zona, sin embargo te marca bien la hora local, ergo tienes mal ambas. .: Bulmailing :. From coding at natew.com Tue Nov 19 22:48:01 2002 From: coding at natew.com (Nate W) Date: Tue Nov 19 22:48:01 2002 Subject: [ODE] Step size vs. frame rate + building ODE In-Reply-To: <000b01c28ff1$62b90c60$3abdf3d5@wli> Message-ID: On Tue, 19 Nov 2002, Niko Nevatie wrote: > Can I use frame processing time to scale the step? E.g.: > > dWorldStep(dWorldID, 0.05 * scaler); > > where scaler is somehow dependent of the frame processing time That's what I do in Juice, and I'm happy with the results. I also clamp the 'frame time' to within a minimum and maximum range, to avoid getting instabilities with large frame times or divide-by-zero with a zero frame time. If you check the archives, I wrote something a while back that goes into more detail. I like the variable time step approach for my app so far. Theoretically there are some potential problems with variable time steps, but in practice I'm happy with the way things work in Juice. If repeatability or consistency across network machines is important, you might want to use fixed time steps. -- Nate Waddoups Redmond WA USA http://www.natew.com From thomas_buehrmann at web.de Wed Nov 20 06:55:02 2002 From: thomas_buehrmann at web.de (Thomas Buehmann) Date: Wed Nov 20 06:55:02 2002 Subject: [ODE] dRay, c++ interface, khepera model? Message-ID: <200211201354.gAKDs3X30804@mailgate5.cinetic.de> hi, is it possible to get the c++ interface by martin c. martin and the dRay contribution without having to use cvs or copy and paste? apart from that, is anyone aware of a good khepera-style two-wheeled differential-steering model? if i use two wheels in front of my vehicle to drive and steer and an additional supporting wheel in the back, the latter tends to bend if the distance between front-wheels and supporting wheel is small (all use hinge2). is that model too simple or is it just a matter of tweaking cfm etc...? thanks, thomas. sorry if this mail got posted twice. i send it earlier from an unlisted address. ______________________________________________________________________________ Der Anrufbeantworter für Ihre E-Mail-Korrespondenz - WEB.DE FreeMail http://freemail.web.de/features/?mc=021137 From anselm at hook.org Wed Nov 20 14:12:02 2002 From: anselm at hook.org (Anselm Hook) Date: Wed Nov 20 14:12:02 2002 Subject: [ODE] dRay, c++ interface, khepera model? In-Reply-To: <200211201354.gAKDs3X30804@mailgate5.cinetic.de> Message-ID: > hi, > is it possible to get the c++ interface by martin c. martin and the dRay > contribution without having to use cvs or copy and paste? http://q12.org/cgi-bin/cvsweb.cgi/ode/ From henri at cs.sun.ac.za Thu Nov 21 02:48:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Thu Nov 21 02:48:02 2002 Subject: [ODE] Faster ODE Message-ID: <021b01c29143$46622a30$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_0218_01C29154.09E63F40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi ODE :) Please can somebody look at this and experiment with the file? LDLT decomposition is one of the primary computational activities in = ODE's physics engine. LDLT =3D Lower Diagonal Lower Transposed, meaning = a constraint matrix A (that describes the physics of a world) can be = decomposed into two matrices (L and D, where L is a lower triangular = matrix (all entries above the diagonal are zero) and D is a diagonal = matrix (all entries except the diagonal are zero)). Now A =3D L D L' = (A equals the lower matrix times the diagonal matrix times the = transposed lower matrix.) The A matrix varies in size and is typically = between 10x10 and 500x500 for ODE (depending on how many constraints/collisions/etc need to be solved for a given = simulation step). This LDLT decomposition needs to be solved with every step and is quite = computationally intensive. I've looked at the stldlt.c file that is part = of the ODE source and it looks to me like it could be improved upon. = Unforetunately I use Delphi, so I cannot test my suggested modifications = directly (though the Delphi version seems fine and considerably faster = then the original). The file http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a = replacement for fastldlt.c and should (barring errors) work flawlessly = and faster then the original. Let me know if it works, thanks :) Henri ------=_NextPart_000_0218_01C29154.09E63F40 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi ODE :)
 
Please can somebody look at this and experiment with the = file?
 
LDLT decomposition is one of the primary computational activities = in ODE's=20 physics engine. LDLT =3D Lower Diagonal Lower Transposed, meaning a = constraint=20 matrix A (that describes the physics of a world) can be decomposed into = two=20 matrices (L and D, where L is a lower triangular matrix (all entries = above the=20 diagonal are zero) and D is a diagonal matrix (all entries except = the=20 diagonal are zero)). Now  A =3D L D L'  (A equals the lower = matrix times=20 the diagonal matrix times the transposed lower matrix.) The A matrix = varies in=20 size and is typically between 10x10 and 500x500 for ODE (depending = on
how=20 many constraints/collisions/etc need to be solved for a given simulation = step).

This LDLT decomposition needs to be solved with every step = and is=20 quite computationally intensive. I've looked at the stldlt.c file that = is part=20 of the ODE source and it looks to me like it could be improved upon.=20 Unforetunately I use Delphi, so I cannot test my=20 suggested modifications directly (though the Delphi version = seems fine=20 and considerably faster then the original).

The file http://www.cs.su= n.ac.za/~henri/fastldlt_henri.c=20 is a replacement for fastldlt.c and should (barring errors) work = flawlessly and=20 faster then the original.
 
Let me know if it works, thanks :)
  Henri
 
------=_NextPart_000_0218_01C29154.09E63F40-- From ruud at marketgraph.nl Thu Nov 21 03:48:01 2002 From: ruud at marketgraph.nl (Ruud van Gaal) Date: Thu Nov 21 03:48:01 2002 Subject: [ODE] os x compile probs Message-ID: <20C09F811939D311BA694854E86C778233E42D@raptor> > El Mar 19 Nov 2002 09:03, ccos escribió: > > hints very well appreciated. > > has anybody here built ode on os x? > > try running ldconfig I just took the error's advice and did 'ranlib libode.a' and that worked. Ruud From jnilson_99 at yahoo.com Thu Nov 21 11:16:01 2002 From: jnilson_99 at yahoo.com (jnilson_99@yahoo.com) Date: Thu Nov 21 11:16:01 2002 Subject: [ODE] Faster ODE In-Reply-To: <021b01c29143$46622a30$45d4e892@temple> Message-ID: <20021121181503.47334.qmail@web40111.mail.yahoo.com> Hi, The mathematics behind what you're talking about sounds really cool but over my head. Do you know of any resource (web page or book) that provides a background on LDLT, Lower Diagonal Lower Transposed? thanks, john --- Henri Hakl wrote: > Hi ODE :) > > Please can somebody look at this and experiment with > the file? > > LDLT decomposition is one of the primary > computational activities in ODE's physics engine. > LDLT = Lower Diagonal Lower Transposed, meaning a > constraint matrix A (that describes the physics of a > world) can be decomposed into two matrices (L and D, > where L is a lower triangular matrix (all entries > above the diagonal are zero) and D is a diagonal > matrix (all entries except the diagonal are zero)). > Now A = L D L' (A equals the lower matrix times > the diagonal matrix times the transposed lower > matrix.) The A matrix varies in size and is > typically between 10x10 and 500x500 for ODE > (depending on > how many constraints/collisions/etc need to be > solved for a given simulation step). > > This LDLT decomposition needs to be solved with > every step and is quite computationally intensive. > I've looked at the stldlt.c file that is part of the > ODE source and it looks to me like it could be > improved upon. Unforetunately I use Delphi, so I > cannot test my suggested modifications directly > (though the Delphi version seems fine and > considerably faster then the original). > > The file > http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a > replacement for fastldlt.c and should (barring > errors) work flawlessly and faster then the > original. > > Let me know if it works, thanks :) > Henri > > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus – Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From henri at cs.sun.ac.za Thu Nov 21 11:53:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Thu Nov 21 11:53:01 2002 Subject: [ODE] Faster ODE References: <20021121181503.47334.qmail@web40111.mail.yahoo.com> Message-ID: <002701c2918f$77a973e0$45d4e892@temple> hmmm... no website springs to mind, but you can probably find one. The basic algorithm for factorizing A into LDL' runs as follows: initialize L and D to zero matrices for i = 1 to n do for j = 1 to i - 1 do Vj = LijDjj Dii = Aii - SUM(from j = 1 to i - 1): LijVj for j = i + 1 to n do Lji = (Aji - SUM(from k = 1 to i - 1)LjkVk) / Dii This creates matrices L and D such that: A = L D L' holds. ODE uses a similar approach, it still has the same big-O of n^3, but is still faster then the vanilla version from above. The original ODE version is in "fastldlt.c" of the ODE source; I've maintained the algorithm but modified the code executing it in "fastldlt_henri.c" (available at: http://www.cs.sun.ac.za/~henri/fastldlt_henri.c) in theory the replacement should be faster then the original. I cannot be sure until somebody verifies that it is correct and indeed faster. In ODE the "A" matrix is infact the Jacobian matrix that contains the current-step world constraint details. hope this helps to start off :) Henri >Hi, > >The mathematics behind what you're talking about >sounds really cool but over my head. > >Do you know of any resource (web page or book) that >provides a background on LDLT, Lower Diagonal Lower >Transposed? > >thanks, > >john From nnevatie at welho.com Thu Nov 21 12:00:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Thu Nov 21 12:00:02 2002 Subject: [ODE] Faster ODE References: <021b01c29143$46622a30$45d4e892@temple> Message-ID: <001001c29190$2c35d9c0$3abdf3d5@wli> I tried out the code in 'fastldlt_henri.c'. It works as expected. There was a small typo somewhere in the beginning of one function, but it caused no probs. I cannot say anything about the speed of the code, as I haven't benchmarked anything yet. But hey, if you say it's faster than the original, I'll take your word on it :) ----- Original Message ----- From: Henri Hakl To: ode@q12.org Sent: Thursday, November 21, 2002 11:49 AM Subject: [ODE] Faster ODE Hi ODE :) Please can somebody look at this and experiment with the file? LDLT decomposition is one of the primary computational activities in ODE's physics engine. LDLT = Lower Diagonal Lower Transposed, meaning a constraint matrix A (that describes the physics of a world) can be decomposed into two matrices (L and D, where L is a lower triangular matrix (all entries above the diagonal are zero) and D is a diagonal matrix (all entries except the diagonal are zero)). Now A = L D L' (A equals the lower matrix times the diagonal matrix times the transposed lower matrix.) The A matrix varies in size and is typically between 10x10 and 500x500 for ODE (depending on how many constraints/collisions/etc need to be solved for a given simulation step). This LDLT decomposition needs to be solved with every step and is quite computationally intensive. I've looked at the stldlt.c file that is part of the ODE source and it looks to me like it could be improved upon. Unforetunately I use Delphi, so I cannot test my suggested modifications directly (though the Delphi version seems fine and considerably faster then the original). The file http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a replacement for fastldlt.c and should (barring errors) work flawlessly and faster then the original. Let me know if it works, thanks :) Henri From henri at cs.sun.ac.za Thu Nov 21 13:24:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Thu Nov 21 13:24:02 2002 Subject: [ODE] Faster ODE References: <021b01c29143$46622a30$45d4e892@temple> <001001c29190$2c35d9c0$3abdf3d5@wli> Message-ID: <001301c2919c$37c07280$45d4e892@temple> Hey! :) you're right... I found the missing comma - the file on the website has been updated to reflect that as well. Please check the accuracy and speed using the testsuite provided with ODE. In the fbuild subdirectory there is a "test_ldlt.cpp" - compile it and run with parameter f ("test_ldlt f"). This should test both the speed and the accuracy of the factorizer. Try to compare both the original and the replacement version... - just because I think it is faster doesn't mean much - there may be compiler optimizations that I'm not aware of and other subtle issues that I'm not taking into account. thanks :) Henri ----- Original Message ----- From: "Niko Nevatie" To: Sent: Thursday, November 21, 2002 8:59 PM Subject: Re: [ODE] Faster ODE > I tried out the code in 'fastldlt_henri.c'. It works as expected. There was > a small typo somewhere in the beginning of one function, but it caused no > probs. I cannot say anything about the speed of the code, as I haven't > benchmarked anything yet. But hey, if you say it's faster than the original, > I'll take your word on it :) > > ----- Original Message ----- > From: Henri Hakl > To: ode@q12.org > Sent: Thursday, November 21, 2002 11:49 AM > Subject: [ODE] Faster ODE > > > Hi ODE :) > > Please can somebody look at this and experiment with the file? > > LDLT decomposition is one of the primary computational activities in ODE's > physics engine. LDLT = Lower Diagonal Lower Transposed, meaning a constraint > matrix A (that describes the physics of a world) can be decomposed into two > matrices (L and D, where L is a lower triangular matrix (all entries above > the diagonal are zero) and D is a diagonal matrix (all entries except the > diagonal are zero)). Now A = L D L' (A equals the lower matrix times the > diagonal matrix times the transposed lower matrix.) The A matrix varies in > size and is typically between 10x10 and 500x500 for ODE (depending on > how many constraints/collisions/etc need to be solved for a given simulation > step). > > This LDLT decomposition needs to be solved with every step and is quite > computationally intensive. I've looked at the stldlt.c file that is part of > the ODE source and it looks to me like it could be improved upon. > Unforetunately I use Delphi, so I cannot test my suggested modifications > directly (though the Delphi version seems fine and considerably faster then > the original). > > The file http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a replacement > for fastldlt.c and should (barring errors) work flawlessly and faster then > the original. > > Let me know if it works, thanks :) > Henri > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From mattias at cambrianlabs.com Thu Nov 21 13:36:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Thu Nov 21 13:36:02 2002 Subject: [ODE] Faster ODE In-Reply-To: <001001c29190$2c35d9c0$3abdf3d5@wli> References: <021b01c29143$46622a30$45d4e892@temple> <001001c29190$2c35d9c0$3abdf3d5@wli> Message-ID: > But hey, if you say it's faster than the original, > I'll take your word on it :) No chance you could time it? I'd be very interested to see what the differences are... cheers, m From nnevatie at welho.com Thu Nov 21 14:12:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Thu Nov 21 14:12:02 2002 Subject: [ODE] Faster ODE References: <021b01c29143$46622a30$45d4e892@temple> <001001c29190$2c35d9c0$3abdf3d5@wli> Message-ID: <001501c291a2$9f68a500$3abdf3d5@wli> Ok, why not, as soon as I have some spare hacking time. I'll post the results here... ----- Original Message ----- From: "Mattias Fagerlund" To: "Niko Nevatie" ; Sent: Thursday, November 21, 2002 10:31 PM Subject: Re: [ODE] Faster ODE > > But hey, if you say it's faster than the original, > > I'll take your word on it :) > > No chance you could time it? I'd be very interested to see what the > differences are... > > cheers, > m > > From duhprey at yahoo.com Thu Nov 21 14:13:01 2002 From: duhprey at yahoo.com (Daniel Duhprey) Date: Thu Nov 21 14:13:01 2002 Subject: [ODE] Faster ODE In-Reply-To: <001301c2919c$37c07280$45d4e892@temple> Message-ID: On Thu, 21 Nov 2002, Henri Hakl wrote: -->Please check the accuracy and speed using the testsuite provided with ODE. If I'm using the numbers from the test_ldlt correctly (as a raw time on some scale) then on my athlon its about 38% faster and on my celeron its roughly twice as slow :). -- ------------ email: duhprey@tosos.com www: http://paradox.tosos.com/~duhprey icq: 129354442 She's got a whole brood of kids, like Sendmail, and Postfix, and Apache, and Perl. And some of 'em die young, and some are mentally retarded. Sterling The European finds intercourse with Americans easy and agreeable. Einstein Not a shred of evidence exists in favor of the idea that life is serious. Gill From martin at metahuman.org Thu Nov 21 14:38:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 21 14:38:01 2002 Subject: [ODE] dRay, c++ interface, khepera model? References: <200211201354.gAKDs3X30804@mailgate5.cinetic.de> Message-ID: <3DDB966D.F1954CFB@metahuman.org> This is a multi-part message in MIME format. --------------AE4A85DEE0EE67C92AD2D7AE Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Here's the new C++ interface. It most likely won't compile out of the box with ODE 0.03, since it uses some of the newer features in the CVS version. But it shouldn't be hard to port, more or less just comment out lines that don't compile. - Martin Thomas Buehmann wrote: > > hi, > is it possible to get the c++ interface by martin c. martin and the dRay > contribution without having to use cvs or copy and paste? > apart from that, is anyone aware of a good khepera-style two-wheeled > differential-steering model? if i use two wheels in front of my vehicle to drive > and steer and an additional supporting wheel in the back, the latter tends to > bend if the distance between front-wheels and supporting wheel is small (all use > hinge2). is that model too simple or is it just a matter of tweaking cfm etc...? > > thanks, > thomas. > > sorry if this mail got posted twice. i send it earlier from an unlisted address. > ______________________________________________________________________________ > Der Anrufbeantworter für Ihre E-Mail-Korrespondenz - WEB.DE FreeMail > http://freemail.web.de/features/?mc=021137 > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode --------------AE4A85DEE0EE67C92AD2D7AE Content-Type: application/x-unknown-content-type-hfile; name="odecpp_new.h" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="odecpp_new.h" LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioNCiAqCQkJCQkJCQkJICoNCiAqIE9wZW4gRHluYW1pY3Mg RW5naW5lLCBDb3B5cmlnaHQgKEMpIDIwMDEsMjAwMiBSdXNzZWxsIEwuIFNtaXRoLgkgKg0K ICogQWxsIHJpZ2h0cyByZXNlcnZlZC4gIEVtYWlsOiBydXNzQHExMi5vcmcgICBXZWI6IHd3 dy5xMTIub3JnIAkgKg0KICoJCQkJCQkJCQkgKg0KICogVGhpcyBsaWJyYXJ5IGlzIGZyZWUg c29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vcgkgKg0KICogbW9kaWZ5 IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiBFSVRIRVI6IAkJCQkgKg0KICogICAoMSkgVGhlIEdO VSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZy ZWUgICoNCiAqCSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyLjEgb2Yg dGhlIExpY2Vuc2UsIG9yIChhdCAgKg0KICoJIHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVy c2lvbi4gVGhlIHRleHQgb2YgdGhlIEdOVSBMZXNzZXIJICoNCiAqCSBHZW5lcmFsIFB1Ymxp YyBMaWNlbnNlIGlzIGluY2x1ZGVkIHdpdGggdGhpcyBsaWJyYXJ5IGluIHRoZQkgKg0KICoJ IGZpbGUgTElDRU5TRS5UWFQuCQkJCQkJICoNCiAqICAgKDIpIFRoZ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tR2V0R2VvbSAoX2lkKTsgfQ0KDQog IHZvaWQgc2V0Q2xlYW51cCAoaW50IG1vZGUpDQogICAgeyBkR2VvbVRyYW5zZm9ybVNldENs ZWFudXAgKF9pZCxtb2RlKTsgfQ0KICBpbnQgZ2V0Q2xlYW51cCAoZEdlb21JRCBnKQ0KICAg IHsgcmV0dXJuIGRHZW9tVHJhbnNmb3JtR2V0Q2xlYW51cCAoX2lkKTsgfQ0KfTsNCg0KDQoj ZW5kaWYNCiNlbmRpZg0K --------------AE4A85DEE0EE67C92AD2D7AE-- From tetron at interreality.org Thu Nov 21 15:00:02 2002 From: tetron at interreality.org (Peter Amstutz) Date: Thu Nov 21 15:00:02 2002 Subject: [ODE] Faster ODE In-Reply-To: Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I haven't looked any of the code involved, but there is one possible explanation for it being faster on one CPU and slower on another :-) It sounds like a cache-size issue. If the Athlon has a bigger L1/L2 cache then the algorithm might be faster overall but if uses more instructions or space than the current algorithm it could be too big and incur a large cache-miss penalty on the Celeron (which if I recall correctly was given a really wimpy L1/L2 cache to keep costs down). Such are the joys of modern CPU architechtures... There's been some work on "cache-oblivious" algorithms, which is essentially a technique of designing the algorithm to work on small, localized and usually recursive subsets of the total problem (this is especially useful for divide-and-conquor algorithms) so that once you have a subproblem which fits in cache, solving that subproblem is efficient without having to know a priori the size of the processor cache. Just something to think about -- as I said, I haven't looked at the code involved so I could completely off base :-) On Thu, 21 Nov 2002, Daniel Duhprey wrote: > On Thu, 21 Nov 2002, Henri Hakl wrote: > > -->Please check the accuracy and speed using the testsuite provided with ODE. > > If I'm using the numbers from the test_ldlt correctly (as a raw time on > some scale) then on my athlon its about 38% faster and on my celeron its > roughly twice as slow :). [ Peter Amstutz ][ amstutz@cs.umass.edu ][ tetron@interreality.org ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE93VdXaeHUyhjCHfcRAiRMAJ9DdwekLZIYJk0n/fAjtcd3aDG0vACfRze6 mcOSJYkj8/NzQXeW/qoia+k= =SJZQ -----END PGP SIGNATURE----- From martin at metahuman.org Thu Nov 21 17:12:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 21 17:12:02 2002 Subject: [ODE] eliminating all state Message-ID: <3DDD760D.CE7EF366@metahuman.org> Hey, So I'm evolving little virtual creatures with ODE, and after the evolution is done, I take the best ones and "play them back" with graphics and logging and other fun stuff. What I'd really like is for the simulation to go through exactly the same calculations with exactly the same roundoff errors, but at the moment there are small differences that creep up over time. Russ, you mentioned that ODE uses the correction at one timestep to estimate the size of the correction at the next timestep. Is there any way I can reset this between evaluations? Is there anywhere else state is stored? For the curious: I'm currently using the debug build with -ffloat-store, and using exactly the same executable in both cases, so it's guaranteed to have exactly the same compiler options, etc... Thanks, Martin From russ at q12.org Thu Nov 21 17:25:02 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 21 17:25:02 2002 Subject: [ODE] eliminating all state In-Reply-To: <3DDD760D.CE7EF366@metahuman.org> Message-ID: > Russ, you mentioned that ODE uses the correction at one timestep to > estimate the size of the correction at the next timestep. Is there any > way I can reset this between evaluations? Is there anywhere else state is > stored? i hope i didn't mention this, because its not true. each time step is completely independent from the last ... the only information that flows between time steps is the position, orientation and linear/angular velocity of the bodies. but of course all the ODE parameters will have effects that spread throughout time precisely because they affect the positions/velocities. if you're trying to reproduce exact behavior, there's one thing to watch out for when saving and restoring state: save and restore the quaternion, not the rotation matrix, as R is generated from Q not the other way around. saving and restoring R will result in some least-significants-bits errors in the restored state. russ. -- Russ Smith http://www.q12.org/ From martin at metahuman.org Thu Nov 21 18:27:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 21 18:27:02 2002 Subject: [ODE] eliminating all state References: Message-ID: <3DDD87C0.2E18DE49@metahuman.org> Russ Smith wrote: > > > Russ, you mentioned that ODE uses the correction at one timestep to > > estimate the size of the correction at the next timestep. Is there any > > way I can reset this between evaluations? Is there anywhere else state is > > stored? > > i hope i didn't mention this, because its not true. Sorry, I must be confused. But wasn't there some issue with radically changing the size of the time step? e.g. going from 0.01 sec to 1.0 sec or vice versa? - Martin From nnevatie at welho.com Thu Nov 21 22:16:01 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Thu Nov 21 22:16:01 2002 Subject: [ODE] Faster ODE References: Message-ID: <000f01c291e6$2f741ec0$3abdf3d5@wli> I benchmarked 'test_ldlt', here are the results. Configuration: - AMD Athlon TB 800MHz, 384MB RAM, Windows XP - ODE 0.03 built with Borland C++ Builder 6.0 (all optimizations on) Test: - ODE was built including first the original 'fastldlt.c' and then 'fastldlt_henri.c' - test_ldlt was on executed using all available parameters (f, s, t) Results: with 'fastldlt.c': ---- 3449 error = 1.625478e-03, size = 71 error = 2.011657e-04, size = 79 error = 4.785806e-04, size = 83 error = 5.344188e-02, size = 89 error = 3.189385e-03, size = 97 error = 2.305180e-03, size = 101 75 error = 4.673339e-04, size = 71 error = 2.476573e-04, size = 73 error = 1.307763e-03, size = 79 error = 1.248479e-03, size = 83 error = 1.030391e-02, size = 89 error = 1.046956e-03, size = 97 error = 7.226467e-04, size = 101 89 ---- with 'fastldlt_henri.c': ---- 2046 error = 1.625478e-03, size = 71 error = 2.011657e-04, size = 79 error = 4.785806e-04, size = 83 error = 5.344188e-02, size = 89 error = 3.189385e-03, size = 97 error = 2.305180e-03, size = 101 75 error = 4.673339e-04, size = 71 error = 2.476573e-04, size = 73 error = 1.307763e-03, size = 79 error = 1.248479e-03, size = 83 error = 1.030391e-02, size = 89 error = 1.046956e-03, size = 97 error = 7.226467e-04, size = 101 89 ---- Conclusions: - The outputs of the tests are identical. - 'fastldlt_henri.c' consumed ~59% of the time taken by 'fastldlt.c', on the described test configuration. - As mentioned earlier, the results may vary depending on the CPU and cache types. Cheers ----- Original Message ----- From: "Peter Amstutz" To: "Daniel Duhprey" Cc: Sent: Thursday, November 21, 2002 11:59 PM Subject: Re: [ODE] Faster ODE > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I haven't looked any of the code involved, but there is one possible > explanation for it being faster on one CPU and slower on another :-) It > sounds like a cache-size issue. If the Athlon has a bigger L1/L2 cache > then the algorithm might be faster overall but if uses more instructions > or space than the current algorithm it could be too big and incur a large > cache-miss penalty on the Celeron (which if I recall correctly was given a > really wimpy L1/L2 cache to keep costs down). Such are the joys of modern > CPU architechtures... There's been some work on "cache-oblivious" > algorithms, which is essentially a technique of designing the algorithm to > work on small, localized and usually recursive subsets of the total > problem (this is especially useful for divide-and-conquor algorithms) so > that once you have a subproblem which fits in cache, solving that > subproblem is efficient without having to know a priori the size of the > processor cache. > > Just something to think about -- as I said, I haven't looked at the code > involved so I could completely off base :-) > > On Thu, 21 Nov 2002, Daniel Duhprey wrote: > > > On Thu, 21 Nov 2002, Henri Hakl wrote: > > > > -->Please check the accuracy and speed using the testsuite provided with ODE. > > > > If I'm using the numbers from the test_ldlt correctly (as a raw time on > > some scale) then on my athlon its about 38% faster and on my celeron its > > roughly twice as slow :). > > [ Peter Amstutz ][ amstutz@cs.umass.edu ][ tetron@interreality.org ] > [Lead Programmer][Interreality Project][Virtual Reality for the Internet] > [ VOS: Next Generation Internet Communication][ http://interreality.org ] > [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.7 (GNU/Linux) > > iD8DBQE93VdXaeHUyhjCHfcRAiRMAJ9DdwekLZIYJk0n/fAjtcd3aDG0vACfRze6 > mcOSJYkj8/NzQXeW/qoia+k= > =SJZQ > -----END PGP SIGNATURE----- > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From chris.campbell at l8tech.com Thu Nov 21 22:55:02 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Thu Nov 21 22:55:02 2002 Subject: [ODE] eliminating all state Message-ID: > is done, I take the best ones and "play them back" with graphics and > logging and other fun stuff. What I'd really like is for the > simulation > to go through exactly the same calculations with exactly the > same roundoff > errors, but at the moment there are small differences that > creep up over > time. Russ, you mentioned that ODE uses the correction at Using fixed timestep? I am making a racing game using ODE for physics which records only keyboard and mouse inputs to make a replay. That is, to play the replay the entire simulation is recalculated. Initially I was a little worried that error might creep in after a while but after a LONG time experimenting I convinced myself that there was no state held by ODE, and that the idea should work. It does, but only with fixed timestep. Also, a recording made with the debug binary will not replay properly with the release binary and vice versa. Another thing which seems to be necessary is that the cpu should conform to IEEE floating point standards in order for replays to work deterministically on a different computer. ChrisC From dmcclurg at pandemicstudios.com.au Thu Nov 21 23:13:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 21 23:13:02 2002 Subject: [ODE] is ball and socket joint anchor relative to body1? Message-ID: From the docs... --- void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z); Set the joint anchor point. --- it's not clear to me what coordinate frame the anchor point is in... --- For the parameter getting functions, if the system is out of alignment (i.e. there is some joint error) then the anchor/axis values will be correct with respect to body 1 only (or body 2 if you specified body 1 as zero in the dJointAttach() function). The default anchor for all joints is (0,0,0). The default axis for all joints is (1,0,0). --- does this mean the anchor point is relative to body1 ? From dmcclurg at pandemicstudios.com.au Thu Nov 21 23:53:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 21 23:53:02 2002 Subject: [ODE] stress testing and box stacking instability Message-ID: This is a multi-part message in MIME format. ------_=_NextPart_001_01C291F3.A8E1CEDE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm trying to use stacked boxes in my game and I ran into the box = stacking instability mentioned previously on this list. That got me to = reading the Gamasutra article "Product Review of Physics Engines, Part = One: The Stress Tests" and I thought it might be useful to put together = the stress test suite for ODE. It was easy to get tests 1-6 coded and the only one that did badly was = Test 2: "A slightly larger cube is dropped on a smaller cube. This was = a variation on the first test in that the difference between the cubes' = sizes was much smaller. This test was meant to be a "gimme" and should = just work." Expected result: cubes should drop straight on top of each = other and come to immediate rest. I attached a modified test_boxstack.cpp which shows what happens. The = top box dances around for a long time and eventually falls off the top = box. In Havok, i think they might be freezing/sleeping boxes in this = situation. Does the solution lie in proper detection of this situation = or in better contact generation? <>=20 ------_=_NextPart_001_01C291F3.A8E1CEDE Content-Type: application/octet-stream; name="test_boxstack.cpp" Content-Transfer-Encoding: base64 Content-Description: test_boxstack.cpp Content-Disposition: attachment; filename="test_boxstack.cpp" LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioNCiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNCiogT3BlbiBEeW5hbWljcyBFbmdp bmUsIENvcHlyaWdodCAoQykgMjAwMSwyMDAyIFJ1c3NlbGwgTC4gU21pdGguICAgICAgICoNCiog QWxsIHJpZ2h0cyByZXNlcnZlZC4gIEVtYWlsOiBydXNzQHExMi5vcmcgICBXZWI6IHd3dy5xMTIu b3JnICAgICAgICAgICoNCiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNCiogVGhpcyBsaWJyYXJ5IGlzIGZyZWUg c29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciAgICAgICAgICoNCiogbW9k aWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiBFSVRIRVI6ICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICoNCiogICAoMSkgVGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5z ZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgICoNCiogICAgICAgU29mdHdhcmUgRm91bmRhdGlv bjsgZWl0aGVyIHZlcnNpb24gMi4xIG9mIHRoZSBMaWNlbnNlLCBvciAoYXQgICoNCiogICAgICAg eW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiBUaGUgdGV4dCBvZiB0aGUgR05VIExlc3Nl ciAgICAgICoNCiogICAgICAgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBpcyBpbmNsdWRlZCB3aXRo IHRoaXMgbGlicmFyeSBpbiB0aGUgICAgICoNCiogICAgICAgZmlsZSBMSUNFTlNFLlRYVC4gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNCiogICAoMikgVGhl IEJTRC1zdHlsZSBsaWNlbnNlIHRoYXQgaXMgaW5jbHVkZWQgd2l0aCB0aGlzIGxpYnJhcnkgaW4g ICAgICoNCiogICAgICAgdGhlIGZpbGUgTElDRU5TRS1CU0QuVFhULiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICoNCiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNCiogVGhpcyBsaWJyYXJ5 IGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAg ICoNCiogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQg d2FycmFudHkgb2YgICAgICAgICoNCiogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEg UEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIGZpbGVzICAgICoNCiogTElDRU5TRS5UWFQgYW5k IExJQ0VOU0UtQlNELlRYVCBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICoN CiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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iAgZHNTaW11bGF0aW9uTG9vcCAoYXJnYyxh cmd2LDM1MiwyODgsJmZuKTsNCg0KICBkSm9pbnRHcm91cERlc3Ryb3kgKGNvbnRhY3Rncm91cCk7 DQogIGRTcGFjZURlc3Ryb3kgKHNwYWNlKTsNCiAgZFdvcmxkRGVzdHJveSAod29ybGQpOw0KDQog IHJldHVybiAwOw0KfQ0K ------_=_NextPart_001_01C291F3.A8E1CEDE-- From Nguyen Binh Fri Nov 22 01:23:02 2002 From: Nguyen Binh (Nguyen Binh) Date: Fri Nov 22 01:23:02 2002 Subject: Re[2]: [ODE] Faster ODE In-Reply-To: <000f01c291e6$2f741ec0$3abdf3d5@wli> References: <000f01c291e6$2f741ec0$3abdf3d5@wli> Message-ID: <9822448108.20021122151447@glassegg.com> For me, P III 550 Mhz , XP SP1 ,VS.NET Latest CVS source. Optimize all enable. --------- Use Henri's code : 23805 error = 1.625478e-003, size = 71 error = 2.011657e-004, size = 79 error = 4.785806e-004, size = 83 error = 5.344188e-002, size = 89 error = 3.189385e-003, size = 97 error = 2.305180e-003, size = 101 485 error = 4.673339e-004, size = 71 error = 2.476573e-004, size = 73 error = 1.307763e-003, size = 79 error = 1.248479e-003, size = 83 error = 1.030391e-002, size = 89 error = 1.046956e-003, size = 97 error = 7.226467e-004, size = 101 707 --------- Original code: 23804 error = 1.625478e-003, size = 71 error = 2.011657e-004, size = 79 error = 4.785806e-004, size = 83 error = 5.344188e-002, size = 89 error = 3.189385e-003, size = 97 error = 2.305180e-003, size = 101 485 error = 4.673339e-004, size = 71 error = 2.476573e-004, size = 73 error = 1.307763e-003, size = 79 error = 1.248479e-003, size = 83 error = 1.030391e-002, size = 89 error = 1.046956e-003, size = 97 error = 7.226467e-004, size = 101 707 ------------- My conclusion : + Both exactly the same for my case. Hey Niko! Are you sure about your result? I see your PC run 10 times faster than mine. ( :-( ) . Nguyen Binh From nlin at nlin.net Fri Nov 22 03:15:02 2002 From: nlin at nlin.net (nlin@nlin.net) Date: Fri Nov 22 03:15:02 2002 Subject: ODE Debug behaves differently than ODE release (was Re: [ODE] eliminating all state) Message-ID: <20021122114259.GA29965@nlin.net> On Fri, Nov 22, 2002 at 03:02:44PM +0900, Chris Campbell wrote: > Also, a recording made with the debug binary will not replay > properly with the release binary and vice versa. Recently I have been investigating exactly this determinism problem and have come to the same conclusion as Chris: ODE's behavior can be deterministically reproduced with a fixed timestep, but the debug and release versions act differently. This is somewhat unsettling for me. I am reasonably certain that is is ODE itself which is behaving differently in debug and release modes, not my application. I don't have time to investigate this in detail now, but I wanted to add a second confirmation to Chris's: ODE debug behaves differently than ODE release. One more note which may provide a clue as to the source of the discrepancy. My app access ODE through custom wrapper classes (in file1.cpp), and I also declared a custom collision space (in file2.cpp). If I compile my entire app in debug mode, but compile file1.cpp and file2.cpp in release mode and link the app with the release ODE lib, then behavior of the entire debug app is identical with the behavior of the release app. If I compile file1.cpp in debug mode, OR compile file2.cpp in debug mode, OR link with the ODE debug library, then divergent behavior results. That merely recompiling my *interface* class to ODE causes divergent behavior seems to indicate this may be a data alignment, calling convention, or other subtle compiler flag issue. This is on MSVC 6. If I recall correctly, I believe that even the ODE demos acted differently in debug and release modes, so anyone wishing to reproduce this divergent behavior should be able to do so easily. -Norman From nlin at nlin.net Fri Nov 22 03:35:02 2002 From: nlin at nlin.net (nlin@nlin.net) Date: Fri Nov 22 03:35:02 2002 Subject: [ODE] eliminating all state Message-ID: <20021122120304.GA30898@nlin.net> On Thu, Nov 21, 2002 at 05:24:02PM -0700, Russ Smith wrote: > > Russ, you mentioned that ODE uses the correction at one timestep to > > estimate the size of the correction at the next timestep. Is there any > > way I can reset this between evaluations? Is there anywhere else state is > > stored? > > i hope i didn't mention this, because its not true. each time step is > completely independent from the last ... the only information that flows > between time steps is the position, orientation and linear/angular > velocity of the bodies. but of course all the ODE parameters will have > effects that spread throughout time precisely because they affect the > positions/velocities. Russ, The message from which you are being indirectly quoted is: http://q12.org/pipermail/ode/2002-April/001107.html The relevant passage: On Wed, Apr 10, 2002, Russ Smith wrote: > in the small-large > timestep case it fails, because the velocity correction is timestep > dependent (i.e. the small velocity correction calculated during the > small timestep becomes a much-too-large correction during the large > timestep). there is a good fix for this problem, which i will > eventually add to ODE (as time permits). there'll be a dWorld switch > to turn it on, as there is a slight performance cost. Has the "fix" mentioned above been implemented? What is the idea behind the fix? -Norman From p.terdiman at wanadoo.fr Fri Nov 22 03:57:01 2002 From: p.terdiman at wanadoo.fr (Pierre Terdiman) Date: Fri Nov 22 03:57:01 2002 Subject: ODE Debug behaves differently than ODE release (was Re: [ODE] eliminating all state) References: <20021122114259.GA29965@nlin.net> Message-ID: <00cb01c29215$84b94ca0$0e00000a@pierre> > This is somewhat unsettling for me. I am reasonably certain that is is > ODE itself which is behaving differently in debug and release modes, > not my application. I don't have time to investigate this in detail > now, but I wanted to add a second confirmation to Chris's: ODE debug > behaves differently than ODE release. Well, that's normal. Due to limited FPU precision,simply reordering some operations can produce slightly different results (and reordering happens a lot when the compiler optimizes the code, of course). Also, something like this : a = b / 2.0f; ...can be compiled with the divide in Debug mode, but actually be transformed into : a = b * 0.5f; ...in Release. Producing different results, that can add up quickly in a physics engine. You can try the following compiler option on VC++ : Project Settings -> C/C++ -> Optimizations ->Improve float consistency Sometimes it helps. But in some cases it can be very hard to get the exact same behaviours in Debug & Release. There was a Gamasutra article explaining related problems, when you try to record an animation and replay it in the same exact way. That's surprisingly difficult. Pierre From chris.campbell at l8tech.com Fri Nov 22 03:57:41 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Fri Nov 22 03:57:41 2002 Subject: [ODE] Debug vs Release floating point (MSVC) Message-ID: Hi Norman, > This is somewhat unsettling for me. I am reasonably certain that is is > ODE itself which is behaving differently in debug and release modes, Nah... I'm pretty sure it is to do with the optimizations (for speed) that occur when building for release. In release build floating point exceptions are not checked for, internal representation of the number is different etc - I don't really know the details. If you are using doubles, this might be relevant too: http://support.microsoft.com/default.aspx?scid=KB;en-us;q217033 > convention, or other subtle compiler flag issue. Apparently the /Op switch is supposed to stop optimizations in the release build as well, but whether you want to do that is the question isn't it... ChrisC From henri at cs.sun.ac.za Fri Nov 22 06:34:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Fri Nov 22 06:34:02 2002 Subject: [ODE] Faster ODE References: <000f01c291e6$2f741ec0$3abdf3d5@wli> Message-ID: <006b01c2922b$ec499710$45d4e892@temple> hmmm... the results are quite interesting. I can understand that in the case of Nguyen Binh there is no difference in resultant speed. This is likely to be due to the compiler that is in that case intelligent enough to produce all the optimizations I've set to it. In essence I just realized that there are alot of code redundancies that aren't guaranteed to be compiled away with optimal efficiency by most compilers. VS.NET has a pretty thorough compiler as far as I understand... ;) I have no idea why the Celeron results should be slower - but the 38-59% speed improvement by Niko and Daniel are what I expect from average systems. I'm quite happy with the results upto now then... ;) Henri ----- Original Message ----- From: "Niko Nevatie" To: Sent: Friday, November 22, 2002 7:15 AM Subject: Re: [ODE] Faster ODE > I benchmarked 'test_ldlt', here are the results. > > Configuration: > - AMD Athlon TB 800MHz, 384MB RAM, Windows XP > - ODE 0.03 built with Borland C++ Builder 6.0 (all optimizations on) > > Test: > - ODE was built including first the original 'fastldlt.c' and then > 'fastldlt_henri.c' > - test_ldlt was on executed using all available parameters (f, s, t) > > Results: > > with 'fastldlt.c': > ---- > 3449 > > error = 1.625478e-03, size = 71 > error = 2.011657e-04, size = 79 > error = 4.785806e-04, size = 83 > error = 5.344188e-02, size = 89 > error = 3.189385e-03, size = 97 > error = 2.305180e-03, size = 101 > 75 > > error = 4.673339e-04, size = 71 > error = 2.476573e-04, size = 73 > error = 1.307763e-03, size = 79 > error = 1.248479e-03, size = 83 > error = 1.030391e-02, size = 89 > error = 1.046956e-03, size = 97 > error = 7.226467e-04, size = 101 > 89 > ---- > > > with 'fastldlt_henri.c': > ---- > 2046 > > error = 1.625478e-03, size = 71 > error = 2.011657e-04, size = 79 > error = 4.785806e-04, size = 83 > error = 5.344188e-02, size = 89 > error = 3.189385e-03, size = 97 > error = 2.305180e-03, size = 101 > 75 > > error = 4.673339e-04, size = 71 > error = 2.476573e-04, size = 73 > error = 1.307763e-03, size = 79 > error = 1.248479e-03, size = 83 > error = 1.030391e-02, size = 89 > error = 1.046956e-03, size = 97 > error = 7.226467e-04, size = 101 > 89 > ---- > > > Conclusions: > - The outputs of the tests are identical. > - 'fastldlt_henri.c' consumed ~59% of the time taken by 'fastldlt.c', on the > described test configuration. > - As mentioned earlier, the results may vary depending on the CPU and cache > types. > > > Cheers > > ----- Original Message ----- > From: "Peter Amstutz" > To: "Daniel Duhprey" > Cc: > Sent: Thursday, November 21, 2002 11:59 PM > Subject: Re: [ODE] Faster ODE > > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > I haven't looked any of the code involved, but there is one possible > > explanation for it being faster on one CPU and slower on another :-) It > > sounds like a cache-size issue. If the Athlon has a bigger L1/L2 cache > > then the algorithm might be faster overall but if uses more instructions > > or space than the current algorithm it could be too big and incur a large > > cache-miss penalty on the Celeron (which if I recall correctly was given a > > really wimpy L1/L2 cache to keep costs down). Such are the joys of modern > > CPU architechtures... There's been some work on "cache-oblivious" > > algorithms, which is essentially a technique of designing the algorithm to > > work on small, localized and usually recursive subsets of the total > > problem (this is especially useful for divide-and-conquor algorithms) so > > that once you have a subproblem which fits in cache, solving that > > subproblem is efficient without having to know a priori the size of the > > processor cache. > > > > Just something to think about -- as I said, I haven't looked at the code > > involved so I could completely off base :-) > > > > On Thu, 21 Nov 2002, Daniel Duhprey wrote: > > > > > On Thu, 21 Nov 2002, Henri Hakl wrote: > > > > > > -->Please check the accuracy and speed using the testsuite provided with > ODE. > > > > > > If I'm using the numbers from the test_ldlt correctly (as a raw time on > > > some scale) then on my athlon its about 38% faster and on my celeron its > > > roughly twice as slow :). > > > > [ Peter Amstutz ][ amstutz@cs.umass.edu ][ etron@interreality.org ] > > [Lead Programmer][Interreality Project][Virtual Reality for the Internet] > > [ VOS: Next Generation Internet Communication][ http://interreality.org ] > > [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.0.7 (GNU/Linux) > > > > iD8DBQE93VdXaeHUyhjCHfcRAiRMAJ9DdwekLZIYJk0n/fAjtcd3aDG0vACfRze6 > > mcOSJYkj8/NzQXeW/qoia+k= > > =SJZQ > > -----END PGP SIGNATURE----- > > > > > > _______________________________________________ > > ODE mailing list > > ODE@q12.org > > http://q12.org/mailman/listinfo/ode > > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From martin at metahuman.org Fri Nov 22 09:47:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Fri Nov 22 09:47:01 2002 Subject: [ODE] eliminating all state References: <20021122120304.GA30898@nlin.net> Message-ID: <3DDE5F39.FFA325DC@metahuman.org> > The message from which you are being indirectly quoted is: > > http://q12.org/pipermail/ode/2002-April/001107.html Thanks Norman, I see where he says it's only positions and velocities. For those who are curious, I found the source of the problem: when I was printing out my doubles, I was only printing DBL_DIG many digits (= 15). It turns out, I need to print out 17 digits to be sure the values when read in are exactly the same as before. Thanks, Martin From jeffrey.palmer at acm.org Fri Nov 22 11:07:02 2002 From: jeffrey.palmer at acm.org (Jeffrey Palmer) Date: Fri Nov 22 11:07:02 2002 Subject: [ODE] Faster ODE In-Reply-To: <006b01c2922b$ec499710$45d4e892@temple> References: <000f01c291e6$2f741ec0$3abdf3d5@wli> <006b01c2922b$ec499710$45d4e892@temple> Message-ID: <200211221206.28464.jeffrey.palmer@acm.org> Hello all, I just thought I'd throw out a couple of references I've found useful while developing highly-efficient C++ code (I apologize if these have been brought up before): 1) Blitz++ (http://www.oonumerics.org/blitz) - A template-based C++ library for highly-efficient numerical development. Uses template-metaprogramming to produce code as fast or faster than FORTRAN, while maintaining an intuitive user model. 2) FFTW - The Fastest Fourier Transform in the West (http://www.fftw.org) - Although perhaps not directly applicable to ODE, their approach is a very interesting one if you're *really* concerned about cranking out performance on whatever platform you're running on. I only point these out because we're at a point where it's becoming increasingly difficult to implement a "correct" solution that is highly performant on all possible platforms. So, rather than search for the Holy Grail, these approaches can help to determine an approach that provides the best performance/platform tradeoff. Hope this helps/is interesting, - j -- The river is moving. The blackbird must be flying. From Sergei Eliseev Fri Nov 22 12:30:02 2002 From: Sergei Eliseev (Sergei Eliseev) Date: Fri Nov 22 12:30:02 2002 Subject: [ODE] Can't compile ODE :( Message-ID: <2620020157.20021122223434@cea.ru> Hello, Just downloaded latest ODE source via WinCVS and make.exe from this site, created file config/user-settings for msvc, but can't compile it. I always get the same error: make (e=2): The system cannot find the file specified. make.exe: *** [configurator.exe] Error 2 Moreover when I downloaded ready .lib, under VC++ 6.0 I always get another error during linking: ode.lib(misc.obj) : error LNK2001: unresolved external symbol __ftol2 How can avoid these nasty errors? Any help really appreciated. Best regards, Sergei mailto:sergey_eu@cea.ru From russ at q12.org Fri Nov 22 13:48:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 13:48:02 2002 Subject: [ODE] eliminating all state In-Reply-To: <3DDD81EB.9D7E5C55@metahuman.org> Message-ID: > Sorry, I must be confused. But wasn't there some issue with radically > changing the size of the time step? e.g. going from 0.01 sec to 1.0 sec > or vice versa? yes ... the issue is that the error correcting velocity would be artificially magnified when switching from a small to large time step (e.g. *10). this issue is on the fix-list. russ. -- Russ Smith http://www.q12.org/ From anselm at hook.org Fri Nov 22 14:41:01 2002 From: anselm at hook.org (Anselm Hook) Date: Fri Nov 22 14:41:01 2002 Subject: [ODE] stress testing and box stacking instability In-Reply-To: Message-ID: Hi Dave, I thought everybody knew about this defect by now? It's something that Russ has said he's going to fix for the next big release. If the bug hasn't changed then basically it is just that not enough contacts are being generated between two box surfaces - there needs to be at least 3 but there is only 1 right now. - a On Fri, 22 Nov 2002, David McClurg wrote: > I'm trying to use stacked boxes in my game and I ran into the box > stacking instability mentioned previously on this list. That got me > to reading the Gamasutra article "Product Review of Physics Engines, > Part One: The Stress Tests" and I thought it might be useful to put > together the stress test suite for ODE. > > It was easy to get tests 1-6 coded and the only one that did badly was > Test 2: "A slightly larger cube is dropped on a smaller cube. This > was a variation on the first test in that the difference between the > cubes' sizes was much smaller. This test was meant to be a "gimme" > and should just work." Expected result: cubes should drop straight on > top of each other and come to immediate rest. > > I attached a modified test_boxstack.cpp which shows what happens. The top box dances around for a long time and eventually falls off the top box. In Havok, i think they might be freezing/sleeping boxes in this situation. Does the solution lie in proper detection of this situation or in better contact generation? > <> > From russ at q12.org Fri Nov 22 15:05:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 15:05:02 2002 Subject: [ODE] Faster ODE In-Reply-To: <200211221206.28464.jeffrey.palmer@acm.org> Message-ID: > 1) Blitz++ (http://www.oonumerics.org/blitz) > 2) FFTW - The Fastest Fourier Transform in the West i have used blitz and have found their approach to be more clever than it is productive. the template meta-program idea results in exceptionally long compile times, and not all compilers have the right optimization strategies to take advantage of the generated code. gcc, for example, does not seem to do terribly well at optimizing away the numerous stack-based parameter-passing temporaries that such code generates. i considered blitz for ODE but gave up on it in favour of explicitly written for-loops and hand unrolling because (a) blitz is slower, (b) blitz increases the compile time hugely, (c) blitz syntax sometimes obscures the actual numerical operations that are being performed - and i like things to be obvious and out in the open. FFTW is new to me, thanks for the pointer. there's also ATLAS, http://math-atlas.sourceforge.net/ ODE's factorizer is generated using an ATLAS-like parameter-finding approach (look in the fbuild directory). that's why the fast-ldlt code looks really complicated when the same thing could be implemented using 3 for-loops in about 20 lines of code. ideally the build process for ODE should involve running the fbuild code to get the fastest factorizer on your platform. the 'default' fastldlt etc code is just what happens to work best on whatever platform i ran fbuild on. note that this default code should still be significantly faster than the 3 for-loops approach on all platforms (for matrices of greater than say 5x5 ?). russ. -- Russ Smith http://www.q12.org/ From kale at sagan.usc.edu Fri Nov 22 15:13:02 2002 From: kale at sagan.usc.edu (Kale Harbick) Date: Fri Nov 22 15:13:02 2002 Subject: [ODE] Vortex vs. ODE Message-ID: I started using MathEngine's dynamics toolkit in 2000, and continued with Vortex when they split up. It's time to renew our academic license but the price was increased a lot, so we're reluctant. I'm investigating alternatives and heard about ODE. I was hoping someone here could compare Vortex and ODE. My application is a simulation of a dynamically-stable hopping robot. Other people in my group are working on humanoid robot simulations. Accuracy is more important to me than speed, as it eases the migration of controllers from simulation to the physical robot. thanks very much Kale Harbick USC Robotics Lab From russ at q12.org Fri Nov 22 15:39:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 15:39:02 2002 Subject: [ODE] Vortex vs. ODE In-Reply-To: Message-ID: > Accuracy is more important to me than speed, as it eases the > migration of controllers from simulation to the physical robot. vortex and ODE both use 1st-order accurate implicit integrators. vortex may have a more accurate model of single-rigid-body tumbling, but this is probably not too relevant for robotics work. in my own experience, robot simulator accuracy is rather difficult to achieve because every piece must be accurate before the whole thing is ... not only the integrator but the friction models, the actuator models (hydraulics anyone? pneumatics?), the sensor models, etc. even getting accurate inertia tensors is tricky for lab robots that sometimes are sticky-taped together instead of being bolted. personally, i wouldn't worry about the numerical accuracy of my simulator unless i had all these other things sorted out. russ. -- Russ Smith http://www.q12.org/ From vbz at cs.ucr.edu Fri Nov 22 21:18:01 2002 From: vbz at cs.ucr.edu (Victor Zordan) Date: Fri Nov 22 21:18:01 2002 Subject: [ODE] joint torques Message-ID: <20021123031114.99CAF25A83@snap.cs.ucr.edu> Hello. Comment and a question... In regards to 11/21 USC comments, I too found vortex to be too expensive. Plus, I prefer having the code open and available for reading... (thanks Russ for that.) Also, I've played with Vortex and their contact models were not to my liking... I asked them if they would let me set up my own ground constraints and got a negative response, saying that was in a part of the program that was closed to the users. In a development environment, like mine or USC's, you want to be able to change as much as possible... Now, I have looked thru the archives and saw my question asked by Jon Klein back in June but I didn't find a reply to his question, so I figure I'll repeat the question. I too am trying to apply torques about joints and I built a controller that applied both torque at the body center and a computed force as an equivalent to applying a joint torque. The joint controller appears to move the body in the correct way, but I somehow don't think I am computing things properly b/c some unnatural forces appear at times and cause the body to spin out of control. The bottom-line question: is there a way in ODE to apply torques relative to a point on a body (the joint center), just as you would apply a force at a particular point? Or am I making this too difficult... Thanks much, Victor From russ at q12.org Fri Nov 22 21:25:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 21:25:02 2002 Subject: [ODE] joint torques In-Reply-To: <20021123031114.99CAF25A83@snap.cs.ucr.edu> References: <20021123031114.99CAF25A83@snap.cs.ucr.edu> Message-ID: <20021122202930.3a0a3adc.russ@q12.org> > is there a way in ODE to apply torques relative to a point on a body > (the joint center), just as you would apply a force at a particular > point? physics fact: any torque applied to a body will have the same effect on that body's motion regardless of the point at which it is applied, so there's no reason to specify a position in the dBodyAdd[Rel]Torque() functions. russ. -- Russell Smith http://www.q12.org From mama7121 at student.uu.se Sat Nov 23 05:43:02 2002 From: mama7121 at student.uu.se (Martin Magnusson) Date: Sat Nov 23 05:43:02 2002 Subject: [ODE] Robotics simulation Message-ID: <3DDF77B8.6080804@student.uu.se> Hello everybody. I'm new to this list and thought I'd say hi... Max Lungarella wrote: > my plan is to simulate a humanoid robot with a reduced number of degrees of > freedom, let's say 10. the simulation would have to be fairly accurate, since > i'd like to develop the control architecture in software and use this very > architecture for the control of a real robot in a second time step. That sounds very much like my project. I'm doing my master's thesis on reinforcement learning for balancing a humaoid robot, and I'm looking for a simulation environment to test my algorithms with. How has it turned out for you? Are you happy with ODE? Is Dymamechs any better? / Martin Magnusson From marinescuiulian at yahoo.com Sat Nov 23 06:56:02 2002 From: marinescuiulian at yahoo.com (Marinescu Iulian) Date: Sat Nov 23 06:56:02 2002 Subject: [ODE] Could I simulate a car with ODE ? Message-ID: <20021123135558.68015.qmail@web13007.mail.yahoo.com> --0-285632834-1038059758=:67118 Content-Type: text/plain; charset=us-ascii Hi to everyone! I am a complete beginner regarding ODE. But I would like to learn. I have to do this project of simulation of a car on different types of road, and different types of weather. I would have to input this: The dinamics of the car ( for wind simulation) Type of road ( with holes and stuff) The type tires Type of suspension The vibration of the engine And many other inputs that I didn't think of, yet. The question is if I could do a program, with ODE, to simulate this. Thank You !!! --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-285632834-1038059758=:67118 Content-Type: text/html; charset=us-ascii

Hi to everyone!

I am a complete beginner regarding ODE. But I would like to learn. I have to do this project of simulation of a car on different types of road, and different types of weather. I would have to input this:

  • The dinamics of the car ( for wind simulation)
  • Type of road ( with holes and stuff)
  • The type tires
  • Type of suspension
  • The vibration of the engine

And many other inputs that I didn't think of, yet. The question is if I could do a program, with ODE, to simulate this.

Thank You !!! 



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-285632834-1038059758=:67118-- From erwin at vo.com Sat Nov 23 06:59:01 2002 From: erwin at vo.com (Erwin de Vries) Date: Sat Nov 23 06:59:01 2002 Subject: [ODE] new ODE collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> Message-ID: <064201c292f8$55791ae0$73fefea9@athlon> > > - Should we add support for a user defined, or infinite AABB on demand > > for spaces? This is really useful for the quadtree space containing > > huge (10.000 for example) amounts of geoms. If i would remove a single > > geom it would need to do a lot of work. > > i don't understand this .. ? I'll explain my situation. In my app i have a lot of initially static scenery objects. I place these inside a quadtree space. Once upon a while the main player hits one (or more) of these objects. At this point i remove them from the quadtree, give them a body, and add them to my 'main space'. Now, as this quadtree essentially covers the whole game world i dont _need_ it to have a tight AABB since it is very large anyways. The point where i _require_ it NOT to have a tight AABB is when i change the structure of the quadtree (remove a geom). Imagine a 10.000 geom quadtree having to recompute its bounds. Even if it only involves recomputing the final aabb of 9999 cached and 1 new aabb, it still is a costly process that is essentially useless. Thats why i would like to add an option to spaces to simply return an infinite AABB instead of computing it. Hope this explains. I'm migrating to the new ODE collision detection today. Perhaps some other suggestions will come to my mind. Erwin From p.terdiman at wanadoo.fr Sat Nov 23 08:12:01 2002 From: p.terdiman at wanadoo.fr (Pierre Terdiman) Date: Sat Nov 23 08:12:01 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> Message-ID: <037501c29302$5bde2ce0$0e00000a@pierre> Hi, I was (finally) looking at Erwin's box-mesh collision today, when I noticed something weird : float DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - *ColTri.Vertices[0]); ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); Unless I'm missing something, the local variable DistSq is never used. On the other hand, ColTri.DistSq is used while probably not initialized. I guess the two lines should be : ColTri.DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - *ColTri.Vertices[0]); ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); ...unless, once again, I'm missing something. (I didn't trace it, I'm just browsing the CVS repository) There's also another version from Nolan Walker, based on Magic. Is this better / more recent ? (the question might already have been asked, but I can't remember the answer...) Pierre From facontidavide at hotmail.com Sat Nov 23 12:54:02 2002 From: facontidavide at hotmail.com (Edgard Oscuro) Date: Sat Nov 23 12:54:02 2002 Subject: [ODE] Robotics simulation Message-ID:

Hi!! I am Davide

>Max Lungarella wrote:

> > my plan is to simulate a humanoid robot with a reduced number of degrees of
> > freedom, let's say 10. the simulation would have to be fairly accurate, since
> > i'd like to develop the control architecture in software and use this very
> > architecture for the control of a real robot in a second time step.
>
>That sounds very much like my project. I'm doing my master's thesis on
>reinforcement learning for balancing a humaoid robot, and I'm looking
>for a simulation environment to test my algorithms with. How has it
>turned out for you? Are you happy with ODE? Is Dymamechs any better?
 
It seems that most of us is doing the same!!! As I said before I am going to simulate a humanoid robot as well (that soon we will build in real world). I will be grade to share (pretty soon) my results.
In this moment we are gonna use simulation to understand how strong motors must be (so that we can buy them!)
 
Davide


Comunica in un ’altra dimensione con MSN Extra Storage! Clicca qui From grubertm at hotmail.com Sat Nov 23 14:37:02 2002 From: grubertm at hotmail.com (Marco Grubert) Date: Sat Nov 23 14:37:02 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> <037501c29302$5bde2ce0$0e00000a@pierre> Message-ID: One thing about the Box-Tri collider I noticed is that it assumes the normal to be that of the triangle. This works fine for a box falling onto a triangle, but yields wrong results for a triangle falling onto a box. I am currently working on the tri-tri detection and pick the normal based on which object is moving and which one is static. This avoids some explosions but introduces other instabilities.. - Marco Grubert From coding at natew.com Sat Nov 23 21:26:02 2002 From: coding at natew.com (Nate W) Date: Sat Nov 23 21:26:02 2002 Subject: [ODE] is ball and socket joint anchor relative to body1? In-Reply-To: Message-ID: On Fri, 22 Nov 2002, David McClurg wrote: > void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z); > it's not clear to me what coordinate frame the anchor point is in... World coordinates. Or at least, I assumed world coordinates, and it works like I'd assumed it would, so I feel pretty good about that assumption. :-) -- Nate Waddoups Redmond WA USA http://www.natew.com From russ at q12.org Sun Nov 24 16:36:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 24 16:36:01 2002 Subject: [ODE] multiple box-box contacts Message-ID: <20021124154047.1ca8d686.russ@q12.org> i have just finished an update to the box-box contact generation code. now up to 8 contacts can be generated per box-box collision, although in practice a limit of 3 or 4 is more useful. the test_boxstack demo has been updated to show box stacking in action: press 'r' to drop boxes in a stack, then press b multiple times. press 't' to show the contact points that are generated. you can play with different numbers of contacts by changing the 3rd argument to dCollide() - the default is 4. note that you have to compile ODE *without* ODE_OLD_COLLISION in user-settings to get the new code. be careful in your own code to generate as few box-box contacts as you actually need, as each extra contact point will slow down the simulation some more. this new code contains a number of heuristics that should result in good contact choices - but these algorithms need some more real-world testing. please report any problems you come across. russ. -- Russell Smith http://www.q12.org From martin at metahuman.org Sun Nov 24 16:52:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Sun Nov 24 16:52:01 2002 Subject: [ODE] multiple box-box contacts References: <20021124154047.1ca8d686.russ@q12.org> Message-ID: <3DE165EB.9FC8D9A6@metahuman.org> Hey Russ, > i have just finished an update to the box-box contact generation code. Thanks, that rocks! Better box-box contacts is one of the major capabilities in the list for 0.035. It's been almost a year since 0.03 was released. Any idea when 0.035 will be out? Thanks again, Martin From dmcclurg at pandemicstudios.com.au Sun Nov 24 19:15:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Sun Nov 24 19:15:02 2002 Subject: [ODE] multiple box-box contacts Message-ID: very nice Russ! just a minor thing that my VC7 compiler doesn't like... collision_std.cpp collision_std.cpp(460) : error C2057: expected constant expression collision_std.cpp(460) : error C2466: cannot allocate an array of constant size 0 collision_std.cpp(460) : error C2133: 'avail' : unknown size if you could change int avail[n]; to int* avail = (int*)alloca(n*sizeof(int)); that would fix it. -----Original Message----- From: Russ Smith [mailto:russ@q12.org] Sent: Monday, 25 November 2002 6:41 AM To: ode@q12.org Subject: [ODE] multiple box-box contacts i have just finished an update to the box-box contact generation code. now up to 8 contacts can be generated per box-box collision, although in practice a limit of 3 or 4 is more useful. the test_boxstack demo has been updated to show box stacking in action: press 'r' to drop boxes in a stack, then press b multiple times. press 't' to show the contact points that are generated. you can play with different numbers of contacts by changing the 3rd argument to dCollide() - the default is 4. note that you have to compile ODE *without* ODE_OLD_COLLISION in user-settings to get the new code. be careful in your own code to generate as few box-box contacts as you actually need, as each extra contact point will slow down the simulation some more. this new code contains a number of heuristics that should result in good contact choices - but these algorithms need some more real-world testing. please report any problems you come across. russ. -- Russell Smith http://www.q12.org _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From russ at q12.org Sun Nov 24 19:58:02 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 24 19:58:02 2002 Subject: [ODE] multiple box-box contacts In-Reply-To: References: Message-ID: <20021124190259.4ef95df8.russ@q12.org> > if you could change > int avail[n]; ah yes ... this is now fixed. russ. -- Russell Smith http://www.q12.org From mal at candomultimedia.com Sun Nov 24 20:11:02 2002 From: mal at candomultimedia.com (Mal) Date: Sun Nov 24 20:11:02 2002 Subject: [ODE] OT: Physics based game beta... In-Reply-To: <20021124190259.4ef95df8.russ@q12.org> Message-ID: <000001c29430$209ac470$7600a8c0@MalLaptop> If any of you need a break from coding physics, check this out... http://www.candomultimedia.com/3dStressBall It's the beta of a new game we're developing in our spare time here at canDo, but it's quite fun already. It uses Shockwave 3D and Havok, but the basics could be implemented using any physics engine. You can post your levels to the new forum. The game will be modified a lot over the next 10 weeks or so. Enjoy, and if you like it, check this out too, it's an updated version of the Balls Up game that also uses Havok ( now 3D Balls Up, has a new novel mouse control, as well as joystick control, music, easier learning levels, feature removals ( bug fixes ) etc. http://www.candomultimedia.com/3dBallsUp As physics gurus it might be fun to get away from the compiler and get your hand to eye co-ordination back up to scratch! :) Mal From Nguyen Binh Sun Nov 24 23:08:02 2002 From: Nguyen Binh (Nguyen Binh) Date: Sun Nov 24 23:08:02 2002 Subject: Re[2]: [ODE] Faster ODE In-Reply-To: References: Message-ID: <130756758.20021125101120@glassegg.com> I think the best way to improve ODE speed is using CPU- specialized instructions like MMX,SIMD,SSE(2). The refs can be : http://LibSimd.sourceforge.net SML library of Intel. (Very nice!) -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media Me Linh Point Tower, 10th Floor 2 Ngo Duc Ke District 1, Ho Chi Minh City Vietnam Fax: (84.8)823-8392 www.glassegg.com --------------------------------------------------------------------- From Dominique at SavageSoftware.com.au Mon Nov 25 02:43:02 2002 From: Dominique at SavageSoftware.com.au (Dominique Louis) Date: Mon Nov 25 02:43:02 2002 Subject: [ODE] Silkworm... Message-ID: <3DE1F12E.6090306@SavageSoftware.com.au> Just thought others might be interested to know that todays ( 24th of November ) image of the day on FlipCode ( http://www.flipcode.com/iotd/ ) is an ODE demo called SilkWorm ( http://slickworm.sourceforge.net ). From tetron at interreality.org Mon Nov 25 11:25:02 2002 From: tetron at interreality.org (Peter Amstutz) Date: Mon Nov 25 11:25:02 2002 Subject: [ODE] multiple box-box contacts In-Reply-To: <20021124154047.1ca8d686.russ@q12.org> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Awesome! This is what I've been waiting for -- now I can use ODE for my VR simulation. Oh, and it's really fun to just play with the box stacking demo, to make a huge tower and then knock it down... Great work! Russ, you rule :-) It's amazing to have such excelent code freely available. On Sun, 24 Nov 2002, Russ Smith wrote: > > i have just finished an update to the box-box contact generation code. > now up to 8 contacts can be generated per box-box collision, although in > practice a limit of 3 or 4 is more useful. the test_boxstack demo has > been updated to show box stacking in action: press 'r' to drop boxes in > a stack, then press b multiple times. press 't' to show the contact > points that are generated. you can play with different numbers of > contacts by changing the 3rd argument to dCollide() - the default is 4. > > note that you have to compile ODE *without* ODE_OLD_COLLISION in > user-settings to get the new code. > > be careful in your own code to generate as few box-box contacts as you > actually need, as each extra contact point will slow down the simulation > some more. > > this new code contains a number of heuristics that should result in good > contact choices - but these algorithms need some more real-world > testing. please report any problems you come across. [ Peter Amstutz ][ amstutz@cs.umass.edu ][ tetron@interreality.org ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE94mrHaeHUyhjCHfcRApGmAJ0Rd0ssY0jsemvGVVaSDbqEW9YQbQCfTiWm 9pWajiZt1CU/KJjnff+AHk0= =Blf/ -----END PGP SIGNATURE----- From henri at cs.sun.ac.za Mon Nov 25 13:46:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Mon Nov 25 13:46:01 2002 Subject: Re[2]: [ODE] Faster ODE Message-ID: <032001c294c3$afa33ec0$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_031D_01C294D4.732027E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions for = ODE - and it is quite possible that it can bring about harmony and speed. But = one thing that is likely going to cause problems is the SSE(2) code. For optimal performance a number of details need to be implemented. = Vectors and matrices need to be of a horizontal size that is a factor of 4 (this = is implemented and the reason why, for example, a 3x3 matrix is defined as = a 12 TReal (3x4) structure. However, the structures also have to be aligned onto 16-byte boundaries. = To allow for optimal SSE(2) access (using movaps) each 128-bit memory = vector that is accessed has to be alligned on a 16-byte memory boundary. This = is a problem in ODE, as every math structure now is required to be 16-byte aligned; this is difficult to achieve because ODE calls/uses = sub-matrices of matrices, and it may be difficult to guarantee that every sub-matrix is >also< correctly 16-byte aligned. Additionally SSE2 primarily adds double-float functionality to the SIMD instructions. This can help somewhat for speed in the TReal =3D double = case, but isn't likely (just my guess) to have as tremendous a speed bonus as = 4 single floats that can be handled simultaneously for TReal =3D single. Anyway... ;) Henri ----- Original Message ----- From: "Nguyen Binh" To: ; "Russ Smith" Cc: "Jeffrey Palmer" ; Sent: Monday, November 25, 2002 5:11 AM Subject: Re[2]: [ODE] Faster ODE > > I think the best way to improve ODE speed is using CPU- > specialized instructions like MMX,SIMD,SSE(2). > > The refs can be : > http://LibSimd.sourceforge.net > SML library of Intel. (Very nice!) > > -- > Best regards, > > --------------------------------------------------------------------- > Nguyen Binh > Software Engineer > Glass Egg Digital Media > Me Linh Point Tower, 10th Floor > 2 Ngo Duc Ke > District 1, Ho Chi Minh City > Vietnam > Fax: (84.8)823-8392 > www.glassegg.com > --------------------------------------------------------------------- > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode ------=_NextPart_000_031D_01C294D4.732027E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions = for ODE=20 -
and it is quite possible that it can bring about harmony and speed. = But=20 one
thing that is likely going to cause problems is the SSE(2)=20 code.

For optimal performance a number of details need to be = implemented.=20 Vectors
and matrices need to be of a horizontal size that is a factor = of 4=20 (this is
implemented and the reason why, for example, a 3x3 matrix is = defined=20 as a 12
TReal (3x4) structure.

However, the structures also = have to be=20 aligned onto 16-byte boundaries. To
allow for optimal SSE(2) access = (using=20 movaps) each 128-bit memory vector
that is accessed has to be = alligned on a=20 16-byte memory boundary. This is a
problem in ODE, as every math = structure=20 now is required to be 16-byte
aligned; this is difficult to achieve = because=20 ODE calls/uses sub-matrices of
matrices, and it may be difficult to = guarantee=20 that every sub-matrix is
>also< correctly 16-byte=20 aligned.

Additionally SSE2 primarily adds double-float = functionality to=20 the SIMD
instructions. This can help somewhat for speed in the TReal = =3D double=20 case,
but isn't likely (just my guess) to have as tremendous a speed = bonus as=20 4
single floats that can be handled simultaneously for TReal =3D=20 single.

Anyway... ;)
  Henri


----- Original = Message=20 -----
From: "Nguyen Binh" <ngbinh@glassegg.com>
To: = <ode-admin@q12.org>; "Russ = Smith" <russ@q12.org>
Cc: "Jeffrey = Palmer" <jeffrey.palmer@acm.org>; = <ode@q12.org>
Sent: Monday, = November 25, 2002=20 5:11 AM
Subject: Re[2]: [ODE] Faster=20 ODE


>
>       &nbs= p; I=20 think the best way to improve ODE speed is using=20 CPU-
>         specialized = instructions like=20 MMX,SIMD,SSE(2).
>
>       = ; =20 The refs can be=20 :
>          &nbs= p; =20 http://LibSimd.sourceforge.net
>          &nbs= p; =20 SML library of Intel. (Very nice!)
>
> --
> Best=20 regards,
>
>=20 ---------------------------------------------------------------------
= >   =20 Nguyen Binh
>    Software=20 Engineer
>    Glass Egg Digital=20 Media
>    Me Linh Point Tower, 10th=20 Floor
>    2 Ngo Duc Ke
>    = District=20 1, Ho Chi Minh City
>    = Vietnam
>   =20 Fax:  (84.8)823-8392
>      www.glassegg.com
>=20 ---------------------------------------------------------------------
= >
>
>=20 _______________________________________________
> ODE mailing = list
>=20 ODE@q12.org
> http://q12.org/mailman/listi= nfo/ode
------=_NextPart_000_031D_01C294D4.732027E0-- From swmatthe at nps.navy.mil Mon Nov 25 14:37:02 2002 From: swmatthe at nps.navy.mil (Matthews, Steve) Date: Mon Nov 25 14:37:02 2002 Subject: [ODE] Help with setting and getting rotation Message-ID: <47D23CE95FD22E47B0C927B7F99DAD0C167A95@grasp.ad.nps.navy.mil> Could somebody please look at the following code? I am trying to set the position and rotation of a body from a 4*4 matrix of floats, and I also want to then be able to query that position and rotation. I seem to be able to set the position and retrieve it correctly, but the rotation comes back as garbage when I try to retrieve it and I don't know why. The code will compile as a standalone main with ode as the only dependency. The input matrix (inputMat) is just dummy numbers; if I'm imposing something or assuming something I shouldn't, please tell me. Thanks much, Steve ********************************************** #include "ode/ode.h" void setPhysicsPosition(dBodyID bodyID, float setMat[4][4]) { dBodySetPosition(bodyID, (dReal)setMat[3][0], (dReal)setMat[3][1], (dReal)setMat[3][2]); dMatrix3 R; R[0] = (dReal)setMat[0][0]; R[1] = (dReal)setMat[0][1]; R[2] = (dReal)setMat[0][2]; R[3] = 0.0; R[4] = (dReal)setMat[1][0]; R[5] = (dReal)setMat[1][1]; R[6] = (dReal)setMat[1][2]; R[7] = 0.0; R[8] = (dReal)setMat[2][0]; R[9] = (dReal)setMat[2][1]; R[10] = (dReal)setMat[2][2]; R[11] = 0.0; dBodySetRotation(bodyID, R); } void getPhysicsPosition(dBodyID bodyID, float getMat[4][4]) { const dReal *getPos; getPos = dBodyGetPosition(bodyID); const dReal *getRot; getRot = dBodyGetRotation(bodyID); getMat[0][0] = (float)getRot[0]; getMat[0][1] = (float)getRot[1]; getMat[0][2] = (float)getRot[2]; getMat[0][3] = (float)getRot[3]; getMat[1][0] = (float)getRot[4]; getMat[1][1] = (float)getRot[5]; getMat[1][2] = (float)getRot[6]; getMat[1][3] = (float)getRot[7]; getMat[2][0] = (float)getRot[8]; getMat[2][1] = (float)getRot[9]; getMat[2][2] = (float)getRot[10]; getMat[2][3] = (float)getRot[11]; getMat[3][0] = (float)getPos[0]; getMat[3][1] = (float)getPos[1]; getMat[3][2] = (float)getPos[2]; getMat[3][3] = 1.0f; } int main() { dWorldID worldID = dWorldCreate(); dBodyID bodyID = dBodyCreate(worldID); //create the input matrix float inputMat[4][4] = {{1.0f, 0.1f, 0.2f, 0.0f}, {0.3f, 1.0f, 0.4f, 0.0f}, {0.5f, 0.6f, 1.0f, 0.0f}, {1.0f, 2.0f, 3.0f, 1.0f}}; //set the position of the physics body setPhysicsPosition(bodyID, inputMat); //print the input to console printf("input matrix:\n\n"); printf("%f %f %f %f\n", inputMat[0][0], inputMat[0][1], inputMat[0][2], inputMat[0][3]); printf("%f %f %f %f\n", inputMat[1][0], inputMat[1][1], inputMat[1][2], inputMat[1][3]); printf("%f %f %f %f\n", inputMat[2][0], inputMat[2][1], inputMat[2][2], inputMat[2][3]); printf("%f %f %f %f\n\n", inputMat[3][0], inputMat[3][1], inputMat[3][2], inputMat[3][3]); //initialize the output matrix float outMat[4][4] = {0.f}; //return the position back to 4*4 matrix format in newPos getPhysicsPosition(bodyID, outMat); //print the output to console printf("output matrix:\n\n"); printf("%f %f %f %f\n", outMat[0][0], outMat[0][1], outMat[0][2], outMat[0][3]); printf("%f %f %f %f\n", outMat[1][0], outMat[1][1], outMat[1][2], outMat[1][3]); printf("%f %f %f %f\n", outMat[2][0], outMat[2][1], outMat[2][2], outMat[2][3]); printf("%f %f %f %f\n\n", outMat[3][0], outMat[3][1], outMat[3][2], outMat[3][3]); return 0; } From erwin at vo.com Mon Nov 25 14:52:01 2002 From: erwin at vo.com (Erwin de Vries) Date: Mon Nov 25 14:52:01 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> <037501c29302$5bde2ce0$0e00000a@pierre> Message-ID: <000201c294cc$c0908090$73fefea9@athlon> > Hi, > > I was (finally) looking at Erwin's box-mesh collision today, when I noticed > something weird : > > float DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - > *ColTri.Vertices[0]); > ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); > > Unless I'm missing something, the local variable DistSq is never used. On > the other hand, ColTri.DistSq is used while probably not initialized. I > guess the two lines should be : > > ColTri.DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - > *ColTri.Vertices[0]); > ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); > > ...unless, once again, I'm missing something. (I didn't trace it, I'm just > browsing the CVS repository) .... You're probably right. I cant quite see how this code is supposed to do anything useful. But its been so long since i've written this code, that i have doubts about the reason of existence of other stuff as well. :-) > There's also another version from Nolan Walker, based on Magic. Is this > better / more recent ? (the question might already have been asked, but I > can't remember the answer...) Yes it is better in some ways, but because of some bugs the end result is something not too great. I STILL need to fix this. I'm using the code in my projects and we're nearing the completion of it, so i would need to do it sometime soon. In case you want it. It is in the mail archives somewhere. Erwin From swmatthe at nps.navy.mil Mon Nov 25 15:09:01 2002 From: swmatthe at nps.navy.mil (Matthews, Steve) Date: Mon Nov 25 15:09:01 2002 Subject: [ODE] Help with setting and getting rotation Message-ID: <47D23CE95FD22E47B0C927B7F99DAD0C0DD9C0@grasp.ad.nps.navy.mil> Okay, next time I'll throw real data in. Apparently this does work; my dummy data was too dummy. sorry all. -----Original Message----- From: Matthews, Steve Sent: Monday, November 25, 2002 1:37 PM To: ode@q12.org Subject: [ODE] Help with setting and getting rotation Could somebody please look at the following code? I am trying to set the position and rotation of a body from a 4*4 matrix of floats, and I also want to then be able to query that position and rotation. I seem to be able to set the position and retrieve it correctly, but the rotation comes back as garbage when I try to retrieve it and I don't know why. The code will compile as a standalone main with ode as the only dependency. The input matrix (inputMat) is just dummy numbers; if I'm imposing something or assuming something I shouldn't, please tell me. Thanks much, Steve ********************************************** #include "ode/ode.h" void setPhysicsPosition(dBodyID bodyID, float setMat[4][4]) { dBodySetPosition(bodyID, (dReal)setMat[3][0], (dReal)setMat[3][1], (dReal)setMat[3][2]); dMatrix3 R; R[0] = (dReal)setMat[0][0]; R[1] = (dReal)setMat[0][1]; R[2] = (dReal)setMat[0][2]; R[3] = 0.0; R[4] = (dReal)setMat[1][0]; R[5] = (dReal)setMat[1][1]; R[6] = (dReal)setMat[1][2]; R[7] = 0.0; R[8] = (dReal)setMat[2][0]; R[9] = (dReal)setMat[2][1]; R[10] = (dReal)setMat[2][2]; R[11] = 0.0; dBodySetRotation(bodyID, R); } void getPhysicsPosition(dBodyID bodyID, float getMat[4][4]) { const dReal *getPos; getPos = dBodyGetPosition(bodyID); const dReal *getRot; getRot = dBodyGetRotation(bodyID); getMat[0][0] = (float)getRot[0]; getMat[0][1] = (float)getRot[1]; getMat[0][2] = (float)getRot[2]; getMat[0][3] = (float)getRot[3]; getMat[1][0] = (float)getRot[4]; getMat[1][1] = (float)getRot[5]; getMat[1][2] = (float)getRot[6]; getMat[1][3] = (float)getRot[7]; getMat[2][0] = (float)getRot[8]; getMat[2][1] = (float)getRot[9]; getMat[2][2] = (float)getRot[10]; getMat[2][3] = (float)getRot[11]; getMat[3][0] = (float)getPos[0]; getMat[3][1] = (float)getPos[1]; getMat[3][2] = (float)getPos[2]; getMat[3][3] = 1.0f; } int main() { dWorldID worldID = dWorldCreate(); dBodyID bodyID = dBodyCreate(worldID); //create the input matrix float inputMat[4][4] = {{1.0f, 0.1f, 0.2f, 0.0f}, {0.3f, 1.0f, 0.4f, 0.0f}, {0.5f, 0.6f, 1.0f, 0.0f}, {1.0f, 2.0f, 3.0f, 1.0f}}; //set the position of the physics body setPhysicsPosition(bodyID, inputMat); //print the input to console printf("input matrix:\n\n"); printf("%f %f %f %f\n", inputMat[0][0], inputMat[0][1], inputMat[0][2], inputMat[0][3]); printf("%f %f %f %f\n", inputMat[1][0], inputMat[1][1], inputMat[1][2], inputMat[1][3]); printf("%f %f %f %f\n", inputMat[2][0], inputMat[2][1], inputMat[2][2], inputMat[2][3]); printf("%f %f %f %f\n\n", inputMat[3][0], inputMat[3][1], inputMat[3][2], inputMat[3][3]); //initialize the output matrix float outMat[4][4] = {0.f}; //return the position back to 4*4 matrix format in newPos getPhysicsPosition(bodyID, outMat); //print the output to console printf("output matrix:\n\n"); printf("%f %f %f %f\n", outMat[0][0], outMat[0][1], outMat[0][2], outMat[0][3]); printf("%f %f %f %f\n", outMat[1][0], outMat[1][1], outMat[1][2], outMat[1][3]); printf("%f %f %f %f\n", outMat[2][0], outMat[2][1], outMat[2][2], outMat[2][3]); printf("%f %f %f %f\n\n", outMat[3][0], outMat[3][1], outMat[3][2], outMat[3][3]); return 0; } _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From franjesus at medtelecom.net Mon Nov 25 15:40:02 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-1?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Mon Nov 25 15:40:02 2002 Subject: [ODE] multiple box-box contacts In-Reply-To: References: Message-ID: <200211252337.39769.franjesus@medtelecom.net> El Lun 25 Nov 2002 19:24, Peter Amstutz escribió: > Oh, and it's really fun to just play with the box stacking > demo, to make a huge tower and then knock it down... Try it with spheres ;-) -- Linux: Esa panda de colgaos y piratas que te reprograman la lavadora desde rusia si usas un Windows pirata. .: Bulmailing :. From Nguyen Binh Mon Nov 25 18:49:03 2002 From: Nguyen Binh (Nguyen Binh) Date: Mon Nov 25 18:49:03 2002 Subject: Re[4]: [ODE] Faster ODE In-Reply-To: <032001c294c3$afa33ec0$45d4e892@temple> References: <032001c294c3$afa33ec0$45d4e892@temple> Message-ID: <751181058.20021126085017@glassegg.com> Hi , HH> I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions for ODE - HH> and it is quite possible that it can bring about harmony and speed. But one HH> thing that is likely going to cause problems is the SSE(2) code. HH> For optimal performance a number of details need to be implemented. Vectors HH> and matrices need to be of a horizontal size that is a factor of 4 (this is HH> implemented and the reason why, for example, a 3x3 matrix is defined as a 12 HH> TReal (3x4) structure. Take a look at Small Matrix Lib (SML) of Intel, you'll see that we have at least a way to solve this. HH> However, the structures also have to be aligned onto 16-byte boundaries. To HH> allow for optimal SSE(2) access (using movaps) each 128-bit memory vector HH> that is accessed has to be alligned on a 16-byte memory boundary. This is a HH> problem in ODE, as every math structure now is required to be 16-byte HH> aligned; this is difficult to achieve because ODE calls/uses sub-matrices of HH> matrices, and it may be difficult to guarantee that every sub-matrix is >>also< correctly 16-byte aligned. Also, SML solved these. But we may consider move all matrix, vector,... of ODE to the matrix, vector ,... of SML. I assure it'll not be hard cause right now vectors,matrixs of ODE are barely a typdef TReal* . Moreover, in SML we have a type of dimension-variable matrix that has built-in LU decomposition function. HH> Additionally SSE2 primarily adds double-float functionality to the SIMD HH> instructions. This can help somewhat for speed in the TReal = double case, HH> but isn't likely (just my guess) to have as tremendous a speed bonus as 4 HH> single floats that can be handled simultaneously for TReal = single. OK, just your guess. I'm SIMDing ODE, I'll put my benchmark when it finishes. -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media Me Linh Point Tower, 10th Floor 2 Ngo Duc Ke District 1, Ho Chi Minh City Vietnam Fax: (84.8)823-8392 www.glassegg.com --------------------------------------------------------------------- From nnevatie at welho.com Tue Nov 26 00:58:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Tue Nov 26 00:58:02 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> <037501c29302$5bde2ce0$0e00000a@pierre> <000201c294cc$c0908090$73fefea9@athlon> Message-ID: <001801c29521$72670a10$3abdf3d5@wli> Erwin, can you help me figure out what is wrong here. I tried the newstuff.gz (Base64 encoded new tricollider code) which you had posted to the list a while ago. I got it compiled OK. The problem is: when I tried the box stacking test, the program would always crash after the first collision. It seemed that the dRay.cpp was the cause of the crash. The function dGeomRaySet uses dMatrix3 to represent a rotatation. The function fills up the structure and tries to access element at [3 * 4 + 2], which causes an access violation (because dMatrix3 only has 12 elements?). Otherwise I'm using the code in ODE 0.03 release (I've tried CVS head too) + Opcode 1.2. I would greatly appreciate if you could enlighten me on this. ----- Original Message ----- From: "Erwin de Vries" To: Sent: Monday, November 25, 2002 1:29 AM Subject: Re: [ODE] Box-mesh collision > Yes it is better in some ways, but because of some bugs the end result is > something not too great. I STILL need to fix this. I'm using the code in my > projects and we're nearing the completion of it, so i would need to do it > sometime soon. > > In case you want it. It is in the mail archives somewhere. > > Erwin From tetron at interreality.org Tue Nov 26 01:34:10 2002 From: tetron at interreality.org (Peter Amstutz) Date: Tue Nov 26 01:34:10 2002 Subject: [ODE] box-box performance Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've tried out the new box-box collision code with the "phystut" program in Crystal Space. I first had to fix a problem with the crystal space use of ODE (it didn't use the dContactSoftCFM flag when generating contact joints, which caused terrible instability problems) but now that it works and is stable, I can't have more than ten or so boxes before the simulation bogs down to unusability. The environment consists of six static collision boxes which are walls of a room. The user can move a viewpoint around and toss a box or sphere, which hits the ground, tumbles (or rolls) a bit and comes to rest. As I said, once there are about 10 boxes in the room, the framerate drops precipitously and the simultion totally bogs down, even if all of the boxes have come to rest and arn't moving at all. My suspicion is that there are a lot of contact points being generated and evaluated every step despite the fact that nothing is moving (and in this case, the boxes are colliding with static geometry, which is never going to move). My question is whether this is something that can be fixed in ODE, or whether this is something that should be handled at a higher level? The specific case here is geometry which is occasionally dynamic. This means that most of the time it is sitting around with no forces acting upon it except gravity. The user should be able to interact with it, but most of the time it shouldn't be moving. If two bodies have collided recently (in the previous time step) then it should be possible to avoid re-calculating the collision and collision joints if neither body has moved more than an infintesimal amount since the previous step. How well would this work? [ Peter Amstutz ][ amstutz@cs.umass.edu ][ tetron@interreality.org ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE94zHNaeHUyhjCHfcRAsBzAJ9eESdKUJPIMcQsmGRoilesznHIrwCeIduH O3kRglgKyqjJByCajI8yOvc= =i2G+ -----END PGP SIGNATURE----- From Daniel.Groll at t-online.de Tue Nov 26 03:30:02 2002 From: Daniel.Groll at t-online.de (Daniel.Groll@t-online.de) Date: Tue Nov 26 03:30:02 2002 Subject: [ODE] box-box performance In-Reply-To: References: Message-ID: <1038306297.3de34bf91ea73@webmail.t-online.de> I have implemented this sort of thing on top of ODE. My bodies come to rest if their velocities went under a certain length. But be careful, there are situation where for example a box can stay on an edge. To avoid this you have to take time in concideration. I also have implemented this and it work great. My simulation has got a significant speed up. Nearly all my objects are "quiet" objects in most situations. This boosts the performance enormously! Daniel Groll From henri at cs.sun.ac.za Tue Nov 26 06:43:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Tue Nov 26 06:43:01 2002 Subject: Re[4]: [ODE] Faster ODE References: <032001c294c3$afa33ec0$45d4e892@temple> <751181058.20021126085017@glassegg.com> Message-ID: <03ad01c29552$032098c0$45d4e892@temple> Sounds good. I know Intel's SML - I used it (among other things) to write a small specialized matrix library of my own (only works on 3x1, 4x1 vectors and 3x3, 4x4 matrices. No LU decomposition or other "higher" functionality; but it has damn fast "basic" functionality (normalize, transpose, multiply, arithmetic, etc). If anybody is interested go look at: http://www.cs.sun.ac.za/~henri/aistuff.html You should know that the SML still has some room for improvement; for example their 4x4 matrix multiply can still gain another 10% speed with some clever use of SSE2 instructions. Nonetheless it is in some cases futile to implement SIMD algorithms, as FPU versions are as fast or faster - and less hassle to create. Unforetunately you have to do both before you can figure out which one is more suited... I've written a seperate LDLT decomposition using the "classic" approach (not the one used in ODE) and FPU optimization which is quite fast. And I wrote a seperate assembler FPU version of the replacement unit I provided, but it is only about 1% faster. (So I think the readability is more important in this case.) Oh yea... and don't forget that you should have seperate FPU, MMX, 3DNow, 3DNow!, SSE and SSE2 versions to keep everybody happy and working at the most efficient. (Oh... and don't use an SSE version for the Athlon processors - although they support SSE it is nowhere near as fast as the Intel equivalents.) Still :)) - I'll be happy to look at the code you develop for ODE and see if I can fit some additional speed in there. ;) Henri ----- Original Message ----- From: "Nguyen Binh" To: ; "Henri Hakl" Cc: Sent: Tuesday, November 26, 2002 3:50 AM Subject: Re[4]: [ODE] Faster ODE > Hi , > > HH> I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions for ODE - > HH> and it is quite possible that it can bring about harmony and speed. But one > HH> thing that is likely going to cause problems is the SSE(2) code. > > > HH> For optimal performance a number of details need to be implemented. Vectors > HH> and matrices need to be of a horizontal size that is a factor of 4 (this is > HH> implemented and the reason why, for example, a 3x3 matrix is defined as a 12 > HH> TReal (3x4) structure. > > Take a look at Small Matrix Lib (SML) of Intel, you'll see that we have > at least a way to solve this. > > HH> However, the structures also have to be aligned onto 16-byte boundaries. To > HH> allow for optimal SSE(2) access (using movaps) each 128-bit memory vector > HH> that is accessed has to be alligned on a 16-byte memory boundary. This is a > HH> problem in ODE, as every math structure now is required to be 16-byte > HH> aligned; this is difficult to achieve because ODE calls/uses sub-matrices of > HH> matrices, and it may be difficult to guarantee that every sub-matrix is > >>also< correctly 16-byte aligned. > > Also, SML solved these. > But we may consider move all matrix, vector,... of ODE to the > matrix, vector ,... of SML. I assure it'll not be hard cause right > now vectors,matrixs of ODE are barely a typdef TReal* . > Moreover, in SML we have a type of dimension-variable matrix that > has built-in LU decomposition function. > > HH> Additionally SSE2 primarily adds double-float functionality to the SIMD > HH> instructions. This can help somewhat for speed in the TReal = double case, > HH> but isn't likely (just my guess) to have as tremendous a speed bonus as 4 > HH> single floats that can be handled simultaneously for TReal = single. > > OK, just your guess. I'm SIMDing ODE, I'll put my benchmark when > it finishes. > > -- > Best regards, > > --------------------------------------------------------------------- > Nguyen Binh > Software Engineer > Glass Egg Digital Media > Me Linh Point Tower, 10th Floor > 2 Ngo Duc Ke > District 1, Ho Chi Minh City > Vietnam > Fax: (84.8)823-8392 > www.glassegg.com > --------------------------------------------------------------------- > > From pml_mrawls at yahoo.com Tue Nov 26 09:32:02 2002 From: pml_mrawls at yahoo.com (Mark Rawls) Date: Tue Nov 26 09:32:02 2002 Subject: [ODE] Latest CVS compiling with MSVC7 Message-ID: <20021126163136.28195.qmail@web40504.mail.yahoo.com> --0-1042572177-1038328296=:27505 Content-Type: text/plain; charset=us-ascii Hi. I am attempting to install the latest CVS version of CS. I have windows XP, and am using MSVC7 (the contrib/msvc7 solution however doesn't appear to be up to date; in any case, it isn't working for me). I downloaded the GNU make binary offered at q12.org, but I get problems when I do make ode-lib. In appears it may be a problem with the source code (or how my compiler treats the code more likely?). Here's what happens: make ode-lib cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= /c /GR- /GX- /W3 /GF /Oy /Iinclude /DdNODEBUG /O2 /Foode/src/step.obj ode/src/step.cpp cl : Command line warning D4029 : optimization is not available in the standard edition compiler step.cpp ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(731) : error C2664: 'dSetValue' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called make: *** [ode/src/step.obj] Error 2 Any help would be appreciated. Thanks, Mark Rawls --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-1042572177-1038328296=:27505 Content-Type: text/html; charset=us-ascii

Hi.

I am attempting to install the latest CVS version of CS.  I have windows XP, and am using MSVC7 (the contrib/msvc7 solution however doesn't appear to be up to date; in any case, it isn't working for me).  I downloaded the GNU make binary offered at q12.org, but I get problems when I do make ode-lib.  In appears it may be a problem with the source code (or how my compiler treats the code more likely?).  Here's what happens:

<prompt at ODE dir>make ode-lib <enter>
cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= /c /GR- /GX- /W3
 /GF /Oy /Iinclude  /DdNODEBUG /O2 /Foode/src/step.obj ode/src/step.cpp
cl : Command line warning D4029 : optimization is not available in the standard
edition compiler
step.cpp
ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi
s operator or a conversion to a type acceptable to the predefined operator
ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr
om 'dInfBytes' to 'dReal'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called
ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi
s operator or a conversion to a type acceptable to the predefined operator
ode\src\step.cpp(731) : error C2664: 'dSetValue' : cannot convert parameter 3 fr
om 'dInfBytes' to 'dReal'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called
make: *** [ode/src/step.obj] Error 2

Any help would be appreciated.  Thanks,

Mark Rawls



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-1042572177-1038328296=:27505-- From slipch Tue Nov 26 09:48:02 2002 From: slipch (slipch) Date: Tue Nov 26 09:48:02 2002 Subject: [ODE] using dCreateGeomClass in the last ode version Message-ID: <15831806395.20021126185038@gsc-game.kiev.ua> Hello ODE, Is it a bug? The problem accrues with setting pointer to a function for self collision because when calling dCreateGeomClass the integer class number is not set yet. So, collider function calling by dCreateGeomClass can not return right function pointer. -- Best regards, slipch mailto:slipch@gsc-game.kiev.ua From russ at q12.org Tue Nov 26 11:57:02 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 26 11:57:02 2002 Subject: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <15831806395.20021126185038@gsc-game.kiev.ua> Message-ID: > The problem accrues with setting pointer to a function for self > collision because when calling dCreateGeomClass the integer class > number is not set yet. So, collider function calling by dCreateGeomClass > can not return right function pointer. i don't know what problem you are talking about - can you describe it more precisely? but the new collision system uses constant class numbers, not variable class numbers, so this should not be a problem (except perhaps for user defined classes set up through the C API??). russ. -- Russ Smith http://www.q12.org/ From thomasharte at lycos.co.uk Tue Nov 26 12:40:02 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Tue Nov 26 12:40:02 2002 Subject: [ODE] My Latest Approach to Polyhedron Collision Management Message-ID: <1038339519025448@lycos-europe.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --=_NextPart_Lycos_0254481038339519_ID Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm continuing to make progress in my pursuit of the perfect arbitrary polyhedron on arbitrary polyhedron collision management. I am looking for comments or suggestions regarding my current approach, from those on this list who must have worked on, or be working on, the same thing. In particular, I am worried about the efficiently of my constraint generation calculations. My driving physics engine is fairly typical. It is assumed that at the start of a time step, no objects are inter-penetrating. If, at the end of the time step, there continue to be no objects inter-penetrating, then the time step is complete. If objects do inter-penetrate, then a binary search reveals something very close to the last time before inter-penetration occurred, at which point the relevant constraints are added to prevent that from happening, and the whole process repeats, this time considering only the remaining portion of the time step after the penetration. Therefore, two discrete binary operations are supported on polyhedron types - an overlap test and a constraint calculation. All polyhedron's have BSP trees and hierarchical bounding sphere sets for : - their vertices - their edges In my hierarchy, every sphere has (at most) 8 children. Obviously the number of children represents a balance between hierarchy depth and bredth, and all the related factors when it comes to eliminating possible edge on polygon tests. I picked 8 to match up with the natural geographical division that occurs under an octree. I understand that a sphere probably models the shape of sets of edges and vertices terribly, but on the other hand it is really cheap to test one against a plane. The overlap test can be achieved using the edge and related bounding sphere information from one object with the BSP tree of another. For any given BSP node, if a particular sphere is entirely on one particular side of the plane, then its tests head that way down the tree. If it sits on the plane, then its children are considered. If a leaf node is found to be intersecting a plane, then complete edge on polygon tests are done. If any edge intersects a polygon, then the two objects are said to overlap, and no further tests are carried out. Obviously a first 'quick throwaway' test on distance between the highest level bounding spheres of both objects is performed, but in my simulation there is already a higher order octree related means to calculating which objects are 'near' which other objects, so that test isn't as useful as it might otherwise be. This BSP approach is a smarter version of testing every polygon of one object against every polygon of the other. It therefore is fooled by the same problems, such as one object being totally enclosed by another object - but these are a result of using a discrete model of time, and things my simulation will simply be built to deal with. Most tests performed by my engine when two objects begin contact will be overlap tests due to the binary search for collision time, and the constraint calculation will only occur once. When two objects start a time step rubbing up against each other, the focus will be the constraint calculation, but still this should only be required once per time step. Therefore, in my engine where objects will frequently change what they are rubbing against, it is the overlap test that needs be most optimal. The constraint calculation needs to detect when vertices on one object are very close to polygons on the other, and when edges on one object are very close to edges on the other. My engine attempts to keep all objects seperated by an invisibly small border, negating the need for the binary search for collision time to be desperately accurate, and generally helping smooth numerical accuracy problems. The edges problem isn't hard. Its more or less like the overlap test, but this time edges which are close to a plane in the BSP are tested in addition to those that cross the plane, and all are tested only against original edges that lie on that plane, not against the edges of the polygons used to construct the BSP tree - the distinction being that I am not interested in the artificial edges generated when splitting polygons for BSP purposes. Vertices on planes is slightly more difficult. My current solution is to push each object's vertices down the BSP tree of the other object. But this means that I have to do two BSP traversals per constraint calculation - which I am sure could probably be only 1 if it weren't for some gross thickness on my part. Is there any way to do this more efficiently? -Thomas BA flight sale now at http://www.lycos.co.uk Caracas, =A3129 rtn. including tax, Tues, 11am --=_NextPart_Lycos_0254481038339519_ID-- From jeffrey.palmer at acm.org Tue Nov 26 15:30:02 2002 From: jeffrey.palmer at acm.org (Jeffrey Palmer) Date: Tue Nov 26 15:30:02 2002 Subject: [ODE] ODE/Tricollider on linux? Message-ID: <200211261629.14222.jeffrey.palmer@acm.org> Hello all, I was wondering if anyone has gotten ODE and the tricollider code (I tried the stuff in the NewStuff email to no avail) working under Linux? Alternatively, I understand that the tri code is currently being integrated with ODE - is that in the CVS version yet? If not, is it bothersome to ask for an ETA? I guess I'm just lazy - I'm sort of unwilling to port everything to linux if it's *about* to be released. ;) Thanks, - j -- The river is moving. The blackbird must be flying. From anselm at hook.org Tue Nov 26 15:45:02 2002 From: anselm at hook.org (Anselm Hook) Date: Tue Nov 26 15:45:02 2002 Subject: [ODE] operator new undefined link cygwin gcc In-Reply-To: <200211261629.14222.jeffrey.palmer@acm.org> Message-ID: For some bizarre reason I had to use g++ instead of gcc with my (very recent) version of cygwin and todays verson of ode. I was getting an "operator new undefined" error at the link phase. Anybody else notice the same thing? I had to modify the configurator code a bit to build under g++ also. - a From mama7121 at student.uu.se Tue Nov 26 16:28:02 2002 From: mama7121 at student.uu.se (Martin Magnusson) Date: Tue Nov 26 16:28:02 2002 Subject: [ODE] operator new undefined link cygwin gcc References: Message-ID: <3DE40356.8010604@student.uu.se> I'm having trouble compiling under Cygwin as well. Then again, it could be a Cygwin problem too, since I'm new to Cygwin as well. Anyway, as far as I can understand I've set the user-settings file correctly, and after that a simple 'make' should be enough, right? Using g++ didn't seem to help. My results are posted below. The problem seems to be with lib/libode.a. I don't have a directory called 'lib', and there's no 'libode.a' anywhere on my HDD. Help, comments or flames are appreciated :) / Martin Magnusson ====================================================================== == Contents of ./config/user-settings: =============================== # ODE user settings: the following variables must be set by the user # (1) the platform to use. this name should have a corresponding # makefile.PLATFORM file. currently supported platforms are: # msvc microsoft visual C/C++ # mingw minimalist GNU for windows # cygwin cygnus GNU for windows # unix-gcc GNU gcc on windows # unix-generic generic unix compiler. you may need to edit the CC # variable in makefile.unix-generic # osx Mac OS-X, with the gnu compiler. PLATFORM=cygwin # (2) the floating point precision to use (either "SINGLE" or "DOUBLE") #PRECISION=SINGLE PRECISION=DOUBLE # (3) the library type to build (either "debug" if you are doing development, # or "release" for the optimized library) #BUILD=debug BUILD=release ===================================================================== == Result of make with gcc: ========================================= /home/martin!/ode-0.03> make gcc -DdDOUBLE -DdNODEBUG -o configurator.exe configurator.c ./configurator.exe include/ode/config.h "gcc -DdNODEBUG -o " "rm -f" ./ rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.c rm -f ctest.exe is this a pentium on a gcc-based platform? ... rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.c rm -f ctest.exe integer types (we assume int >= 32 bits) ... select the base floating point type ... the floating point infinity ... rm -f data gcc -DdNODEBUG -o ctest.exe ctest.c ctest.c:5: initializer element is not constant ./ctest.exe ./ctest.exe: not found rm -f data gcc -DdNODEBUG -o ctest.exe ctest.c ./ctest.exe rm -f data gcc -DdNODEBUG -o ctest.exe ctest.c ./ctest.exe rm -f ctest.c rm -f ctest.exe rm -f data *** configurator succeeded *** gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/array.o ode/src/array.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/error.o ode/src/error.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/memory.o ode/src/memory.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/obstack.o ode/src/obstack.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/odemath.o ode/src/odemath.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/matrix.o ode/src/matrix.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/misc.o ode/src/misc.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/rotation.o ode/src/rotation.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/mass.o ode/src/mass.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/ode.o ode/src/ode.cpp ode/src/ode.cpp: In function `void dJointAttach(dxJoint*, dxBody*, dxBody*)': ode/src/ode.cpp:922: warning: unused variable `dxWorld*world' gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/step.o ode/src/step.cpp ode/src/step.cpp:701:5: warning: multi-line comment ode/src/step.cpp:704:5: warning: multi-line comment gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/lcp.o ode/src/lcp.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/joint.o ode/src/joint.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/space.o ode/src/space.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/geom.o ode/src/geom.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/timer.o ode/src/timer.cpp ode/src/timer.cpp:109:17: warning: multi-line string literals are deprecated ode/src/timer.cpp:119:17: warning: multi-line string literals are deprecated gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/mat.o ode/src/mat.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/testing.o ode/src/testing.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastldlt.o ode/src/fastldlt.c gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastlsolve.o ode/src/fastlsolve.c gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastltsolve.o ode/src/fastltsolve. c gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastdot.o ode/src/fastdot.c ar rc lib/libode.a ode/src/array.o ode/src/error.o ode/src/memory.o ode/src/obst ack.o ode/src/odemath.o ode/src/matrix.o ode/src/misc.o ode/src/rotation.o ode/s rc/mass.o ode/src/ode.o ode/src/step.o ode/src/lcp.o ode/src/joint.o ode/src/spa ce.o ode/src/geom.o ode/src/timer.o ode/src/mat.o ode/src/testing.o ode/src/fast ldlt.o ode/src/fastlsolve.o ode/src/fastltsolve.o ode/src/fastdot.o ar: lib/libode.a: No such file or directory make: *** [lib/libode.a] Error 1 ===================================================================== == Result of make with g++: ========================================= /home/martin!/ode-0.03> make g++ -DdDOUBLE -DdNODEBUG -o configurator.exe configurator.c configurator.c: In function `void fatal_error(char*)': configurator.c:112: `exit' undeclared (first use this function) configurator.c:112: (Each undeclared identifier is reported only once for each function it appears in.) configurator.c: In function `void delete_file(char*)': configurator.c:167: `system' undeclared (first use this function) make: *** [configurator.exe] Error 1 From harleybl at hotmail.com Tue Nov 26 16:53:01 2002 From: harleybl at hotmail.com (Harley Blumenfeld) Date: Tue Nov 26 16:53:01 2002 Subject: [ODE] Unhandled exception - access violation Message-ID:
Has anyone else been getting an Unhandled exception - access violation,when calling dGeomDestroy? I got the latest from cvs this morning and have run into this problem when my application closes.
 
All I did was make a sub folder under test, and created a project which contains a copy of the buggy_test.cpp. The program runs fine, except when the window is closed I get an access violation. It seems to be happening when the box is destroyed in the line dGeomDestroy( box[0] );
 
When I look up the call stack it is failing at this place in the chain dxGeom::bodyRemove( void ).
 
Here is my configuration:
msvc version 6.0
Ode from this morning compiled with build=debug
Windows 2000 SP 2
 
Is there a setting that I am missing in my project? I noticed that there was a warning about a conflicting library and the linker said that I should be using /NODEFAULTLIB: libc.
Which library should I be using instead?
 
Thanks,
-Harley Blumenfeld
 


Tired of spam? Get advanced junk mail protection with MSN 8. From russ at q12.org Tue Nov 26 19:56:02 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 26 19:56:02 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: References: Message-ID: <20021126190026.00c5f3ed.russ@q12.org> > It seems to be happening when the box is destroyed in the line > dGeomDestroy( box[0] ); is the error happening within dGeomDestroy() or within main(). are you using an unaltered copy of test_buggy? russ. -- Russell Smith http://www.q12.org From Nguyen Binh Tue Nov 26 20:32:02 2002 From: Nguyen Binh (Nguyen Binh) Date: Tue Nov 26 20:32:02 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <20021126190026.00c5f3ed.russ@q12.org> References: <20021126190026.00c5f3ed.russ@q12.org> Message-ID: <931545011.20021127103524@glassegg.com> >> It seems to be happening when the box is destroyed in the line >> dGeomDestroy( box[0] ); It's the same for me. I'm using the latest test_buggt.cpp in CVS. RS> is the error happening within dGeomDestroy() or within main(). are you RS> using an unaltered copy of test_buggy? I solved it by bring the dGeomDestroy()... to front like this: dGeomDestroy (box[0]); dGeomDestroy (sphere[0]); dGeomDestroy (sphere[1]); dGeomDestroy (sphere[2]); dJointGroupDestroy (contactgroup); dSpaceDestroy (space); dWorldDestroy (world); -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media E.Town Building 7th Floor, 364 CongHoa Street Tan Binh District, HoChiMinh City, VietNam, Phone : +84 8 8109018 Fax : +84 8 8109013 www.glassegg.com --------------------------------------------------------------------- From anselm at hook.org Tue Nov 26 20:43:01 2002 From: anselm at hook.org (Anselm Hook) Date: Tue Nov 26 20:43:01 2002 Subject: [ODE] operator new undefined link cygwin gcc In-Reply-To: <3DE40356.8010604@student.uu.se> Message-ID: For the default compiler in makefile.cygwin to be g++ you have to wrap extern "C" { } around your includes in the configurator source. Also just remove exit() - it isn't important. The configurator could be generalized to support this overall but I guess it's pretty obvious. As for your bug with not being able to link - I did see some comment about that earlier on the list. Try cvs to head revision and see if it is fixed. Otherwise try see if your cygwin is older... - a > ===================================================================== > == Result of make with g++: ========================================= > > /home/martin!/ode-0.03> make > g++ -DdDOUBLE -DdNODEBUG -o configurator.exe configurator.c > configurator.c: In function `void fatal_error(char*)': > configurator.c:112: `exit' undeclared (first use this function) > configurator.c:112: (Each undeclared identifier is reported only once > for each > function it appears in.) > configurator.c: In function `void delete_file(char*)': > configurator.c:167: `system' undeclared (first use this function) > make: *** [configurator.exe] Error 1 > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From g.r.vansickle at worldnet.att.net Tue Nov 26 23:53:02 2002 From: g.r.vansickle at worldnet.att.net (Gary R. Van Sickle) Date: Tue Nov 26 23:53:02 2002 Subject: [ODE] box-box performance In-Reply-To: <1038306297.3de34bf91ea73@webmail.t-online.de> Message-ID: > I have implemented this sort of thing on top of ODE. My bodies come to > rest if their velocities went under a certain length. But be careful, > there are situation where for example a box can stay on an edge. To > avoid this you have to take time in concideration. Instead of time, could this take "stability" into account instead? e.g. something like this: if( (body.KineticEnergy() < epsilon) // i.e. velocity ~= 0 && (body.PotentialEnergyRelativeTo(body_it_is_contacting) < epsilon) // i.e. it isn't going to change on us on its own. ) { // "Freeze" body until something hits it etc. // ... } Seems to me that this would be pretty much foolproof, and better yet instantaneously-acting; there'd be no need to wait until you were reasonably sure the body had "really" stopped moving, you could lock the body down as soon as these conditions became true and know you were doing the right thing. Or is there a conceptual or implementational issue here I'm missing? -- Gary R. Van Sickle Brewer. Patriot. From muellerptr at kimweb.de Wed Nov 27 00:19:02 2002 From: muellerptr at kimweb.de (=?iso-8859-1?Q?Patrik_M=FCller?=) Date: Wed Nov 27 00:19:02 2002 Subject: [ODE] Collision detection Message-ID: Hi all, I'm observing the list some times now and it seems ODE is the tool I need. Now my question: I want to include the collision test to a modeller I write at the moment. But the problem are my input files: CAD data. That means I get huge triangle objects. Do you think I can use it with the tri-collider? Or has anyone a better idea (physics is not my world!)? Do i still need Opcode for the actual tri-collider code? Best regards, Patrik Müller From chris.campbell at l8tech.com Wed Nov 27 00:23:02 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Wed Nov 27 00:23:02 2002 Subject: [ODE] box-box performance Message-ID: Like Daniel says you might find that for example as a rolling box (dice maybe?) comes to a stop, it might teeter on one edge for a second before deciding which face it will eventually fall onto. At that point the kinetic energy would be near to zero. Also consider if you threw a body straight up. At some point it will have near zero kinetic energy, then start coming down. With an extremely small epsilon it might work out most of the time but I think it's safer to judge by distance travelled/over a few consecutive time steps. ChrisC > > there are situation where for example a box can stay on an edge. To > > avoid this you have to take time in concideration. > > Instead of time, could this take "stability" into account instead? > > e.g. something like this: > > if( > (body.KineticEnergy() < epsilon) // i.e. velocity ~= 0 > && > (body.PotentialEnergyRelativeTo(body_it_is_contacting) < epsilon) > // i.e. it isn't going to change on us on its own. > ) > { > // "Freeze" body until something hits it etc. > // ... > } > > Seems to me that this would be pretty much foolproof, and better yet > instantaneously-acting; there'd be no need to wait until you > were reasonably > sure the body had "really" stopped moving, you could lock the > body down as soon > as these conditions became true and know you were doing the > right thing. Or is > there a conceptual or implementational issue here I'm missing? From russ at q12.org Wed Nov 27 01:23:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 01:23:02 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <931545011.20021127103524@glassegg.com> References: <20021126190026.00c5f3ed.russ@q12.org> <931545011.20021127103524@glassegg.com> Message-ID: <20021127002815.74167e9e.russ@q12.org> > It's the same for me. I'm using the latest test_buggt.cpp in CVS. i've tried a fresh checked out CVS head under both linux and windows (cygwin) and i don't see any problem. could one of you track this problem down further so that it can be fixed?? russ. -- Russell Smith http://www.q12.org From g.r.vansickle at worldnet.att.net Wed Nov 27 01:54:02 2002 From: g.r.vansickle at worldnet.att.net (Gary R. Van Sickle) Date: Wed Nov 27 01:54:02 2002 Subject: [ODE] box-box performance In-Reply-To: Message-ID: > Like Daniel says you might find that for example as a rolling box > (dice maybe?) comes to a stop, it might teeter on one edge for > a second before deciding which face it will eventually fall onto. > At that point the kinetic energy would be near to zero. Right, but the *potential* energy will not be zero. It can still move to a lower total energy state. > Also > consider if you threw a body straight up. At some point it will > have near zero kinetic energy, then start coming down. Again though, potential energy != 0. > With an extremely small epsilon it might work out most of the > time but I think it's safer to judge by distance travelled/over a > few consecutive time steps. But that's where the "lockups" tend to come from; whether it's every step or a number of steps (and how do you chose that number?), you can get into a wildly wrong physical situation. E.g., the "body straight up" problem. How long is your rocket going to sit at its apogee, say over a low-gravity planet, with velocity ~= 0, before starting to fall back? Pick a just-too-long max time before you lock it down, and the rocket stays up there forever. If it's possible to base the lockdown decision on potential energy, you will at least never get into wildly wrong situations like that; they'd at worst be "epsilon-total-energy-is-still-left wrong", which should always be less than any velocity-only-based solution. All that said, I can't offhand come up with an algorithm to do the potential-energy measurement, which would be the key to have this work at all. I would think it would involve some relation between the center of mass, any contacts, and the total forces & torques applied at each timestep. But as is all too often the case, more thinking required.... -- Gary R. Van Sickle Brewer. Patriot. > > > there are situation where for example a box can stay on an edge. To > > > avoid this you have to take time in concideration. > > > > Instead of time, could this take "stability" into account instead? > > > > e.g. something like this: > > > > if( > > (body.KineticEnergy() < epsilon) // i.e. velocity ~= 0 > > && > > (body.PotentialEnergyRelativeTo(body_it_is_contacting) < epsilon) > > // i.e. it isn't going to change on us on its own. > > ) > > { > > // "Freeze" body until something hits it etc. > > // ... > > } > > > > Seems to me that this would be pretty much foolproof, and better yet > > instantaneously-acting; there'd be no need to wait until you > > were reasonably > > sure the body had "really" stopped moving, you could lock the > > body down as soon > > as these conditions became true and know you were doing the > > right thing. Or is > > there a conceptual or implementational issue here I'm missing? > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From slipch Wed Nov 27 01:55:01 2002 From: slipch (slipch) Date: Wed Nov 27 01:55:01 2002 Subject: Re[2]: [ODE] using dCreateGeomClass in the last ode version Message-ID: <1044162224.20021127105729@gsc-game.kiev.ua> Hello Russ, Tuesday, November 26, 2002, 8:55:31 PM, you wrote: RS> i don't know what problem you are talking about - can you describe it more RS> precisely? but the new collision system uses constant class numbers, not RS> variable class numbers, so this should not be a problem (except perhaps RS> for user defined classes set up through the C API??). Yes, I mean user definite classes. When I create geometry class ////////////////////////////////////////////// dGeomClass c; c.bytes = sizeof (dxCylinder); c.collider = &dMyClassColliderFn; c.aabb = &dMyClassAABB; c.aabb_test = 0; c.dtor = 0; dMyClass=dCreateGeomClass (&c); ////////////////////////////////////////// static dColliderFn * dMyClassColliderFn (int num) { if (num == dBoxClass) return (dColliderFn *) &dCollideMyClassBox; if (num == dSphereClass) return (dColliderFn *) &dCollideMyClasSphere; if (num == dMyClass) return (dColliderFn *)&dCollideMyClassMyClass; if (num == dPlaneClass) return (dColliderFn *) &dCollideMyClassPlane; return 0; } dMyClassColliderFn do not return dCollideMyClassMyClass in dCreateGeomClass because dMyClass is not set until it return and dCollideMyClassMyClass do not set in colliders array. It is not a bug but I do not know how to set collider for MyClass - MyClass collision. -- Best regards, Konstantin Slipchenko mailto:slipch@gsc-game.kiev.ua Sorry for sometimes I use reply button by mistake :). From slipch Wed Nov 27 02:18:02 2002 From: slipch (slipch) Date: Wed Nov 27 02:18:02 2002 Subject: [ODE] unresolved external symbol __ftol2 Message-ID: <95565933.20021127112053@gsc-game.kiev.ua> Hello ODE, I can not build last ode version with MS VC 6.0. C:\SDK\odeLast\!new-ode_lib!>make link /dll /nologo /SUBSYSTEM:WINDOWS /LIBPATH:"C:\Programme\Micros~2\VC98\Lib" / def:config/msvcdefs.def Comctl32.lib kernel32.lib user32.lib gdi32.lib OpenGL32. lib Glu32.lib /OUT:lib/ode.dll ode/src/array.obj ode/src/error.obj ode/src/memor y.obj ode/src/obstack.obj ode/src/odemath.obj ode/src/matrix.obj ode/src/misc.ob j ode/src/rotation.obj ode/src/mass.obj ode/src/ode.obj ode/src/step.obj ode/src /lcp.obj ode/src/joint.obj ode/src/timer.obj ode/src/mat.obj ode/src/testing.obj ode/src/collision_kernel.obj ode/src/collision_util.obj ode/src/collision_std.o bj ode/src/collision_space.obj ode/src/collision_transform.obj ode/src/fastldlt. obj ode/src/fastlsolve.obj ode/src/fastltsolve.obj ode/src/fastdot.obj Creating library lib/ode.lib and object lib/ode.exp LINK : warning LNK4049: locally defined symbol "_dInfinityValue" imported misc.obj : error LNK2001: unresolved external symbol __ftol2 collision_space.obj : error LNK2001: unresolved external symbol __ftol2 lib/ode.dll : fatal error LNK1120: 1 unresolved externals make: *** [lib/ode.lib] Error 1120 I also can not find any reference on even occurrence of "__ftol2". I will very appreciate any suggestion. -- Best regards, slipch mailto:slipch@gsc-game.kiev.ua From slipch Wed Nov 27 02:21:02 2002 From: slipch (slipch) Date: Wed Nov 27 02:21:02 2002 Subject: [ODE] unresolved external symbol __ftol2 In-Reply-To: <95565933.20021127112053@gsc-game.kiev.ua> References: <95565933.20021127112053@gsc-game.kiev.ua> Message-ID: <835760062.20021127112407@gsc-game.kiev.ua> Hello ODE, I can not build last ode version with MS VC 6.0. C:\SDK\odeLast\!new-ode_lib!>make link /dll /nologo /SUBSYSTEM:WINDOWS /LIBPATH:"C:\Programme\Micros~2\VC98\Lib" / def:config/msvcdefs.def Comctl32.lib kernel32.lib user32.lib gdi32.lib OpenGL32. lib Glu32.lib /OUT:lib/ode.dll ode/src/array.obj ode/src/error.obj ode/src/memor y.obj ode/src/obstack.obj ode/src/odemath.obj ode/src/matrix.obj ode/src/misc.ob j ode/src/rotation.obj ode/src/mass.obj ode/src/ode.obj ode/src/step.obj ode/src /lcp.obj ode/src/joint.obj ode/src/timer.obj ode/src/mat.obj ode/src/testing.obj ode/src/collision_kernel.obj ode/src/collision_util.obj ode/src/collision_std.o bj ode/src/collision_space.obj ode/src/collision_transform.obj ode/src/fastldlt. obj ode/src/fastlsolve.obj ode/src/fastltsolve.obj ode/src/fastdot.obj Creating library lib/ode.lib and object lib/ode.exp LINK : warning LNK4049: locally defined symbol "_dInfinityValue" imported misc.obj : error LNK2001: unresolved external symbol __ftol2 collision_space.obj : error LNK2001: unresolved external symbol __ftol2 lib/ode.dll : fatal error LNK1120: 1 unresolved externals make: *** [lib/ode.lib] Error 1120 I also can not find any reference or even occurrence of "__ftol2". I will very appreciate any suggestion. -- Best regards, slipch mailto:slipch@gsc-game.kiev.ua From anselm at hook.org Wed Nov 27 04:21:02 2002 From: anselm at hook.org (Anselm Hook) Date: Wed Nov 27 04:21:02 2002 Subject: [ODE] networking demo In-Reply-To: <20021127002815.74167e9e.russ@q12.org> Message-ID: Hi all, I'm playing around with a little networking demo that is gradually getting better. Now it networks all the state of the little cars including the user events - this makes it fairly smooth. Also it uses udp - although I still have a defect in that area which will prevent more than 2 connections at a time (you can turn off udp though and have an arbitrary number of clients). http://hook.org/anselm/test_buggy.cpp Next I have to do compression, blending, distance attenuation and a few things like that... In any case some of you may find it interesting. - a From mama7121 at student.uu.se Wed Nov 27 04:28:01 2002 From: mama7121 at student.uu.se (Martin Magnusson) Date: Wed Nov 27 04:28:01 2002 Subject: [ODE] operator new undefined link cygwin gcc References: Message-ID: <3DE4AC0E.3070304@student.uu.se> OK, thanks for your help everybody. After creating lib/ manually both configurator and ode-lib compile properly (although with a couple of warnings about multi line strings and one or two unused variables), but when it comes to ode-test and drawstuff-test I get undefined references to new[] (when I compile with gcc in Cygwin/Windows). lib/libdrawstuff.a(drawstuff.o)(.text+0x393):drawstuff.cpp: undefined reference to `operator new[](unsigned)' Anselm Hook wrote: > For the default compiler in makefile.cygwin to be g++ you have to wrap > extern "C" { } around your includes in the configurator source. Also just > remove exit() - it isn't important. The configurator could be generalized > to support this overall but I guess it's pretty obvious. I wrapped the entire configurator.c in #ifdef __cplusplus extern "C" { #endif ... #ifdef __cplusplus } #endif #endif and commented out the exit() line, but that didn't help (g++ complained about the system() calls in configurator.c and lots of other stuff as well). I installed Cygwin a couple of days ago, so it should be recent enough. My ./include/ode/config.h looks like this - if that matters: == config.h: ========================================================= /* per-machine configuration. this file is automatically generated. */ #ifndef _ODE_CONFIG_H_ #define _ODE_CONFIG_H_ /* shared lib definitions */ #ifndef SHAREDLIBIMPORT #define SHAREDLIBIMPORT #endif #ifndef SHAREDLIBEXPORT #define SHAREDLIBEXPORT #endif /* standard system headers */ #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* is this a pentium on a gcc-based platform? */ #define PENTIUM 1 /* integer types (we assume int >= 32 bits) */ typedef char int8; typedef unsigned char uint8; typedef int int32; typedef unsigned int uint32; /* an integer type that we can safely cast a pointer to and * from without loss of bits. */ typedef unsigned int intP; /* select the base floating point type */ #define dDOUBLE 1 /* the floating point infinity */ #define DINFINITY_DECL SHAREDLIBEXPORT union dInfBytes dInfinityValue = {{0,0,0,0,0,0,0xf0,0x7f}}; #if defined SHARED_CONFIG_H_INCLUDED_FROM_DEFINING_FILE #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBEXPORT #else #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBIMPORT #endif union dInfBytes { unsigned char c[8]; double d; }; extern GLOBAL_SHAREDLIB_SPEC union dInfBytes dInfinityValue; #define dInfinity (dInfinityValue.d) #undef GLOBAL_SHAREDLIB_SPEC /* ODE feature configuration */ #ifdef __cplusplus } #endif #endif ====================================================================== / Martin Magnusson From harleybl at hotmail.com Wed Nov 27 08:51:02 2002 From: harleybl at hotmail.com (Harley Blumenfeld) Date: Wed Nov 27 08:51:02 2002 Subject: [ODE] Unhandled exception - access violation Message-ID:


Yes I am using an unaltered version of test_buggy.cpp. I just recopied it from test to make sure.

Yes the error is happening within dGeomDestroy( box[ 0 ] );

Here is what the stack looks like when it happens ( from MSVC Context: bar )

MYBUGGY! dxGeom::bodyRemove( void )

MYBUGGY! dxGeom::~dxGeom( void )

MYBUGGY! dxBox::~dxBox( void )

MYBUGGY! dxBox: `vector deleting destructor'(unsigned int )

MYBUGGY! dxGeomDestroy

I tried the solution of moving the dGeomDestroy code to the first line after dsSimulationLoop and that seemed to work... is there a specific ordering in which things should be deleted?

-Harley Blumenfeld

 

 


 

>From: Russ Smith
>To: "Harley Blumenfeld"
>CC: ode@q12.org
>Subject: Re: [ODE] Unhandled exception - access violation
>Date: Tue, 26 Nov 2002 19:00:26 -0500
>
>
> > It seems to be happening when the box is destroyed in the line
> > dGeomDestroy( box[0] );
>
>is the error happening within dGeomDestroy() or within main(). are you
>using an unaltered copy of test_buggy?
>
>russ.
>
>--
>Russell Smith
>http://www.q12.org


Protect your PC - Click here for McAfee.com VirusScan Online From thomas_buehrmann at web.de Wed Nov 27 09:31:02 2002 From: thomas_buehrmann at web.de (Thomas Buehmann) Date: Wed Nov 27 09:31:02 2002 Subject: [ODE] drawstuff problems: "pulsating" spheres Message-ID: <200211271630.gARGULX20996@mailgate5.cinetic.de> hi, i get some weird looking spheres if i encapsulate my models as well as the world and space in c++ classes. The first object(consisting of several bodies and spheres) looks fine, but if i add another object to the world its spheres look as if there are shadows rotating around them. the speed of that rotatiion is somehow depend on the first object in the world. is that anything i got wrong about drawstuff? thanks for help, thomas. ______________________________________________________________________________ Schon wieder Viren-Alarm? Bei WEB.DE FreeMail ist das kein Problem, hier ist der Virencheck inklusive! http://freemail.web.de/features/?mc=021158 From tirobu at gmx.de Wed Nov 27 10:22:01 2002 From: tirobu at gmx.de (Tim) Date: Wed Nov 27 10:22:01 2002 Subject: [ODE] compiling CVS Message-ID: <003b01c29639$5a4886c0$0200a8c0@P4> This is a multi-part message in MIME format. ------=_NextPart_000_0038_01C29641.BBA6B2E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello. I want to use ODE - but I don=B4t get it compiled... I am using Windows (msvc) and modified the user-settings.example file as it is explained in the howto. For sure I made a copy of this file and renamed it to user-settings. Now I wanted to use the just downloaded GNU make for windows file to compile as it is explained in the manual. But when I try "make configure" I get the following error message: cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT=3D /DSHAREDLIBIMPORT=3D = /DdDOUBLE /DdDE BUG_ALLOC /DODE_OLD_COLLISION /Feconfigurator.exe configurator.c process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT =3D /DSHAREDLIBIMPORT=3D /DdDOUBLE /DdDEBUG_ALLOC /DODE_OLD_COLLISION /Feconfigurato r.exe configurator.c, ...) failed. make (e=3D2): The system can not find the specifed file make: *** [configurator.exe] Error 2 I tried several things but nothing helped! Hope someone can help me! Thanks a lot, Tim. ------=_NextPart_000_0038_01C29641.BBA6B2E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello.

I want to use ODE - but I don=B4t get it = compiled...
I am=20 using Windows (msvc) and modified the user-settings.example
file as = it is=20 explained in the howto. For sure I made a copy of this
file and = renamed it to=20 user-settings.

Now I wanted to use the just downloaded GNU make = for=20 windows file
to compile as it is explained in the manual. But when I=20 try
"make configure"
I get the following error message:

cl = /nologo=20 /DWIN32 /DMSVC /DSHAREDLIBEXPORT=3D /DSHAREDLIBIMPORT=3D=20 /DdDOUBLE
/DdDE
BUG_ALLOC /DODE_OLD_COLLISION /Feconfigurator.exe=20 configurator.c
process_begin: CreateProcess((null), cl /nologo = /DWIN32=20 /DMSVC
/DSHAREDLIBEXPORT
=3D /DSHAREDLIBIMPORT=3D /DdDOUBLE = /DdDEBUG_ALLOC=20 /DODE_OLD_COLLISION
/Feconfigurato
r.exe configurator.c, ...)=20 failed.
make (e=3D2): The system can not find the specifed = file
make: ***=20 [configurator.exe] Error 2

I tried several things but nothing=20 helped!
Hope someone can help me!
Thanks a lot, = Tim.
------=_NextPart_000_0038_01C29641.BBA6B2E0-- From leaf at tataput.com Wed Nov 27 10:39:02 2002 From: leaf at tataput.com (Leaf Garland) Date: Wed Nov 27 10:39:02 2002 Subject: [ODE] compiling CVS In-Reply-To: <003b01c29639$5a4886c0$0200a8c0@P4> Message-ID: <001c01c2963b$da7b0f50$8e130750@mumu> I noticed this same problem when compiling on one pc, but not on another. Strange. Anyway I fixed it by adding the ode dir to the path. Eg. PATH=%PATH%;c:\dev\ode I also had to create the ode/lib dir, as mentioned in a previous post, and change a line in test_boxstack.cpp where there were two "for(int i..." in the same function, which msvc6 can't handle. Cheers, Leaf. -----Original Message----- From: ode-admin@q12.org [mailto:ode-admin@q12.org] On Behalf Of Tim Sent: 27 November 2002 17:21 To: ode@q12.org Subject: [ODE] compiling CVS Hello. I want to use ODE - but I don´t get it compiled... I am using Windows (msvc) and modified the user-settings.example file as it is explained in the howto. For sure I made a copy of this file and renamed it to user-settings. Now I wanted to use the just downloaded GNU make for windows file to compile as it is explained in the manual. But when I try "make configure" I get the following error message: cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= /DdDOUBLE /DdDE BUG_ALLOC /DODE_OLD_COLLISION /Feconfigurator.exe configurator.c process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT = /DSHAREDLIBIMPORT= /DdDOUBLE /DdDEBUG_ALLOC /DODE_OLD_COLLISION /Feconfigurato r.exe configurator.c, ...) failed. make (e=2): The system can not find the specifed file make: *** [configurator.exe] Error 2 I tried several things but nothing helped! Hope someone can help me! Thanks a lot, Tim. From baas at ira.uka.de Wed Nov 27 10:57:01 2002 From: baas at ira.uka.de (Matthias Baas) Date: Wed Nov 27 10:57:01 2002 Subject: [ODE] compiling CVS In-Reply-To: <003b01c29639$5a4886c0$0200a8c0@P4> Message-ID: <5.1.0.14.0.20021127184821.00cdaa68@i31i33mail.informatik.uni-karlsruhe.de> At 18:20 27.11.2002 +0100, you wrote: >r.exe configurator.c, ...) failed. >make (e=2): The system can not find the specifed file >make: *** [configurator.exe] Error 2 Looks like the same problem I had, too. It can be fixed with a little modification in the Makefile. Change the line CONFIGURATOR_SRC=configurator.c into the following: CONFIGURATOR_SRC=./configurator.c BTW, would it be possible to do this small modification in the cvs tree? (I hope it won't break any other build processes...) - Matthias - From tirobu at gmx.de Wed Nov 27 11:17:02 2002 From: tirobu at gmx.de (Tim) Date: Wed Nov 27 11:17:02 2002 Subject: [ODE] compiling CVS Message-ID: <007b01c29641$03084730$0200a8c0@P4> This is a multi-part message in MIME format. ------=_NextPart_000_0078_01C29649.645890A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi. Thanks for your answers! Using MSVC7 I get the following error: d:\ode\ode\src\dcTriListCollider.h(4): fatal error C1083: Cannot open = include file: 'Opcode.h': No such file or directory The problem is, that there is no file named Opcode.h at all! So what about that? Thanks Tim. ------=_NextPart_000_0078_01C29649.645890A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi.
 
Thanks for your answers!
Using MSVC7 I get the following = error:
 
d:\ode\ode\src\dcTriListCollider.h(4): = fatal error=20 C1083: Cannot open include file: 'Opcode.h': No such file or=20 directory
 
The problem is, that there is no file = named=20 Opcode.h at all!
So what about that?
Thanks Tim.

------=_NextPart_000_0078_01C29649.645890A0-- From thomasharte at lycos.co.uk Wed Nov 27 11:25:02 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Wed Nov 27 11:25:02 2002 Subject: [ODE] My Latest Approach to Polyhedron Collision Management Message-ID: <1038421390011900@lycos-europe.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --=_NextPart_Lycos_0119001038421390_ID Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit >First a question/suggestion regarding the type of BSP tree - have you
>considered (or are you using) a solid-BSP tree? I would imagine that several
>vertexoverlapping tests would become unnecessary as it is sufficient to find
>a vertex that is in a "solid" (illegal) region of the tree to determine that
>a collision must have occured (thus only requiring single point tests
>against the BSP tree).

I'm no BSP expert, but I have the unfortunate problem (unavoidably so) that some of my
models include two sided polygons - i.e. infinitely flat sections of model. This means that
a vertex may penetrated a model but never be inside the model, and is why I am using
edge through polygon tests to detect when intersection has occurred, and applying
constraints to prevent any interpenetration _before_ it occurs. I believe this means that
solid BSPs wouldn't help me much?

>Regarding the vertices on planes problem (and sending the data down bo th BSP
>trees, twice) - won't the one traversal of a BSP tree just yield the
>inverted result of the other BSP traversal? (i.e: case 1: point penetrates
>plane; case 2: plane is penetrated by point)

If I were sending polygons down either BSP tree, this would be true, but if I send
polygons down then I usually have a worse set of bounding hierarchies, leading to
greater inefficiency that way, and it is also more work to make sure I am not testing my
vertices many times. Therefore I send down just the vertices. In doing so, 1 BSP
traversal only checks for when the vertices of one model are rubbing against the
polygons of the other, and in fact I care about when vertices from either model are
rubbing against polygons from the other, leading me to do two traversals in the current
implementation.

This is all based on 'gut feeling' rather than actual practical investigation and comparison,
and I am open to other opinions so - do you think that sending groups of polygons down
the BSP tree, and checking edges/vertices as they are implicitly defined by virtue of the
polygons in question and not worrying too much about doing the same tests multiple
times, or indeed implementing a safeguard against repeated testing, would yield a better
implementation given that I'd save a BSP traversal? My models tend to be 'simple'.

-Thomas

------------------------------------------------------
BA flight sale now at www.lycos.co.uk
Boston, £129 rtn. including tax, Wednesday, 1pm --=_NextPart_Lycos_0119001038421390_ID-- From nnevatie at welho.com Wed Nov 27 11:39:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Wed Nov 27 11:39:02 2002 Subject: [ODE] compiling CVS References: <007b01c29641$03084730$0200a8c0@P4> Message-ID: <001201c29642$bc6b9410$3abdf3d5@wli> Go to: http://www.codercorner.com/Opcode.htm Opcode is an external package specializing in collision detection. I have succesfully used the version 1.2. Compile Opcode to another lib and link with ODE. Cheers ----- Original Message ----- From: "Tim" To: Sent: Wednesday, November 27, 2002 8:15 PM Subject: [ODE] compiling CVS Hi. Thanks for your answers! Using MSVC7 I get the following error: d:\ode\ode\src\dcTriListCollider.h(4): fatal error C1083: Cannot open include file: 'Opcode.h': No such file or directory The problem is, that there is no file named Opcode.h at all! So what about that? Thanks Tim. From thomasharte at lycos.co.uk Wed Nov 27 11:39:44 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Wed Nov 27 11:39:44 2002 Subject: [ODE] Contact Constraints: First Order Slip? Message-ID: <1038421837001983@lycos-europe.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --=_NextPart_Lycos_0019831038421837_ID Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Can anyone explain to me the purpose of the first order slip variables within the dSurfaceParameters structure contained within the dContact structre, used when establishing a contact constraint? My understanding of slip is that it is the difference between the linear velocity a particle wants to travel at by virtue of the body it is attached to, and the speed at which it is travelling over a surface. In the general case, the coefficient of friction is a function of slip - although often it isn't related to slip at all. E.g. if we have a box scraping along a surface, the slip is simply the linear velocity of the body. However, if we are talking about a car wheel, then the slip is the difference between the linear velocity of the outside of the tyre and the speed at which the wheel is moving along the ground. This is important for rubber tyres because the coefficient of friction for rubber is most certainly a function of slip, and a fairly interesting one at that. Anyway, I therefore don't see why I must express 'first order slip', surely ODE already has enough information to calculate it internally? I notice the paramter is described next to the relevant contact flag simply as 'slip', and only later by the corresponding dReal as 'first order slip'. It therefore strikes me that it is probably not asking me for the first order differential of slip (e.g. if the motor attached to my car wheel is changing speed) in order to help with numerical accuracy regarding the discrete model of time. But perhaps that is exactly what it is asking me for? One thing I can understand from the documentation : "this needs more description". -Thomas ------------------------------------------------------ BA flight sale now at http://www.lycos.co.uk. Boston, =A3129 rtn. including tax, Wednesday, 1pm --=_NextPart_Lycos_0019831038421837_ID-- From maddocks at metservice.com Wed Nov 27 12:45:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Wed Nov 27 12:45:02 2002 Subject: [ODE] ODE/Tricollider on linux? Message-ID: <8C058A1A-0240-11D7-92B8-00039394FB86@metservice.com> I did some initial work on a port to gcc (MAC OS X) based on Opcode from the F4 engine. It should work for linux without much hassle. I asked for feedback but no one seemed interested. You can download what I did from... http://homepages.paradise.net.nz/henryj/code/index.html Tricollider has been updated since then, but I'm not going to do anymore until tricollider is integrated because the VCC code is a nightmare. Henry On Wednesday, November 27, 2002, at 11:29 AM, Jeffrey Palmer wrote: > Hello all, > > I was wondering if anyone has gotten ODE and the tricollider code (I > tried the stuff in the NewStuff email to no avail) working under Linux? > > Alternatively, I understand that the tri code is currently being > integrated with ODE - is that in the CVS version yet? If not, is it > bothersome to ask for an ETA? > > I guess I'm just lazy - I'm sort of unwilling to port everything to > linux if it's *about* to be released. ;) > > Thanks, > > - j > > -- > The river is moving. > The blackbird must be flying. > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From russ at q12.org Wed Nov 27 20:55:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 20:55:02 2002 Subject: Re[2]: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <1044162224.20021127105729@gsc-game.kiev.ua> References: <1044162224.20021127105729@gsc-game.kiev.ua> Message-ID: <20021127195951.0c303209.russ@q12.org> > dMyClassColliderFn do not return dCollideMyClassMyClass in > dCreateGeomClass because dMyClass is not set until it return and > dCollideMyClassMyClass do not set in colliders array. ah yes ... i see the problem. i have fixed the code in collision_kernel.cpp. but i don't have a good test case for this right now - i would appreciate if you can try it out and report any problems. russ. -- Russell Smith http://www.q12.org From russ at q12.org Wed Nov 27 21:15:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 21:15:02 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: References: Message-ID: <20021127202012.0ef3615c.russ@q12.org> > Yes the error is happening within dGeomDestroy( box[ 0 ] ); > Here is what the stack looks like when it happens ( from MSVC Context: > bar ) okay, i've found the issue i think. when dBodyDestroy() is being called it was not notifying any attached geoms that it is going to disappear, so when those geoms are destroyed they try to remove themselves from nonexistant linked lists. it's a classic 'accessing freed memory' bug. update from CVS and try it again. let me know what happens. russ. -- Russell Smith http://www.q12.org From nnevatie at welho.com Wed Nov 27 23:13:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Wed Nov 27 23:13:02 2002 Subject: [ODE] Tricollider status clarification Message-ID: <000901c296a5$2bd0f540$3abdf3d5@wli> I'm trying to figure out which one of the many triangle collider combinations associated with ODE is the newest, the fastest or otherwise the best one currently: - ODE 0.03 release package (ODE 0.03 + tricollider in contrib/tri-collider directory) - Current CVS head version (ODE in CVS or ODE 0.0.3 + tricollider in contrib/tri-collider CVS directory) - Erwin's newstuff.gz + patch sent later (both sent to mailing list August-September) (ODE in CVS or ODE 0.0.3) Future development of the triangle collider? How about Opcode? Does the newest version 1.2 work OK with the triangle colliders? If you have tested some or all of these combinations, please share your experiences. Keep up the good work! Cheers From russ at q12.org Wed Nov 27 23:29:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 23:29:02 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: <1038421837001983@lycos-europe.com> References: <1038421837001983@lycos-europe.com> Message-ID: <20021127223342.4a68a6cc.russ@q12.org> > One thing I can understand from the documentation : "this needs more > description". i started to write a long email reply about this then realized that was dumb - i updated the documentation instead. look at the latest userguide, section "7.3.7. Contact" - there a bigger description of the slip parameters. in hindsight calling these numbers 'slip' was a mistake because 'slip' is such an overloaded word in ODE - i should have called them 'FDS' or something else. there's no pictures to accompany the description although there should be ... unfortunately drawing pictures takes a lot of time that i don't have :( russ. -- Russell Smith http://www.q12.org From Nguyen Binh Wed Nov 27 23:35:03 2002 From: Nguyen Binh (Nguyen Binh) Date: Wed Nov 27 23:35:03 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <20021127202012.0ef3615c.russ@q12.org> References: <20021127202012.0ef3615c.russ@q12.org> Message-ID: <6311874734.20021128133956@glassegg.com> Hi , RS> okay, i've found the issue i think. when dBodyDestroy() is being called RS> it was not notifying any attached geoms that it is going to disappear, so RS> when those geoms are destroyed they try to remove themselves from RS> nonexistant linked lists. it's a classic 'accessing freed memory' bug. I think we should follow the FIFO-style in new / delete . We create World first so destroy it last. Then if we move the DestroyGeom to front, everything's OK. RS> update from CVS and try it again. let me know what happens. RS> russ. -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media E.Town Building 7th Floor, 364 CongHoa Street Tan Binh District, HoChiMinh City, VietNam, Phone : +84 8 8109018 Fax : +84 8 8109013 www.glassegg.com --------------------------------------------------------------------- From russ at q12.org Wed Nov 27 23:39:01 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 23:39:01 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <6311874734.20021128133956@glassegg.com> References: <20021127202012.0ef3615c.russ@q12.org> <6311874734.20021128133956@glassegg.com> Message-ID: <20021127224341.55bb6de6.russ@q12.org> > I think we should follow the FIFO-style in new / delete . > We create World first so destroy it last. Then if we move the > DestroyGeom to front, everything's OK. sure, but geoms and bodys can be created/destroyed independently of each other, so ODE should handle whatever order you chose to destroy geoms in. russ. -- Russell Smith http://www.q12.org From russ at q12.org Wed Nov 27 23:44:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 23:44:02 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: <20021127223342.4a68a6cc.russ@q12.org> References: <1038421837001983@lycos-europe.com> <20021127223342.4a68a6cc.russ@q12.org> Message-ID: <20021127224824.3a373168.russ@q12.org> it has just occured to me ... i can't think of any ODE base vehicle sim that actually takes full advantage of ODE's contact modeling capabilities to model different road surfaces. asphalt, concrete, gravel, ice and mud will all have different mu, slip(FDS), soft_cfm and soft_erp parameters. there's potential here for somebody to do a really good job... russ. -- Russell Smith http://www.q12.org From anselm at hook.org Thu Nov 28 00:46:02 2002 From: anselm at hook.org (Anselm Hook) Date: Thu Nov 28 00:46:02 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: <20021127224824.3a373168.russ@q12.org> Message-ID: Hi Russ, What about finding a way to generalize material properties such that contacts could be generated automatically? I'd sure enjoy finding a way to remove the collision callback. In your opinion is this really such a difficult problem or is there some way that the intersection of material properties could be computed reasonably - say as a third party contrib item? One would have to be able to say that a surface is ice, or velcro, or rubber, or gravel and then calculate reasonable mu, slip, soft_cfm, soft_erp out of the intersection of each pair. Even if this can't be automated maybe common intersections could be manually defined by the community and added or maintained as a contribs lib...? - a On Wed, 27 Nov 2002, Russ Smith wrote: > > it has just occured to me ... i can't think of any ODE base vehicle sim > that actually takes full advantage of ODE's contact modeling > capabilities to model different road surfaces. asphalt, concrete, > gravel, ice and mud will all have different mu, slip(FDS), soft_cfm and > soft_erp parameters. there's potential here for somebody to do a really > good job... > > russ. > > -- > Russell Smith > http://www.q12.org > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From slipch Thu Nov 28 02:56:02 2002 From: slipch (slipch) Date: Thu Nov 28 02:56:02 2002 Subject: Re[4]: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <20021127195951.0c303209.russ@q12.org> References: <1044162224.20021127105729@gsc-game.kiev.ua> <20021127195951.0c303209.russ@q12.org> Message-ID: <1086558160.20021128115858@gsc-game.kiev.ua> Hello Russ, Thursday, November 28, 2002, 2:59:51 AM, you wrote: RS> ah yes ... i see the problem. i have fixed the code in RS> collision_kernel.cpp. but i don't have a good test case RS> for this right now - i would appreciate if you can try RS> it out and report any problems. RS> russ. Seems it works all right. But one problem still remains for user definite geometry classes. If I have some user definite classes it always necessary to support right sequence of their creating or colliders would not be set in colliders array again. Of course I can register all user classes in right order before start my simulation. But if I want to support ode stile of creating geometry classes when creating geometries, it is very inconvenient. Why not open setCollider function? It may be useful to have a possibility even reset colliders for all classes. -- Best regards, Konstantin Slipchenko mailto:slipch@gsc-game.kiev.ua From jon_lgridge at hotmail.com Thu Nov 28 06:35:02 2002 From: jon_lgridge at hotmail.com (Jonathan Langridge) Date: Thu Nov 28 06:35:02 2002 Subject: [ODE] Re: Contact Constraints: First Order Slip? Message-ID: As far as I can tell from experimentation, "slip" as defined in the ODE interface is sort of fudge factor. Instead of trying to pull the relative velocities of touching surfaces towards zero by friction, the system will only pull them towards a relative velocity of "slip". In other words, a sliding box will be slowed down until it reaches slip velocity, then it will continue to slide at that velocity forever. I guess this helps simplify constraint calculations. (note: somebody scream if this explanation is rubbish!) On the topic of contacts, I've thought of a couple of things that would help a fair bit in the usual car game that everyone makes with ODE. Since I find the source code fairly impenetrable (Jacobian matrix??) I can't yet implement this stuff myself, but perhaps others will agree that: + it would be nice to have an accurate (conical) friction model available, even if this caused a big performance hit. When objects are near the friction force limit, dependance on friction axes can be quite noticeable. + some feedback from contact joints would be good. For example, the normal force that has been used to correct object velocities (or would normal impulse be more appropriate?) in order to choose appropriate impact sound effect volume. Also, an indication of how much friction force was used (two applications: switching to dynamic friction, and again sound effects depending on the amount of "scraping") Maybe I'll eventually understand how ODE works and be able to code this for my lazy self ;) In the mean time however, ODE is a godsend, and great fun too! Many thanks to Russ & contributors for this masterpiece. Colas, Jon _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From ruud at marketgraph.nl Thu Nov 28 12:23:01 2002 From: ruud at marketgraph.nl (Ruud van Gaal) Date: Thu Nov 28 12:23:01 2002 Subject: [ODE] Contact Constraints: First Order Slip? Message-ID: <20C09F811939D311BA694854E86C778233E4B5@raptor> ... > it has just occured to me ... i can't think of any ODE base > vehicle sim > that actually takes full advantage of ODE's contact modeling > capabilities to model different road surfaces. asphalt, concrete, > gravel, ice and mud will all have different mu, slip(FDS), > soft_cfm and > soft_erp parameters. there's potential here for somebody to > do a really > good job... Actually, mu changes quite considerably with load, slip ratio, temperature etc. :) You would get somewhere with the above, but nothing like a Pacejka model. Ruud (www.racer.nl) From russ at q12.org Thu Nov 28 13:43:01 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 13:43:01 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: References: <20021127224824.3a373168.russ@q12.org> Message-ID: <20021128124744.1d9badff.russ@q12.org> > What about finding a way to generalize material properties such that > contacts could be generated automatically? the trouble is, there are many schemes for generating contact parameters from material properties, and most of the useful schemes are rather ad-hoc. it's impossible to come up with a single scheme that will please everybody. the near-callback provides a convenient place to compute contact parameters, and this is also where contact culling decisions can be made. the alternative to a near-callback is a "get list of all potentially colliding objects" function - but then you have the problem of the caller having to allocate a maximum size return array. consider the case where only 10% of near object-object cases will lead to contacts - the user is required to allocate an array of 10 times the potential maximum number of object-object intersections - not always an easy thing to do. russ. -- Russell Smith http://www.q12.org From c.haarmeijer at keepitsimple.nl Thu Nov 28 13:48:02 2002 From: c.haarmeijer at keepitsimple.nl (Chris Haarmeijer) Date: Thu Nov 28 13:48:02 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <20021127224341.55bb6de6.russ@q12.org> Message-ID: Why not use reference counting on objects? This way, objects are freed whenever they're not in use anymore.... Chris -----Original Message----- From: ode-admin@q12.org [mailto:ode-admin@q12.org]On Behalf Of Russ Smith Sent: donderdag 28 november 2002 4:44 To: Nguyen Binh Cc: ode@q12.org Subject: Re: Re[2]: [ODE] Unhandled exception - access violation > I think we should follow the FIFO-style in new / delete . > We create World first so destroy it last. Then if we move the > DestroyGeom to front, everything's OK. sure, but geoms and bodys can be created/destroyed independently of each other, so ODE should handle whatever order you chose to destroy geoms in. russ. -- Russell Smith http://www.q12.org _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From russ at q12.org Thu Nov 28 13:56:01 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 13:56:01 2002 Subject: [ODE] Re: Contact Constraints: First Order Slip? In-Reply-To: References: Message-ID: <20021128130045.24a94b37.russ@q12.org> > In other words, a sliding box will be slowed down until it reaches > slip velocity, then it will continue to slide at that velocity > forever. I guess this helps simplify constraint calculations. ermmm ... it might look that way, but this is the wrong way to interpret things. see the recently updated documentation. > + it would be nice to have an accurate (conical) friction model yes it would be nice - but it's rather hard to implement the way that ODE is designed right now. but for most applications the friction pyramid approximation model is visually indistinguishable from the real thing. > + some feedback from contact joints would be good. this is not so hard to implement, there is already a dJointSetFeedback() function that provides some information, but this is not exactly what you want. it's on my to-do list to extend dJointSetFeedback() to provide the computed force values *before* they are applied to bodies, so that you can get contact normal force, motor force, etc. russ. -- Russell Smith http://www.q12.org From russ at q12.org Thu Nov 28 13:58:02 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 13:58:02 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: References: <20021127224341.55bb6de6.russ@q12.org> Message-ID: <20021128130304.7cef8101.russ@q12.org> > Why not use reference counting on objects? This way, objects are freed > whenever they're not in use anymore.... this is not the point. we *want* be able to forcibly remove a body when it's still referenced by a geom. russ. -- Russell Smith http://www.q12.org From russ at q12.org Thu Nov 28 14:05:02 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 14:05:02 2002 Subject: Re[4]: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <1086558160.20021128115858@gsc-game.kiev.ua> References: <1044162224.20021127105729@gsc-game.kiev.ua> <20021127195951.0c303209.russ@q12.org> <1086558160.20021128115858@gsc-game.kiev.ua> Message-ID: <20021128130914.3a2ad978.russ@q12.org> > Seems it works all right. good. > But one problem still remains for user definite geometry classes. > If I have some user definite classes it always necessary to support > right sequence of their creating or colliders would not be set in > colliders array again. Of course I can register all user classes in > right order before start my simulation. But if I want to support > ode stile of creating geometry classes when creating geometries, it is > very inconvenient. can you show me a situation that fails? - because i thought i had allowed for arbitrary creation order. dCreateGeomClass() sets a default collider (dCollideUserGeomWithGeom) and does not call the supplied colliders function. it returns the geom class number. the collider function is only referenced by dCollideUserGeomWithGeom() ... so i don't see how creation order makes any difference. > Why not open setCollider function? this is not a good option, because this function exposes some of the internals of the way dCollide() works. exposing this will prevent any further major overhaul of the collision system (not that i have one planned). russ. -- Russell Smith http://www.q12.org From dmcclurg at pandemicstudios.com.au Thu Nov 28 17:35:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 28 17:35:02 2002 Subject: [ODE] new ODE collision Message-ID: should it be allowable to have an empty space in another space? it is convenient for my application because i add/remove geoms to/from groups on the fly to optimize collisions. if it's ok and i'm pretty sure it used to work with an empty group inside a hash space, then i think there is a problem. currently, i get a floating point invalid operation in findLevel() because q=dInfinity frexp (q,&level); this is because the AABB for an empty group (ie, simple space) is set to infinities in dxSpace::computeAABB() in collision_space.cpp From dmcclurg at pandemicstudios.com.au Thu Nov 28 17:44:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 28 17:44:02 2002 Subject: [ODE] new ODE collision Message-ID: In findLevel(), just check for -dInfinity too because... bounds[0] == dInfinity; bounds[1] == -dInfinity; (bounds[1] - bounds[0]) => -dInfinity Here's the patch to findLevel(): static int findLevel (dReal bounds[6]) { // compute q dReal q,q2; q = bounds[1] - bounds[0]; // x bounds q2 = bounds[3] - bounds[2]; // y bounds if (q2 > q) q = q2; q2 = bounds[5] - bounds[4]; // z bounds if (q2 > q) q = q2; if (q == dInfinity || q == -dInfinity) return MAXINT; // find level such that 0.5 * 2^level < q <= 2^level int level; frexp (q,&level); // q = (0.5 .. 1.0) * 2^level (definition of frexp) return level; } -----Original Message----- From: David McClurg Sent: Friday, 29 November 2002 10:34 AM To: ode@q12.org Subject: RE: [ODE] new ODE collision should it be allowable to have an empty space in another space? it is convenient for my application because i add/remove geoms to/from groups on the fly to optimize collisions. if it's ok and i'm pretty sure it used to work with an empty group inside a hash space, then i think there is a problem. currently, i get a floating point invalid operation in findLevel() because q=dInfinity frexp (q,&level); this is because the AABB for an empty group (ie, simple space) is set to infinities in dxSpace::computeAABB() in collision_space.cpp _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From coding at natew.com Fri Nov 29 00:33:01 2002 From: coding at natew.com (Nate W) Date: Fri Nov 29 00:33:01 2002 Subject: [ODE] Contacts and materials In-Reply-To: Message-ID: On Thu, 28 Nov 2002, Anselm Hook wrote: > What about finding a way to generalize material properties such that > contacts could be generated automatically? I'd sure enjoy finding a way > to remove the collision callback. As would I - probably because I've been having fun with C# and I'm eager to put your wrappers to work. :-) Here's how I was thinking the problem might be approached: The wrapper (your C# wrapper, or probably any wrapper) would define a material data structure, something like: typedef struct { void *pUserData; dReal Mu; dReal Bounce; dReal SoftERP; dReal SoftCFM; // etc } Material; All geom objects would have Material pointers in their dGeomGetData / dGeomSetData members, and the wrapper would implement those methods as follows: // GetData implementation return ((Material*) dGeomGetData())->m_Data; // SetData implementation ((Material*) dGeomGetData())->m_Data = p; Then, a wrapper-defined collision callback would work something like this: void Callback (void *, dGeomID o1, dGeomID o2) { int iCount = dCollide (o1, o2, iContacts, &contact[0].geom, sizeof (dContact)); if (iCount) { int iMax = min (iCount, iContacts); for (int iContact = 0; iContact < iMax; iContact++) { Material *pMaterial1 = null; Material *pMaterial2 = null; if (o1) pMaterial1 = dGeomGetData (o1); if (o2) pMaterial2 = dGeomGetData (o2); SetContactParameters (&contact[iContact], pMaterial1, pMaterial2); dJointID ContactJoint = dJointCreateContact (WorldID, CollisionJointGroupID, &contact[iContact]); dJointAttach (ContactJoint, Body1, Body2); } } } The implementation of SetContactParameters is left as an exercise for the reader. :-) But, as Anselm suggested, I think it would make a nice contrib. It would make the C# wrapper considerably more useful, and would probably be helpful for most non-C/C++ applications that want to use ODE, since there would no longer be a need for a callback into the application language. Instead, applications would just set material properties for all of the Geoms, and the SetContactParameters method would take care of material interactions. Comments? -- Nate Waddoups Redmond WA USA http://www.natew.com From russ at q12.org Fri Nov 29 00:37:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 29 00:37:02 2002 Subject: [ODE] new ODE collision In-Reply-To: References: Message-ID: <20021128234118.0f966fb5.russ@q12.org> > In findLevel(), just check for -dInfinity too because... fixed. i also fixed the root of the problem, which is that an empty space was giving a 'backwards infinite' AABB. now it gives a zero AABB. russ. -- Russell Smith http://www.q12.org From slipch Fri Nov 29 01:20:02 2002 From: slipch (slipch) Date: Fri Nov 29 01:20:02 2002 Subject: Re[6]: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <20021128130914.3a2ad978.russ@q12.org> References: <1044162224.20021127105729@gsc-game.kiev.ua> <20021127195951.0c303209.russ@q12.org> <1086558160.20021128115858@gsc-game.kiev.ua> <20021128130914.3a2ad978.russ@q12.org> Message-ID: <992103885.20021129102325@gsc-game.kiev.ua> Hello Russ, Thursday, November 28, 2002, 8:09:14 PM, you wrote: >> Seems it works all right. RS> good. >> But one problem still remains for user definite geometry classes. >> If I have some user definite classes it always necessary to support >> right sequence of their creating or colliders would not be set in >> colliders array again. Of course I can register all user classes in >> right order before start my simulation. But if I want to support >> ode stile of creating geometry classes when creating geometries, it is >> very inconvenient. RS> can you show me a situation that fails? - because i thought i had RS> allowed for arbitrary creation order. dCreateGeomClass() sets a default RS> collider (dCollideUserGeomWithGeom) and does not call the supplied RS> colliders function. it returns the geom class number. the collider RS> function is only referenced by dCollideUserGeomWithGeom() ... so i don't RS> see how creation order makes any difference. I am sorry. It seems to be my fault. I have currently two user classes - tri-mesh and cylinders. When I move creating of tri-mesh before creating cylinders they fall through while all other things remain on tri-mesh. Before this I try cylinder - cylinder collision and it works. Now I try to create tri-mesh before cylinders again and everything works. I is a puzzle for me how it may happen before, maybe I mixed lib ang dll somehow. Now it works grate. -- Best regards, Konstantin Slipchenko mailto:slipch@gsc-game.kiev.ua From franjesus at medtelecom.net Fri Nov 29 12:35:02 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-15?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Fri Nov 29 12:35:02 2002 Subject: [ODE] CVS not working Message-ID: <200211292033.10697.franjesus@medtelecom.net> Having some problems with the access violation/dGeomDestroy issue, i tried to update, but: fran@avalon fran $ cd develop/ode/ fran@avalon ode $ cvs up cvs [update aborted]: connect to q12.org(209.115.250.14):2401 failed: Connection refused -- En fin... que me estoy quitando, ya sólo me pongo de vez en cuando. .: Bulmailing :. From mborigin at hotmail.com Fri Nov 29 16:33:02 2002 From: mborigin at hotmail.com (Malcolm Burton) Date: Fri Nov 29 16:33:02 2002 Subject: [ODE] Opcode and Win32.cpp Message-ID: Hi this is Malcolm... I have WinCVS working fine and have downloaded the latest CVS, I also downloaded the 0.03 tgz. I cannot find Opcode.h, or the Win32.cpp files. VC++7, and Visual Studio .NET compile is working as per the notes for vs7 but complains about opcode.h not found, Win32.cpp not found - and halts. I do not seem to have all the files! Malcolm _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From coding at natew.com Fri Nov 29 23:09:02 2002 From: coding at natew.com (Nate W) Date: Fri Nov 29 23:09:02 2002 Subject: [ODE] Opcode and Win32.cpp In-Reply-To: Message-ID: On Fri, 29 Nov 2002, Malcolm Burton wrote: > downloaded the 0.03 tgz. I cannot find Opcode.h, or the Win32.cpp files. Opcode comes separately: http://www.codercorner.com/Opcode.htm Win32.cpp is not needed. Just delete it from the project and all will be well. I removed it from mine, but apparently not until after I uploaded the contrib. Sorry about that. -- Nate Waddoups Redmond WA USA http://www.natew.com From pml_mrawls at yahoo.com Sat Nov 30 14:28:02 2002 From: pml_mrawls at yahoo.com (Mark Rawls) Date: Sat Nov 30 14:28:02 2002 Subject: [ODE] cvs compiling issues Message-ID: <20021130212752.13403.qmail@web40504.mail.yahoo.com> --0-2059245022-1038691672=:12812 Content-Type: text/plain; charset=us-ascii Hi. I've attempted to compile the cvs version of ODE using msvc7 and also GNU make. MSVC7 complained about external ref to dInfinityValue (maybe this was meant to be dInfinity which I see is used in the code several times, but not dInifnityValue?), and some other things; I got the impression it wasn't up to date with the latest cvs version: is this true? Because of this, I tried to use GNU make. Using GNU make, I get these errors which I believe might be problems with the source code... step.cpp ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(731) : error C2664: 'dSet! Value' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called make: *** [ode/src/step.obj] Error 2 Also, I tried to get a more recent version of cvs to see if this has been fixed, but WinCVS gives me this message: connect to q12.org(q12.org):2401 failed: No connection could be made because the target machine actively refused it. Is there something going on with the server that connections are being refused for a certain amount of time, or is this something wrong with my configuration (which worked before)? --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-2059245022-1038691672=:12812 Content-Type: text/html; charset=us-ascii

Hi.

I've attempted to compile the cvs version of ODE using msvc7 and also GNU make.  MSVC7 complained about external ref to dInfinityValue (maybe this was meant to be dInfinity which I see is used in the code several times, but not dInifnityValue?), and some other things; I got the impression it wasn't up to date with the latest cvs version: is this true?   Because of this, I tried to use GNU make.

Using GNU make, I get these errors which I believe might be problems with the source code...

step.cpp
ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi
s operator or a conversion to a type acceptable to the predefined operator

ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr
om 'dInfBytes' to 'dReal'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called

ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi
s operator or a conversion to a type acceptable to the predefined operator

ode\src\step.cpp(731) : error C2664: 'dSet! Value' : cannot convert parameter 3 fr
om 'dInfBytes' to 'dReal'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called
make: *** [ode/src/step.obj] Error 2

Also, I tried to get a more recent version of cvs to see if this has been fixed, but WinCVS gives me this message:

connect to q12.org(q12.org):2401 failed: No connection could be made because the target machine actively refused it.

Is there something going on with the server that connections are being refused for a certain amount of time, or is this something wrong with my configuration (which worked before)?



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-2059245022-1038691672=:12812-- From coding at natew.com Sat Nov 30 14:56:01 2002 From: coding at natew.com (Nate W) Date: Sat Nov 30 14:56:01 2002 Subject: [ODE] cvs compiling issues In-Reply-To: <20021130212752.13403.qmail@web40504.mail.yahoo.com> Message-ID: On Sat, 30 Nov 2002, Mark Rawls wrote: > I've attempted to compile the cvs version of ODE using msvc7 [...] I > got the impression it wasn't up to date with the latest cvs version: > is this true? Because of this, I tried to use GNU make. That's true. I submitted the msvc7 project quite a while ago, and I know there have been a number of changes to ODE since then. I'll update the msvc7 contrib as soon as I get around up updating my local ODE code... unless someone else gets to it first (hint, hint). -- Nate Waddoups Redmond WA USA http://www.natew.com From russ at q12.org Sat Nov 30 16:21:01 2002 From: russ at q12.org (Russ Smith) Date: Sat Nov 30 16:21:01 2002 Subject: [ODE] cvs compiling issues In-Reply-To: <20021130212752.13403.qmail@web40504.mail.yahoo.com> References: <20021130212752.13403.qmail@web40504.mail.yahoo.com> Message-ID: <20021130152618.6e6dc902.russ@q12.org> > Also, I tried to get a more recent version of cvs to see if this has > been fixed, but WinCVS gives me this message: > > connect to q12.org(q12.org):2401 failed: No connection could be made > because the target machine actively refused it. the CVS server is down, i'm hoping to get it fixed shortly. russ. -- Russell Smith http://www.q12.org From russ at q12.org Sat Nov 30 17:00:02 2002 From: russ at q12.org (Russ Smith) Date: Sat Nov 30 17:00:02 2002 Subject: [ODE] cvs compiling issues In-Reply-To: <20021130152618.6e6dc902.russ@q12.org> References: <20021130212752.13403.qmail@web40504.mail.yahoo.com> <20021130152618.6e6dc902.russ@q12.org> Message-ID: <20021130160426.4dcd1863.russ@q12.org> > the CVS server is down, i'm hoping to get it fixed shortly. the CVS server is up again. russ. -- Russell Smith http://www.q12.org From stephan at eisscholle.de Fri Nov 1 02:09:02 2002 From: stephan at eisscholle.de (Stephan Heigl) Date: Fri Nov 1 02:09:02 2002 Subject: [ODE] Tri-Collider code and OpCode 1.2? Message-ID: <000c01c28187$268650e0$0411a8c0@tonline> This is a multi-part message in MIME format. ------=_NextPart_000_0009_01C2818F.88079560 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, how does opcode 1.2 support for the tri-collider come along? I am = looking forward to it since opcode 1.0 isn't available for Unix. Thanks. - Stephan ------=_NextPart_000_0009_01C2818F.88079560 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
how does opcode 1.2 support for the = tri-collider=20 come along? I am looking forward to it since opcode 1.0 isn't available = for=20 Unix.
 
Thanks.
- Stephan
------=_NextPart_000_0009_01C2818F.88079560-- From Remko at act-3d.com Fri Nov 1 06:16:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Fri Nov 1 06:16:02 2002 Subject: [ODE] GTA3 and Physics Message-ID: <278777570.1387675341.98@server> Hi, We implemented ODE in our real-time 3D authoring tool. I created a demo called 'Monster Mayhem' that demonstrates the vehicle simulation capabilities of ODE. You get to drive around in stunt level with ramps, loopings and jumps. There are power-ups spread trough the level that change the car into a monster truck, reduce gravity, speed up time, or give the car a turbo engine. The results are just as good as the physics in GTA3. The capabilities of ODE really amazed me. To be honest, the results are better than I expected. To get everything working, we added several extensions to ODE. We made the collision routine work with our binary partitioning tree and we implemented better polygon collision. We also build in a feature so you can pin the simulation down to a certain frequency. This is VERY important because this ensures your perfectly tweaked simulation will run the same way on any system. The source is available in our SDK. The SDK is downloadable in our support section. Another important feature we added is angular velocity damping. We simply reduce the angular velocity each step so rotating objects can come to a halt (simulated rotational friction). This feature is very important to get stable vehicles. By applying an angular velocity damping to the body of the car, you prevent it from tipping over too quickly (keeping the simulation fun). These are the bottlenecks of ODE I found during a month of full time testing: - Lack of certain collision shapes (cylinder, cone, pyramid) - Stack overflow when there are too many collisions (because of a recursive function) If this occurs, the simulation is too slow anyway. - Box stacking problem (a lot of info about this in the mailing list) - 'Bending wheels' when the wheel rotate extremely fast (this can be prevented by tweaking the simulation) - Except for the hinge2 joint, the joints are not really usable, they are very un-rigid and they have a hard time keeping bodies together. The joints can only keep bodies together if the bodies are not too heavy.(Maybe we did something wrong here but I can't get a regular hinge to behave as you would expect. At first, I planned a bridge in the demo but the hinge could not keep the bridge into its place. Tweaking the CFM and ERP values made some improvements but they did not solve the problem.) - The way ODE works, makes heavy objects or objects that are under a lot of stress behave in a spongy way. This is not a real problem because you can solve it by tweaking the simulation and it is the reason why ODE is so very stable. You can see this effect at the beginning of the demo where you see the balls squash into each other because the ball at the bottom is under so much stress. In some cases, this is actually a nice side effect. - It is impossible to prevent bodies from rotating. This is important if you want to make a 1st person camera using ODE. Now, the character will always roll down a shallow slope. Maybe this is solvable now, suggestions are welcome. In the end, I must say ODE does a great job. The lack of certain collision shapes can be solved by coding them yourself and there already is a cylinder shape in development. The box-stacking problem is not an ODE problem but just a problem in the collision detection routine. This problem can be solved with not to much effort it is just a matter of waiting until someone finds some time to fix it. I do not have a clue about the hinges but there is a lot you can do without using hinges :) ODE is very forgiving when it comes to errors. I can throw in random objects and ODE solves the physics perfectly. ODE is a great alternative to commercial physics engines although it is more limited of course. Hey, its free and it works like a charm so why should you complain about it? Have a look: http://www.quest3d.com You can download the demo version of Quest3D and experiment with ODE yourself. -Remko (P.S. Russ, If you read this, can you put our page on your community list? http://www.quest3d.com/index.php3?id=116) -----Original Message----- From: Aanand Narayanan.P.P [mailto:aanand@milestoneindia.com] Sent: Wednesday, October 30, 2002 10:05 AM To: ode@q12.org; Remko Jacobs (act-3d.com) Subject: [ODE] GTA3 and Physics Does anybody know which method (direct LCP, iterative LCP, penalty etc) was used in the (vehicle) physics for GTA3? Is it possible to achieve the same level of stability with ODE? I would like to hear from other people who have used ODE for full fledged physics simulations. Thanks AN --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/2002 _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From martin at metahuman.org Fri Nov 1 06:33:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Fri Nov 1 06:33:02 2002 Subject: [ODE] GTA3 and Physics References: <278777570.1387675341.98@server> Message-ID: <3DC28266.C376AC14@metahuman.org> "Remko Jacobs (act-3d.com)" wrote: > > Hi, > > - Except for the hinge2 joint, the joints are not really usable, ... > I do not have a clue > about the hinges but there is a lot you can do without using hinges :) When you say "the joints are not really usable," did you mean hinges? Or, for example, do you consider the ball and socket joints to also be usable? > - The way ODE works, makes heavy objects or objects that are under a lot > of stress behave in a spongy way. I wonder whether this could be reduced by adding a constraint a timestep early, to help prevent objects from penetrating in the first place. From mattias at cambrianlabs.com Fri Nov 1 11:14:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Fri Nov 1 11:14:02 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> References: <278777570.1387675341.98@server> Message-ID: > (P.S. Russ, If you read this, can you put our page on your community > list? http://www.quest3d.com/index.php3?id=116) Excellent game! cheers, m From russ at q12.org Fri Nov 1 12:11:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 1 12:11:02 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: > We implemented ODE in our real-time 3D authoring tool. I created a demo > called 'Monster Mayhem' that demonstrates the vehicle simulation nice! > - Stack overflow when there are too many collisions (because of a > recursive function) If this occurs, the simulation is too slow anyway. what recursive function do you mean? perhaps you mean a stack overflow in the main ODE solver function - because too many collisions = too many contacts = a big matrix that is slow to solve. if ODE moves to an iterative LCP method then this problem might go away (lots of experiments to do here). > - 'Bending wheels' when the wheel rotate extremely fast (this can be > prevented by tweaking the simulation) yes ... when i get all the other things on the TO-DO out of the way, i'd like to try some solutions for this problem (i.e. 'glue the wheels back on'). > - Except for the hinge2 joint, the joints are not really usable, they are > very un-rigid and they have a hard time keeping bodies together. this is surprising ... but i can think of two ways this could happen. (1) if the vehicle is rotating quickly through the air, errors in the simulation may cause the wheels to pull apart. (2) if you are directly setting the velocity of individual bodies to implement damping, the joints will certainly pull apart, as the velocities at the joint points will no longer match up. also on the TO-DO list is stable rotational damping. > - The way ODE works, makes heavy objects or objects that are under a lot > of stress behave in a spongy way. this should only be the case if that CFM number is high. > (P.S. Russ, If you read this, can you put our page on your community > list? http://www.quest3d.com/index.php3?id=116) sure, this might take until after the weekend though. russ. -- Russ Smith http://www.q12.org/ From gazza at shaw.ca Fri Nov 1 17:10:02 2002 From: gazza at shaw.ca (Gazza) Date: Fri Nov 1 17:10:02 2002 Subject: [ODE] How do I code my own constraints ? Message-ID: <000a01c281be$11650e40$03324c18@vf.shawcable.net> This is a multi-part message in MIME format. --Boundary_(ID_1JqNyQXxqSfOhiMWDfjTSQ) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Hi, I'm trying to understand how to compute the constraints matrix for a particular constraint. I'm of the understanding that a 'contact' constraint would remove a DOF along the contact normal, thus requiring 1 value. When solved, the force/impulse is applied along the normal. For a ball joint, 3 DOF's are removed - x,y,z translations, and for a hinge, 5 DOF's are removed - x,y,z translation and say x,y rotation. Am I correct in these assumptions ? What I don't understand (or can find any documentation/papers on) is how the value(s) are computed for the A(n*n) matrix and b(n*1) for each constraint, which tell the system to remove these DOF's. Any help given is most appreciated. Thanks in advance. Gazza --Boundary_(ID_1JqNyQXxqSfOhiMWDfjTSQ) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: 7BIT
Hi,
 
I'm trying to understand how to compute the constraints matrix for a particular constraint.
 
I'm of the understanding that a 'contact' constraint would remove a DOF along the contact normal, thus requiring 1 value.  When solved, the force/impulse is applied along the normal.  For a ball joint, 3 DOF's are removed - x,y,z translations,  and for a hinge, 5 DOF's are removed - x,y,z translation and say x,y rotation.  Am I correct in these assumptions ?
 
What I don't understand (or can find any documentation/papers on) is how the value(s) are computed for the A(n*n) matrix and b(n*1) for each constraint, which tell the system to remove these DOF's.
 
Any help given is most appreciated.
 
Thanks in advance.
  Gazza
--Boundary_(ID_1JqNyQXxqSfOhiMWDfjTSQ)-- From aanand_pp at myrealbox.com Fri Nov 1 17:11:44 2002 From: aanand_pp at myrealbox.com (Aanand Narayanan.P.P) Date: Fri Nov 1 17:11:44 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: <000001c281cd$f6ae6be0$4ac1c0cb@digitalcrusher> Hi Thanks for all that info from everyone. > The source is available in our SDK. The SDK > is downloadable in our support section. Is it freely downloadable? > - The way ODE works, makes heavy objects or objects that are under a lot > of stress behave in a spongy way. ... I guess that's the reason why it is safer to limit the mass of objects between 1.0 and 10.0. Am I right, Russ? Thanks for the info, it was really useful and I should watch out for that stack overflow problem :). Cheers AN From coding at natew.com Fri Nov 1 18:10:02 2002 From: coding at natew.com (Nate W) Date: Fri Nov 1 18:10:02 2002 Subject: [ODE] msvc dlls? In-Reply-To: Message-ID: On Thu, 31 Oct 2002, Anselm Hook wrote: > Using msvc 7.0 I think that I have to have __dllexport... defined - but > none of the methods in objects.h have SHAREDLIBEXPORT as a prefix. [...] > > But I am a bit baffled about how I did it last time - I don't think I was > using cygwin... maybe these define prefixes were removed? Did you run the configurator? SHAREDLIBEXPORT is my my config.h, which if I recall correctly is generated by the configurator program. I haven't actually generated my config.h in a long time since I've just been copying that file from previous build trees. > Also I noticed that there's an include of alloca.h - msdev doesn't have > that. I think that may be another configurator/config.h thing. -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Fri Nov 1 22:13:01 2002 From: coding at natew.com (Nate W) Date: Fri Nov 1 22:13:01 2002 Subject: [ODE] slider trouble In-Reply-To: <20021031221053.291c8cac.russ@q12.org> Message-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --1363170581-1279554879-1036185734=:7964 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 31 Oct 2002, Russ Smith wrote: > nate, can you verify the fix? Unfortunately, no... I've attached another test that bounces things off the ground a bit differently, and you can watch two blocks bounce skyward and then gradually spin up to an explosion. How's this for an alternate approach: apply the linear force created by the joint stop at each body's center of mass, but apply it in the direction of the other body's center of mass, rather than along the slider axis (project the force vector along the direction of the other body's center of mass). Would that also cancel out the torque effect, without adding torques to the bodies explicitly? Also, could this problem be related to the problem where a single flying spinning body also gains angular momentum? I actually saw the slider-limit acceleration problem months ago, but I mistook it for the explicit integration problem described in the FAQ in 11.12. -- Nate Waddoups Redmond WA USA http://www.natew.com --1363170581-1279554879-1036185734=:7964 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="test_sliderstops.cpp" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="test_sliderstops.cpp" LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioNDQogKiAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKg0NCiAqIE9wZW4gRHluYW1pY3MgRW5naW5lLCBD b3B5cmlnaHQgKEMpIDIwMDEsMjAwMiBSdXNzZWxsIEwuIFNtaXRoLiAgICAg ICAqDQ0KICogQWxsIHJpZ2h0cyByZXNlcnZlZC4gIEVtYWlsOiBydXNzQHEx Mi5vcmcgICBXZWI6IHd3dy5xMTIub3JnICAgICAgICAgICoNDQogKiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKg0NCiAqIFRoaXMgbGlicmFyeSBpcyBm cmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3Ig ICAgICAgICAqDQ0KICogbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiBF SVRIRVI6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNDQog KiAgICgxKSBUaGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNl IGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSAgKg0NCiAqICAgICAgIFNvZnR3 YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIuMSBvZiB0aGUgTGlj ZW5zZSwgb3IgKGF0ICAqDQ0KICogICAgICAgeW91ciBvcHRpb24pIGFueSBs YXRlciB2ZXJzaW9uLiBUaGUgdGV4dCBvZiB0aGUgR05VIExlc3NlciAgICAg ICoNDQogKiAgICAgICBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGlzIGluY2x1 ZGVkIHdpdGggdGhpcyBsaWJyYXJ5IGluIHRoZSAgICAgKg0NCiAqICAgICAg IGZpbGUgTElDRU5TRS5UWFQuICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAqDQ0KICogICAoMikgVGhlIEJTRC1zdHls ZSBsaWNlbnNlIHRoYXQgaXMgaW5jbHVkZWQgd2l0aCB0aGlzIGxpYnJhcnkg aW4gICAgICoNDQogKiAgICAgICB0aGUgZmlsZSBMSUNFTlNFLUJTRC5UWFQu ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKg0NCiAq ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAqDQ0KICogVGhpcyBsaWJyYXJ5 IGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1 c2VmdWwsICAgICAgICoNDQogKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7 IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAg Kg0NCiAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJ Q1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBmaWxlcyAgICAqDQ0KICogTElDRU5T RS5UWFQgYW5kIExJQ0VOU0UtQlNELlRYVCBmb3IgbW9yZSBkZXRhaWxzLiAg ICAgICAgICAgICAgICAgICAgICoNDQogKiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKg0NCiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0NCg0N CiNpbmNsdWRlIDxvZGUvb2RlLmg+DQ0KI2luY2x1ZGUgPGRyYXdzdHVmZi9k cmF3c3R1ZmYuaD4NDQoNDQojaWZkZWYgTVNWQw0NCiNwcmFnbWEgd2Fybmlu ZyhkaXNhYmxlOjQyNDQgNDMwNSkgIC8vIGZvciBWQysrLCBubyBwcmVjaXNp b24gbG9zcyBjb21wbGFpbnRzDQ0KI2VuZGlmDQ0KDQ0KLy8gc2VsZ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K ICAvLyBjcmVhdGUgYm9keSAyDQ0KICBib2R5WzFdID0gZEJvZHlDcmVhdGUg KHdvcmxkKTsNDQogIGRCb2R5U2V0TWFzcyAoYm9keVsxXSwmbSk7DQ0KICBk Qm9keVNldFBvc2l0aW9uIChib2R5WzFdLC0xLDAsMTUpOw0NCg0NCiAgYm94 WzFdID0gZENyZWF0ZUJveCAoc3BhY2UsMSwxLDEpOw0NCiAgZEdlb21TZXRC b2R5IChib3hbMV0sYm9keVsxXSk7DQ0KDQ0KICAvLyBjcmVhdGUgc2xpZGVy DQ0KICBzbGlkZXIgPSBkSm9pbnRDcmVhdGVTbGlkZXIgKHdvcmxkLDApOw0N CiAgZEpvaW50QXR0YWNoIChzbGlkZXIsYm9keVswXSxib2R5WzFdKTsNDQog IGRKb2ludFNldFNsaWRlckF4aXMgKHNsaWRlciwwLDAsMSk7DQ0KICBkSm9p bnRTZXRTbGlkZXJQYXJhbSAoc2xpZGVyLCBkUGFyYW1Mb1N0b3AsIC0xLjAp Ow0NCiAgZEpvaW50U2V0U2xpZGVyUGFyYW0gKHNsaWRlciwgZFBhcmFtSGlT dG9wLCAxLjApOw0NCg0NCiAgLy8gcnVuIHNpbXVsYXRpb24NDQogIGRzU2lt dWxhdGlvbkxvb3AgKGFyZ2MsYXJndiwzNTIsMjg4LCZmbik7DQ0KDQ0KICBk V29ybGREZXN0cm95ICh3b3JsZCk7DQ0KICByZXR1cm4gMDsNDQp9DQ0K --1363170581-1279554879-1036185734=:7964-- From russ at q12.org Fri Nov 1 23:46:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 1 23:46:02 2002 Subject: [ODE] slider trouble In-Reply-To: References: <20021031221053.291c8cac.russ@q12.org> Message-ID: <20021101225009.53deb28e.russ@q12.org> > > nate, can you verify the fix? > > Unfortunately, no... I've attached another test that bounces things off > the ground a bit differently, and you can watch two blocks bounce skyward > and then gradually spin up to an explosion. i'll check this out after the weekend. russ. -- Russell Smith http://www.q12.org From jeffreyweber at hotmail.com Sat Nov 2 08:07:01 2002 From: jeffreyweber at hotmail.com (Jeff Weber) Date: Sat Nov 2 08:07:01 2002 Subject: [ODE] GTA3 and Physics Message-ID: Quick question. What "geometry" are you using for you wheels? Are you using one of the built in ode geometries, or your own? ----Original Message Follows---- From: "Remko Jacobs (act-3d.com)" To: "ODE@q12.org" Subject: RE: [ODE] GTA3 and Physics Date: Fri, 1 Nov 2002 14:13:00 +0100 Hi, We implemented ODE in our real-time 3D authoring tool. I created a demo called 'Monster Mayhem' that demonstrates the vehicle simulation capabilities of ODE. You get to drive around in stunt level with ramps, loopings and jumps. There are power-ups spread trough the level that change the car into a monster truck, reduce gravity, speed up time, or give the car a turbo engine. The results are just as good as the physics in GTA3. The capabilities of ODE really amazed me. To be honest, the results are better than I expected. To get everything working, we added several extensions to ODE. We made the collision routine work with our binary partitioning tree and we implemented better polygon collision. We also build in a feature so you can pin the simulation down to a certain frequency. This is VERY important because this ensures your perfectly tweaked simulation will run the same way on any system. The source is available in our SDK. The SDK is downloadable in our support section. Another important feature we added is angular velocity damping. We simply reduce the angular velocity each step so rotating objects can come to a halt (simulated rotational friction). This feature is very important to get stable vehicles. By applying an angular velocity damping to the body of the car, you prevent it from tipping over too quickly (keeping the simulation fun). These are the bottlenecks of ODE I found during a month of full time testing: - Lack of certain collision shapes (cylinder, cone, pyramid) - Stack overflow when there are too many collisions (because of a recursive function) If this occurs, the simulation is too slow anyway. - Box stacking problem (a lot of info about this in the mailing list) - 'Bending wheels' when the wheel rotate extremely fast (this can be prevented by tweaking the simulation) - Except for the hinge2 joint, the joints are not really usable, they are very un-rigid and they have a hard time keeping bodies together. The joints can only keep bodies together if the bodies are not too heavy.(Maybe we did something wrong here but I can't get a regular hinge to behave as you would expect. At first, I planned a bridge in the demo but the hinge could not keep the bridge into its place. Tweaking the CFM and ERP values made some improvements but they did not solve the problem.) - The way ODE works, makes heavy objects or objects that are under a lot of stress behave in a spongy way. This is not a real problem because you can solve it by tweaking the simulation and it is the reason why ODE is so very stable. You can see this effect at the beginning of the demo where you see the balls squash into each other because the ball at the bottom is under so much stress. In some cases, this is actually a nice side effect. - It is impossible to prevent bodies from rotating. This is important if you want to make a 1st person camera using ODE. Now, the character will always roll down a shallow slope. Maybe this is solvable now, suggestions are welcome. In the end, I must say ODE does a great job. The lack of certain collision shapes can be solved by coding them yourself and there already is a cylinder shape in development. The box-stacking problem is not an ODE problem but just a problem in the collision detection routine. This problem can be solved with not to much effort it is just a matter of waiting until someone finds some time to fix it. I do not have a clue about the hinges but there is a lot you can do without using hinges :) ODE is very forgiving when it comes to errors. I can throw in random objects and ODE solves the physics perfectly. ODE is a great alternative to commercial physics engines although it is more limited of course. Hey, its free and it works like a charm so why should you complain about it? Have a look: http://www.quest3d.com You can download the demo version of Quest3D and experiment with ODE yourself. -Remko (P.S. Russ, If you read this, can you put our page on your community list? http://www.quest3d.com/index.php3?id=116) -----Original Message----- From: Aanand Narayanan.P.P [mailto:aanand@milestoneindia.com] Sent: Wednesday, October 30, 2002 10:05 AM To: ode@q12.org; Remko Jacobs (act-3d.com) Subject: [ODE] GTA3 and Physics Does anybody know which method (direct LCP, iterative LCP, penalty etc) was used in the (vehicle) physics for GTA3? Is it possible to achieve the same level of stability with ODE? I would like to hear from other people who have used ODE for full fledged physics simulations. Thanks AN --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/2002 _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp From filipe.dias at mind.pt Sat Nov 2 08:51:01 2002 From: filipe.dias at mind.pt (Filipe Dias) Date: Sat Nov 2 08:51:01 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: <200211021550.gA2FoSu02059@hook.org> I liked it much! the only criticism I have is that I find the car to stable... What are you doing to make the car always stand up? My guess is you have a "weight" under the wheels of the car.. Oh, and it is nearly impossible to make the loop.. Fil. -----Original Message----- From: "Remko Jacobs (act-3d.com)" To: "ODE@q12.org" Date: Fri, 1 Nov 2002 14:13:00 +0100 Subject: RE: [ODE] GTA3 and Physics > Hi, > > We implemented ODE in our real-time 3D authoring tool. I created a demo > > called 'Monster Mayhem' that demonstrates the vehicle simulation > capabilities of ODE. You get to drive around in stunt level with ramps, > > loopings and jumps. There are power-ups spread trough the level that > change the car into a monster truck, reduce gravity, speed up time, or > > give the car a turbo engine. The results are just as good as the > physics > in GTA3. The capabilities of ODE really amazed me. To be honest, the > results are better than I expected. > > To get everything working, we added several extensions to ODE. We made > > the collision routine work with our binary partitioning tree and we > implemented better polygon collision. We also build in a feature so you > > can pin the simulation down to a certain frequency. This is VERY > important because this ensures your perfectly tweaked simulation will > run > the same way on any system. The source is available in our SDK. The SDK > > is downloadable in our support section. > > Another important feature we added is angular velocity damping. We > simply > reduce the angular velocity each step so rotating objects can come to a > > halt (simulated rotational friction). This feature is very important to > > get stable vehicles. By applying an angular velocity damping to the > body > of the car, you prevent it from tipping over too quickly (keeping the > simulation fun). > > These are the bottlenecks of ODE I found during a month of full time > testing: > > - Lack of certain collision shapes (cylinder, cone, pyramid) > - Stack overflow when there are too many collisions (because of a > recursive function) If this occurs, the simulation is too slow anyway. > - Box stacking problem (a lot of info about this in the mailing list) > - 'Bending wheels' when the wheel rotate extremely fast (this can be > prevented by tweaking the simulation) > - Except for the hinge2 joint, the joints are not really usable, they > are > very un-rigid and they have a hard time keeping bodies together. The > joints can only keep bodies together if the bodies are not too > heavy.(Maybe we did something wrong here but I can't get a regular > hinge > to behave as you would expect. At first, I planned a bridge in the demo > > but the hinge could not keep the bridge into its place. Tweaking the > CFM > and ERP values made some improvements but they did not solve the > problem.) > - The way ODE works, makes heavy objects or objects that are under a > lot > of stress behave in a spongy way. This is not a real problem because > you > can solve it by tweaking the simulation and it is the reason why ODE is > > so very stable. You can see this effect at the beginning of the demo > where you see the balls squash into each other because the ball at the > > bottom is under so much stress. In some cases, this is actually a nice > > side effect. > - It is impossible to prevent bodies from rotating. This is important > if > you want to make a 1st person camera using ODE. Now, the character will > > always roll down a shallow slope. Maybe this is solvable now, > suggestions > are welcome. > > In the end, I must say ODE does a great job. The lack of certain > collision shapes can be solved by coding them yourself and there > already > is a cylinder shape in development. The box-stacking problem is not an > > ODE problem but just a problem in the collision detection routine. This > > problem can be solved with not to much effort it is just a matter of > waiting until someone finds some time to fix it. I do not have a clue > about the hinges but there is a lot you can do without using hinges :) > > ODE is very forgiving when it comes to errors. I can throw in random > objects and ODE solves the physics perfectly. ODE is a great > alternative > to commercial physics engines although it is more limited of course. > Hey, > its free and it works like a charm so why should you complain about it? > > Have a look: > http://www.quest3d.com > > You can download the demo version of Quest3D and experiment with ODE > yourself. > > -Remko > > (P.S. Russ, If you read this, can you put our page on your community > list? http://www.quest3d.com/index.php3?id=116) > > > -----Original Message----- > From: Aanand Narayanan.P.P [mailto:aanand@milestoneindia.com] > Sent: Wednesday, October 30, 2002 10:05 AM > To: ode@q12.org; Remko Jacobs (act-3d.com) > Subject: [ODE] GTA3 and Physics > > > > > Does anybody know which method (direct LCP, iterative LCP, penalty etc) > was used in the (vehicle) physics for GTA3? > Is it possible to achieve the same level of stability with ODE? I would > like to hear from other people who have used ODE for full fledged > physics simulations. > > Thanks > AN > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/2002 > > > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From ander_taylor at hotmail.com Sat Nov 2 16:21:02 2002 From: ander_taylor at hotmail.com (Ander Taylor) Date: Sat Nov 2 16:21:02 2002 Subject: [ODE] Complie to a Lib Message-ID: Hi, I am new to ODE and C++. I am working on a wrapper to allow the use of ODE from .Net, extending the work already done by Jeff Weber. Anyway, my qestion, how should I complie ODE to a Lib from VC++7? Does anyone know the settings I should use? Cheers, Ander _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From coding at natew.com Sat Nov 2 23:49:02 2002 From: coding at natew.com (Nate W) Date: Sat Nov 2 23:49:02 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: On Sat, 2 Nov 2002, Ander Taylor wrote: > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > from .Net, extending the work already done by Jeff Weber. Have a look at Anselm Hook's work too, if you haven't seen it yet: http://p2pmap.org/cgi-bin/cvsweb.cgi/p2pmap/src/ode/ode.cs?rev=1.3&content-type=text/x-cvsweb-markup > Anyway, my qestion, how should I compile ODE to a Lib from VC++7? Does > anyone know the settings I should use? If you want to build a DLL, have a look at the contrib/msvc7/ CVS folder, it's got .sln files for regular ODE and ODE with the tri-collider extension. -- Nate Waddoups Redmond WA USA http://www.natew.com From ps_yumemi at yahoo.com Sun Nov 3 02:10:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sun Nov 3 02:10:02 2002 Subject: [ODE] rotation matrix Message-ID: <20021103090928.66813.qmail@web40509.mail.yahoo.com> hello, i have a simple question: how do you access the contents of the rotation matrix that the function dGeomGetRotation or dBodyGetRotation give out? I know that the pointer is only a dReal and the matrix i need is a dMatrix3. How do you resolve this? i really need to pass that info somehow. thanks pia __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From coding at natew.com Sun Nov 3 03:10:02 2002 From: coding at natew.com (Nate W) Date: Sun Nov 3 03:10:02 2002 Subject: [ODE] rotation matrix In-Reply-To: <20021103090928.66813.qmail@web40509.mail.yahoo.com> Message-ID: On Sun, 3 Nov 2002, pia dalusong wrote: > i have a simple question: how do you access the > contents of the rotation matrix that the function > dGeomGetRotation or dBodyGetRotation give out? > I know that the pointer is only a dReal and the matrix > i need is a dMatrix3. How do you resolve this? > i really need to pass that info somehow. Have a look at the setTransform function in drawstuff.cpp, around line 325. This shows how to use the array of values returned by a dBodyGetRotation call to populate a matrix for OpenGL. Note that dBodyGetRotation returns a 4x3 matrix, so every fourth scalar is ignored during the conversion. -- Nate Waddoups Redmond WA USA http://www.natew.com From kaffiene at xtra.co.nz Sun Nov 3 12:31:01 2002 From: kaffiene at xtra.co.nz (Peter) Date: Sun Nov 3 12:31:01 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: <001301c2836f$78a17190$5c02a8c0@peter> > - 'Bending wheels' when the wheel rotate extremely fast (this can be > prevented by tweaking the simulation) Can I ask which tweaks you used? Peter. From anselm at hook.org Sun Nov 3 20:12:02 2002 From: anselm at hook.org (Anselm Hook) Date: Sun Nov 3 20:12:02 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: > On Sat, 2 Nov 2002, Ander Taylor wrote: > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > from .Net, extending the work already done by Jeff Weber. Cool! > Have a look at Anselm Hook's work too, if you haven't seen it yet: I recently moved my version here - you'll want this copy if you use this: http://p2pmap.org/cgi-bin/cvsweb.cgi/p2pmap/src/ode/contrib/csharp/ > > Anyway, my qestion, how should I compile ODE to a Lib from VC++7? Does > > anyone know the settings I should use? > > If you want to build a DLL, have a look at the contrib/msvc7/ CVS folder, > it's got .sln files for regular ODE and ODE with the tri-collider > extension. Some misc thoughts re C# ODE bindings: I think it's a good idea to do a C# wrapper. I have one that you can grab pieces from as Nate pointed out - although I simply haven't had time to finish it up. There might be some merit in my approach however - regardless of if you do your own or not: 1) I made C# methods that directly bind to all DLL methods. All of the raw dll methods I stuck into a single class - and made them static. (so effectively I have a big bucket of static methods) 2) Then - separately - I made C# classes that called the static methods. 3) I used no-arg constructors so that it was easier to manufacture my ODE objects using an XML notation. The factory methods that discover the ODE objects (using the C# type reflection) are easier to deal with if you can invoke no-arg constructors on them... This *is* a bit of a hassle; it means that you have to 'late submit' ODE bodies to the world... my code does that. Oh, one other reason for no-arg constructors - it allows out of order instantiation of objects. The reason for the two stage approach is that it allows other developers to build their own class abstraction layer on top of the ODE API. ...um... otherwise I think the only thing that I did that (while actually pretty lame and pretty incomplete) was to try to keep the collision callback in C. I slightly extended the ODE DLL to have a new self managing callback method for collision. [ The reason that Russ makes us normally handle collision ourselves is because collision is subjective to the application. There are many ways two surfaces can interact. Imagine sandpaper and granite, or granite and granite, or gummy bears and ceramic tile... It turns out that finding ways to abstract surface properties in the general case is not easy to solve.] In the case of C# you really don't want to have an inner loop like this being exposed to C# - my own tests and others show that it is slow: http://www.tempest-sw.com/benchmark/ http://www.kuro5hin.org/story/2002/6/25/122237/078 (although I expect that this will be untrue soon) It might be possible to build intersection tables that are exposed to C# - you could define the intersection of material properties. Finally... I just gave a little talk recently on using C# for games - I will post my notes somewhere on my website - I'll make a link at: http://p2pmap.org/technology/csharp.html for now. Basically I think binding ODE to C# is good but I wouldn't use C# for the mainloop if you want performance... - a From anselm at hook.org Sun Nov 3 22:30:02 2002 From: anselm at hook.org (Anselm Hook) Date: Sun Nov 3 22:30:02 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: There is one good reason not to use my C# binding - I am relying on a class based Vector and Matrix math library (that I ported from an open source clone of Java3D). I strongly suggest using a struct based Vector and Matrix library such as http://www.exocortex.org/3dengine or others (his starting point is BSD licenced). I'll bet Jeff Weber has solved this correctly - where is Jeff's site? Jeff? - a > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > > from .Net, extending the work already done by Jeff Weber. From ps_yumemi at yahoo.com Mon Nov 4 00:31:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Mon Nov 4 00:31:02 2002 Subject: [ODE] rotation matrix Message-ID: <20021104073051.52060.qmail@web40507.mail.yahoo.com> hello, first of all thanks for replying. i tried to pass the values to the dMatrix3 the same way in the setTransform function in the drawstuff.cpp file. unfortunately, my mobot is heading towards the opposite direction now. what i did was this : const dReal *mobot_pos; const dReal *mobot_rot; mobot_rot = dBodyGetRotation (mobot.chassis.body); mobot_pos = dBodyGetPosition (mobot.chassis.body); mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[4]; mobotdata.rota[2]=mobot_rot[8]; mobotdata.rota[3]=0; mobotdata.rota[4]=mobot_rot[1]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[9]; mobotdata.rota[7]=0; mobotdata.rota[8]=mobot_rot[2]; mobotdata.rota[9]=mobot_rot[6]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=0; i also tried this mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[1]; mobotdata.rota[2]=mobot_rot[2]; mobotdata.rota[3]=mobot_rot[3]; mobotdata.rota[4]=mobot_rot[4]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[6]; mobotdata.rota[7]=mobot_rot[7]; mobotdata.rota[8]=mobot_rot[8]; mobotdata.rota[9]=mobot_rot[9]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=mobot_rot[11]; __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From ps_yumemi at yahoo.com Mon Nov 4 00:33:01 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Mon Nov 4 00:33:01 2002 Subject: [ODE] rotation matrix Message-ID: <20021104073214.21133.qmail@web40509.mail.yahoo.com> hello, first of all thanks for replying. i tried to pass the values to the dMatrix3 the same way in the setTransform function in the drawstuff.cpp file. unfortunately, my mobot is heading towards the opposite direction now. what i did was this : const dReal *mobot_pos; const dReal *mobot_rot; mobot_rot = dBodyGetRotation (mobot.chassis.body); mobot_pos = dBodyGetPosition (mobot.chassis.body); mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[4]; mobotdata.rota[2]=mobot_rot[8]; mobotdata.rota[3]=0; mobotdata.rota[4]=mobot_rot[1]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[9]; mobotdata.rota[7]=0; mobotdata.rota[8]=mobot_rot[2]; mobotdata.rota[9]=mobot_rot[6]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=0; i also tried this mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[1]; mobotdata.rota[2]=mobot_rot[2]; mobotdata.rota[3]=mobot_rot[3]; mobotdata.rota[4]=mobot_rot[4]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[6]; mobotdata.rota[7]=mobot_rot[7]; mobotdata.rota[8]=mobot_rot[8]; mobotdata.rota[9]=mobot_rot[9]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=mobot_rot[11]; and the mobot went 90 degrees away from the rotation it was suppose to have. it only works when the values are 1 0 0 0 0 1 0 0 0 0 1 0 and that's it. what else can i do? pia __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From ps_yumemi at yahoo.com Mon Nov 4 04:55:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Mon Nov 4 04:55:02 2002 Subject: [ODE] rotation matrix In-Reply-To: <3DC64BDF.8070505@oracle.com> Message-ID: <20021104115420.48967.qmail@web40506.mail.yahoo.com> hello, ummm, what did you use to set the rotation and position of the mobots? did you still use dBodySetRotation and dBodySetPosition? or settransform? and how did you do it exactly? sorry. got confused. pia --- Ed Jones wrote: > Hiya, > > I've done exactly the same and just pinched (ahem, > "reused") this code > from drawstuff. > > As far as I know; if you define "mobotdata.rota" as > "GLfloat rota[16]" > (something like "mobotdata.transform" would probably > make more sense) > then you just need to do exactly what you've already > done, plus; > > mobotdata.rota[12] = mobot_pos[0]; > mobotdata.rota[13] = mobot_pos[1]; > mobotdata.rota[14] = mobot_pos[2]; > mobotdata.rota[15] = 1; > > ...and that works fine for me. > > I hope I'm right in saying that if things are going > in the wrong > direction then there's probably just some signs > wrong somewhere. > > Cheers, > Ed. > __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From jeffreyweber at hotmail.com Mon Nov 4 05:29:02 2002 From: jeffreyweber at hotmail.com (Jeff Weber) Date: Mon Nov 4 05:29:02 2002 Subject: [ODE] Complie to a Lib Message-ID: I just made my own vector and matrix structs. One other thing that is different about my approach is I used a "Managed C++" wrapper rather than the PInvoke method. It seemed to work great considering my lack of any true C++ experience. I'll be getting back to it eventually, but currently I'm busy "faking" some vehicle physics for a demo that is due in december. I didn't want to chance using ode as I wasn't sure I'd be able to get things running correctly by then and still have time to work on the other things that need to be in the demo. -jeff ----Original Message Follows---- From: Anselm Hook To: Nate W CC: Subject: Re: [ODE] Complie to a Lib Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) There is one good reason not to use my C# binding - I am relying on a class based Vector and Matrix math library (that I ported from an open source clone of Java3D). I strongly suggest using a struct based Vector and Matrix library such as http://www.exocortex.org/3dengine or others (his starting point is BSD licenced). I'll bet Jeff Weber has solved this correctly - where is Jeff's site? Jeff? - a > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > > from .Net, extending the work already done by Jeff Weber. _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode _________________________________________________________________ Unlimited Internet access -- and 2 months free!  Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.asp From ander_taylor at hotmail.com Mon Nov 4 06:17:02 2002 From: ander_taylor at hotmail.com (Ander Taylor) Date: Mon Nov 4 06:17:02 2002 Subject: [ODE] Complie to a Lib Message-ID: I just worked out that I dont need the lib. I can compile the whole lot, managed bits and everything, to a DLL. Finished Space, AMotor and Geom, also added Params to JointHinge. Works great. Ander ----Original Message Follows---- From: "Jeff Weber" To: ode@q12.org I just made my own vector and matrix structs. One other thing that is different about my approach is I used a "Managed C++" wrapper rather than the PInvoke method. It seemed to work great considering my lack of any true C++ experience. I'll be getting back to it eventually, but currently I'm busy "faking" some vehicle physics for a demo that is due in december. I didn't want to chance using ode as I wasn't sure I'd be able to get things running correctly by then and still have time to work on the other things that need to be in the demo. -jeff ----Original Message Follows---- From: Anselm Hook To: Nate W CC: Subject: Re: [ODE] Complie to a Lib Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) There is one good reason not to use my C# binding - I am relying on a class based Vector and Matrix math library (that I ported from an open source clone of Java3D). I strongly suggest using a struct based Vector and Matrix library such as http://www.exocortex.org/3dengine or others (his starting point is BSD licenced). I'll bet Jeff Weber has solved this correctly - where is Jeff's site? Jeff? - a > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > > from .Net, extending the work already done by Jeff Weber. _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp From ed.jones at oracle.com Mon Nov 4 08:55:02 2002 From: ed.jones at oracle.com (Ed Jones) Date: Mon Nov 4 08:55:02 2002 Subject: [ODE] CVS is Scary Message-ID: <3DC6981D.5080408@oracle.com> Hi Folks, I've been fiddling about with ODE v0.03 for a while yet, and I think it's probably best if I get my head around CVS, so I can get the latest stuff, specifically to do with the recent "dContactApprox1 mode" updates. Not having used CVS before I've tried to get the latest version of everything using WinCVS and it seems to have worked. I set the CVSROOT in the Preferences, set authentication to the "passwd" option, logged in, and used the Admin->Command Line option to type in "cvs co ode". That seemed to copy everything out of CVS and it all builds fine. Presumably, I now just need to do "cvs update" in future to pick up any changes? I assume that the "anonymous" user I logged in as doesn't have permissions to lock or change any files within CVS? So there's no danger that me being crap at using WinCVS can cause any damage to the code tree? I've seen other CVS based projects that produce a "nightly tarball" from their repositories. Is this something that's been considered for ODE? To save me worrying about accidentally deleting all the code. Or something. ;-) Cheers, Ed. From wristy_j at yahoo.com Mon Nov 4 09:00:02 2002 From: wristy_j at yahoo.com (Jason Gott) Date: Mon Nov 4 09:00:02 2002 Subject: [ODE] How do I code my own constraints ? In-Reply-To: <000a01c281be$11650e40$03324c18@vf.shawcable.net> Message-ID: <20021104155943.53446.qmail@web40804.mail.yahoo.com> Hello, The best paper I've found for describing the A matrix and B (right hand side) vector is "Linear-Time Dynamics Using Lagrange Multipliers" by David Baraff. It was in Siggraph '96. Search for it by name and you'll find .pdf's. "Fast Contact Force Computation for Nonpenetrating Rigid Bodies", also by Baraff (Siggraph '94) is also helpful. It talks about LCP's and Dantzig's algorithm. As far as figuring out what to put in J (the constraint matrices), look at ODE's source code for the different joint types. Hope that helps! J --- Gazza wrote: > Hi, > > I'm trying to understand how to compute the > constraints matrix for a particular constraint. > > I'm of the understanding that a 'contact' constraint > would remove a DOF along the contact normal, thus > requiring 1 value. When solved, the force/impulse > is applied along the normal. For a ball joint, 3 > DOF's are removed - x,y,z translations, and for a > hinge, 5 DOF's are removed - x,y,z translation and > say x,y rotation. Am I correct in these assumptions > ? > > What I don't understand (or can find any > documentation/papers on) is how the value(s) are > computed for the A(n*n) matrix and b(n*1) for each > constraint, which tell the system to remove these > DOF's. > > Any help given is most appreciated. > > Thanks in advance. > Gazza > __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From anselm at hook.org Mon Nov 4 09:33:01 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 4 09:33:01 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: do you have a site for your stuff or is it something you're not sharing yet? just curious because i'd like to see your approach. -a On Mon, 4 Nov 2002, Ander Taylor wrote: > I just worked out that I dont need the lib. > > I can compile the whole lot, managed bits and everything, to a DLL. > > Finished Space, AMotor and Geom, also added Params to JointHinge. > > Works great. > > Ander > > > ----Original Message Follows---- > From: "Jeff Weber" > To: ode@q12.org > > > I just made my own vector and matrix structs. > > One other thing that is different about my approach is I used a "Managed > C++" wrapper rather than the PInvoke method. > > It seemed to work great considering my lack of any true C++ experience. > I'll be getting back to it eventually, but currently I'm busy "faking" some > vehicle physics for a demo that is due in december. I didn't want to chance > using ode as I wasn't sure I'd be able to get things running correctly by > then and still have time to work on the other things that need to be in the > demo. > > -jeff > > > ----Original Message Follows---- > From: Anselm Hook > To: Nate W > CC: > Subject: Re: [ODE] Complie to a Lib > Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) > > > There is one good reason not to use my C# binding - I am relying on a > class based Vector and Matrix math library (that I ported from an open > source clone of Java3D). I strongly suggest using a struct based Vector > and Matrix library such as http://www.exocortex.org/3dengine or others > (his starting point is BSD licenced). > > I'll bet Jeff Weber has solved this correctly - where is Jeff's site? > Jeff? > > - a > > > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > > I am new to ODE and C++. I am working on a wrapper to allow the use > of ODE > > > > from .Net, extending the work already done by Jeff Weber. > > > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From anselm at hook.org Mon Nov 4 09:43:01 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 4 09:43:01 2002 Subject: [ODE] CVS is Scary In-Reply-To: <3DC6981D.5080408@oracle.com> Message-ID: > Presumably, I now just need to do "cvs update" in future to pick up any > changes? Yup. > I assume that the "anonymous" user I logged in as doesn't have > permissions to lock or change any files within CVS? So there's no danger > that me being crap at using WinCVS can cause any damage to the code tree? Right - there's no way you can cause any damage. It's totally safe. > I've seen other CVS based projects that produce a "nightly tarball" from > their repositories. Is this something that's been considered for ODE? To > save me worrying about accidentally deleting all the code. Or something. ;-) Russ has to answer that. I suppose once it moves to sourceforge this will happen. - a From adam.moravanszky at novodex.com Mon Nov 4 10:19:02 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [Novodex]) Date: Mon Nov 4 10:19:02 2002 Subject: [ODE] Joint Naming Message-ID: <00ae01c28425$ebdb2820$17a08481@nxcommanche> Hi, while working on improving joint support for an app that will support both ODE and Nx physics back ends, it occurred to me that there is a good opportunity for misunderstandings regarding joint naming. In particular, I think the picture for slider joint in the ODE user's guide is misleading. The joint has a circular shaft, which makes one think that rotation around the shaft may be possible. However, when one considers that such a joint would need an additional anchor parameter, it becomes clear that rotation around the axis is in fact not possible. It says this too in section 3.5, though not later in the section on slider: "... a slider joint that constraints the ``piston'' and ``socket'' to line up, and additionally constraints the two bodies to have the same orientation." We call such a joint a Prismatic joint, and draw it in the manual with a square shaft. We also have joints called sliders, with circular shafts, which is what can be created in ODE by combining a slider and a hinge through a proxy body. Obviously it is inconvenient to do any sort of renaming, but I would suggest changing the picture in ODE. --Adam -- Adam Moravanszky /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From coding at natew.com Mon Nov 4 13:18:01 2002 From: coding at natew.com (Nate W) Date: Mon Nov 4 13:18:01 2002 Subject: [ODE] CVS is Scary In-Reply-To: <3DC6981D.5080408@oracle.com> Message-ID: On Mon, 4 Nov 2002, Ed Jones wrote: > Not having used CVS before I've tried to get the latest version of > everything using WinCVS and it seems to have worked. I was using WinCVS myself until a couple weeks ago when someone suggested I try this instead: http://www.tortoisecvs.org/ It's MUCH more user-friendly. WinCVS GUI just made me want to learn the command line syntax so I wouldn't have to be confronted with all those cryptic buttons. :-) Tortoise is probably not as powerful, but all I need is to stay current with ODE and one other project I'm peripherally involved with, so I'm happy with it. It's also implemented as a shell extension, which is kind of neat. -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Mon Nov 4 13:38:02 2002 From: coding at natew.com (Nate W) Date: Mon Nov 4 13:38:02 2002 Subject: [ODE] Joint Naming In-Reply-To: <00ae01c28425$ebdb2820$17a08481@nxcommanche> Message-ID: On Mon, 4 Nov 2002, Adam Moravanszky [Novodex] wrote: > The joint has a circular shaft, which makes one think that rotation > around the shaft may be possible. [.....] We call such a joint a > Prismatic joint, and draw it in the manual with a square shaft. FWIW, I feel the same way. I use the "prismatic" term in the XML generated by Juice. It's called "slider" in the UI, but I think that was a mistake, as the term is ambiguous. > We also have joints called sliders, with circular shafts [....] So long as we're talking about naming, how about "cylindrical joint" for those? -- Nate Waddoups Redmond WA USA http://www.natew.com From adam.moravanszky at novodex.com Mon Nov 4 14:22:02 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [NovodeX]) Date: Mon Nov 4 14:22:02 2002 Subject: [ODE] Joint Naming References: Message-ID: <004001c28440$1ca4a200$f311da50@powerhouse> > > We also have joints called sliders, with circular shafts [....] > > So long as we're talking about naming, how about "cylindrical joint" for > those? > Perhaps -- I like it because it describes a shape like 'spherical' and 'prismatic' do. I'd have to ask someone with a robotics background what the 'official' term is. Not that I insist on using those -- sometimes they are confusing to novices: For example "prismatic" isn't exactly intuitive: most people will think of optics when they hear that. We still use it to avoid ambiguity. -- Adam /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From ander_taylor at hotmail.com Mon Nov 4 14:35:02 2002 From: ander_taylor at hotmail.com (Ander Taylor) Date: Mon Nov 4 14:35:02 2002 Subject: [ODE] Complie to a Lib Message-ID: No I don't have a site. I will ask Jeff if I can put it on his. I will keep you posted. Ander ----Original Message Follows---- From: Anselm Hook To: Ander Taylor do you have a site for your stuff or is it something you're not sharing yet? just curious because i'd like to see your approach. -a On Mon, 4 Nov 2002, Ander Taylor wrote: > I just worked out that I dont need the lib. > > I can compile the whole lot, managed bits and everything, to a DLL. > > Finished Space, AMotor and Geom, also added Params to JointHinge. > > Works great. > > Ander > > > ----Original Message Follows---- > From: "Jeff Weber" > To: ode@q12.org > > > I just made my own vector and matrix structs. > > One other thing that is different about my approach is I used a "Managed > C++" wrapper rather than the PInvoke method. > > It seemed to work great considering my lack of any true C++ experience. > I'll be getting back to it eventually, but currently I'm busy "faking" some > vehicle physics for a demo that is due in december. I didn't want to chance > using ode as I wasn't sure I'd be able to get things running correctly by > then and still have time to work on the other things that need to be in the > demo. > > -jeff > > > ----Original Message Follows---- > From: Anselm Hook > To: Nate W > CC: > Subject: Re: [ODE] Complie to a Lib > Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) > > > There is one good reason not to use my C# binding - I am relying on a > class based Vector and Matrix math library (that I ported from an open > source clone of Java3D). I strongly suggest using a struct based Vector > and Matrix library such as http://www.exocortex.org/3dengine or others > (his starting point is BSD licenced). > > I'll bet Jeff Weber has solved this correctly - where is Jeff's site? > Jeff? > > - a > > > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > > I am new to ODE and C++. I am working on a wrapper to allow the use > of ODE > > > > from .Net, extending the work already done by Jeff Weber. > > > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > _________________________________________________________________ Internet access plans that fit your lifestyle -- join MSN. http://resourcecenter.msn.com/access/plans/default.asp From p.terdiman at wanadoo.fr Mon Nov 4 15:09:02 2002 From: p.terdiman at wanadoo.fr (Pierre Terdiman) Date: Mon Nov 4 15:09:02 2002 Subject: [ODE] Joint Naming References: <004001c28440$1ca4a200$f311da50@powerhouse> Message-ID: <001d01c2844e$76582980$0e00000a@pierre> "Cylindrical" seems nice : http://www.solid-dynamics.com/mwfunctionalities/index.htm Pierre > > > We also have joints called sliders, with circular shafts [....] > > > > So long as we're talking about naming, how about "cylindrical joint" for > > those? > > > > Perhaps -- I like it because it describes a shape like 'spherical' and > 'prismatic' do. I'd have to ask someone with a robotics background what the > 'official' term is. Not that I insist on using those -- sometimes they are > confusing to novices: For example "prismatic" isn't exactly intuitive: most > people will think of optics when they hear that. We still use it to avoid > ambiguity. > > -- Adam > > /*================*\ > |Chief Software Architect > |NovodeX AG > |physics middleware > |www.novodex.com > \*================*/ > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From adam.moravanszky at novodex.com Mon Nov 4 15:46:01 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [NovodeX]) Date: Mon Nov 4 15:46:01 2002 Subject: [ODE] Joint Naming References: <004001c28440$1ca4a200$f311da50@powerhouse> <001d01c2844e$76582980$0e00000a@pierre> Message-ID: <019101c2844b$df61fdf0$f311da50@powerhouse> Cool site. Too bad the tiny pictures don't always make sense. So "cylindrical" it is, then. -- Adam Moravanszky /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From henri at cs.sun.ac.za Mon Nov 4 15:46:50 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Mon Nov 4 15:46:50 2002 Subject: [ODE] Optimization maybe? Message-ID: <012801c28454$367ee3c0$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_0125_01C28464.FA0087D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi everybody :) I'm your newest newcomer... *grinZ* I've been very impressed with what I've seen of ODE upto now (not that = I've had much exposure yet) - enough to consider porting the entire code = to Delphi just to understand it better (but after looking at that = whirlwind that is the code for ODE I decided to be less ambitious for = the time being... ;) Nonetheless, I'd like to see if I can help a little; one of the things I = have some experience in is low-level programming. I'd appreciate if = somebody could show me to the part of the ODE code that is the most CPU = intensive (presumably the big Jacobian matrix solving) I'd like to give = a crack at optimizing the code (not the algorithm!!) manually. Maybe its = possible to wring a couple of speed increases out of it. hmmm... and maybe somebody should tell me how the matrix would typically = look (random values all over, mostly just a diagonal, or whatever) so I = can setup test cases. And what would a suitable matrix size be for = testing purposes? (50x50, 200x200, smaller, bigger?) Anything else I should know? (Maybe give-up now, before its too late?) thanks :) Henri ------=_NextPart_000_0125_01C28464.FA0087D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi everybody :)
 
I'm your newest newcomer... = *grinZ*
 
I've been very impressed with what I've = seen of ODE=20 upto now (not that I've had much exposure yet) - enough to consider = porting the=20 entire code to Delphi just to understand it better (but after looking at = that=20 whirlwind that is the code for ODE I decided to be less ambitious for = the time=20 being... ;)
 
Nonetheless, I'd like to see if I can = help a=20 little; one of the things I have some experience in is low-level = programming.=20 I'd appreciate if somebody could show me to the part of the ODE code = that is the=20 most CPU intensive (presumably the big Jacobian matrix solving) I'd like = to give=20 a crack at optimizing the code (not the algorithm!!) manually. Maybe its = possible to wring a couple of speed increases out of it.
 
hmmm... and maybe somebody should tell = me how the=20 matrix would typically look (random values all over, mostly just a = diagonal, or=20 whatever) so I can setup test cases. And what would a suitable matrix = size be=20 for testing purposes? (50x50, 200x200, smaller, bigger?)
 
Anything else I should know? (Maybe = give-up now,=20 before its too late?)
 
thanks :)
  Henri
------=_NextPart_000_0125_01C28464.FA0087D0-- From jeffreyweber at hotmail.com Mon Nov 4 16:59:02 2002 From: jeffreyweber at hotmail.com (Jeff Weber) Date: Mon Nov 4 16:59:02 2002 Subject: [ODE] Complie to a Lib Message-ID: My site is at www.farseer.com. The ode stuff is in the downloads section. It's not finished, but Ander Taylor has picked up where I left off. He's going to send me his code and I'll post it on my site. -jeff ----Original Message Follows---- From: Anselm Hook To: Ander Taylor CC: Subject: Re: [ODE] Complie to a Lib Date: Mon, 4 Nov 2002 09:32:30 -0700 (MST) do you have a site for your stuff or is it something you're not sharing yet? just curious because i'd like to see your approach. -a On Mon, 4 Nov 2002, Ander Taylor wrote: > I just worked out that I dont need the lib. > > I can compile the whole lot, managed bits and everything, to a DLL. > > Finished Space, AMotor and Geom, also added Params to JointHinge. > > Works great. > > Ander > > > ----Original Message Follows---- > From: "Jeff Weber" > To: ode@q12.org > > > I just made my own vector and matrix structs. > > One other thing that is different about my approach is I used a "Managed > C++" wrapper rather than the PInvoke method. > > It seemed to work great considering my lack of any true C++ experience. > I'll be getting back to it eventually, but currently I'm busy "faking" some > vehicle physics for a demo that is due in december. I didn't want to chance > using ode as I wasn't sure I'd be able to get things running correctly by > then and still have time to work on the other things that need to be in the > demo. > > -jeff > > > ----Original Message Follows---- > From: Anselm Hook > To: Nate W > CC: > Subject: Re: [ODE] Complie to a Lib > Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) > > > There is one good reason not to use my C# binding - I am relying on a > class based Vector and Matrix math library (that I ported from an open > source clone of Java3D). I strongly suggest using a struct based Vector > and Matrix library such as http://www.exocortex.org/3dengine or others > (his starting point is BSD licenced). > > I'll bet Jeff Weber has solved this correctly - where is Jeff's site? > Jeff? > > - a > > > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > > I am new to ODE and C++. I am working on a wrapper to allow the use > of ODE > > > > from .Net, extending the work already done by Jeff Weber. > > > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode _________________________________________________________________ Get a speedy connection with MSN Broadband.  Join now! http://resourcecenter.msn.com/access/plans/freeactivation.asp From russ at q12.org Mon Nov 4 17:30:02 2002 From: russ at q12.org (Russ Smith) Date: Mon Nov 4 17:30:02 2002 Subject: [ODE] Optimization maybe? In-Reply-To: <012801c28454$367ee3c0$45d4e892@temple> Message-ID: > Nonetheless, I'd like to see if I can help a little; one of the things > I have some experience in is low-level programming. I'd appreciate if > somebody could show me to the part of the ODE code that is the most CPU > intensive there are two things right now: (A) the factorization of large matrices (fast_ldlt.c) and solving right hand sides (fast_lsolve.c) and (B) the formation of that matrix in the first place (parts of step.cpp). problem (A) can be made faster by rewriting the factorizer/solver functions to use SIMD assembly, for various platforms (XMM, altivec, whatever). problem (B) is harder because it's a mix of detailed algorithm and many small matrix multiplies - probably implementing XMM versions of the small matrix multiplies would make it faster. note that there has been some talk about using some other, faster (but less precise) dynamics algorithms instead of the big-matrix-factorizing technique (e.g. iterative LCP), but there are still plenty of reasons to optimize the big-matrix algorithms: - they're faster for systems less than N*N, where N is maybe around 20. - they're more precise, and will give good answers in some cases where iterative LCP might fail. - the work done (and experience gained) optimizing the big-matrix algorithms will also apply to optimizing the other algorithms that come along later. - they'll probably be easier to optimize this way. > hmmm... and maybe somebody should tell me how the matrix would > typically look (random values all over, mostly just a diagonal, or > whatever) the big system matrix 'A' is block-sparse. get some test cases by printing out A at the entry to dSolveLCP() in lcp.cpp. > And what would a suitable matrix > size be for testing purposes? (50x50, 200x200, smaller, bigger?) it depends - you can optimize for large or small problems. i would optimize for 20x20 to 50x50 sizes, as systems larger than this will benefit (eventually) from other solver algorithms. > Anything else I should know? (Maybe give-up now, before its too late?) don't give up just yet! search the archive of this mailing list for messages of mine that mention SIMD, XMM or the factorizer, because i've written about this topic before. you'll also want to look at the factorizer builder code in ode/fbuild for an idea of how the current code is constructed. also reading a good book on numerical code will help, e.g. "numerical recipes in C, 2nd ed". (before someone retorts that NRC is not a good book ... on the subject of factorizers it has a good introduction and coverage of the basic issues, even though the code examples they provide are either lame, broken or both). russ. -- Russ Smith http://www.q12.org/ From ps_yumemi at yahoo.com Tue Nov 5 02:15:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Tue Nov 5 02:15:02 2002 Subject: [ODE] rotation Message-ID: <20021105091356.64536.qmail@web40510.mail.yahoo.com> hello, again... sorry people. i really don't get what i'm doing wrong or why my rotation matrix doesn't work. i have two variables: dMatrix3 mobot_rotation const dReal *mobot_rot i use the following code to pass the rotation matrix mobot_rot = dBodyGetRotation(bodyID) mobot_rotation[0]=mobot_rot[0] ... mobot_rotation[11]=mobot_rot[11] dBodySetRotation(bodyID, mobot_rotation) it doesn't work? the bodies end up rotated wrong. i also tried to use the same technique as the settransform function in drawstuff.cpp mobot_rotation[0]=mobot_rot[0] mobot_rotation[1]=mobot_rot[4] ... mobot_rotation[11]=0 and it still didn't turn out right. please help. i really need to solve this problem. __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From ed.jones at oracle.com Tue Nov 5 03:22:01 2002 From: ed.jones at oracle.com (Ed Jones) Date: Tue Nov 5 03:22:01 2002 Subject: [ODE] rotation References: <20021105091356.64536.qmail@web40510.mail.yahoo.com> Message-ID: <3DC79BC2.6050402@oracle.com> Hi, So you are doing this; Get the rotation of "bodyID". Copy that into another matrix. Use that matrix to set the rotation of "bodyID" I think I'm misunderstanding what you're trying to do. My example code, which was nabbed directly from drawstuff does this; Gets the rotation of a body according to ODE Copies that ODE flavoured matrix to an OpenGL matrix Sets the OpenGL transform so that the box (or whatever) gets drawn in its "correct" place, according to ODE What is the effect you're trying to achieve? Cheers, Ed. pia dalusong wrote: >hello, > >again... sorry people. i really don't get what i'm >doing wrong or why my rotation matrix doesn't work. > >i have two variables: >dMatrix3 mobot_rotation >const dReal *mobot_rot > >i use the following code to pass the rotation matrix > >mobot_rot = dBodyGetRotation(bodyID) >mobot_rotation[0]=mobot_rot[0] >... >mobot_rotation[11]=mobot_rot[11] > >dBodySetRotation(bodyID, mobot_rotation) > >it doesn't work? the bodies end up rotated wrong. > >i also tried to use the same technique as the >settransform function in drawstuff.cpp > >mobot_rotation[0]=mobot_rot[0] >mobot_rotation[1]=mobot_rot[4] >... >mobot_rotation[11]=0 > >and it still didn't turn out right. > >please help. i really need to solve this problem. > > >__________________________________________________ >Do you Yahoo!? >HotJobs - Search new jobs daily now >http://hotjobs.yahoo.com/ >_______________________________________________ >ODE mailing list >ODE@q12.org >http://q12.org/mailman/listinfo/ode > > From paul.chavent at fnac.net Tue Nov 5 03:52:02 2002 From: paul.chavent at fnac.net (Chavent Paul) Date: Tue Nov 5 03:52:02 2002 Subject: [ODE] Can i access each geom of a space? Message-ID: <3DC7956A.6040608@fnac.net> Can i access each geom of a space? Yes, it seams possible. But i need to do : dGeomGroupGetNumGeoms() dGeomGroupGetGeom() i wonder if it couldn't be fastest to access geoms with the "first" pointer that is in the "space" structure. Unfortunately, the structure isn't declared in the includes. Is there someone that can say to me if my idea is wrong and/or if there is a solution to access "geoms" without having to do a geomgroup containing all my scene ? From n_di_leva at hotmail.com Tue Nov 5 05:49:02 2002 From: n_di_leva at hotmail.com (Nicola Di Leva) Date: Tue Nov 5 05:49:02 2002 Subject: [ODE] bending wheels again? Message-ID: Hi everybody, done enough RDTL, so don't complain about the overused topic;) Just to be original, I've started my own car simulator using ODE, stealing code..ehm, taking inspiration from the freefall buggy demo ( very stable and smooth indeed ). When it's just a matter of going back and forth, the car behaves quite well, but as soon as it starts turning, the wheels progressively lose their alignment with the relative joint axes. Previous posts mentioned high rotation speeds and friction coefficients, but this is not the case ( i won't list the details of the simulation since they are the same of the freefall buggy demo ). I've read something about problems using directx with ODE too, can someone tell me more? ps. ODE is great, keep up the good work Russ! _________________________________________________________________ Unlimited Internet access for only $21.95/month.  Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp From Remko at act-3d.com Tue Nov 5 07:32:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Tue Nov 5 07:32:02 2002 Subject: [ODE] bending wheels again? Message-ID: <279127752.1737917222.98@server> Maybe you have set the ERP value of the hinge2 to 0.0? We are using ODE with DirectX 8.1 for quite a while now and I do not know of any problems :) -----Original Message----- From: Nicola Di Leva [mailto:n_di_leva@hotmail.com] Sent: Tuesday, November 05, 2002 12:48 PM To: ode@q12.org; Remko Jacobs (act-3d.com) Subject: [ODE] bending wheels again? Hi everybody, done enough RDTL, so don't complain about the overused topic;) Just to be original, I've started my own car simulator using ODE, stealing code..ehm, taking inspiration from the freefall buggy demo ( very stable and smooth indeed ). When it's just a matter of going back and forth, the car behaves quite well, but as soon as it starts turning, the wheels progressively lose their alignment with the relative joint axes. Previous posts mentioned high rotation speeds and friction coefficients, but this is not the case ( i won't list the details of the simulation since they are the same of the freefall buggy demo ). I've read something about problems using directx with ODE too, can someone tell me more? ps. ODE is great, keep up the good work Russ! _________________________________________________________________ Unlimited Internet access for only $21.95/month.á Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From marco.koegler at web.de Tue Nov 5 07:38:02 2002 From: marco.koegler at web.de (=?ISO-8859-2?Q?Marco_K=F6gler?=) Date: Tue Nov 5 07:38:02 2002 Subject: [ODE] Tri-Collider ... confused Message-ID: <3DC7D7A7.7010507@web.de> Hi! I was wondering whether somebody on the list would be kind enough to shed some light regarding the tricollider. There is a tricollider in the CVS repository, but it seems 'oldish' ... is that still the tricollider to use? I'm using Opcode 1.2 in my project and fear that this will conflict with the tricollider in the CVS (as it needs Opcode 1.0). Erwin posted an update to the list sometime in August (newstuff.gz). This uses Opcode 1.2, so that should solve that problem. A bit later Erwin posted something about this code having problems with large triangles and other issues ... he also said that he was glad he didn't commit the changes in the CVS. So, I don't know which code to use :( Should I use the version in the CVS or the one posted in August? Is there a possibility of a more stable/current version in the near future? Questions over questions *sigh* Anyways, ODE rocks ... -Marco From n_di_leva at hotmail.com Tue Nov 5 10:14:01 2002 From: n_di_leva at hotmail.com (Nicola Di Leva) Date: Tue Nov 5 10:14:01 2002 Subject: [ODE] bending wheels again? Message-ID: >Maybe you have set the ERP value of the hinge2 to 0.0? We are using ODE >with DirectX 8.1 for quite a while now and I do not know of any problems >:) No, joint erp and cfm are always set. I've tried several combinations of values for them, but the bending is still there. _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From russ at q12.org Tue Nov 5 11:54:01 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 5 11:54:01 2002 Subject: [ODE] Can i access each geom of a space? In-Reply-To: <3DC7956A.6040608@fnac.net> Message-ID: > Can i access each geom of a space? Yes, it seams possible. the new collision code i'm working on will allow this (and many other things). it'll be checked into CVS hopefully by the end of this week (gotta work the bugs out first). russ. -- Russ Smith http://www.q12.org/ From coding at natew.com Tue Nov 5 12:04:01 2002 From: coding at natew.com (Nate W) Date: Tue Nov 5 12:04:01 2002 Subject: [ODE] bending wheels again? In-Reply-To: Message-ID: On Tue, 5 Nov 2002, Nicola Di Leva wrote: > When it's just a matter of going back and forth, the car behaves quite > well, but as soon as it starts turning, the wheels progressively lose their > alignment with the relative joint axes. > Previous posts mentioned high rotation speeds and friction coefficients, but > this is not the case [...]/ I think you're describing something that I also noticed with the freefall demo on my machine, and my guess is that it could be corrected by tweaking the CFM. Try making it an order of magnitude smaller... e.g. if it's 0.001, change it to 0.0001 (more zeroes). I didn't actually test this theory, but it looks similar to what simulations in Juice do when the CFM is too high, so I think it could be the same thing. The catch is that turning down the CFM makes the simulation more rigid, thus less forgiving, thus more prone to instability or explosion. It's a compromise. It may well be possible to stiffen it a bit before any problems appear, it's impossible to say without trying. -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Tue Nov 5 12:35:02 2002 From: coding at natew.com (Nate W) Date: Tue Nov 5 12:35:02 2002 Subject: [ODE] bending wheels again? In-Reply-To: Message-ID: On Tue, 5 Nov 2002, Nicola Di Leva wrote: > >Maybe you have set the ERP value of the hinge2 to 0.0? > > No, joint erp and cfm are always set. I've tried several combinations of > values for them, but the bending is still there. That reminds me, I should have been more clear in my last message... when I suggested changing CFM, I was referring to the world CFM (set with dWorldSetCFM()). -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Tue Nov 5 17:20:02 2002 From: coding at natew.com (Nate W) Date: Tue Nov 5 17:20:02 2002 Subject: [ODE] LMotor? Message-ID: While talking off-list with Adam M about motors, I had an idea that I want to share here, in hopes of elongating Russ' to-do list. ODE has angular motors, but how about linear motors? I'd like to be able to define an 'anchor' body and one to three axes relative to that body, and then constrain the position of a second body along those axes... sorta like the angular motors do now, but with position rather than orientation. The thing I like about this approach to motorization is that AMotors and LMotors together will allow me to create gaits for walking creatures using a higher-level "language." It's basically a way to use ODE's solver to do reverse kinematics. For example, rather than commanding the hip to flex 5 degrees, the knee to bend 10 degrees, and the ankle to flex 5 degrees, the control system could just attach the foot to the hip via an LMotor and command the foot to move up a couple inches. It should allow creature motions to be controlled in a more intuitive way - and in a way that should still work with little or tuning even if the creature's limbs get lengthened or shortened or placed at different angles. From the user's perspective, it turns the problem of foot or hand placement from a nonlinear problem with as many variables as there are joints in the limb, to a linear problem with only as many variables as the user wants to bother with. Comments? Volunteers? I started trying to implement this myself, but couldn't shake the feeling that I was getting in way over my head and would have no idea how to debug what I was writing. Math is hard. :-) -- Nate Waddoups Redmond WA USA http://www.natew.com From n_di_leva at hotmail.com Tue Nov 5 19:31:01 2002 From: n_di_leva at hotmail.com (Nicola Di Leva) Date: Tue Nov 5 19:31:01 2002 Subject: [ODE] bending wheels again? Message-ID: A weird demo is better than 1000 words, so if you want take a look at http://ndileva.250free.com/ToyCar.zip. Any suggestion will be appreciated ( especially on turning the car, which is still a hard task ). ps. i noticed that the freefall demo does not set world's cfm and erp at all, shouldn't it blow up? _________________________________________________________________ Broadband? Dial-up? Get reliable MSN Internet Access. http://resourcecenter.msn.com/access/plans/default.asp From russ at q12.org Tue Nov 5 23:41:01 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 5 23:41:01 2002 Subject: [ODE] slider trouble In-Reply-To: References: <20021031221053.291c8cac.russ@q12.org> Message-ID: <20021105224532.446b7061.russ@q12.org> > I've attached another test that bounces things off > the ground a bit differently, and you can watch two blocks bounce > skyward and then gradually spin up to an explosion. i'm chalking this one up to integrator error - if you lower the timestep, the effect disappears. i'm pretty sure that there are no non-physical forces being applied to the system (as was the case with your previous slider-stop problem). unfortunately this kind of thing (integrator error) is unavoidable with ODE's current integrator in some situations where you have rapidly rotating bodies. > Also, could this problem be related to the problem where a single > flying spinning body also gains angular momentum? yes, it's the same kind of thing. i'll do some more experiments and see if something can be done about this. in the meantime, use a smaller timestep, or less bounce, or larger mass - anything to reduce the amount of rotation experienced per time step. russ. -- Russell Smith http://www.q12.org From adam.moravanszky at novodex.com Wed Nov 6 01:46:01 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [Novodex]) Date: Wed Nov 6 01:46:01 2002 Subject: [ODE] bending wheels again? References: Message-ID: <003201c28570$8c555870$17a08481@nxcommanche> From: "Nicola Di Leva" > Any suggestion will be appreciated ( especially on turning the car, > which is still a hard task ). Automobile manufacturers have tried in the past to make cars with four wheel steering, but it did not turn out to be a good idea. I would recommend sticking to front wheel steering only when making virtual cars as well. Not sure why the primary ODE buggy demo has this absolutely undriveable configuration either. I tried setting "turnable" to false in your car config file for the rear wheels, but it didn't make a difference. Also: I can still drive the car when it is flipped over! -- Adam Moravanszky /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From max.lungarella at aist.go.jp Wed Nov 6 02:21:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 02:21:02 2002 Subject: [ODE] joint friction Message-ID: <20021106181905.203257ac.max.lungarella@aist.go.jp> hi there, i may be asking something that is documented somewhere. but anyhow ... is there a way to enable friction in the joints? in ball and socket joints, for instance? or do i need to implement my own friction model? or do i need to play around with the joint related ERP and CFM? the API does not feature a dJointSetBallAndSocketParam() though! thanks a lot for any sort of feedback! cheers, max From mattias at cambrianlabs.com Wed Nov 6 02:32:01 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Wed Nov 6 02:32:01 2002 Subject: [ODE] bending wheels again? In-Reply-To: <003201c28570$8c555870$17a08481@nxcommanche> References: <003201c28570$8c555870$17a08481@nxcommanche> Message-ID: You must reduce friction if you don't want the car to turn over. cheers, m From Daniel.Groll at t-online.de Wed Nov 6 03:42:02 2002 From: Daniel.Groll at t-online.de (Daniel.Groll@t-online.de) Date: Wed Nov 6 03:42:02 2002 Subject: [ODE] bending wheels again? In-Reply-To: References: <003201c28570$8c555870$17a08481@nxcommanche> Message-ID: <1036578694.3dc8ef864be07@webmail.t-online.de> Hi! I made the wheel bending problem go away by adjusting the rotation of the steering wheels every 6-10th timestep. I calculate which direction they should have and set it with dBodySetQuaternion (or dBodySetRotation). To prevent the car from turning over, I check if all four wheels have contact with the ground. If yes, I apply small forces to them as a "glue" and I reduce the angular velocity of the car body. On an even surface it's almost impossible to tip over now. The behaviour of the car when jumping or flying around seems to be ok because the the tweaks are only applied when the car touches the ground as said before. From neo-nb at gmx.de Wed Nov 6 07:01:01 2002 From: neo-nb at gmx.de (Stefan Werner) Date: Wed Nov 6 07:01:01 2002 Subject: [ODE] Suddenly Disappearing ODE Objects Message-ID: <002401c2859c$f2cba560$1701a8c0@cion> Hello, I've created a simple car sim with ODE and everything works fine. I can drive through my landscape and can jump over other objects. But there is still one problem. If my car doesn't move, then after a few seconds it completely disappears. I get my position out of const dReal *pos; pos = dBodyGetPosition(carbody[0]); I've also noticed, that when my car disappears, "pos" is not a number anymore, it contains a string: "QNAN". I programm with MS VC++ .Net. What does this mean? Does anyone knows this problem? I can't explain it because everything works fine when my car moves around, it happens only when the car doesn't move. I hope someone can help me. Karl Koch From russ at q12.org Wed Nov 6 12:12:01 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 6 12:12:01 2002 Subject: [ODE] joint friction In-Reply-To: <20021106181905.203257ac.max.lungarella@aist.go.jp> Message-ID: > i may be asking something that is documented somewhere. > but anyhow ... is there a way to enable friction in the joints? there is a good and simple way to do this. set the joint 'fmax' parameter to some (positive) value. set the desired velocity parameter to 0. now the joint will exert a force up to fmax to bring the joint velocity down to 0. this is actually a pretty good model of coulomb friction for a joint. changing fmax to be higher will give more friction - and there's no stability problem with choosing any value of fmax >= 0. russ. -- Russ Smith http://www.q12.org/ From neo-nb at gmx.de Wed Nov 6 15:01:01 2002 From: neo-nb at gmx.de (Stefan Werner) Date: Wed Nov 6 15:01:01 2002 Subject: [ODE] Suddenly Disappearing ODE Objects Message-ID: <001201c285df$ec009ea0$1701a8c0@cion> I found out that when my object disappears, the dJointGetHinge2Angle1(Joints[0]) retrieves exactly PI or -PI. When my car move this value lies between -0.5 and 0.5; I think that the reason why dBodyGetPosition retrieves a wrong value. Now does anyone know why suddenly the value jumps to "PI"? And what's about "single" and "double" ODE? What shall I use and how can I switch between both precisions in C++? > Hello, > > I've created a simple car sim with ODE and everything works fine. I can > drive through my landscape and can jump over other objects. But there is > still one problem. If my car doesn't move, then after a few seconds it > completely disappears. I get my position out of > const dReal *pos; > pos = dBodyGetPosition(carbody[0]); > I've also noticed, that when my car disappears, "pos" is not a number > anymore, it contains a string: "QNAN". I programm with MS VC++ .Net. > What does this mean? Does anyone knows this problem? I can't explain it > because everything works fine when my car moves around, it happens only when > the car doesn't move. > I hope someone can help me. > Karl Koch From max.lungarella at aist.go.jp Wed Nov 6 17:07:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 17:07:02 2002 Subject: [ODE] joint friction In-Reply-To: References: <20021106181905.203257ac.max.lungarella@aist.go.jp> Message-ID: <20021107090532.54d375b5.max.lungarella@aist.go.jp> hi russ, yes, your model sounds perfectly reasonable to me. thank you very much. but what about ball and socket joints? is there a way to set something similar to an "fmax" parameter for them? was not able to figure out any function dealing with it. thanks a lot! cheers, max > > i may be asking something that is documented somewhere. > > but anyhow ... is there a way to enable friction in the joints? > > there is a good and simple way to do this. set the joint 'fmax' parameter > to some (positive) value. set the desired velocity parameter to 0. now the > joint will exert a force up to fmax to bring the joint velocity down to 0. > this is actually a pretty good model of coulomb friction for a joint. > changing fmax to be higher will give more friction - and there's no > stability problem with choosing any value of fmax >= 0. > > russ. > > -- > Russ Smith > http://www.q12.org/ > From russ at q12.org Wed Nov 6 17:35:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 6 17:35:02 2002 Subject: [ODE] joint friction In-Reply-To: <20021107090532.54d375b5.max.lungarella@aist.go.jp> Message-ID: friction can be applied to ball and socket joints using the amotor joint - again setting fmax=something and vel=0 for the three axes. note that this is not as general as for the hinge and slider joints - for three free axes there are many ways to derive three (or one or two) friction forces to get various effects. the amotor joint will implement friction as though there were three hinge-type linkages connecting the two bodies - but this is different from what you would get if there was an actual ball fitting into an actual socket, for example. russ. -- Russ Smith http://www.q12.org/ From max.lungarella at aist.go.jp Wed Nov 6 17:43:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 17:43:02 2002 Subject: [ODE] joint friction In-Reply-To: References: <20021107090532.54d375b5.max.lungarella@aist.go.jp> Message-ID: <20021107094110.1651031d.max.lungarella@aist.go.jp> thank you very much for the hint. i'll give it a try right away. keep up the good work! max > friction can be applied to ball and socket joints using the amotor joint - > again setting fmax=something and vel=0 for the three axes. note that this > is not as general as for the hinge and slider joints - for three free axes > there are many ways to derive three (or one or two) friction forces to get > various effects. the amotor joint will implement friction as though there > were three hinge-type linkages connecting the two bodies - but this > is different from what you would get if there was an actual ball fitting > into an actual socket, for example. > > russ. > > -- > Russ Smith > http://www.q12.org/ > From erickt at andrew.cmu.edu Wed Nov 6 18:42:01 2002 From: erickt at andrew.cmu.edu (Erick Tryzelaar) Date: Wed Nov 6 18:42:01 2002 Subject: [ODE] Slip friction coefficient In-Reply-To: Message-ID: Hello all, I was just wondering if the slip friction coefficient corresponds to one to one with dynamic friction. Or is it something else? -Erick From thomas_buehrmann at web.de Wed Nov 6 19:09:02 2002 From: thomas_buehrmann at web.de (Thomas Buehmann) Date: Wed Nov 6 19:09:02 2002 Subject: [ODE] Message-ID: <200211070208.gA728bX26148@mailgate5.cinetic.de> Hi, i'm new to ODE and just tried to install the last release on WinXP. Unfortunately, the make just fails displaying following error code: D:\Development\ODE\ode-0.03>make cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC /Feconfigurator.exe configur ator.c process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBU G_ALLOC /Feconfigurator.exe configurator.c, ...) failed. make (e=2): Das System kann die angegebene Datei nicht finden. make: *** [configurator.exe] Error 2 (sorry for the german stuff in the line before the last; it just means the system wasn't able to find the specified file). i have to admit i'm a make dummy, but it seems as if make fails while trying to build the configurator.exe, right? is there supposed to be a config.h file somewhere (e.g. in include\ode), cause there is none? at least in the doc it's saying you could as well just set the condiguration yourself in that file. or am i just too stupid? any help would be great. thanks, thomas. ________________________________________________________________ Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 From max.lungarella at aist.go.jp Wed Nov 6 19:28:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 19:28:02 2002 Subject: [ODE] In-Reply-To: <200211070208.gA728bX26148@mailgate5.cinetic.de> References: <200211070208.gA728bX26148@mailgate5.cinetic.de> Message-ID: <20021107112605.294d406e.max.lungarella@aist.go.jp> you've got to properly set your "path" environment variable, i guess. apparently your makefile is not able to find "Feconfigurator.exe". try to type "path" in the console (if winXP's got one) and check the output. the directory where "Feconfigurator.exe" is installed should be there. if not, add it to "path". hope this works. cheers, max > Hi, > i'm new to ODE and just tried to install the last release on WinXP. > Unfortunately, the make just fails displaying following error code: > > D:\Development\ODE\ode-0.03>make > cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC > /Feconfigurator.exe configur ator.c > process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC > /DdDOUBLE /DdDEBU G_ALLOC /Feconfigurator.exe configurator.c, ...) > failed. make (e=2): Das System kann die angegebene Datei nicht finden. > make: *** [configurator.exe] Error 2 > > (sorry for the german stuff in the line before the last; it just means > the system wasn't able to find the specified file). > > i have to admit i'm a make dummy, but it seems as if make fails while > trying to build the configurator.exe, right? is there supposed to be a > config.h file somewhere (e.g. in include\ode), cause there is none? at > least in the doc it's saying you could as well just set the > condiguration yourself in that file. > > or am i just too stupid? > any help would be great. > > thanks, > thomas. > > ________________________________________________________________ > Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! > Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From max.lungarella at aist.go.jp Wed Nov 6 19:36:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 19:36:02 2002 Subject: [ODE] : update In-Reply-To: <200211070208.gA728bX26148@mailgate5.cinetic.de> References: <200211070208.gA728bX26148@mailgate5.cinetic.de> Message-ID: <20021107113406.7b685a55.max.lungarella@aist.go.jp> i'm sorry ... thomas, you should be looking for "cl.exe"'s (the compiler's) directory and NOT for "configurator.exe"'s! cheers, max > Hi, > i'm new to ODE and just tried to install the last release on WinXP. Unfortunately, the make just fails displaying following error code: > > D:\Development\ODE\ode-0.03>make > cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC /Feconfigurator.exe configur > ator.c > process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBU > G_ALLOC /Feconfigurator.exe configurator.c, ...) failed. > make (e=2): Das System kann die angegebene Datei nicht finden. > make: *** [configurator.exe] Error 2 > > (sorry for the german stuff in the line before the last; it just means the system > wasn't able to find the specified file). > > i have to admit i'm a make dummy, but it seems as if make fails while trying to build > the configurator.exe, right? is there supposed to be a config.h file somewhere (e.g. in > include\ode), cause there is none? at least in the doc it's saying you could as well just > set the condiguration yourself in that file. > > or am i just too stupid? > any help would be great. > > thanks, > thomas. > > ________________________________________________________________ > Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! > Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From gene at erachampion.com Wed Nov 6 22:31:02 2002 From: gene at erachampion.com (Gene Ruebsamen) Date: Wed Nov 6 22:31:02 2002 Subject: [ODE] Thesis on Evolving Virtual Creatures Message-ID: <1036656107.5212.7.camel@aludra.eranet.com> Hello Everybody, Just finished my thesis on evolving intelligent behaviors in embodied agents. I've updated my page with new videos and information at: http://www.erachampion.com/ai/ I am very happy I selected to use ODE as the physics engine, and I wanted to thank all of you who have offered your input over the past year. Now that I have more time, I will try and make further optimizations and improvements to my work, and hopefully release the code soon (have to clean it up first!). For those of you that are not familiar with my work, I have been evolving locomotive strategies in virtual creatures in a 3D environment. The creatures try to "survive" by evolving faster and more efficient means of locomotion. I am utilizing the ANN/GA paradigm that several of you have discussed in earlier posts. Thanks again! Gene Ruebsamen From coding at natew.com Wed Nov 6 23:23:02 2002 From: coding at natew.com (Nate W) Date: Wed Nov 6 23:23:02 2002 Subject: [ODE] Thesis on Evolving Virtual Creatures In-Reply-To: <1036656107.5212.7.camel@aludra.eranet.com> Message-ID: On 7 Nov 2002, Gene Ruebsamen wrote: > Just finished my thesis on evolving intelligent behaviors in embodied > agents. [...] Nice work! -- Nate Waddoups Redmond WA USA http://www.natew.com From minorlogic at yahoo.com Thu Nov 7 01:16:02 2002 From: minorlogic at yahoo.com (Michael Norel) Date: Thu Nov 7 01:16:02 2002 Subject: [ODE] Optimization again Message-ID: <20021107081527.91338.qmail@web11703.mail.yahoo.com> Have a look at ODE sources, and have a quest : code such this is not very important but calculated every step and for every object: ............ for (i=0; ifacc[0] += body[i]->mass.mass * world->gravity[0]; body[i]->facc[1] += body[i]->mass.mass * world->gravity[1]; body[i]->facc[2] += body[i]->mass.mass * world->gravity[2]; } ............. Is this possible to ilolate such a code and optimaze it ? I think it will not change often ? ............ // some example for C like style code for (i=0; ifacc; dReal mass = body[i]->mass.mass; dReal * gravity = world->gravity; // some isolated performance primitives MULTYPLY_BLOCK( facc, gravity, mass, 3 ); // MULTYPLY_BLOCK( dest, src, multer, counter ); } } __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ed.jones at oracle.com Thu Nov 7 03:11:02 2002 From: ed.jones at oracle.com (Ed Jones) Date: Thu Nov 7 03:11:02 2002 Subject: [ODE] References: <200211070208.gA728bX26148@mailgate5.cinetic.de> <20021107112605.294d406e.max.lungarella@aist.go.jp> Message-ID: <3DCA3C01.4020800@oracle.com> Hi, I don't know which compiler you're using, but for Visual C/C++ 6.0 I type something like; "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat" ...(including the quotes) at the command prompt, before typing "make", and that seems to work just fine. In the olden days you'd probably be able to call this script from your autoexec.bat file, but I'm not sure if recent versions of Windows have such a thing. Alternatively, when I install VC there's an option which says something like "Register the environment variables" which I guess sets the environment properly within Windows, so you don't have to type this everytime. Alternatively (again), you could look in that script and register all environment variables manually, with Windows, yourself. Mind you, that's on Win2k and VC6, dunno about XP. ;-) Hope that's useful. Cheers, Ed. Max Lungarella wrote: >you've got to properly set your "path" environment variable, i guess. >apparently your makefile is not able to find "Feconfigurator.exe". try >to type "path" in the console (if winXP's got one) and check the output. >the directory where "Feconfigurator.exe" is installed should be there. >if not, add it to "path". > >hope this works. > >cheers, > max > > > > >>Hi, >>i'm new to ODE and just tried to install the last release on WinXP. >>Unfortunately, the make just fails displaying following error code: >> >>D:\Development\ODE\ode-0.03>make >>cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC >>/Feconfigurator.exe configur ator.c >>process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC >>/DdDOUBLE /DdDEBU G_ALLOC /Feconfigurator.exe configurator.c, ...) >>failed. make (e=2): Das System kann die angegebene Datei nicht finden. >>make: *** [configurator.exe] Error 2 >> >>(sorry for the german stuff in the line before the last; it just means >>the system wasn't able to find the specified file). >> >>i have to admit i'm a make dummy, but it seems as if make fails while >>trying to build the configurator.exe, right? is there supposed to be a >>config.h file somewhere (e.g. in include\ode), cause there is none? at >>least in the doc it's saying you could as well just set the >>condiguration yourself in that file. >> >>or am i just too stupid? >>any help would be great. >> >>thanks, >>thomas. >> >>________________________________________________________________ >>Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! >>Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 >> >> >>_______________________________________________ >>ODE mailing list >>ODE@q12.org >>http://q12.org/mailman/listinfo/ode >> >> >_______________________________________________ >ODE mailing list >ODE@q12.org >http://q12.org/mailman/listinfo/ode > > From ps_yumemi at yahoo.com Thu Nov 7 08:55:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Thu Nov 7 08:55:02 2002 Subject: [ODE] rotation Message-ID: <20021107155451.29271.qmail@web40506.mail.yahoo.com> hello, ok, i finally got my variables right. i have another question though. i got my rotation matrix using const dReal dBodyGetRotation(bodyID) and then i got the values using a dReal matrix[12]; i then to transfer it to a dMatrix3 rotation_matrix and use dBodySetRotation(bodyID,rotation_matrix) however, i'm not getting the result i want. is there any way to get the euler angles from the matrix? if i'm using it on a car just on the chassis body after i attach everything else is that ok? is there any reason for this not to work? pia __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From coding at natew.com Thu Nov 7 10:27:01 2002 From: coding at natew.com (Nate W) Date: Thu Nov 7 10:27:01 2002 Subject: [ODE] rotation In-Reply-To: <20021107155451.29271.qmail@web40506.mail.yahoo.com> Message-ID: On Thu, 7 Nov 2002, pia dalusong wrote: > is there any way to get the euler angles from the > matrix? I'm not sure, but a google search on "euler angle matrix conversion" does turn up a bunch of pages that I think show how to extract euler angles from a quaternion. I only skimmed the results, but it looks promising. > if i'm using it on a car just on the chassis body > after i attach everything else is that ok? > is there any reason for this not to work? If "it" refers to dBodySetRotation, then I think you're going to get some weird behavior if you're rotating the body more than a tiny amount. ODE will try to bring the wheels back into alignment during the next timestep, and that could take huge forces, and that could lead to explosive behavior. At the very least I would expect the car to wiggle a lot during the first few timesteps. -- Nate Waddoups Redmond WA USA http://www.natew.com From erwin at vo.com Thu Nov 7 11:05:02 2002 From: erwin at vo.com (Erwin de Vries) Date: Thu Nov 7 11:05:02 2002 Subject: [ODE] Tri-Collider ... confused References: <3DC7D7A7.7010507@web.de> Message-ID: <000201c28688$0983c4e0$73fefea9@athlon> You should try both and see which works best for you. Both are very similar, and its pretty trivial to convert the CVS version to Opcode 1.2. If you need your trilist to be transformed dynamically, you can only use the one posted on this list. The tricollider will be integrated into ODE at some point in the future. I will fix the issues i reported to this list earlier, sometime soon. I've been saying this for a while.. Busy.. :-( But it will happen this year! :-P Erwin ----- Original Message ----- From: "Marco Kögler" To: Sent: Tuesday, November 05, 2002 15:37 Subject: [ODE] Tri-Collider ... confused > Hi! > > I was wondering whether somebody on the list would be kind enough to > shed some light regarding the tricollider. > > There is a tricollider in the CVS repository, but it seems 'oldish' ... > is that still the tricollider to use? > > I'm using Opcode 1.2 in my project and fear that this will conflict with > the tricollider in the CVS (as it needs Opcode 1.0). Erwin posted an > update to the list sometime in August (newstuff.gz). This uses Opcode > 1.2, so that should solve that problem. A bit later Erwin posted > something about this code having problems with large triangles and other > issues ... he also said that he was glad he didn't commit the changes in > the CVS. > > So, I don't know which code to use :( > > Should I use the version in the CVS or the one posted in August? Is > there a possibility of a more stable/current version in the near future? > > Questions over questions *sigh* > > Anyways, ODE rocks ... > > -Marco > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > > From mattias at cambrianlabs.com Thu Nov 7 11:32:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Thu Nov 7 11:32:02 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: <000201c28688$0983c4e0$73fefea9@athlon> References: <3DC7D7A7.7010507@web.de> <000201c28688$0983c4e0$73fefea9@athlon> Message-ID: > The tricollider will be integrated into ODE at some point > in the future. If I recall correctly, the tri-collider requires ODE to be compiled in single precision - will this change for the integration, or will tri- collider not be available when compiling to double precision? cheers, m From stephan at eisscholle.de Thu Nov 7 12:19:02 2002 From: stephan at eisscholle.de (Stephan Heigl) Date: Thu Nov 7 12:19:02 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: <000201c28688$0983c4e0$73fefea9@athlon> References: <3DC7D7A7.7010507@web.de> <000201c28688$0983c4e0$73fefea9@athlon> Message-ID: <200211072018.29994.stephan@eisscholle.de> Since i haven't been subscribed that long to that list, what patches are you refering to? I've searched through the the ml archive of August, but i haven't found the mentioned patch. Thanks alot. - Stephan On Wednesday 06 November 2002 22:58, Erwin de Vries wrote: > You should try both and see which works best for you. Both are very > similar, and its pretty trivial to convert the CVS version to Opcode 1.2. > If you need your trilist to be transformed dynamically, you can only use > the one posted on this list. The tricollider will be integrated into ODE at > some point in the future. > > I will fix the issues i reported to this list earlier, sometime soon. I've > been saying this for a while.. Busy.. :-( > > But it will happen this year! :-P > > Erwin > > ----- Original Message ----- > From: "Marco Kögler" > To: > Sent: Tuesday, November 05, 2002 15:37 > Subject: [ODE] Tri-Collider ... confused > > > Hi! > > > > I was wondering whether somebody on the list would be kind enough to > > shed some light regarding the tricollider. > > > > There is a tricollider in the CVS repository, but it seems 'oldish' ... > > is that still the tricollider to use? > > > > I'm using Opcode 1.2 in my project and fear that this will conflict with > > the tricollider in the CVS (as it needs Opcode 1.0). Erwin posted an > > update to the list sometime in August (newstuff.gz). This uses Opcode > > 1.2, so that should solve that problem. A bit later Erwin posted > > something about this code having problems with large triangles and other > > issues ... he also said that he was glad he didn't commit the changes in > > the CVS. > > > > So, I don't know which code to use :( > > > > Should I use the version in the CVS or the one posted in August? Is > > there a possibility of a more stable/current version in the near future? > > > > Questions over questions *sigh* > > > > Anyways, ODE rocks ... > > > > -Marco > > > > _______________________________________________ > > ODE mailing list > > ODE@q12.org > > http://q12.org/mailman/listinfo/ode > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From erickt at andrew.cmu.edu Thu Nov 7 12:25:02 2002 From: erickt at andrew.cmu.edu (Erick Tryzelaar) Date: Thu Nov 7 12:25:02 2002 Subject: [ODE] rotation In-Reply-To: Message-ID: Sure there is: This is from David Eberly's (chief architect behind the netimmerse engine) webpage: http://www.magic-software.com/Documentation/EulerAngles.pdf Also, if you're interested, the rest of that site has an amazing amount of useful information. Its good stuff. -Erick On Thu, 7 Nov 2002, Nate W wrote: > On Thu, 7 Nov 2002, pia dalusong wrote: > > > is there any way to get the euler angles from the > > matrix? > > I'm not sure, but a google search on "euler angle matrix conversion" does > turn up a bunch of pages that I think show how to extract euler angles > from a quaternion. I only skimmed the results, but it looks promising. > > > if i'm using it on a car just on the chassis body > > after i attach everything else is that ok? > > is there any reason for this not to work? > > If "it" refers to dBodySetRotation, then I think you're going to get some > weird behavior if you're rotating the body more than a tiny amount. ODE > will try to bring the wheels back into alignment during the next timestep, > and that could take huge forces, and that could lead to explosive > behavior. At the very least I would expect the car to wiggle a lot during > the first few timesteps. > > -- > > Nate Waddoups > Redmond WA USA > http://www.natew.com > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > > From marco.koegler at web.de Thu Nov 7 13:09:02 2002 From: marco.koegler at web.de (=?ISO-8859-2?Q?Marco_K=F6gler?=) Date: Thu Nov 7 13:09:02 2002 Subject: [ODE] Tri-Collider ... confused References: <3DC7D7A7.7010507@web.de> <000201c28688$0983c4e0$73fefea9@athlon> <200211072018.29994.stephan@eisscholle.de> Message-ID: <3DCAC82E.8020404@web.de> Stephan Heigl wrote: > Since i haven't been subscribed that long to that list, what patches are you > refering to? I've searched through the the ml archive of August, but i > haven't found the mentioned patch. You can find it here: http://q12.org/pipermail/ode/2002-August/001646.html I had to copy/paste the base64 encoded stuff into a file and then decode it with the 'base64' command-line tool. Should be standard on Linux/Unix ... a Windows version can be found here: http://www.fourmilab.ch/webtools/base64/ -Marco From coding at natew.com Thu Nov 7 13:49:01 2002 From: coding at natew.com (Nate W) Date: Thu Nov 7 13:49:01 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: Message-ID: On Thu, 7 Nov 2002, Mattias Fagerlund wrote: > > The tricollider will be integrated into ODE at some point > > in the future. > > If I recall correctly, the tri-collider requires ODE to be compiled in > single precision - will this change for the integration, or will tri- > collider not be available when compiling to double precision? I am using tri-collider with single-precision ODE right now with good results. I tried compiling both with double-precision and although the build worked I couldn't get it work at run time. I think the run-time problem was caused by pointer confusion - something expecting an arry of single-precision values received an array of doubles, or vice versa. I really don't think it would take much effort to get it work with doubles, but at the time this happened the CRCRLF bug in VS.Net was making some of the tri-collider source files impossible for me to work with. FWIW, my app doesn't behave noticably different when built with dSINGLE vs dDOUBLE. Juice started out in dDOUBLE mode, but has been released in dSINGLE mode since I integrated Demeter and the tri collider. If anyone noticed the change they haven't mentioned it to me. -- Nate Waddoups Redmond WA USA http://www.natew.com From mattias at cambrianlabs.com Thu Nov 7 14:03:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Thu Nov 7 14:03:02 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: References: Message-ID: > > > The tricollider will be integrated into ODE at some point > > > in the future. > > > > If I recall correctly, the tri-collider requires ODE to be compiled > in > > single precision - will this change for the integration, or will tri- > > collider not be available when compiling to double precision? > > I am using tri-collider with single-precision ODE right now with good > results. I tried compiling both with double-precision and although the > build worked I couldn't get it work at run time. My evolved demos exploded spectacularly when I used single precision. I mean, my hopper left for saturn or something. I haven't seen it since. In double precision, things work just fine. That could be some bug on my part, but nothing I could track down. > I really don't think it would take much effort to get > it > work with doubles, but at the time this happened the CRCRLF bug in > VS.Net > was making some of the tri-collider source files impossible for me to > work with. I made a small util that loads all files that match a pattern and re- saves them, fixing all lines with CrLf (i recurses into subdirs as well). Let me know if you're interested. cheers, m From russ at q12.org Fri Nov 8 00:58:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 8 00:58:02 2002 Subject: [ODE] new ODE collision Message-ID: <20021108000235.5bc25ca1.russ@q12.org> if you're curious, the source files for the new collision infrastructure have been checked into CVS (collision_*.h, collision_*.cpp). it has not been hooked up to the rest of ODE yet, so the only reason i mention it is for the curious. note that there's still a bunch of stuff to do, in particular to hook up the ray, trimesh and cylinder classes, and to convert the hash table space to use an incremental approach ... but you can get an idea of the new layout. the new collision infrastructure is 99% API compatible with the old, but i'll provide an ODE 'legacy' collision option so that existing code is guaranteed not to break - but all new collision development will go on the new infrastructure. russ. -- Russell Smith http://www.q12.org From ps_yumemi at yahoo.com Fri Nov 8 08:12:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Fri Nov 8 08:12:02 2002 Subject: [ODE] missing function Message-ID: <20021108151058.35692.qmail@web40510.mail.yahoo.com> hello, do these functions exist and what do they do? dStopwatchReset dStopwatchStop dStopwatchStart i know they probably work the way they sound but are they in ode? pia __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From espmiii at yahoo.com Fri Nov 8 10:26:03 2002 From: espmiii at yahoo.com (James Myers) Date: Fri Nov 8 10:26:03 2002 Subject: [ODE] Pool table physics Message-ID: <20021108172523.74417.qmail@web11303.mail.yahoo.com> Hello all, new user here... Is ODE appropriate for simulating a game of pool? I ask because I'm either modifying the wrong parameters or barking up the wrong library. There are two big problems I'm having: The first problem is that the balls are not "rolling". The friction from the table should put torque on the ball and cause angular acceleration until the ball reaches natural rolling. The balls orientation as returned by dBodyGetRotation doesn't reflect this. Eventually the balls' orientation does change a little, but only after a lot of playing. I'm using dBodyAddForce, so there shouldn't be any english applied to the cue ball. The second problem is that as the balls start to slow down, they will not travel in a straight line. This is hard to describe but if I apply a small force at about a 35 degree angle around the y axis parallel to the xz plane, the cue ball will travel straight for a bit, then start to curve in the +x direction, then roll straight along +x until it stops. The same happens if I hit on an angle closer to + or - z, it will start to head along that axis. It also happens on say, a break shot, where all the balls will eventually be traveling in + or - x or z near the end of the shot. I'm guessing there's just something wrong with my surface parameters. I am only using the dContactBounce flag and changing the mu and bounce parameters based on the type of collision (bumper-ball, ball-floor, ball-ball). I'm not a real physics genius, which is why I switched to ODE in the first place. I am using my own collision functions right now, perhaps there should be more than a single contact joint where the ball meets the table? They tend to jitter a bit every 50 frames (which is about 200 world ticks). Maybe that's due to using the double precision ode and performing my collision detection with single precision? It does happen in both the 0.03 release and whatever was in cvs wednesday afternoon. Any advice would be appreciated greatly. Is more information needed? Thanks much, James __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ps_yumemi at yahoo.com Sat Nov 9 02:27:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sat Nov 9 02:27:02 2002 Subject: [ODE] need to understand this Message-ID: <20021109092556.77275.qmail@web40507.mail.yahoo.com> hello, after a lot of digging, i saw this void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal theta, dReal psi) { dReal sphi,cphi,stheta,ctheta,spsi,cpsi; dAASSERT (R); sphi = dSin(phi); cphi = dCos(phi); stheta = dSin(theta); ctheta = dCos(theta); spsi = dSin(psi); cpsi = dCos(psi); _R(0,0) = cpsi*ctheta; _R(0,1) = spsi*ctheta; _R(0,2) =-stheta; _R(1,0) = cpsi*stheta*sphi - spsi*cphi; _R(1,1) = spsi*stheta*sphi + cpsi*cphi; _R(1,2) = ctheta*sphi; _R(2,0) = cpsi*stheta*cphi + spsi*sphi; _R(2,1) = spsi*stheta*cphi - cpsi*sphi; _R(2,2) = ctheta*cphi; } i'm a little confused as to how you put values into a dMatrix and how do you call it? if i have a variable const dReal *R and dMatrix3 M is R[0]=m[0,0] ? i'm sorry but i don't understand what happens when you write _R(2,1) is it an 2d array matrix[3][3] or a 1d matrix[12]? thanks __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ps_yumemi at yahoo.com Sat Nov 9 04:42:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sat Nov 9 04:42:02 2002 Subject: [ODE] speed control Message-ID: <20021109114122.66919.qmail@web40508.mail.yahoo.com> hi, how do you best control the speed and orientation of your mobot when you have specific values in mind? how can i control the time it stays that way? is using dbodysetlinearvel and dbodysetangular vel during a simloop wrong? what else can i use? thanks __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From erwin at vo.com Sat Nov 9 05:37:02 2002 From: erwin at vo.com (Erwin de Vries) Date: Sat Nov 9 05:37:02 2002 Subject: [ODE] new ODE collision References: <20021108000235.5bc25ca1.russ@q12.org> Message-ID: <000401c287ec$8c862b70$73fefea9@athlon> Looking good. Some comments: - Remember to add dGeomMoved() calls inside of all Set functions of a geom. Also SetRadius, etc. - I think the destructor of a geom needs to tell the body it might be attached to that it wants to remove itself. Otherwise the body will use this geom in its linked list after it has been destroyed, which crashes. - When adding the ray class we should think about what the 'penetration depth' should be. Do you have any thoughts on this? - Why do you memcopy inside the dxSpace::computeAABB() function? - Should we add support for a user defined, or infinite AABB on demand for spaces? This is really useful for the quadtree space containing huge (10.000 for example) amounts of geoms. If i would remove a single geom it would need to do a lot of work. Its very nice to see how you transformed parts of my code to work with your (existing) code, resulting in the best of both worlds. Great job. Erwin ----- Original Message ----- From: "Russ Smith" To: Sent: Friday, November 08, 2002 06:02 Subject: [ODE] new ODE collision > > if you're curious, the source files for the new collision infrastructure > have been checked into CVS (collision_*.h, collision_*.cpp). it has not > been hooked up to the rest of ODE yet, so the only reason i mention it > is for the curious. note that there's still a bunch of stuff to do, in > particular to hook up the ray, trimesh and cylinder classes, and to > convert the hash table space to use an incremental approach ... but you > can get an idea of the new layout. > > the new collision infrastructure is 99% API compatible with the old, but > i'll provide an ODE 'legacy' collision option so that existing code is > guaranteed not to break - but all new collision development will go on > the new infrastructure. > > russ. > > -- > Russell Smith > http://www.q12.org > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > > From Daniel.Groll at t-online.de Sat Nov 9 07:19:02 2002 From: Daniel.Groll at t-online.de (Daniel.Groll@t-online.de) Date: Sat Nov 9 07:19:02 2002 Subject: [ODE] rate for fixed timesteps Message-ID: <1036851471.3dcd190fc0ebf@webmail.t-online.de> I use fixed timesteps to run my car simulation game. With a rate of 60 Hz the simulation runs smooth and seemed to be stable but now with further testing I encountered some stability problems when cars or objects move fast. Sometimes they seem to break through geometry or "caught" in geometry. Is this the cause of a relatively low rate of world timesteps? Or are there other reasons for instability? At which rates run phyiscs simulations in common? From ps_yumemi at yahoo.com Sat Nov 9 10:35:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sat Nov 9 10:35:02 2002 Subject: [ODE] no rotation Message-ID: <20021109173403.55406.qmail@web40513.mail.yahoo.com> hello, i called a dBodySetRotation and the program doesn't go through it. all the other functions work but that particular pair. i called dRFromEulerAngles before i called dbodysetrotation before i joined the wheels to my chassis but the chassis doesn't rotate at all. i even put different values to check dRFromEulerAngles (bodyID,0,0,270) and it still doesn't turn? what could possibly wrong with it? btw this is the second mobot in the system can that affect it? thanks __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ps_yumemi at yahoo.com Sun Nov 10 10:03:01 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sun Nov 10 10:03:01 2002 Subject: [ODE] matrix Message-ID: <20021110170253.68888.qmail@web40508.mail.yahoo.com> is the rotation matrix unique for ANY combination of theta, phi and psi? or do they have their drawbacks? are the linear and angular velocities related to euler angles? __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From thomasharte at lycos.co.uk Sun Nov 10 15:51:02 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Sun Nov 10 15:51:02 2002 Subject: [ODE] matrix Message-ID: <1036968557010081@lycos-europe.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --=_NextPart_Lycos_0100811036968557_ID Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit >is the rotation matrix unique for ANY combination of >theta, phi and psi? or do they have their drawbacks? The rotation matrix is unique for any particular orientation. However, the three angle orientation system has singularities, which more or less just means that not all unique combinations of theta, phi and psi produce unique orientations. Therefore the rotation matrix for a unique theta/phi/psi is not necessarily unique. However, the rotation matrix method of storing orientations has drawbacks in this sense. It is the three angle description that is limited. In fact, ODE is unlikely to be using the rotation matrix form internally at all, but intead using quaternions internally then converting to orientation matrices when requested because that form is more useful for object display. Were it solely using rotation matrices however, the drawbacks would include relatively costly rotations (due mostly to having to deal with precision issues) and larger than necessary data size. >are the linear and angular velocities related to euler angles? No. Linear velocity is exactly the same as if an object could not rotation. So, e.g. a velocity vector of (a, b, c) will always mean a units along the global 'x axis', b along the global 'y' and c along the global 'z', regardless of object orientation. Angular velocity has a different meaning again. It is a 3 component vector, which may therefore be thought of as describing a direction and a magnitude. The rotation it describes is a rotation around the axis described by its rotation of n radians, where n is equal to the vector's magnitude. This is a very useful form for calculating how applied impulses and forces affect rotation. -Thomas

______________________________________________________
The making of Brazillian football

--=_NextPart_Lycos_0100811036968557_ID-- From russ at q12.org Sun Nov 10 18:54:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 18:54:01 2002 Subject: [ODE] ODE's new collision system Message-ID: <20021110175837.73e010cb.russ@q12.org> ODE's new collision system has been hooked up to the rest of ODE. here's the docs for the new API, as well as a porting guide. http://q12.org/ode/ode-docs.html note that the user can activate either the old or new collision API when ODE is compiled, by setting the ODE_OLD_COLLISION variable in config/user-settings. BUT NOTE, even if the old ODE collision code is used, spaces must still be created with the new API, using a parent argument or 0. work is continuing on adding features to the new collision code. russ. -- Russell Smith http://www.q12.org From russ at q12.org Sun Nov 10 19:09:02 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 19:09:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <000401c287ec$8c862b70$73fefea9@athlon> References: <20021108000235.5bc25ca1.russ@q12.org> <000401c287ec$8c862b70$73fefea9@athlon> Message-ID: <20021110181315.7c8dcc2e.russ@q12.org> > - Remember to add dGeomMoved() calls inside of all Set functions of a > geom. Also SetRadius, etc. yup, i'm on it. > - I think the destructor of a geom needs to tell the body it might be > attached to that it wants to remove itself. Otherwise the body will > use this geom in its linked list after it has been destroyed, which > crashes. quite right - i'll do this too. > - When adding the ray class we should think about what the > 'penetration depth' should be. Do you have any thoughts on this? i'm not sure that dRay will ever be attached to a body, in which case penetration depth does not have much use for the dynamics. perhaps you can think of a non-dynamics use/definition for the penetration depth? > - Why do you memcopy inside the dxSpace::computeAABB() function? no good reason. it may actually be marginally faster because the g->recomputeAABB() call will cause a reload of the class aabb pointer, but not the stack aabb buffer. it's an optimization, but i doubt anyone would notice the extra cycles. > - Should we add support for a user defined, or infinite AABB on demand > for spaces? This is really useful for the quadtree space containing > huge (10.000 for example) amounts of geoms. If i would remove a single > geom it would need to do a lot of work. i don't understand this .. ? russ. -- Russell Smith http://www.q12.org From russ at q12.org Sun Nov 10 20:44:02 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 20:44:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <000401c287ec$8c862b70$73fefea9@athlon> References: <20021108000235.5bc25ca1.russ@q12.org> <000401c287ec$8c862b70$73fefea9@athlon> Message-ID: <20021110194819.0b0957de.russ@q12.org> > - Remember to add dGeomMoved() calls inside of all Set functions of a > geom. Also SetRadius, etc. done. > - I think the destructor of a geom needs to tell the body it might be > attached to that it wants to remove itself. Otherwise the body will > use this geom in its linked list after it has been destroyed, which > crashes. done. also the previous dGeomSetBody(0) code was completely broken, this is fixed too (hopefully). russ. -- Russell Smith http://www.q12.org From mein at cs.umn.edu Sun Nov 10 20:54:01 2002 From: mein at cs.umn.edu (Kent Mein) Date: Sun Nov 10 20:54:01 2002 Subject: [ODE] another small patch to the ode source Message-ID: <20021105201649.A4038@cs.umn.edu> At the end of the build: My machine is trying to link the following with gcc, it should be g++. (I'm on a Sparc running SunOS5.8 useing gcc-3.2) Example: gcc -o ode/test/test_chain2.exe ode/test/test_chain2.o lib/libode.a lib/libdrawstuff.a -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib/X11R6 -L/usr/lib/X11 -lX11 -lGL -lGLU -lm Kent -- mein@cs.umn.edu http://www.cs.umn.edu/~mein From si at sjbrown.co.uk Sun Nov 10 21:02:35 2002 From: si at sjbrown.co.uk (Si Brown) Date: Sun Nov 10 21:02:35 2002 Subject: [ODE] bending wheels again? Message-ID: <200211061355.gA6DtVu11493@hook.org> Hi, >I've read something about problems using directx with ODE too, can someone >tell me more? The only problem I had was with getting DirectX to preserve the FPU exception behaviour, which can be achieved by creating the device with the D3DCREATE_FPU_PRESERVE flag set. Failing to do so broke some of the ODE internals (in the version I was using). Ta, Si From maddocks at metservice.com Sun Nov 10 21:15:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Sun Nov 10 21:15:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <20021110194819.0b0957de.russ@q12.org> Message-ID: <1B6F5262-F52C-11D6-8ACD-00039394FB86@metservice.com> Does all this mean that tricollider is now part of the core distribution? Henry On Monday, November 11, 2002, at 01:48 PM, Russ Smith wrote: > > russ. > From russ at q12.org Sun Nov 10 21:38:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 21:38:01 2002 Subject: [ODE] credit Message-ID: <20021110204247.41e37209.russ@q12.org> in the spirit of giving credit where it is due, i've created a list of ODE contributors and their contributions: http://q12.org/cgi-bin/wiki.pl?ContributorsToODE if i forgot your name or what you did, can you edit this page accordingly? (it's a wiki, so everyone can edit it). i'll move this list to the ODE main page when it's accurate. russ. -- Russell Smith http://www.q12.org From russ at q12.org Sun Nov 10 21:47:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 21:47:01 2002 Subject: [ODE] new ODE collision In-Reply-To: <1B6F5262-F52C-11D6-8ACD-00039394FB86@metservice.com> References: <20021110194819.0b0957de.russ@q12.org> <1B6F5262-F52C-11D6-8ACD-00039394FB86@metservice.com> Message-ID: <20021110204313.0f068550.russ@q12.org> > Does all this mean that tricollider is now part of the core > distribution? not quite yet, but it will be. russ. -- Russell Smith http://www.q12.org From maddocks at metservice.com Sun Nov 10 21:56:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Sun Nov 10 21:56:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <20021110204313.0f068550.russ@q12.org> Message-ID: kewl...I can't wait:) On Monday, November 11, 2002, at 02:43 PM, Russ Smith wrote: > not quite yet, but it will be. From dmcclurg at pandemicstudios.com.au Sun Nov 10 22:04:43 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Sun Nov 10 22:04:43 2002 Subject: [ODE] rate for fixed timesteps Message-ID: To avoid breaking through geometry or generating large collision penetration depths, you'll need use a step value which scales to your velocity. step = 1/60 speed = length(vel) if (speed * step) > max_depth then step = max_depth / speed endif dWorldStep(world, step) just make sure max_depth is less than the radius of your moving vehicle. ideally, it would be small enough not to visually notice either (eg. radius * 0.1f) if you really want to use a fixed time step, step = max_depth / max_speed -----Original Message----- From: Daniel.Groll@t-online.de [mailto:Daniel.Groll@t-online.de] Sent: Sunday, 10 November 2002 12:18 AM To: ode@q12.org Subject: [ODE] rate for fixed timesteps I use fixed timesteps to run my car simulation game. With a rate of 60 Hz the simulation runs smooth and seemed to be stable but now with further testing I encountered some stability problems when cars or objects move fast. Sometimes they seem to break through geometry or "caught" in geometry. Is this the cause of a relatively low rate of world timesteps? Or are there other reasons for instability? At which rates run phyiscs simulations in common? From chris.campbell at l8tech.com Sun Nov 10 22:38:01 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Sun Nov 10 22:38:01 2002 Subject: [ODE] bang! Message-ID: Sometimes having explosions in a physics simulation is a good thing :) http://oscar.lincmedia.co.jp:58080/bang.zip Press h to get some instructions - you should really be inside the room to throw the dynamite properly. This is from the final (?) tutorial on how to use a game engine I have been working on which has a small amount of integration with ODE. I'm hoping to get my website organised and up sometime in the next few weeks. ChrisC From coding at natew.com Mon Nov 11 01:44:02 2002 From: coding at natew.com (Nate W) Date: Mon Nov 11 01:44:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <20021110181315.7c8dcc2e.russ@q12.org> Message-ID: On Sun, 10 Nov 2002, Russ Smith wrote: > > - When adding the ray class we should think about what the > > 'penetration depth' should be. Do you have any thoughts on this? > > i'm not sure that dRay will ever be attached to a body, in which case > penetration depth does not have much use for the dynamics. perhaps you > can think of a non-dynamics use/definition for the penetration depth? The first thing that came to my mind when I heard about the ray class was sensors for the critters I'm making in Juice, sort of like IR or ultrasonic rangefinders in robots, or like whiskers on cats. I'd want to know the distance from the ray's origin to the first object it collides with. Second, I think they might be useful for fast-moving objects - if you project a ray forward along a missile's direction of travel, you could get "collision" info in cases where the missile would otherwise teleport around an object due to its position changing by a distance greater than its length. In that case, could the ray intersection be used to generate a contact joint, to stop the missile from penetrating? -- Nate Waddoups Redmond WA USA http://www.natew.com From Remko at act-3d.com Mon Nov 11 03:33:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Mon Nov 11 03:33:02 2002 Subject: [ODE] Universal joint Message-ID: <279631823.2242109102.98@server> Is it possible to include parameters that limit the rotation of a universal joint? This way you could create a rag doll with ODE. This is very useful in games, like Doom 3 where a character drops of the stairs after dying instead of playing a standard animation. From ed.jones at oracle.com Mon Nov 11 04:11:02 2002 From: ed.jones at oracle.com (Ed Jones) Date: Mon Nov 11 04:11:02 2002 Subject: [ODE] need to understand this References: <20021109092556.77275.qmail@web40507.mail.yahoo.com> Message-ID: <3DCF9028.4040402@oracle.com> Hi, From "common.h"... typedef dReal dMatrix3[4*3]; and from the top of "rotation.cpp"... #define _R(i,j) R[(i)*4+(j)] ;-) Cheers, Ed. pia dalusong wrote: >hello, > >after a lot of digging, i saw this >void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal >theta, dReal psi) >{ > dReal sphi,cphi,stheta,ctheta,spsi,cpsi; > dAASSERT (R); > sphi = dSin(phi); > cphi = dCos(phi); > stheta = dSin(theta); > ctheta = dCos(theta); > spsi = dSin(psi); > cpsi = dCos(psi); > _R(0,0) = cpsi*ctheta; > _R(0,1) = spsi*ctheta; > _R(0,2) =-stheta; > _R(1,0) = cpsi*stheta*sphi - spsi*cphi; > _R(1,1) = spsi*stheta*sphi + cpsi*cphi; > _R(1,2) = ctheta*sphi; > _R(2,0) = cpsi*stheta*cphi + spsi*sphi; > _R(2,1) = spsi*stheta*cphi - cpsi*sphi; > _R(2,2) = ctheta*cphi; >} >i'm a little confused as to how you put values into a >dMatrix and how do you call it? >if i have a variable >const dReal *R >and >dMatrix3 M > >is R[0]=m[0,0] ? >i'm sorry but i don't understand what happens when you >write _R(2,1) > >is it an 2d array matrix[3][3] or a 1d matrix[12]? > >thanks > > > >__________________________________________________ >Do you Yahoo!? >U2 on LAUNCH - Exclusive greatest hits videos >http://launch.yahoo.com/u2 >_______________________________________________ >ODE mailing list >ODE@q12.org >http://q12.org/mailman/listinfo/ode > > From dominicmorris2 at yahoo.com Mon Nov 11 07:32:01 2002 From: dominicmorris2 at yahoo.com (Dominic Morris) Date: Mon Nov 11 07:32:01 2002 Subject: [ODE] Car handling - Overturning too easily Message-ID: <20021111143146.93605.qmail@web80305.mail.yahoo.com> Hello all, I'm sure that there must be a simple solution to this, so if anybody can advise me I'd be very grateful. I've got my car driving over my terrain mesh using the contrib tri-collider, and the one remaining problem I have is that when I steer the car when it's travelling quickly, it overturns much too easily. I've based my code on the buggy example, so the geoms are four spheres and a box. Is this down to the use of spheres for the wheels? If so, what is the solution? Capped Cylinders don't seem any better, as they don't seem to fit the geometery of wheels any better than spheres, and I'm not sure of a user tri-collider for CCylinders. I've played about with masses, and friction models etc, and I can tune down the overturning tendancy, at the expense of the car's grip by using the Slip1 and Slip2 parameters (not that I fully understand these either!) Any help is appreciated, DM. __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From henri at cs.sun.ac.za Mon Nov 11 08:35:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Mon Nov 11 08:35:02 2002 Subject: [ODE] Faster replacement for fastldlt.c Message-ID: <000d01c28997$fcabf4f0$39d4e892@shrine> This is a multi-part message in MIME format. ------=_NextPart_000_000A_01C289A8.C02B4F10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi ODE fans and perpetrators :) I've been looking into various ways to optimize the LDLT factorization = which is one of the computationally intensive tasks in ODE. = Unforetunately I cannot directly test alot of my results due to not = having a C(++) compiler around. Nonetheless, I've restructured the = original "fastldlt.c" file which should be functionally equivalent to = the original but considerably faster. (Russ... the version I send you = had a bug in it - this version here should be correct.) I hope the = version I provide is correct, this is difficult to ascertain just by = inspection though, as the code is heavily interdependent. Please can somebody that is "in the know" test the replacement file for = correctness and speed. If it gets the thumbs-up I'd be happy to see it = integrated into the ODE package. You can find the file at: = http://www.cs.sun.ac.za/~henri/fastldlt_henri.c thanks Henri ------=_NextPart_000_000A_01C289A8.C02B4F10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi ODE fans and = perpetrators :)
 
I've been looking into various ways to optimize = the LDLT=20 factorization which is one of the computationally intensive = tasks in ODE.=20 Unforetunately I cannot directly test alot of my results due to not = having a=20 C(++) compiler around. Nonetheless, I've restructured the original = "fastldlt.c"=20 file which should be functionally equivalent to the original but=20 considerably faster. (Russ... the version I send you had a bug in it - = this=20 version here should be correct.) I hope the version I provide is = correct, this=20 is difficult to ascertain just by inspection though, as the code is = heavily=20 interdependent.
 
Please can somebody that is "in the know" test = the=20 replacement file for correctness and speed. If it gets the thumbs-up I'd = be=20 happy to see it integrated into the ODE package. You can find the file = at: http://www.cs.sun.ac.za/~henri/fastldlt_henri.c
 
thanks
  Henri
------=_NextPart_000_000A_01C289A8.C02B4F10-- From anselm at hook.org Mon Nov 11 09:54:02 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 11 09:54:02 2002 Subject: [ODE] Car handling - Overturning too easily In-Reply-To: <20021111143146.93605.qmail@web80305.mail.yahoo.com> Message-ID: Hi Dominic, You can put a weight far below the car's chassis - the Monster Mayhem demo does this. - a On Mon, 11 Nov 2002, Dominic Morris wrote: > Hello all, > > I'm sure that there must be a simple solution to this, > so if anybody can advise me I'd be very grateful. > > I've got my car driving over my terrain mesh using the > contrib tri-collider, and the one remaining problem I > have is that when I steer the car when it's travelling > quickly, it overturns much too easily. > > I've based my code on the buggy example, so the geoms > are four spheres and a box. Is this down to the use of > spheres for the wheels? If so, what is the solution? > Capped Cylinders don't seem any better, as they don't > seem to fit the geometery of wheels any better than > spheres, and I'm not sure of a user tri-collider for > CCylinders. > > I've played about with masses, and friction models > etc, and I can tune down the overturning tendancy, at > the expense of the car's grip by using the Slip1 and > Slip2 parameters (not that I fully understand these > either!) > > Any help is appreciated, > > DM. > > __________________________________________________ > Do you Yahoo!? > New DSL Internet Access from SBC & Yahoo! > http://sbc.yahoo.com > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From coding at natew.com Mon Nov 11 11:30:02 2002 From: coding at natew.com (Nate W) Date: Mon Nov 11 11:30:02 2002 Subject: [ODE] Car handling - Overturning too easily In-Reply-To: <20021111143146.93605.qmail@web80305.mail.yahoo.com> Message-ID: On Mon, 11 Nov 2002, Dominic Morris wrote: > I'm sure that there must be a simple solution to this, > so if anybody can advise me I'd be very grateful. > > I've got my car driving over my terrain mesh using the > contrib tri-collider, and the one remaining problem I > have is that when I steer the car when it's travelling > quickly, it overturns much too easily. I ran into this as well. I've mostly just been tuning the tire-ground friction, so it is more likely to slide sideways than flip onto its roof. You might also want to try lowering the car's center of gravity, either by changing the chassis' inertial tensor or by reducing the 'ride height' of the suspension. I think you have to expect a certain amount of rollover, since it's a problem with real off-road racing as well. Also, are you steering with a joystick, or are you using the keyboard? If the latter, you might want to try slowing down the steering response, or reducing the steering angle as the car gains speed. > Capped Cylinders don't seem any better, as they don't > seem to fit the geometery of wheels any better than > spheres, and I'm not sure of a user tri-collider for > CCylinders. I'm using spheres for driving over terrain, and flat-ended cylinders for driving over ground planes. I've been wondering if it might be useful to have a "tire" collision hull - something similar to a cylinder but simplified. For example, just the ends of a flat-end cylinder, or just the middle section of a capped cylinder (not the caps). It might be more trouble than it's worth, but then again it might be possible to save some clock cycles by using a shape that is correct 99% of the time. -- Nate Waddoups Redmond WA USA http://www.natew.com From erwin at vo.com Mon Nov 11 12:04:02 2002 From: erwin at vo.com (Erwin de Vries) Date: Mon Nov 11 12:04:02 2002 Subject: [ODE] new ODE collision References: Message-ID: <004401c289b5$109f81d0$73fefea9@athlon> > On Sun, 10 Nov 2002, Russ Smith wrote: > > > > - When adding the ray class we should think about what the > > > 'penetration depth' should be. Do you have any thoughts on this? > > > > i'm not sure that dRay will ever be attached to a body, in which case > > penetration depth does not have much use for the dynamics. perhaps you > > can think of a non-dynamics use/definition for the penetration depth? > > The first thing that came to my mind when I heard about the ray class was > sensors for the critters I'm making in Juice, sort of like IR or > ultrasonic rangefinders in robots, or like whiskers on cats. I'd want to > know the distance from the ray's origin to the first object it collides > with. Thats also what i'm thinking of. Its not what it currently does, but i believe this would be more useful than the current version. > Second, I think they might be useful for fast-moving objects - if you > project a ray forward along a missile's direction of travel, you could get > "collision" info in cases where the missile would otherwise teleport > around an object due to its position changing by a distance greater than > its length. In that case, could the ray intersection be used to generate > a contact joint, to stop the missile from penetrating? I'd say it would be more appropriate to use a ccylinder here. Unless you want it to bounce off of course. Erwin From maddocks at metservice.com Mon Nov 11 12:50:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Mon Nov 11 12:50:02 2002 Subject: Fwd: [ODE] Car handling - Overturning too easily Message-ID: On Tuesday, November 12, 2002, at 03:31 AM, Dominic Morris wrote: > I've got my car driving over my terrain mesh using the > contrib tri-collider, and the one remaining problem I > have is that when I steer the car when it's travelling > quickly, it overturns much too easily. > I had this problem too. > I've based my code on the buggy example, so the geoms > are four spheres and a box. I didn't base my code on the buggy but I've got a box and four spheres. > > I've played about with masses, and friction models > etc, and I can tune down the overturning tendancy, at > the expense of the car's grip by using the Slip1 and > Slip2 parameters (not that I fully understand these > either!) > That's how I fixed it. It took a while to get a good balance between too much grip (overturning) and not enough (skidding). My car still over turns sometimes which I think is because my centre of gravity is too high. And anyway, cars do turn over in real life, I know:) henry From Filipe Dias" Message-ID: <001601c289bd$21d47070$4601a8c0@mind.pt> I don't know how many turning wheels you guys have (assuming the front 2), but shifting the center of gravity forward or backwards will also affect the turning... more weight on the front wheels will turn more (the back slips easyer), but I like to place more wieght on the back wheels.. But don't exagerate!! Fil. From dmcclurg at pandemicstudios.com.au Mon Nov 11 16:55:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Mon Nov 11 16:55:02 2002 Subject: [ODE] new ODE collision Message-ID: >>> - When adding the ray class we should think about what the 'penetration depth' should be. Do you have any thoughts on this? The way a ray works is that you get one contact point where the ray first hits something. Penetration depth doesn't mean anything but it is very convenient to know the distance from the origin of the ray to the contact position. Storing that in the 'depth' field would make alot of sense for rays. >> i'm not sure that dRay will ever be attached to a body, in which case penetration depth does not have much use for the dynamics. perhaps you can think of a non-dynamics use/definition for the penetration depth? I'm finding two uses for rays in my game. 1) Ground Height Detection 2) LOS - line of sight The rays are almost always associated with a moving body! Perhaps some examples will clarify... - cameras: i don't want the chase camera going under the ground or perhaps i want to look at the ground point under the puppet so i don't have to head bob when he jumps. two rays are useful here-- one for the target and one for the eye. also the camera will need to cast a LOS ray to determine if there is an obstruction. - floating prizes: i detect the ground height so that prizes can automatically find a convenient home position where the player can grab them. in this situation, the ray is used for one HIT and then the ray is destroyed. Hope that helps! From claytonious at cox.net Mon Nov 11 18:02:02 2002 From: claytonious at cox.net (Clay Fowler) Date: Mon Nov 11 18:02:02 2002 Subject: [ODE] Weird collision/force problem Message-ID: <006a01c289e6$fe384860$0500a8c0@angus> This is a multi-part message in MIME format. ------=_NextPart_000_0067_01C289AC.51C413A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, everyone. I have a problem with forces being applied to my rigid body. My = vehicle's "front" is along the positive Y-Axis, its "right" is along the = positive X-axis and it's "up" is positive-Z. When I call = dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"), = specifying the rear-right of the vehicle as the point (so it's, for = example, an X of 1 and a Y of -1), for some reason the FRONT LEFT of the = vehicle gets pushed up into the air. This is the opposite corner of the = point I am specifying! When I swap the coordinates and apply an upward = force at the point (-1,1), the REAR RIGHT of the vehicle gets pushed up. = I have verified that ODE and my app both have the same idea of what the = world coordinate axes are by applying forces to the center of mass to = move the vehicle along the world's X, Y, and Z axes and these all behave = exactly as I would expect. But when I apply a force at a point, it seems = like the point I'm passing is "mirrored" on the axes. I am specifying = the mass of the vehicle with a simple dMassSetBox() and I have visually = verified that the box is a very good fit to the vehicle. Any ideas on = why the axes are "mirrored" this way for applying forces? The reason this is such a big problem is because I am doing my own = collision detection with the terrain beneath the vehicle by creating my = own Contact joints where the vehicle touches the terrain. Of course, the = vehicle responds incorrectly to these points because of the mirroring = problem. Thanks for any help! - Clay ------=_NextPart_000_0067_01C289AC.51C413A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello, everyone.
 
I have a problem with forces being = applied to my=20 rigid body. My vehicle's "front" is along the positive Y-Axis, its = "right" is=20 along the positive X-axis and it's "up" is positive-Z. When I call=20 dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"), = specifying=20 the rear-right of the vehicle as the point (so it's, for example, an X = of 1 and=20 a Y of -1), for some reason the FRONT LEFT of the vehicle gets pushed up = into=20 the air. This is the opposite corner of the point I am specifying! When = I swap=20 the coordinates and apply an upward force at the point (-1,1), the REAR = RIGHT of=20 the vehicle gets pushed up. I have verified that ODE and my app both = have the=20 same idea of what the world coordinate axes are by applying forces to = the center=20 of mass to move the vehicle along the world's X, Y, and Z axes and these = all=20 behave exactly as I would expect. But when I apply a force at a point, = it seems=20 like the point I'm passing is "mirrored" on the axes. I am specifying = the mass=20 of the vehicle with a simple dMassSetBox() and I have visually verified = that the=20 box is a very good fit to the vehicle. Any ideas on why the axes are = "mirrored"=20 this way for applying forces?
 
The reason this is such a big problem = is because I=20 am doing my own collision detection with the terrain beneath the vehicle = by=20 creating my own Contact joints where the vehicle touches the terrain. Of = course,=20 the vehicle responds incorrectly to these points because of the = mirroring=20 problem.
 
Thanks for any help!
 
- Clay
 
------=_NextPart_000_0067_01C289AC.51C413A0-- From mal at candomultimedia.com Tue Nov 12 05:54:02 2002 From: mal at candomultimedia.com (Mal) Date: Tue Nov 12 05:54:02 2002 Subject: [ODE] ODE / Blender news... In-Reply-To: <006a01c289e6$fe384860$0500a8c0@angus> Message-ID: <000101c28a4a$7c2f1ab0$b000a8c0@MalLaptop> Here's some ODE related news regarding Blender... http://www.blender.org/modules.php?op=modload&name=News&file=article&sid =15&mode=thread&order=0&thold=0 " No new functionality is added in Blender, with one exception: ODE. Commits in this part of Blender should be aimed at getting Blender not crashing, and preferably running (some) of the old demos again. The current Blender physics system (nicked SUMO) will be entirely replaced with ODE later. That might give a compatibility problem, but at least it will provide quite some cool new features." Sounds like things are flying along! Norman, do you have any binary beta files with ODE support that we can test out? :) I'm just recovering from a pretty bad PC crash, and have lost all my old eMails, so I don't have your direct eMail anymore! Mal From anselm at hook.org Tue Nov 12 12:11:01 2002 From: anselm at hook.org (Anselm Hook) Date: Tue Nov 12 12:11:01 2002 Subject: [ODE] irc? In-Reply-To: <000101c28a4a$7c2f1ab0$b000a8c0@MalLaptop> Message-ID: Where was that irc channel again for ode? Which server? - a From Alan_Gordie at payformance.com Tue Nov 12 12:39:02 2002 From: Alan_Gordie at payformance.com (Alan Gordie) Date: Tue Nov 12 12:39:02 2002 Subject: [ODE] irc? Message-ID: It's #ode on EFNet Alan -----Original Message----- From: Anselm Hook [mailto:anselm@hook.org] Sent: Tuesday, November 12, 2002 2:11 PM To: ode@q12.org Subject: [ODE] irc? Where was that irc channel again for ode? Which server? - a _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From colire02 at noa.nintendo.com Wed Nov 13 11:32:02 2002 From: colire02 at noa.nintendo.com (Colin Reed) Date: Wed Nov 13 11:32:02 2002 Subject: [ODE] Convex hulls Message-ID: How difficult would it be to get convex hulls working as a more general collision type as opposed to box collisions? For me this would be really helpfull, I was just wondering how much work it would be. Colin From dmcclurg at pandemicstudios.com.au Wed Nov 13 17:51:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Wed Nov 13 17:51:02 2002 Subject: [ODE] Convex hulls Message-ID: > if you're curious, the source files for the new collision infrastructure have been checked into CVS (collision_*.h, collision_*.cpp). it has not been hooked up to the rest of ODE yet, so the only reason i mention it is for the curious. note that there's still a bunch of stuff to do, in particular to hook up the ray, trimesh and cylinder classes, and to convert the hash table space to use an incremental approach ... but you can get an idea of the new layout. i think the trimesh, when completed, should work for you. -----Original Message----- From: Colin Reed [mailto:colire02@noa.nintendo.com] Sent: Wednesday, 13 November 2002 1:53 PM To: ode@q12.org Subject: [ODE] Convex hulls How difficult would it be to get convex hulls working as a more general collision type as opposed to box collisions? For me this would be really helpfull, I was just wondering how much work it would be. Colin From claytonious at cox.net Wed Nov 13 18:45:02 2002 From: claytonious at cox.net (Clay Fowler) Date: Wed Nov 13 18:45:02 2002 Subject: [ODE] Weird collision/force problem References: <006a01c289e6$fe384860$0500a8c0@angus> Message-ID: <003d01c28b7f$50820180$0500a8c0@angus> This is a multi-part message in MIME format. ------=_NextPart_000_003A_01C28B44.A40C1F10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable In case anyone else runs into this, here is the solution... The axes seemed inverted because I was incorrectly copying the = transformation matrix from ODE into OSG. I finally looked at the code in = the drawstuff lib to see how to fill an OpenGL-style 4x4 matrix with = values, and I was doing it backwards. Now that I'm filling xform = matrices properly, everything works wonderfully. ----- Original Message -----=20 From: Clay Fowler=20 To: ode@q12.org=20 Sent: Monday, November 11, 2002 6:01 PM Subject: [ODE] Weird collision/force problem Hello, everyone. I have a problem with forces being applied to my rigid body. My = vehicle's "front" is along the positive Y-Axis, its "right" is along the = positive X-axis and it's "up" is positive-Z. When I call = dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"), = specifying the rear-right of the vehicle as the point (so it's, for = example, an X of 1 and a Y of -1), for some reason the FRONT LEFT of the = vehicle gets pushed up into the air. This is the opposite corner of the = point I am specifying! When I swap the coordinates and apply an upward = force at the point (-1,1), the REAR RIGHT of the vehicle gets pushed up. = I have verified that ODE and my app both have the same idea of what the = world coordinate axes are by applying forces to the center of mass to = move the vehicle along the world's X, Y, and Z axes and these all behave = exactly as I would expect. But when I apply a force at a point, it seems = like the point I'm passing is "mirrored" on the axes. I am specifying = the mass of the vehicle with a simple dMassSetBox() and I have visually = verified that the box is a very good fit to the vehicle. Any ideas on = why the axes are "mirrored" this way for applying forces? The reason this is such a big problem is because I am doing my own = collision detection with the terrain beneath the vehicle by creating my = own Contact joints where the vehicle touches the terrain. Of course, the = vehicle responds incorrectly to these points because of the mirroring = problem. Thanks for any help! - Clay ------=_NextPart_000_003A_01C28B44.A40C1F10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
In case anyone else runs into this, = here is the=20 solution...
 
The axes seemed inverted because I was = incorrectly=20 copying the transformation matrix from ODE into OSG. I finally looked at = the=20 code in the drawstuff lib to see how to fill an OpenGL-style 4x4 matrix = with=20 values, and I was doing it backwards. Now that I'm filling xform = matrices=20 properly, everything works wonderfully.
----- Original Message -----
From:=20 Clay Fowler=20
Sent: Monday, November 11, 2002 = 6:01=20 PM
Subject: [ODE] Weird = collision/force=20 problem

Hello, everyone.
 
I have a problem with forces being = applied to my=20 rigid body. My vehicle's "front" is along the positive Y-Axis, its = "right" is=20 along the positive X-axis and it's "up" is positive-Z. When I call=20 dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"),=20 specifying the rear-right of the vehicle as the point (so it's, for = example,=20 an X of 1 and a Y of -1), for some reason the FRONT LEFT of the = vehicle gets=20 pushed up into the air. This is the opposite corner of the point I am=20 specifying! When I swap the coordinates and apply an upward force at = the point=20 (-1,1), the REAR RIGHT of the vehicle gets pushed up. I have verified = that ODE=20 and my app both have the same idea of what the world coordinate axes = are by=20 applying forces to the center of mass to move the vehicle along the = world's X,=20 Y, and Z axes and these all behave exactly as I would expect. But when = I apply=20 a force at a point, it seems like the point I'm passing is "mirrored" = on the=20 axes. I am specifying the mass of the vehicle with a simple = dMassSetBox() and=20 I have visually verified that the box is a very good fit to the = vehicle. Any=20 ideas on why the axes are "mirrored" this way for applying=20 forces?
 
The reason this is such a big problem = is because=20 I am doing my own collision detection with the terrain beneath the = vehicle by=20 creating my own Contact joints where the vehicle touches the terrain. = Of=20 course, the vehicle responds incorrectly to these points because of = the=20 mirroring problem.
 
Thanks for any help!
 
- Clay
 
------=_NextPart_000_003A_01C28B44.A40C1F10-- From claytonious at cox.net Wed Nov 13 22:42:01 2002 From: claytonious at cox.net (Clay Fowler) Date: Wed Nov 13 22:42:01 2002 Subject: [ODE] slip1 and slip2 Message-ID: <000e01c28ba0$7f74e270$0500a8c0@angus> This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C28B65.D2F478B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable What do the slip1 and slip2 parameters in a contact structure do? ------=_NextPart_000_000B_01C28B65.D2F478B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
What do the slip1 and slip2 parameters = in a contact=20 structure do?
------=_NextPart_000_000B_01C28B65.D2F478B0-- From Tony.Peguero at xtra.co.nz Wed Nov 13 23:53:01 2002 From: Tony.Peguero at xtra.co.nz (Tony Peguero) Date: Wed Nov 13 23:53:01 2002 Subject: [ODE] more physics In-Reply-To: Message-ID: >Costs in what way? It does say memory usage and how much of >the cpu per frame the physics system takes. What other costs >are there? He he. You must have been working with open source projects for quite a while to have forgotten that some things cost money. Some physics engines cost a LOT of money. >Also is it just me or do the chain and hinge behave strangly? >If you continue to force it upwards it starts to wobble. Like >a snake or something. Maybe it's just me and thats how it >should behave. I noticed that too. I think it's because of the way the keyboard controls were written, rather than a problem with the engine. When you press the lift key, it applies a momentary impulse to the end of the chain. When you hold the button down it applies repeated impulses, not a constant force, so the end of the chain is basically being shaken up and down. -----Original Message----- From: ode-admin@q12.org [mailto:ode-admin@q12.org]On Behalf Of Joakim Eriksson Sent: Friday, 1 November 2002 10:27 a.m. To: ode@q12.org Subject: SV: [ODE] more physics > > looks like another physics engine... > > > > www.tokamakphysics.com > > interesting. yet another mention of iterative constraint > solving methods here. the demos are kind of bare bones >(i.e., like ODE's bare bones demos). no mention of the cost. Costs in what way? It does say memory usage and how much of the cpu per frame the physics system takes. What other costs are there? > the box stack demo has an interesting flaw: a nudged stack > will tip over, then freeze part of the way down. this suggests > that 'stable' box stacking is achieved through simply turning >off the phisics for a stationary stack Yes, seems like the objects sleep VERY quickly. After just a few tries I manage to get it to sleep in a physicly impossible position. (If the simulation had run for just a few ticks more the boxes would have fallen over) but they quickly froze in place. > the collision looks like it allows penetration, like ODE. if > you collapse the chain on top of itself it will squish into > itself a bit then expand out. It does indeed allow penetration. Just move closer to a object and spawn a sphere or something. You can see that even if the object is inside another object he can handle it. Its also a dead give away that he for the moment only handles primitives vs primitives and primitives vs static triangle meshes. It seems to be able to handle quite a lot. It does use a bit of memory 500Kb in some cases but they do contain quite a lot of objects. Too bad they dont have any more information on thier method. Also is it just me or do the chain and hinge behave strangly? If you continue to force it upwards it starts to wobble. Like a snake or something. Maybe it's just me and thats how it should behave. /Joakim E. - www.planestate.net _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From Remko at act-3d.com Thu Nov 14 03:54:01 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Thu Nov 14 03:54:01 2002 Subject: [ODE] Universal joint Message-ID: <279892225.2502571807.98@server> I noticed that two bodies that are connected by a joint do not have collision with each other. Am I missing something here? The ODE examples show the same behavior between connected bodies. -----Original Message----- From: Martin C. Martin [mailto:martin@metahuman.org] Sent: Monday, November 11, 2002 8:58 AM To: Remko Jacobs (act-3d.com) Subject: Re: [ODE] Universal joint Hi, The way I do it is to use collisions with the body to limit the rotation. That looks pretty natural... - Martin "Remko Jacobs (act-3d.com)" wrote: > > Is it possible to include parameters that limit the rotation of a > universal joint? This way you could create a rag doll with ODE. This is > very useful in games, like Doom 3 where a character drops of the stairs > after dying instead of playing a standard animation. > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From Remko at act-3d.com Thu Nov 14 04:00:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Thu Nov 14 04:00:02 2002 Subject: [ODE] rate for fixed timesteps Message-ID: <279892645.2502991882.98@server> Using a fixed time step is the way to go. The problem is that the frame rate is not constant. We solved this by using a constant update rate (in Hz) for ODE that is independent of the program updates. CFM and ERP values work differently with different time steps so you should avoid using more than one different time step for one project. Using a constant update frequency means that for some frames there might be 10 time steps calculated for ODE and other frames ODE does not update at all. From: David McClurg [mailto:dmcclurg@pandemicstudios.com.au] >To avoid breaking through geometry or generating large collision >penetration depths, you'll need use a step value which scales to your >velocity. > > step = 1/60 > speed = length(vel) > if (speed * step) > max_depth then > step = max_depth / speed > endif > dWorldStep(world, step) > >just make sure max_depth is less than the radius of your moving vehicle. >ideally, it would be small enough not to visually notice either (eg. radius * 0.1f) >if you really want to use a fixed time step, > > step = max_depth / max_speed From martin at metahuman.org Thu Nov 14 06:41:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 14 06:41:02 2002 Subject: [ODE] Universal joint References: <279892225.2502571807.98@server> Message-ID: <3DD3A7AB.4A2594E9@metahuman.org> "Remko Jacobs (act-3d.com)" wrote: > > I noticed that two bodies that are connected by a joint do not have > collision with each other. They do in my application. Does your near callback create collision constraints for them? Are you sure the size/location/orientation/shape that you're drawing are the same as ODE is using? - Martin From ykhun at singnet.com.sg Thu Nov 14 08:23:02 2002 From: ykhun at singnet.com.sg (ykhun) Date: Thu Nov 14 08:23:02 2002 Subject: [ODE] Help for beginners Message-ID: <000a01c28bf2$1cf993a0$889f15a5@dune> This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C28C35.2ADC9650 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, i'm very new to ODE and rigid body physics. I found that there isn't = much stuff to help newbies like me to kickstart using ODE. Read the docs = and learn much about how ODE works but not how to use it! Is there any resource to help beginners up and running with ODE in a = short time?? Cheers! ykhun ------=_NextPart_000_0007_01C28C35.2ADC9650 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
i'm very new to ODE and rigid body = physics. I found=20 that there isn't much stuff to help newbies like me to kickstart using = ODE. Read=20 the docs and learn much about how ODE works but not how to use = it!
 
Is there any resource to help beginners = up and=20 running with ODE in a short time??
Cheers!
 
ykhun
------=_NextPart_000_0007_01C28C35.2ADC9650-- From martin at metahuman.org Thu Nov 14 08:43:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 14 08:43:02 2002 Subject: [ODE] Help for beginners References: <000a01c28bf2$1cf993a0$889f15a5@dune> Message-ID: <3DD3C44B.1F9A8A9C@metahuman.org> You can take a look at the examples included with ODE, especially the boxstack and buggy demos. - Martin > ykhun wrote: > > Hi, > i'm very new to ODE and rigid body physics. I found that there isn't > much stuff to help newbies like me to kickstart using ODE. Read the docs > and learn much about how ODE works but not how to use it! > > Is there any resource to help beginners up and running with ODE in a > short time?? > Cheers! > > ykhun From max.lungarella at aist.go.jp Thu Nov 14 08:59:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Thu Nov 14 08:59:02 2002 Subject: [ODE] Help for beginners In-Reply-To: <000a01c28bf2$1cf993a0$889f15a5@dune> References: <000a01c28bf2$1cf993a0$889f15a5@dune> Message-ID: <20021115005725.5ff946cb.max.lungarella@aist.go.jp> hi, you can also learn a lot by browsing through the archives of this mailing list. cheerio, max > i'm very new to ODE and rigid body physics. I found that there isn't > much stuff to help newbies like me to kickstart using ODE. Read the > docs and learn much about how ODE works but not how to use it! > > Is there any resource to help beginners up and running with ODE in a > short time?? Cheers! > > ykhun From christian.verbeek at ais.fraunhofer.de Thu Nov 14 10:57:01 2002 From: christian.verbeek at ais.fraunhofer.de (Christian Verbeek) Date: Thu Nov 14 10:57:01 2002 Subject: [ODE] test_buggy with 13 buggys Message-ID: <3DD3E3E6.C600B51@ais.fraunhofer.de> dear ode-users, i am quite new to ode. but it took me half a day to write a program that will crash. you can find it under http://ais.gmd.de/~verbeek/ode/ this is the test_buggy example modularised. for the buggy i made a class RBuggy where i am deriving 13 objects from. when the buggys collide the program crashes. when i do the same with 12 buggys, everthing is ok. i tested it with ode-0.03 and the latest cvs-version under cygwin and windowsXP. dont blame me, but linux does not support the graficsadapter of my laptop. compiling this with linux works, but execution of the program is really really slow. i used gdb to find out, where the program crashes. i think it is somewhere in the collision detection routines. at least these are called right before the program crashes. help needed, c. -- -__________________________________________ Dr. rer. nat. Dipl.-Phys. C. Verbeek email: christian.verbeek@ais.fraunhofer.de room: C2-214 http://www.ais.fraunhofer.de/~verbeek phone: +49 2241 14 2057 fax : +49 2241 14 2384 From ericc at xenopi.com Thu Nov 14 11:08:02 2002 From: ericc at xenopi.com (Eric Cha) Date: Thu Nov 14 11:08:02 2002 Subject: [ODE] test_buggy with 13 buggys In-Reply-To: <3DD3E3E6.C600B51@ais.fraunhofer.de> Message-ID: <005701c28c09$37a798c0$6401a8c0@donald> Sounds like stack overflow to me... I could see that happening with 13 buggies rolling around.. > -----Original Message----- > From: ode-admin@q12.org [mailto:ode-admin@q12.org] On Behalf > Of Christian Verbeek > Sent: Thursday, November 14, 2002 9:57 AM > To: ode@q12.org > Subject: [ODE] test_buggy with 13 buggys > > > dear ode-users, > > i am quite new to ode. but it took me half a day to write a > program that will crash. you can find it under > http://ais.gmd.de/~verbeek/ode/ this is the test_buggy example modularised. for the buggy i made a class RBuggy where i am deriving 13 objects from. when the buggys collide the program crashes. when i do the same with 12 buggys, everthing is ok. i tested it with ode-0.03 and the latest cvs-version under cygwin and windowsXP. dont blame me, but linux does not support the graficsadapter of my laptop. compiling this with linux works, but execution of the program is really really slow. i used gdb to find out, where the program crashes. i think it is somewhere in the collision detection routines. at least these are called right before the program crashes. help needed, c. -- -__________________________________________ Dr. rer. nat. Dipl.-Phys. C. Verbeek email: christian.verbeek@ais.fraunhofer.de room: C2-214 http://www.ais.fraunhofer.de/~verbeek phone: +49 2241 14 2057 fax : +49 2241 14 2384 _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.410 / Virus Database: 231 - Release Date: 10/31/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.410 / Virus Database: 231 - Release Date: 10/31/2002 From coding at natew.com Thu Nov 14 11:42:02 2002 From: coding at natew.com (Nate W) Date: Thu Nov 14 11:42:02 2002 Subject: [ODE] test_buggy with 13 buggys In-Reply-To: <3DD3E3E6.C600B51@ais.fraunhofer.de> Message-ID: On Thu, 14 Nov 2002, Christian Verbeek wrote: > this is the test_buggy example modularised. for the buggy i made a class > RBuggy where i am deriving 13 objects from. when the buggys collide the > program crashes. when i do the same with 12 buggys, everthing is ok. > > i tested it with ode-0.03 and the latest cvs-version under cygwin and > windowsXP. Try doubling the size of the stack. There should be a linker option for that. Windows doesn't grow the stack automatically, and ODE uses a lot of stack for complex worlds. -- Nate Waddoups Redmond WA USA http://www.natew.com From christian.verbeek at ais.fraunhofer.de Fri Nov 15 03:35:02 2002 From: christian.verbeek at ais.fraunhofer.de (Christian Verbeek) Date: Fri Nov 15 03:35:02 2002 Subject: [ODE] test_buggy with 13 buggys References: Message-ID: <3DD4CD9A.4BCA2A58@ais.fraunhofer.de> i did not find out how to increase the stack size with cygwin. but i compiled the program on linux and there it works. i tried 100 buggys. no crash, but simulation goes very slow, when all 100 buggys collide. when are the first THz processors coming out? does anyone know how to increase the stack size under cygwin? something like gcc -Wl,--stack,4096 does not help. c. Nate W wrote: > On Thu, 14 Nov 2002, Christian Verbeek wrote: > > > this is the test_buggy example modularised. for the buggy i made a class > > RBuggy where i am deriving 13 objects from. when the buggys collide the > > program crashes. when i do the same with 12 buggys, everthing is ok. > > > > i tested it with ode-0.03 and the latest cvs-version under cygwin and > > windowsXP. > > Try doubling the size of the stack. There should be a linker option for > that. Windows doesn't grow the stack automatically, and ODE uses a lot of > stack for complex worlds. > > -- > > Nate Waddoups > Redmond WA USA > http://www.natew.com > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode -- -__________________________________________ Dr. rer. nat. Dipl.-Phys. C. Verbeek email: christian.verbeek@ais.fraunhofer.de room: C2-214 http://www.ais.fraunhofer.de/~verbeek phone: +49 2241 14 2057 fax : +49 2241 14 2384 From hans at tat.physik.uni-tuebingen.de Fri Nov 15 06:30:02 2002 From: hans at tat.physik.uni-tuebingen.de (Torsten Hans) Date: Fri Nov 15 06:30:02 2002 Subject: [ODE] what integration method is used ? In-Reply-To: <200211151243.gAFCh2u15455@hook.org> Message-ID: hello, i recently came across ode. its seems like an interesting project. however i couldn't find out an important information: what basic integration scheme does ODE use ? is it an explicit or implicit integration method ? does it use runge kutta or something else ? is it possible to use a different integration scheme ? any information would be appreciated. kind regards, torsten hans From henri at cs.sun.ac.za Fri Nov 15 08:30:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Fri Nov 15 08:30:02 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? Message-ID: <00ba01c28cbc$227f17d0$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_00B7_01C28CCC.E600BBE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi :) I've played with the hinge-joint recently and figured out how to use lo = and hi stops to limit rotations. My problem now is to have a similar system for ball-socket joints. The = idea is to have limited range of motions similar to (for example) the = joint holding arm and shoulder together. It should have some degree of = mobility to rotate around an arbitrary axis of motion, and it should be = able to deviate from the initial axis of rotation to some degree. Essentially it should be able to move inside a cone-of-freedom (plus it = is only allowed to twist to a certain extend). Help please. Henri ------=_NextPart_000_00B7_01C28CCC.E600BBE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi :)
 
I've played with the hinge-joint = recently and=20 figured out how to use lo and hi stops to limit rotations.
 
My problem now is to have a similar = system for=20 ball-socket joints. The idea is to have limited range of motions similar = to (for=20 example) the joint holding arm and shoulder together. It should have = some degree=20 of mobility to rotate around an arbitrary axis of motion, and it should = be able=20 to deviate from the initial axis of rotation to some = degree.
 
Essentially it should be able to move = inside a=20 cone-of-freedom (plus it is only allowed to twist to a certain=20 extend).
 
Help please.
  Henri
------=_NextPart_000_00B7_01C28CCC.E600BBE0-- From pete_graves at hotmail.com Fri Nov 15 14:21:01 2002 From: pete_graves at hotmail.com (Pete Graves) Date: Fri Nov 15 14:21:01 2002 Subject: [ODE] Problems installing ODE 0.03 Message-ID: I'm new to ODE, and inexperienced with C++ and the Microsoft Visual C/C++ 6.0 IDE, so please bear with me. I wanted to try out ODE and some of the test programs. I downloaded ODE 0.03, and followed the installation instructions in the User Guide. I set MSVC's path variables during its installation, downloaded the GNU make tool from the ODE web site, left the user-settings with PLATFORM=msvc and PRECISION=DOUBLE, and ran make in the ODE directory. This is some clips of the results: ... ctest.c(1) : fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory ... ctest.c(2) : error C2143: syntax error : missing ')' before ':' ctest.c(2) : error C2059: syntax error : ')' ... *** configurator succeeded *** ... cl /nologo /DWIN32 /DMSVC /c /GR- /GX- /W3 /GF /Oy /Iinclude /DdNODEBUG /O2 /Fo ode/src/array.obj ode/src/array.cpp Command line warning D4002 : ignoring unknown option '/Oy' (this is shown loads of times} ... LIB : fatal error LNK1104: cannot open file "lib/ode.lib" MAKE: *** [lib/ode.lib] Error 1104 I don't appear to have a lib/ directory at all. Am I missing something? Could anyone suggest what I am doing wrong? Thanks, Pete. _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From coding at natew.com Fri Nov 15 21:29:01 2002 From: coding at natew.com (Nate W) Date: Fri Nov 15 21:29:01 2002 Subject: [ODE] Problems installing ODE 0.03 In-Reply-To: Message-ID: On Fri, 15 Nov 2002, Pete Graves wrote: > ctest.c(1) : fatal error C1083: Cannot open include file: 'alloca.h': No > such file or directory Change that to "malloc.h" instead. I'm not sure about the rest though. -- Nate Waddoups Redmond WA USA http://www.natew.com From pete_graves at hotmail.com Sat Nov 16 08:49:01 2002 From: pete_graves at hotmail.com (Pete Graves) Date: Sat Nov 16 08:49:01 2002 Subject: [ODE] Re: Problems installing ODE 0.03 Message-ID: The only file I can find that contains 'alloca.h' is 'configurator.c': 229: char *header[7] = {"stdio.h", "stdlib.h", "math.h", "string.h", 330: "stdarg.h", "malloc.h", "alloca.h"}; ~~~~~~~~ Can I just remove this? 'malloc.h' is already there? Am I looking in the right place? _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From martin at metahuman.org Sat Nov 16 09:06:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Sat Nov 16 09:06:01 2002 Subject: [ODE] Re: Problems installing ODE 0.03 References: Message-ID: <3DD66C9A.B8FA8884@metahuman.org> You don't need to replace alloca with anything. What the configurator does is see how your computer is set up by compiling a bunch of programs. So the fact that some of them fail is normal. It said "configurator succeeded" so you can ignore all messages above that. Try making an empty "lib" directory. I think that's your only problem. - Martin Pete Graves wrote: > > The only file I can find that contains 'alloca.h' is 'configurator.c': > > 229: char *header[7] = {"stdio.h", "stdlib.h", "math.h", "string.h", > 330: "stdarg.h", "malloc.h", "alloca.h"}; > ~~~~~~~~ > > Can I just remove this? 'malloc.h' is already there? Am I looking in the > right place? > > _________________________________________________________________ > The new MSN 8: smart spam protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From coding at natew.com Sat Nov 16 11:24:01 2002 From: coding at natew.com (Nate W) Date: Sat Nov 16 11:24:01 2002 Subject: [ODE] Re: Problems installing ODE 0.03 In-Reply-To: Message-ID: On Sat, 16 Nov 2002, Pete Graves wrote: > The only file I can find that contains 'alloca.h' is 'configurator.c': > > 229: char *header[7] = {"stdio.h", "stdlib.h", "math.h", "string.h", > 330: "stdarg.h", "malloc.h", "alloca.h"}; > > Can I just remove this? 'malloc.h' is already there? Am I looking in the > right place? When configurator gets run, it creates a header file called config.h. Once I got a working config.h (I may have edited this file by hand, I don't recall as it was quite a while ago), I took the configurator out of my build process. -- Nate Waddoups Redmond WA USA http://www.natew.com From henri at cs.sun.ac.za Sat Nov 16 11:30:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Sat Nov 16 11:30:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? References: <00ba01c28cbc$227f17d0$45d4e892@temple> Message-ID: <004701c28d9e$70bd7990$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_0044_01C28DAF.34418EA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Anybody??? ----- Original Message -----=20 From: Henri Hakl=20 To: ode@q12.org=20 Sent: Friday, November 15, 2002 5:31 PM Subject: [ODE] Lo/Hi Stops for ball-sockets? Hi :) I've played with the hinge-joint recently and figured out how to use = lo and hi stops to limit rotations. My problem now is to have a similar system for ball-socket joints. The = idea is to have limited range of motions similar to (for example) the = joint holding arm and shoulder together. It should have some degree of = mobility to rotate around an arbitrary axis of motion, and it should be = able to deviate from the initial axis of rotation to some degree. Essentially it should be able to move inside a cone-of-freedom (plus = it is only allowed to twist to a certain extend). Help please. Henri ------=_NextPart_000_0044_01C28DAF.34418EA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Anybody???
 
----- Original Message -----
From:=20 Henri = Hakl=20
Sent: Friday, November 15, 2002 = 5:31=20 PM
Subject: [ODE] Lo/Hi Stops for=20 ball-sockets?

Hi :)
 
I've played with the hinge-joint = recently and=20 figured out how to use lo and hi stops to limit = rotations.
 
My problem now is to have a similar = system for=20 ball-socket joints. The idea is to have limited range of motions = similar to=20 (for example) the joint holding arm and shoulder together. It should = have some=20 degree of mobility to rotate around an arbitrary axis of motion, and = it should=20 be able to deviate from the initial axis of rotation to some=20 degree.
 
Essentially it should be able to move = inside a=20 cone-of-freedom (plus it is only allowed to twist to a certain=20 extend).
 
Help please.
 =20 Henri
------=_NextPart_000_0044_01C28DAF.34418EA0-- From coding at natew.com Sat Nov 16 11:46:01 2002 From: coding at natew.com (Nate W) Date: Sat Nov 16 11:46:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? In-Reply-To: <004701c28d9e$70bd7990$45d4e892@temple> Message-ID: On Sat, 16 Nov 2002, Henri Hakl wrote: > Essentially it should be able to move inside a cone-of-freedom (plus > it is only allowed to twist to a certain extend). > > Anybody??? Have you tried using an AMotor to set the limits? I haven't tried this myself, but looking at 7.5.1. of the documentation it seem like it should be possible to apply an AMotor to the two bodies and set limits using dParamSetHiStopN where N is empty, 2 or 3 for each of the AMotor's axes. Especially look at the last part of 7.5.1, below the table of parameters. Like I said, I haven't tried it, but from a quick look at the docs I think it might do what you want. -- Nate Waddoups Redmond WA USA http://www.natew.com From henri at cs.sun.ac.za Sat Nov 16 17:44:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Sat Nov 16 17:44:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? References: Message-ID: <006901c28dd2$ab7efcf0$45d4e892@temple> hmmmm... thanks Nate... - it looks like something that might work. :) It would help to see an example or something that uses the AMotorJoint (prefably with limits and everything) - can anybody point me to some simple program that makes use of it? None of the examples seem to make use of it (I'm using the DelphiODE). ----- Original Message ----- From: "Nate W" To: Sent: Saturday, November 16, 2002 8:46 PM Subject: Re: [ODE] Lo/Hi Stops for ball-sockets? > On Sat, 16 Nov 2002, Henri Hakl wrote: > > > Essentially it should be able to move inside a cone-of-freedom (plus > > it is only allowed to twist to a certain extend). > > > > Anybody??? > > Have you tried using an AMotor to set the limits? I haven't tried this > myself, but looking at 7.5.1. of the documentation it seem like it should > be possible to apply an AMotor to the two bodies and set limits using > dParamSetHiStopN where N is empty, 2 or 3 for each of the AMotor's axes. > Especially look at the last part of 7.5.1, below the table of parameters. > > Like I said, I haven't tried it, but from a quick look at the docs I think > it might do what you want. > > -- > > Nate Waddoups > Redmond WA USA > http://www.natew.com > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From mattias at cambrianlabs.com Sun Nov 17 03:44:01 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Sun Nov 17 03:44:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? In-Reply-To: <006901c28dd2$ab7efcf0$45d4e892@temple> References: <006901c28dd2$ab7efcf0$45d4e892@temple> Message-ID: > It would help to see an example or something that uses the AMotorJoint > (prefably with limits and everything) - can anybody point me to some > simple > program that makes use of it? None of the examples seem to make use of > it (I'm using the DelphiODE). I was going to say "I have some examples, but they're built using delphi", but now that's not a problem; // Create a AMotor AMotor := dJointCreateAMotor(world, 0); dJointAttach(AMotor, MainBody, UpperLeg); BallLimit := pi*0.15; dJointSetAMotorNumAxes (AMotor,2); dJointSetAMotorAxis (AMotor, 0, 1, 1,0,0); dJointSetAMotorAxis (AMotor, 1, 1, 0,0,1); // AUTO AXIS BY EULER MOTOR dJointSetAMotorAxis (AMotor, 2, 2, 0,1,0); dJointSetAMotorParam (AMotor, dParamLoStop, -BallLimit); dJointSetAMotorParam (AMotor, dParamHiStop, BallLimit); dJointSetAMotorParam (AMotor, dParamFudgeFactor, 0.01);//} // This axis of the motor isn't used with EULER (?) dJointSetAMotorParam (AMotor, dParamLoStop2, -0.01); dJointSetAMotorParam (AMotor, dParamHiStop2, 0.01); dJointSetAMotorParam (AMotor, dParamFudgeFactor2, 0.01);//} dJointSetAMotorParam (AMotor, dParamLoStop3, -BallLimit); dJointSetAMotorParam (AMotor, dParamHiStop3, BallLimit); dJointSetAMotorParam (AMotor, dParamFudgeFactor3, 0.01);//} dJointSetAMotorMode (AMotor, dAMotorEuler); cheers, m From laury.michel at free.fr Sun Nov 17 17:42:02 2002 From: laury.michel at free.fr (Laury MICHEL) Date: Sun Nov 17 17:42:02 2002 Subject: [ODE] Collision problem with geomGroups Message-ID: <016c01c28e9b$5b79cfe0$9cdc933e@hal9000> Hello! I'm quite new to ODE, but I did a little "buggy-like" program that works! The problem is that when I want to use a geomGroup for my buggy, it does not collide with the "world geometry" anymore... My "world geometry" consists of a large box with a smaller rotated box in the middle playing the role of a ramp... The buggy geometry is created in space 0 then added to a geomGroup wich is created in the same space as the world geometry. But, when running the program the buggy falls through the "world"! Before, without geomGroups, it worked well beside the fact that I couldn't put the vehicle wheels too close from the chassis as they collided resulting in strange behavior as soon as the sim started... I'm using ode v0.03, I've read the doc and I think I understood the part on geomGroups so I don't see what I've missed :-( Please help! Here is part of the code I use: void odeBox::InitOde(dWorldID _worldID, dSpaceID _spaceID, dReal _fMass) { m_bodyID = dBodyCreate(_worldID); dBodySetPosition(m_bodyID, 0, 0, 0); const dReal fDensity = 1.0f; dMassSetBox(&m_mass, fDensity, m_fLength, m_fWidth, m_fHeight); dMassAdjust (&m_mass, _fMass); dBodySetMass(m_bodyID, &m_mass); m_geomID = dCreateBox(_spaceID, m_fLength, m_fWidth, m_fHeight); dGeomSetBody(m_geomID, m_bodyID); } void odeCar::CreateChassis(float _fWidth, float _fLength, float _fHeight) { m_geomGroupID = dCreateGeomGroup (m_spaceID); m_pChassis = new odeBox; dReal fMass = 10.0f; ((odeBox*) m_pChassis)->InitBox(_fWidth, _fLength, _fHeight); m_pChassis->InitOde(m_worldID, 0, fMass); // 0 for space as it is added to a geomGroup m_pChassis->SetPosition(5,0,35); dGeomGroupAdd (m_geomGroupID, m_pChassis->GetGeomID()); } void odeWheel::InitOde(dWorldID _worldID, dSpaceID _spaceID, dReal _fMass) { m_bodyID = dBodyCreate(_worldID); dBodySetPosition(m_bodyID, 0, 0, 0); const dReal fDensity = 1.0f; dMassSetSphere(&m_mass, fDensity, m_fRadius); dMassAdjust (&m_mass, _fMass); dBodySetMass(m_bodyID, &m_mass); m_geomID = dCreateSphere(_spaceID, m_fRadius); dGeomSetBody(m_geomID, m_bodyID); } void odeCar::AddWheel(dReal _posX, dReal _posY, dReal _posZ, float _fRadius, float _fWidth) { // odeWheel odeWheel* pWheel = new odeWheel; pWheel->InitWheel(_fRadius, _fWidth); pWheel->InitOde(m_worldID, 0, m_fDefaultWheelMass); // 0 for space as it is added to a geomGroup const dReal *a = dBodyGetPosition(m_pChassis->GetBodyID()); dBodySetPosition(pWheel->GetBodyID(), a[0] + _posX, a[1] + _posY, a[2] + _posZ); m_vpWheel.push_back(pWheel); // Joint dJointID jointID = dJointCreateHinge2(m_worldID, 0); dJointAttach(jointID, m_pChassis->GetBodyID(), pWheel->GetBodyID()); dJointSetHinge2Anchor(jointID, a[0] + _posX, a[1] + _posY, a[2] + _posZ); dJointSetHinge2Axis1(jointID, 0, 0, 1); dJointSetHinge2Axis2(jointID, 1, 0, 0); dJointSetHinge2Param(jointID, dParamSuspensionERP, 0.6f); dJointSetHinge2Param(jointID, dParamSuspensionCFM, 0.08f); dJointSetHinge2Param(jointID, dParamLoStop, 0); dJointSetHinge2Param(jointID, dParamHiStop, 0); m_vJoint.push_back(jointID); m_vPowered.push_back(false); m_vSteered.push_back(false); dGeomGroupAdd (m_geomGroupID, pWheel->GetGeomID()); } From Nguyen Binh Sun Nov 17 21:23:03 2002 From: Nguyen Binh (Nguyen Binh) Date: Sun Nov 17 21:23:03 2002 Subject: [ODE] what integration method is used ? In-Reply-To: References: Message-ID: <301716267.20021118105438@glassegg.com> Hi , TH> what basic integration scheme does ODE use ? is it an TH> explicit or implicit integration method ? does it use TH> runge kutta or something else ? Refer to the 0.3 docs, you'll see that ODE curently use basic Euler integration. TH> is it possible to use a different integration scheme ? Sure, But maybe you'll have to do it yourself or waiting for future ODE release. -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media Me Linh Point Tower, 10th Floor 2 Ngo Duc Ke District 1, Ho Chi Minh City Vietnam Fax: (84.8)823-8392 www.glassegg.com --------------------------------------------------------------------- From franjesus at medtelecom.net Mon Nov 18 02:59:02 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-15?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Mon Nov 18 02:59:02 2002 Subject: [ODE] Bug in documentation? Message-ID: <200211181055.20531.franjesus@medtelecom.net> In section 3.2 documentation states: - Position of the center of mass with respect to the point of reference. In the current implementation the center of mass and the point of reference must coincide. But later, in section 8.2: void dMassTranslate (dMass *, dReal x, dReal y, dReal z); Given mass parameters for some object, adjust them to represent the object displaced by (x,y,z) relative to the body frame. void dMassRotate (dMass *, const dMatrix3 R); Given mass parameters for some object, adjust them to represent the object rotated by R relative to the body frame. So, can the center of mass be displaced wrt. the body frame or I'm missing something? -- "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989 From nlin at nlin.net Mon Nov 18 03:35:02 2002 From: nlin at nlin.net (nlin@nlin.net) Date: Mon Nov 18 03:35:02 2002 Subject: [ODE] what integration method is used ? Message-ID: <20021118120342.GA1863@nlin.net> Nguyen Binh wrote: > On Fri, Nov 15, 2002 at 02:28:59PM +0100, Torsten Hans wrote: > TH> what basic integration scheme does ODE use ? is it an > TH> explicit or implicit integration method ? does it use > TH> runge kutta or something else ? > > Refer to the 0.3 docs, you'll see that ODE curently use basic Euler > integration. Not quite. Somewhere in the docs is mentioned that ODE uses a _time_ _stepping_ Euler integration scheme. This is a bit more hairy to extend to higher order schemes. For the gory details and some links to research papers see the thread started in April 2002 at http://q12.org/pipermail/ode/2002-April/001175.html > TH> is it possible to use a different integration scheme ? > Sure, But maybe you'll have to do it yourself or waiting for future > ODE release. A discussion on this topic in March 2002: nlin> The problem with all of this ... is the interplay of all of this nlin> with the time-stepping scheme. russ>actually i'm not sure what a higher order time stepping scheme russ>will look like in this case. i'd have to sit down and read some russ>papers and write some equations. it's not a problem i have russ>considered yet. Don't let this stop you - I'd also be interested in seeing the performance and accuracy of higher-order integration schemes with ODE - but be aware that this isn't a completely trivial thing to do because of the time-stepping (rather than instantaneous) view of the equations to be solved. -Norman From Dominique at SavageSoftware.com.au Mon Nov 18 03:49:02 2002 From: Dominique at SavageSoftware.com.au (Dominique Louis) Date: Mon Nov 18 03:49:02 2002 Subject: [ODE] Rag Doll Demo? Message-ID: <3DD8C604.8000203@SavageSoftware.com.au> I was recently playing the Unreal Tournament demo and was impressed by the rag doll physics they used, though it still did not look 100% realistic. I beleive they used the MathEngine for their physics. It is still a very cool game. I was wondering if anyone has used ODE to create a rag doll type demo, and also if anyone knows where I can get or find information on the UT model format. Thanks, Dominique. From mattias at cambrianlabs.com Mon Nov 18 03:56:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Mon Nov 18 03:56:02 2002 Subject: [ODE] Rag Doll Demo? In-Reply-To: <3DD8C604.8000203@SavageSoftware.com.au> References: <3DD8C604.8000203@SavageSoftware.com.au> Message-ID: Have a look at this site; http://taat.fi/taat/porrasturvat/ cheers, m -----Original Message----- From: Dominique Louis To: ode@q12.org Date: Mon, 18 Nov 2002 10:50:44 +0000 Subject: [ODE] Rag Doll Demo? > I was recently playing the Unreal Tournament demo and was impressed by > the rag doll physics they used, though it still did not look 100% > realistic. I beleive they used the MathEngine for their physics. It is > still a very cool game. > > I was wondering if anyone has used ODE to create a rag doll type demo, > and also if anyone knows where I can get or find information on the UT > model format. > > Thanks, > > > > Dominique. > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From Dominique at SavageSoftware.com.au Mon Nov 18 05:22:02 2002 From: Dominique at SavageSoftware.com.au (Dominique Louis) Date: Mon Nov 18 05:22:02 2002 Subject: [ODE] Rag Doll Demo? References: <3DD8C604.8000203@SavageSoftware.com.au> Message-ID: <3DD8DBE5.4040506@SavageSoftware.com.au> That is an excellent demo! Will a similar type demo be included as part of the "standard" demos that ship with ODE? Thanks again, Dominique. Mattias Fagerlund wrote: > Have a look at this site; http://taat.fi/taat/porrasturvat/ > > cheers, > m > > -----Original Message----- > From: Dominique Louis > To: ode@q12.org > Date: Mon, 18 Nov 2002 10:50:44 +0000 > Subject: [ODE] Rag Doll Demo? > > >>I was recently playing the Unreal Tournament demo and was impressed by >>the rag doll physics they used, though it still did not look 100% >>realistic. I beleive they used the MathEngine for their physics. It is >>still a very cool game. >> >>I was wondering if anyone has used ODE to create a rag doll type demo, >>and also if anyone knows where I can get or find information on the UT >>model format. >> >>Thanks, >> >> >> >>Dominique. >> >>_______________________________________________ >>ODE mailing list >>ODE@q12.org >>http://q12.org/mailman/listinfo/ode > > > From anselm at hook.org Mon Nov 18 12:06:02 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 18 12:06:02 2002 Subject: [ODE] ode networking code snippet In-Reply-To: <301716267.20021118105438@glassegg.com> Message-ID: Here's a small hack to network a couple of ODE cars together. I had a couple of hours and I was thinking about a comment somebody asked earlier - so I threw this together... I'll probably improve it later since it is really crude right now. It really just hammers on objects positions and it doesn't network all of the state of each object so it doesn't look very good - although this could be improved. The networking layer itself might be useful as a test-bench for people to explore other more effacious networking strategies. The theory is that even if object physics state is hammered on, one will still get the appearance of reasonably believable physical interaction simply because of the way each machine will simulate forward the whole system. But in practice since not all state is networked properly, the first pass at least looks pretty poor - however I do think the theory is still sound. If this theory doesn't pan out then (if I have time) I may modify the code to try out a variety of other approaches. For example the simplest approach is simply to integrate everything on the server. To build it replace the test_buggy.cpp code with the below, and compile ODE as usual under cygwin. It doesn't build under msvc because I haven't bothered fully implementing the berkeley sockets for msvc. To run a server type: test_buggy To run a client type: test_buggy be a client It networks on 127.0.0.1:8000 so you can run multiple instances on one machine to fiddle with it... BTW I *really* like the geomgroups stuff now... way better! Have fun! - a /* "bangup" - a small testbed for ode networking. The code is broken up into a number of pieces, 1) NetSocket - a network abstraction layer (runs under cygwin only - not ported to windows) 2) SimObject - a generic type of simulation object 3) Dynamics - the basic ODE dynamics (world, space, ground ) 4) Car - a car 5) Main - handles network traffic and overall event stuff In general the networking scheme here is: 1) There is a server and a number of clients. 2) A server is similar to a client in that it also has a window and a pov 3) Each machine is locally authoritative for some objects 4) Other objects on a machine are considered to be driven by some remote authority 5) In the tests so far the clients are authoritative for the local participants pov. 6) In the tests so far the server is authoritative for its pov 7) The clients and server echo to each other any state that they are authoritative for. 8) The server additionally re-echoes out all state so that other clients can be advised of changes. 9) Rather than publishing a database on new client connections; clients dynamically create missing objects. This is extremely crude... and one will see that it does not behave well. Not much state is networked so things tend to jump around and misbehave terribly. It may improve over time. */ /**************************************************************/ // network stuff /**************************************************************/ //#if defined( WIN32 ) || defined( __CYGWIN32__ ) //#include //#else #include #include #include #include #define _USE_BSD #include #include #include #include #include #include #include #include #include #include #include typedef int SOCKET; //#endif #include class NetSocket { public: struct sockaddr_in sa; struct hostent *hp; SOCKET sock; FILE* sockin; FILE* sockout; NetSocket* next; #define MAXHOSTNAME 64 char myname[MAXHOSTNAME+1]; int isserver; int key; void error_fail(char* str,...) { puts(str); } void init() { isserver = 0; sock = 0; next = 0; sockin = 0; sockout = 0; myname[0] = 0; key = 0; } NetSocket() { init(); } NetSocket(SOCKET _s) { init(); attach(_s); } ~NetSocket() { disconnect(); // xxx remove from list } void attach(SOCKET _s) { sock = _s; int opts = fcntl(sock,F_GETFL); opts = opts | O_NONBLOCK; fcntl(sock,F_SETFL,opts); sockin = fdopen(sock,"r"); sockout = fdopen(sock,"w"); } void disconnect() { if( sockout ) { fflush(sockout); fclose(sockout); sockout = 0; } if( sockin ) { fclose(sockin); sockin = 0; } if( sock ) { #ifdef USEWIN32 closesocket(sock); #else close(sock); #endif sock = 0; } } bool serve(int portnum = 8700 ) { isserver = 1; #ifdef USEWIN32 WSAData ws; if( WSAStartup(0x0101,&ws) < 0 ) { error_fail("TcpServer: tcp does not seem to be supported"); return 0; } #endif struct protoent *tcp_prot = getprotobyname("tcp"); if(!tcp_prot) { error_fail("TcpServer: tcp does not seem to be supported"); return 0; } sock = socket(AF_INET,SOCK_STREAM,tcp_prot->p_proto); if( sock < 0 ) { error_fail(" can't make server socket: %s", strerror(errno)); return 0; } int one = 1; if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(int)) < 0) { error_fail("failed on setsockopt(): %s", strerror(errno)); return 0; } gethostname(myname, MAXHOSTNAME); if ((hp= gethostbyname(myname)) == NULL) { disconnect(); return 0; } memset(&sa, 0, sizeof(struct sockaddr_in)); sa.sin_family= hp->h_addrtype; sa.sin_port= htons(portnum); sa.sin_family = AF_INET; sa.sin_addr.s_addr = htonl(INADDR_ANY); if( bind(sock,(struct sockaddr *)&sa,sizeof(sa)) == -1 ) { error_fail("server count not bind"); disconnect(); return 0; } #ifdef USEWIN32 WSAAsyncSelect(sock,GetForegroundWindow(),WM_USER+1,FD_ACCEPT | FD_CLOSE | FD_READ | FD_WRITE ); #endif if( listen(sock,100) < 0 ) { disconnect(); return 0; } return 1; } void update() { if( !isserver ) { return; } if( !sock ) { return; } timeval tv; tv.tv_sec = 0; tv.tv_usec = 10; fd_set readmask,writemask,exceptmask; FD_ZERO( &readmask ); FD_ZERO( &writemask ); FD_ZERO( &exceptmask ); FD_SET( sock, &readmask ); int results = select( FD_SETSIZE, &readmask, &writemask, &exceptmask, &tv ); if( !results ) { return; } int conn; if( (conn = accept(sock,NULL,NULL)) < 0 ) { printf("failed conn\n"); return; } printf("new conn\n"); NetSocket* cl = new NetSocket( conn ); cl->next = next; next = cl; } void client(const char* hostname = "localhost", unsigned short portnum = 8700 ) { isserver = 0; if ((hp= gethostbyname(hostname)) == NULL) { return; } printf("got localhost\n"); memset(&sa, 0, sizeof(struct sockaddr_in)); memcpy((char *)&sa.sin_addr,hp->h_addr,hp->h_length); sa.sin_family= hp->h_addrtype; sa.sin_port= htons((u_short)portnum); if ((sock= socket(hp->h_addrtype,SOCK_STREAM,0)) < 0) { return; } if (connect(sock,(struct sockaddr *)&sa,sizeof sa) < 0) { disconnect(); return; } attach( sock ); printf("conned %x,%x,%x\n",sock,(int)sockin,(int)sockout); } void publish(char* str) { if( sockout ) { fputs(str,sockout); fflush(sockout); } } }; #if 0 /* // some inactivated code - idea here was to run 2 sims, one at present moment, and one in past that is synced. // but i am concerned that ode is not deterministic between machines; there might be strange rounding errors. // non deterministic input event structure class ndi_event { public: struct ndi_event* next; struct ndi_event* prev; time_t timenow; int key; int cmd; ndi_event( int key, int cmd) { next = prev = 0; time(&timenow); this->key = key; this->cmd = cmd; } }; // data structures static ndi_event* ndi_head = 0; static ndi_event* ndi_tail = 0; // insert event into temporally sorted queue void ndi_hold_event(ndi_event* event) { event->next = event->prev = 0; for( ndi_event* cursor = ndi_tail ; cursor ; cursor = cursor->prev ) { if( cursor->time < event->time ) { event->next = cursor->next; event->prev = cursor; if( cursor->next ) cursor->next->prev = event; cursor->next = event; return; } } event->next = ndi_head; ndi_head = event; } void system_command( int key, int cmd ); // do all events up to the current time void ndi_advance(int current_time) { for( ndi_event* cursor = ndi_head ; cursor ; ) { if( cursor->time > current_time ) { return; } ndi_head = cursor->next; system_command(cursor->key, cursor->cmd ); cursor = cursor->next free cursor->prev; } } void network_publish_event(int key, int cmd) { // ndi_hold_event( new ndi_event(key,cmd) ); // - send over net now also - except maybe updates // for updates we want to do this general bookkeeping // accept new pending connections and fire off a copy of my objects once only as well as pending state // get current time // ndi_advance( to current time - 1 ); // and do a local command update too... or heart beated } */ #endif /**********************************************************************/ // game stuff /**********************************************************************/ #ifdef USE_WIN32 #define __USE_W32_SOCKETS 1 #include #include #ifdef MSVC #pragma warning(disable:4244 4305) // for VC++, no precision loss complaints #endif #endif #include #include // select correct drawing functions #ifdef dDOUBLE #define dsDrawBox dsDrawBoxD #define dsDrawSphere dsDrawSphereD #define dsDrawCylinder dsDrawCylinderD #define dsDrawCappedCylinder dsDrawCappedCylinderD #endif /**********************************************************************/ // simobject - game object management /**********************************************************************/ class SimObject { public: SimObject* next; int key; static class SimObject* objects; SimObject() { next = objects; objects = this; } virtual ~SimObject() { for(SimObject** obj = &objects; *obj; obj = &((*obj)->next)) { if( *obj == this ) { *obj = (*obj)->next; break; } } } virtual void draw() {} virtual void update() {} virtual void command(char *cmd) {} }; SimObject* SimObject::objects = 0; /**********************************************************************/ // a dynamics object /**********************************************************************/ class Dynamics { public: dWorldID world; dSpaceID space; dGeomID ground; dJointGroupID contactgroup; Dynamics* next; // this is called by dSpaceCollide when two objects in space are potentially colliding. void nearCallback2 (void *data, dGeomID o1, dGeomID o2) { int i,n; const int N = 10; dContact contact[N]; n = dCollide (o1,o2,N,&contact[0].geom,sizeof(dContact)); if (n > 0) { for (i=0; inearCallback2(0,o1,o2); } Dynamics() { world = dWorldCreate(); space = dHashSpaceCreate(); contactgroup = dJointGroupCreate (0); dWorldSetGravity (world,0,0,-0.5); ground = dCreatePlane (space,0,0,1,0); } void draw() {} void update() { dSpaceCollide (space,this,&nearCallback); dWorldStep (world,0.05); dJointGroupEmpty (contactgroup); } void command(char* cmd) {} ~Dynamics() { dJointGroupDestroy (contactgroup); dSpaceDestroy (space); dWorldDestroy (world); } }; /**********************************************************************/ // a car /**********************************************************************/ class Car: public SimObject { public: // some constants #define LENGTH 0.7 // chassis length #define WIDTH 0.5 // chassis width #define HEIGHT 0.2 // chassis height #define RADIUS 0.18 // wheel radius #define STARTZ 0.5 // starting height of chassis #define CMASS 1 // chassis mass #define WMASS 0.2 // wheel mass // dynamics and collision objects (chassis, 3 wheels ) dBodyID body[4]; dJointID joint[3]; // joint[0] is the front wheel dGeomID geom_group; dGeomID box[1]; dGeomID sphere[3]; double speed,steer; Dynamics* parent; Car(Dynamics* parent, dReal x, dReal y, dReal z); virtual ~Car(); virtual void update(); virtual void draw(); virtual void command(char *); }; Car::Car(Dynamics* parent, dReal x, dReal y, dReal z): SimObject() { this->parent = parent; int i; dMass m; // chassis body body[0] = dBodyCreate (parent->world); dBodySetPosition (body[0],x+0,y+0,z+STARTZ); dMassSetBox (&m,1,LENGTH,WIDTH,HEIGHT); dMassAdjust (&m,CMASS); dBodySetMass (body[0],&m); box[0] = dCreateBox (0,LENGTH,WIDTH,HEIGHT); dGeomSetBody (box[0],body[0]); // wheel bodies for (i=1; i<=3; i++) { body[i] = dBodyCreate ( parent->world); dQuaternion q; dQFromAxisAndAngle (q,1,0,0,M_PI*0.5); dBodySetQuaternion (body[i],q); dMassSetSphere (&m,1,RADIUS); dMassAdjust (&m,WMASS); dBodySetMass (body[i],&m); sphere[i-1] = dCreateSphere (0,RADIUS); dGeomSetBody (sphere[i-1],body[i]); } dBodySetPosition (body[1],x+ 0.5*LENGTH,y+ 0,z + STARTZ-HEIGHT*0.5); dBodySetPosition (body[2],x+ -0.5*LENGTH,y+ WIDTH*0.5,z + STARTZ-HEIGHT*0.5); dBodySetPosition (body[3],x+ -0.5*LENGTH,y+ -WIDTH*0.5,z + STARTZ-HEIGHT*0.5); // front and back wheel hinges for (i=0; i<3; i++) { joint[i] = dJointCreateHinge2 (parent->world,0); dJointAttach (joint[i],body[0],body[i+1]); const dReal *a = dBodyGetPosition (body[i+1]); dJointSetHinge2Anchor (joint[i],a[0],a[1],a[2]); dJointSetHinge2Axis1 (joint[i],0,0,1); dJointSetHinge2Axis2 (joint[i],0,1,0); } // set joint suspension for (i=0; i<3; i++) { dJointSetHinge2Param (joint[i],dParamSuspensionERP,0.4); dJointSetHinge2Param (joint[i],dParamSuspensionCFM,0.8); } // lock back wheels along the steering axis for (i=1; i<3; i++) { // set stops to make sure wheels always stay in alignment dJointSetHinge2Param (joint[i],dParamLoStop,0); dJointSetHinge2Param (joint[i],dParamHiStop,0); // the following alternative method is no good as the wheels may get out // of alignment: // dJointSetHinge2Param (joint[i],dParamVel,0); // dJointSetHinge2Param (joint[i],dParamFMax,dInfinity); } // create geometry group and add it to the space geom_group = dCreateGeomGroup ( parent->space ); dGeomGroupAdd (geom_group,box[0]); dGeomGroupAdd (geom_group,sphere[0]); dGeomGroupAdd (geom_group,sphere[1]); dGeomGroupAdd (geom_group,sphere[2]); speed = 0; steer = 0; } Car::~Car() { // destroy body xxx dGeomDestroy (box[0]); dGeomDestroy (sphere[0]); dGeomDestroy (sphere[1]); dGeomDestroy (sphere[2]); } void Car::update() { // motor dJointSetHinge2Param (joint[0],dParamVel2,-speed); dJointSetHinge2Param (joint[0],dParamFMax2,0.1); // steering dReal v = steer - dJointGetHinge2Angle1 (joint[0]); if (v > 0.1) v = 0.1; if (v < -0.1) v = -0.1; v *= 10.0; dJointSetHinge2Param (joint[0],dParamVel,v); dJointSetHinge2Param (joint[0],dParamFMax,0.2); dJointSetHinge2Param (joint[0],dParamLoStop,-0.75); dJointSetHinge2Param (joint[0],dParamHiStop,0.75); dJointSetHinge2Param (joint[0],dParamFudgeFactor,0.1); } void Car::draw() { dsSetColor (0,1,1); dsSetTexture (DS_WOOD); dReal sides[3] = {LENGTH,WIDTH,HEIGHT}; dsDrawBox (dBodyGetPosition(body[0]),dBodyGetRotation(body[0]),sides); dsSetColor (1,1,1); int i; for (i=1; i<=3; i++) dsDrawCylinder (dBodyGetPosition(body[i]),dBodyGetRotation(body[i]),0.02f,RADIUS); } void Car::command(char* command) { int cmd; float x,y,z; sscanf(command,"%d %f %f %f",&cmd,&x,&y,&z); switch( cmd ) { case 'a': case 'A': speed += 0.3; break; case 'z': case 'Z': speed -= 0.3; break; case ',': steer -= 0.5; break; case '.': steer += 0.5; break; case ' ': speed = 0.0; steer = 0.0; default: break; } } /**************************************************************************************/ // main /**************************************************************************************/ static NetSocket network; static Dynamics* dynamics; static int local_sim_key_code = 0x00010000; static int remote_machine_code = 0x00010000; static void network_command(NetSocket* s,char* buffer) { if(!strncmp(buffer,"login",5)) { // remote has logged into me; accept their login printf("got login\n"); remote_machine_code += 0x00010000; if( s ) { fprintf(s->sockout,"id %x\n",remote_machine_code); // tell client to make an obj fprintf(s->sockout,"new %x %d %f %f %f\n",remote_machine_code + 1, 0, 0.0f,0.0f,0.0f); fflush(s->sockout); s->key = remote_machine_code; } } else if(!strncmp(buffer,"id",2)) { // remote sent us our own unique id sscanf(buffer+2,"%x",&local_sim_key_code); printf("local is is now %x\n",local_sim_key_code); remote_machine_code = local_sim_key_code; } else if(!strncmp(buffer,"new",3)) { // remote has asked us to make something at location xyz int id,type; float x,y,z; sscanf(buffer+3,"%x %d %f %f %f",&id,&type,&x,&y,&z); printf("got new request: 0x%x,%d,%f,%f,%f\n",id,type,x,y,z); Car* car = new Car(dynamics,x,y,z); car->key = id; } else if(!strncmp(buffer,"update",3)) { int key; float x,y,z; float rotf[12]; double rot[12]; sscanf(buffer+6,"%x %f %f %f\n",&key,&x,&y,&z); sscanf(buffer+6,"%x %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f\n", &key,&x,&y,&z, &rotf[0],&rotf[1],&rotf[2],&rotf[3], &rotf[4],&rotf[5],&rotf[6],&rotf[7], &rotf[8],&rotf[9],&rotf[10],&rotf[11] ); rot[0] = rotf[0]; rot[1] = rotf[1]; rot[2] = rotf[2]; rot[3] = rotf[3]; rot[4] = rotf[4]; rot[5] = rotf[5]; rot[6] = rotf[6]; rot[7] = rotf[7]; rot[8] = rotf[8]; rot[9] = rotf[9]; rot[10] = rotf[10]; rot[11] = rotf[11]; for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { if( obj->key == key ) { Car* car = (Car*)obj; dBodySetPosition( car->body[0],x,y,z); dBodySetRotation( car->body[0], rot ); return; } } // if not found then add Car* car = new Car(dynamics,x,y,z); car->key = key; } } static void network_input_events() { // handle incoming traffic from any port for(NetSocket* s = &network; s ; s = s->next ) { if(! s->sockin ) continue; char buffer[2048]; while( fgets(buffer,2040,s->sockin) ) { network_command(s,buffer); } } } static void network_output_events() { // for all machines that have observers here, tell them about all objects we are responsible for static int counter = 0; if( counter++ < 16 ) { return; } counter = 0; for(NetSocket* s = &network; s ; s = s->next ) { if( !s->sockout ) continue; for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { if(network.sockout) { // if we are a client then emit information about our objects only - else emit all if( (obj->key & 0xffff0000) != (local_sim_key_code & 0xffff0000) ) { continue; } } else { // if we are a server - emit all objects to all machines except real owners if( (obj->key & 0xffff0000) == ( s->key & 0xffff0000) ) { continue; } } Car* car = (Car*)obj; const dReal* pos = dBodyGetPosition( car->body[0] ); const dReal* rot = dBodyGetRotation( car->body[0] ); float x = pos[0]; float y = pos[1]; float z = pos[2]; fprintf(s->sockout,"update %x %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f\n", obj->key,x,y,z, (float)rot[0],(float)rot[1],(float)rot[2],(float)rot[3], (float)rot[4],(float)rot[5],(float)rot[6],(float)rot[7], (float)rot[8],(float)rot[9],(float)rot[10],(float)rot[11] ); fflush(s->sockout); } } } static void mainLoop (int pause) { // for server only - look for new socket connections network.update(); // for servers and clients - deal with any remote commands network_input_events(); // for servers and clients - emit anything anybody else might be interested in network_output_events(); // update... could be done before outputting state for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { obj->update(); } if( dynamics ) { dynamics->update(); } // redraw... best done after updating state for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { obj->draw(); } } void key_events(int cmd ) { switch(cmd) { default: int key = ( local_sim_key_code & 0xffff0000 ) + 1; for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { printf("%x %x\n",obj->key,key); if( obj->key == key ) { char buffer[512]; sprintf(buffer,"%d 0 0 0\n",cmd); obj->command(buffer); return; } } } } void start() { printf ("Press:\t'a' to increase speed.\n" "\t'z' to decrease speed.\n" "\t',' to steer left.\n" "\t'.' to steer right.\n" "\t' ' to reset speed and steering.\n"); // move camera somewhere useful { //const dReal* pos = dBodyGetPosition(body[0]); float pos[3] = { 3,-3,2 }; // xxx move viewpoint behind car - xxx wrong - do dynamically static float xyz[3] = {0.8317f,-0.9817f,0.8000f}; static float hpr[3] = {121.0000f,-27.5000f,0.0000f}; xyz[0] = pos[0] + 0.8317f; xyz[1] = pos[1] - 0.9817f; xyz[2] = pos[2] + 0.8000f; dsSetViewpoint (xyz,hpr); } } int main (int argc, char **argv) { dynamics = new Dynamics(); if( argc < 2 ) { // be a server - server will always start up one dynamics engine and always add one car to kickstart itself. printf("server\n"); network.serve(); network_command(0,"id 0x00010000\n"); // server id network_command(0,"new 0x00010001 0 2.0 0 0\n"); // server car location } else { // be a client - client explicitly logs in and waits for reply with an id before doing anything network.client(); if( network.sockout ) { network.publish("login joe\n"); printf("client: network up - logging in\n"); } else { printf("client: no network :-(\n"); } } // setup pointers to drawstuff callback functions and run forever dsFunctions fn; fn.version = DS_VERSION; fn.start = &start; fn.step = &mainLoop; fn.command = &key_events; fn.stop = 0; fn.path_to_textures = "../../drawstuff/textures"; dsSimulationLoop (0,0,352,288,&fn); // exit... network.disconnect(); } From ccos at bigpond.com Tue Nov 19 01:07:01 2002 From: ccos at bigpond.com (ccos) Date: Tue Nov 19 01:07:01 2002 Subject: [ODE] os x compile probs Message-ID: <6FC6A94D-FB95-11D6-9679-000393722276@bigpond.com> hello everybody, i'm trying to build ode on os x 10.1.5 and this is what i'm doing (from the docs): > Step 1: Unpack the ODE archive. done > Step 2: Get the GNU make tool. Many Unix platforms come with this, > although sometimes it is called gmake. I have provided a version of GNU > make for windows here. done, ( default os x make ) > Step 3: Edit the settings in the file config/user-settings. The list of > supported platforms is given in that file. done, set it to osx > Step 4: Run make to configure and build ODE and the graphical test > programs. > Be sure you are using the correct version of GNU make. which is the correct version? > The make targets for building the parts of ODE are: > * make configure : Create the configuration file include/ode/config.h. i get: *** configurator succeeded *** > * make ode-lib : Build the core ODE library. seems to work these are all i can make because i don't have X11, but i don't really need to run the drawing library, so i should be fine right? > Step 5: To install the ODE library onto your system you should copy the > lib/ and include/ directories to a suitable place, e.g. on Unix: > > * include/ode/ --> /usr/local/include/ode/ > * lib/libode.a --> /usr/local/lib/libode.a done ok, so everything seems alright, but when i try to compile with #include i get: /usr/bin/ld: archive: /usr/local/lib/libode.a has no table of contents, add one with ranlib(1) (can't load from it) hints very well appreciated. has anybody here built ode on os x? thanks much, c From nnevatie at welho.com Tue Nov 19 10:31:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Tue Nov 19 10:31:02 2002 Subject: [ODE] Step size vs. frame rate + building ODE Message-ID: <000b01c28ff1$62b90c60$3abdf3d5@wli> I read in the ODE documentation that "10*0.1 not the same as 5*0.2". So, my guestion is, can I use frame processing time to scale the step? E.g.: dWorldStep(dWorldID, 0.05 * scaler); where scaler is somehow dependent of the frame processing time BTW, I was able to build ODE with Borland C++ Builder 6.0 Pro (+ CVS Tricollider & Opcode 1.2). One thing is still not clear to me: Which one is the newer version of tricollider - Erwin's base64 patch ('newstuff.gz') or the version in CVS? I wasn't able to build the contents of 'newstuff.gz', a function in dRay.cpp used Matrix3 and caused some access violations by accessing element at [3 * 4 + 2] (Matrix3 seems to have 4x3 elements). -- Niko From franjesus at medtelecom.net Tue Nov 19 16:06:01 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-1?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Tue Nov 19 16:06:01 2002 Subject: [ODE] os x compile probs Message-ID: <200211200001.37100.franjesus@medtelecom.net> El Mar 19 Nov 2002 09:03, ccos escribió: > hints very well appreciated. > has anybody here built ode on os x? try running ldconfig I believe OSX uses libtool, so you need to run ldconfig each time you add libraries to your system. -- Tienes mal la zona, sin embargo te marca bien la hora local, ergo tienes mal ambas. .: Bulmailing :. From coding at natew.com Tue Nov 19 22:48:01 2002 From: coding at natew.com (Nate W) Date: Tue Nov 19 22:48:01 2002 Subject: [ODE] Step size vs. frame rate + building ODE In-Reply-To: <000b01c28ff1$62b90c60$3abdf3d5@wli> Message-ID: On Tue, 19 Nov 2002, Niko Nevatie wrote: > Can I use frame processing time to scale the step? E.g.: > > dWorldStep(dWorldID, 0.05 * scaler); > > where scaler is somehow dependent of the frame processing time That's what I do in Juice, and I'm happy with the results. I also clamp the 'frame time' to within a minimum and maximum range, to avoid getting instabilities with large frame times or divide-by-zero with a zero frame time. If you check the archives, I wrote something a while back that goes into more detail. I like the variable time step approach for my app so far. Theoretically there are some potential problems with variable time steps, but in practice I'm happy with the way things work in Juice. If repeatability or consistency across network machines is important, you might want to use fixed time steps. -- Nate Waddoups Redmond WA USA http://www.natew.com From thomas_buehrmann at web.de Wed Nov 20 06:55:02 2002 From: thomas_buehrmann at web.de (Thomas Buehmann) Date: Wed Nov 20 06:55:02 2002 Subject: [ODE] dRay, c++ interface, khepera model? Message-ID: <200211201354.gAKDs3X30804@mailgate5.cinetic.de> hi, is it possible to get the c++ interface by martin c. martin and the dRay contribution without having to use cvs or copy and paste? apart from that, is anyone aware of a good khepera-style two-wheeled differential-steering model? if i use two wheels in front of my vehicle to drive and steer and an additional supporting wheel in the back, the latter tends to bend if the distance between front-wheels and supporting wheel is small (all use hinge2). is that model too simple or is it just a matter of tweaking cfm etc...? thanks, thomas. sorry if this mail got posted twice. i send it earlier from an unlisted address. ______________________________________________________________________________ Der Anrufbeantworter für Ihre E-Mail-Korrespondenz - WEB.DE FreeMail http://freemail.web.de/features/?mc=021137 From anselm at hook.org Wed Nov 20 14:12:02 2002 From: anselm at hook.org (Anselm Hook) Date: Wed Nov 20 14:12:02 2002 Subject: [ODE] dRay, c++ interface, khepera model? In-Reply-To: <200211201354.gAKDs3X30804@mailgate5.cinetic.de> Message-ID: > hi, > is it possible to get the c++ interface by martin c. martin and the dRay > contribution without having to use cvs or copy and paste? http://q12.org/cgi-bin/cvsweb.cgi/ode/ From henri at cs.sun.ac.za Thu Nov 21 02:48:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Thu Nov 21 02:48:02 2002 Subject: [ODE] Faster ODE Message-ID: <021b01c29143$46622a30$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_0218_01C29154.09E63F40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi ODE :) Please can somebody look at this and experiment with the file? LDLT decomposition is one of the primary computational activities in = ODE's physics engine. LDLT =3D Lower Diagonal Lower Transposed, meaning = a constraint matrix A (that describes the physics of a world) can be = decomposed into two matrices (L and D, where L is a lower triangular = matrix (all entries above the diagonal are zero) and D is a diagonal = matrix (all entries except the diagonal are zero)). Now A =3D L D L' = (A equals the lower matrix times the diagonal matrix times the = transposed lower matrix.) The A matrix varies in size and is typically = between 10x10 and 500x500 for ODE (depending on how many constraints/collisions/etc need to be solved for a given = simulation step). This LDLT decomposition needs to be solved with every step and is quite = computationally intensive. I've looked at the stldlt.c file that is part = of the ODE source and it looks to me like it could be improved upon. = Unforetunately I use Delphi, so I cannot test my suggested modifications = directly (though the Delphi version seems fine and considerably faster = then the original). The file http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a = replacement for fastldlt.c and should (barring errors) work flawlessly = and faster then the original. Let me know if it works, thanks :) Henri ------=_NextPart_000_0218_01C29154.09E63F40 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi ODE :)
 
Please can somebody look at this and experiment with the = file?
 
LDLT decomposition is one of the primary computational activities = in ODE's=20 physics engine. LDLT =3D Lower Diagonal Lower Transposed, meaning a = constraint=20 matrix A (that describes the physics of a world) can be decomposed into = two=20 matrices (L and D, where L is a lower triangular matrix (all entries = above the=20 diagonal are zero) and D is a diagonal matrix (all entries except = the=20 diagonal are zero)). Now  A =3D L D L'  (A equals the lower = matrix times=20 the diagonal matrix times the transposed lower matrix.) The A matrix = varies in=20 size and is typically between 10x10 and 500x500 for ODE (depending = on
how=20 many constraints/collisions/etc need to be solved for a given simulation = step).

This LDLT decomposition needs to be solved with every step = and is=20 quite computationally intensive. I've looked at the stldlt.c file that = is part=20 of the ODE source and it looks to me like it could be improved upon.=20 Unforetunately I use Delphi, so I cannot test my=20 suggested modifications directly (though the Delphi version = seems fine=20 and considerably faster then the original).

The file http://www.cs.su= n.ac.za/~henri/fastldlt_henri.c=20 is a replacement for fastldlt.c and should (barring errors) work = flawlessly and=20 faster then the original.
 
Let me know if it works, thanks :)
  Henri
 
------=_NextPart_000_0218_01C29154.09E63F40-- From ruud at marketgraph.nl Thu Nov 21 03:48:01 2002 From: ruud at marketgraph.nl (Ruud van Gaal) Date: Thu Nov 21 03:48:01 2002 Subject: [ODE] os x compile probs Message-ID: <20C09F811939D311BA694854E86C778233E42D@raptor> > El Mar 19 Nov 2002 09:03, ccos escribió: > > hints very well appreciated. > > has anybody here built ode on os x? > > try running ldconfig I just took the error's advice and did 'ranlib libode.a' and that worked. Ruud From jnilson_99 at yahoo.com Thu Nov 21 11:16:01 2002 From: jnilson_99 at yahoo.com (jnilson_99@yahoo.com) Date: Thu Nov 21 11:16:01 2002 Subject: [ODE] Faster ODE In-Reply-To: <021b01c29143$46622a30$45d4e892@temple> Message-ID: <20021121181503.47334.qmail@web40111.mail.yahoo.com> Hi, The mathematics behind what you're talking about sounds really cool but over my head. Do you know of any resource (web page or book) that provides a background on LDLT, Lower Diagonal Lower Transposed? thanks, john --- Henri Hakl wrote: > Hi ODE :) > > Please can somebody look at this and experiment with > the file? > > LDLT decomposition is one of the primary > computational activities in ODE's physics engine. > LDLT = Lower Diagonal Lower Transposed, meaning a > constraint matrix A (that describes the physics of a > world) can be decomposed into two matrices (L and D, > where L is a lower triangular matrix (all entries > above the diagonal are zero) and D is a diagonal > matrix (all entries except the diagonal are zero)). > Now A = L D L' (A equals the lower matrix times > the diagonal matrix times the transposed lower > matrix.) The A matrix varies in size and is > typically between 10x10 and 500x500 for ODE > (depending on > how many constraints/collisions/etc need to be > solved for a given simulation step). > > This LDLT decomposition needs to be solved with > every step and is quite computationally intensive. > I've looked at the stldlt.c file that is part of the > ODE source and it looks to me like it could be > improved upon. Unforetunately I use Delphi, so I > cannot test my suggested modifications directly > (though the Delphi version seems fine and > considerably faster then the original). > > The file > http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a > replacement for fastldlt.c and should (barring > errors) work flawlessly and faster then the > original. > > Let me know if it works, thanks :) > Henri > > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus – Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From henri at cs.sun.ac.za Thu Nov 21 11:53:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Thu Nov 21 11:53:01 2002 Subject: [ODE] Faster ODE References: <20021121181503.47334.qmail@web40111.mail.yahoo.com> Message-ID: <002701c2918f$77a973e0$45d4e892@temple> hmmm... no website springs to mind, but you can probably find one. The basic algorithm for factorizing A into LDL' runs as follows: initialize L and D to zero matrices for i = 1 to n do for j = 1 to i - 1 do Vj = LijDjj Dii = Aii - SUM(from j = 1 to i - 1): LijVj for j = i + 1 to n do Lji = (Aji - SUM(from k = 1 to i - 1)LjkVk) / Dii This creates matrices L and D such that: A = L D L' holds. ODE uses a similar approach, it still has the same big-O of n^3, but is still faster then the vanilla version from above. The original ODE version is in "fastldlt.c" of the ODE source; I've maintained the algorithm but modified the code executing it in "fastldlt_henri.c" (available at: http://www.cs.sun.ac.za/~henri/fastldlt_henri.c) in theory the replacement should be faster then the original. I cannot be sure until somebody verifies that it is correct and indeed faster. In ODE the "A" matrix is infact the Jacobian matrix that contains the current-step world constraint details. hope this helps to start off :) Henri >Hi, > >The mathematics behind what you're talking about >sounds really cool but over my head. > >Do you know of any resource (web page or book) that >provides a background on LDLT, Lower Diagonal Lower >Transposed? > >thanks, > >john From nnevatie at welho.com Thu Nov 21 12:00:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Thu Nov 21 12:00:02 2002 Subject: [ODE] Faster ODE References: <021b01c29143$46622a30$45d4e892@temple> Message-ID: <001001c29190$2c35d9c0$3abdf3d5@wli> I tried out the code in 'fastldlt_henri.c'. It works as expected. There was a small typo somewhere in the beginning of one function, but it caused no probs. I cannot say anything about the speed of the code, as I haven't benchmarked anything yet. But hey, if you say it's faster than the original, I'll take your word on it :) ----- Original Message ----- From: Henri Hakl To: ode@q12.org Sent: Thursday, November 21, 2002 11:49 AM Subject: [ODE] Faster ODE Hi ODE :) Please can somebody look at this and experiment with the file? LDLT decomposition is one of the primary computational activities in ODE's physics engine. LDLT = Lower Diagonal Lower Transposed, meaning a constraint matrix A (that describes the physics of a world) can be decomposed into two matrices (L and D, where L is a lower triangular matrix (all entries above the diagonal are zero) and D is a diagonal matrix (all entries except the diagonal are zero)). Now A = L D L' (A equals the lower matrix times the diagonal matrix times the transposed lower matrix.) The A matrix varies in size and is typically between 10x10 and 500x500 for ODE (depending on how many constraints/collisions/etc need to be solved for a given simulation step). This LDLT decomposition needs to be solved with every step and is quite computationally intensive. I've looked at the stldlt.c file that is part of the ODE source and it looks to me like it could be improved upon. Unforetunately I use Delphi, so I cannot test my suggested modifications directly (though the Delphi version seems fine and considerably faster then the original). The file http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a replacement for fastldlt.c and should (barring errors) work flawlessly and faster then the original. Let me know if it works, thanks :) Henri From henri at cs.sun.ac.za Thu Nov 21 13:24:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Thu Nov 21 13:24:02 2002 Subject: [ODE] Faster ODE References: <021b01c29143$46622a30$45d4e892@temple> <001001c29190$2c35d9c0$3abdf3d5@wli> Message-ID: <001301c2919c$37c07280$45d4e892@temple> Hey! :) you're right... I found the missing comma - the file on the website has been updated to reflect that as well. Please check the accuracy and speed using the testsuite provided with ODE. In the fbuild subdirectory there is a "test_ldlt.cpp" - compile it and run with parameter f ("test_ldlt f"). This should test both the speed and the accuracy of the factorizer. Try to compare both the original and the replacement version... - just because I think it is faster doesn't mean much - there may be compiler optimizations that I'm not aware of and other subtle issues that I'm not taking into account. thanks :) Henri ----- Original Message ----- From: "Niko Nevatie" To: Sent: Thursday, November 21, 2002 8:59 PM Subject: Re: [ODE] Faster ODE > I tried out the code in 'fastldlt_henri.c'. It works as expected. There was > a small typo somewhere in the beginning of one function, but it caused no > probs. I cannot say anything about the speed of the code, as I haven't > benchmarked anything yet. But hey, if you say it's faster than the original, > I'll take your word on it :) > > ----- Original Message ----- > From: Henri Hakl > To: ode@q12.org > Sent: Thursday, November 21, 2002 11:49 AM > Subject: [ODE] Faster ODE > > > Hi ODE :) > > Please can somebody look at this and experiment with the file? > > LDLT decomposition is one of the primary computational activities in ODE's > physics engine. LDLT = Lower Diagonal Lower Transposed, meaning a constraint > matrix A (that describes the physics of a world) can be decomposed into two > matrices (L and D, where L is a lower triangular matrix (all entries above > the diagonal are zero) and D is a diagonal matrix (all entries except the > diagonal are zero)). Now A = L D L' (A equals the lower matrix times the > diagonal matrix times the transposed lower matrix.) The A matrix varies in > size and is typically between 10x10 and 500x500 for ODE (depending on > how many constraints/collisions/etc need to be solved for a given simulation > step). > > This LDLT decomposition needs to be solved with every step and is quite > computationally intensive. I've looked at the stldlt.c file that is part of > the ODE source and it looks to me like it could be improved upon. > Unforetunately I use Delphi, so I cannot test my suggested modifications > directly (though the Delphi version seems fine and considerably faster then > the original). > > The file http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a replacement > for fastldlt.c and should (barring errors) work flawlessly and faster then > the original. > > Let me know if it works, thanks :) > Henri > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From mattias at cambrianlabs.com Thu Nov 21 13:36:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Thu Nov 21 13:36:02 2002 Subject: [ODE] Faster ODE In-Reply-To: <001001c29190$2c35d9c0$3abdf3d5@wli> References: <021b01c29143$46622a30$45d4e892@temple> <001001c29190$2c35d9c0$3abdf3d5@wli> Message-ID: > But hey, if you say it's faster than the original, > I'll take your word on it :) No chance you could time it? I'd be very interested to see what the differences are... cheers, m From nnevatie at welho.com Thu Nov 21 14:12:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Thu Nov 21 14:12:02 2002 Subject: [ODE] Faster ODE References: <021b01c29143$46622a30$45d4e892@temple> <001001c29190$2c35d9c0$3abdf3d5@wli> Message-ID: <001501c291a2$9f68a500$3abdf3d5@wli> Ok, why not, as soon as I have some spare hacking time. I'll post the results here... ----- Original Message ----- From: "Mattias Fagerlund" To: "Niko Nevatie" ; Sent: Thursday, November 21, 2002 10:31 PM Subject: Re: [ODE] Faster ODE > > But hey, if you say it's faster than the original, > > I'll take your word on it :) > > No chance you could time it? I'd be very interested to see what the > differences are... > > cheers, > m > > From duhprey at yahoo.com Thu Nov 21 14:13:01 2002 From: duhprey at yahoo.com (Daniel Duhprey) Date: Thu Nov 21 14:13:01 2002 Subject: [ODE] Faster ODE In-Reply-To: <001301c2919c$37c07280$45d4e892@temple> Message-ID: On Thu, 21 Nov 2002, Henri Hakl wrote: -->Please check the accuracy and speed using the testsuite provided with ODE. If I'm using the numbers from the test_ldlt correctly (as a raw time on some scale) then on my athlon its about 38% faster and on my celeron its roughly twice as slow :). -- ------------ email: duhprey@tosos.com www: http://paradox.tosos.com/~duhprey icq: 129354442 She's got a whole brood of kids, like Sendmail, and Postfix, and Apache, and Perl. And some of 'em die young, and some are mentally retarded. Sterling The European finds intercourse with Americans easy and agreeable. Einstein Not a shred of evidence exists in favor of the idea that life is serious. Gill From martin at metahuman.org Thu Nov 21 14:38:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 21 14:38:01 2002 Subject: [ODE] dRay, c++ interface, khepera model? References: <200211201354.gAKDs3X30804@mailgate5.cinetic.de> Message-ID: <3DDB966D.F1954CFB@metahuman.org> This is a multi-part message in MIME format. --------------AE4A85DEE0EE67C92AD2D7AE Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Here's the new C++ interface. It most likely won't compile out of the box with ODE 0.03, since it uses some of the newer features in the CVS version. But it shouldn't be hard to port, more or less just comment out lines that don't compile. - Martin Thomas Buehmann wrote: > > hi, > is it possible to get the c++ interface by martin c. martin and the dRay > contribution without having to use cvs or copy and paste? > apart from that, is anyone aware of a good khepera-style two-wheeled > differential-steering model? if i use two wheels in front of my vehicle to drive > and steer and an additional supporting wheel in the back, the latter tends to > bend if the distance between front-wheels and supporting wheel is small (all use > hinge2). is that model too simple or is it just a matter of tweaking cfm etc...? > > thanks, > thomas. > > sorry if this mail got posted twice. i send it earlier from an unlisted address. > ______________________________________________________________________________ > Der Anrufbeantworter für Ihre E-Mail-Korrespondenz - WEB.DE FreeMail > http://freemail.web.de/features/?mc=021137 > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode --------------AE4A85DEE0EE67C92AD2D7AE Content-Type: application/x-unknown-content-type-hfile; name="odecpp_new.h" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="odecpp_new.h" LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioNCiAqCQkJCQkJCQkJICoNCiAqIE9wZW4gRHluYW1pY3Mg RW5naW5lLCBDb3B5cmlnaHQgKEMpID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.org Thu Nov 21 15:00:02 2002 From: tetron at interreality.org (Peter Amstutz) Date: Thu Nov 21 15:00:02 2002 Subject: [ODE] Faster ODE In-Reply-To: Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I haven't looked any of the code involved, but there is one possible explanation for it being faster on one CPU and slower on another :-) It sounds like a cache-size issue. If the Athlon has a bigger L1/L2 cache then the algorithm might be faster overall but if uses more instructions or space than the current algorithm it could be too big and incur a large cache-miss penalty on the Celeron (which if I recall correctly was given a really wimpy L1/L2 cache to keep costs down). Such are the joys of modern CPU architechtures... There's been some work on "cache-oblivious" algorithms, which is essentially a technique of designing the algorithm to work on small, localized and usually recursive subsets of the total problem (this is especially useful for divide-and-conquor algorithms) so that once you have a subproblem which fits in cache, solving that subproblem is efficient without having to know a priori the size of the processor cache. Just something to think about -- as I said, I haven't looked at the code involved so I could completely off base :-) On Thu, 21 Nov 2002, Daniel Duhprey wrote: > On Thu, 21 Nov 2002, Henri Hakl wrote: > > -->Please check the accuracy and speed using the testsuite provided with ODE. > > If I'm using the numbers from the test_ldlt correctly (as a raw time on > some scale) then on my athlon its about 38% faster and on my celeron its > roughly twice as slow :). [ Peter Amstutz ][ amstutz@cs.umass.edu ][ tetron@interreality.org ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE93VdXaeHUyhjCHfcRAiRMAJ9DdwekLZIYJk0n/fAjtcd3aDG0vACfRze6 mcOSJYkj8/NzQXeW/qoia+k= =SJZQ -----END PGP SIGNATURE----- From martin at metahuman.org Thu Nov 21 17:12:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 21 17:12:02 2002 Subject: [ODE] eliminating all state Message-ID: <3DDD760D.CE7EF366@metahuman.org> Hey, So I'm evolving little virtual creatures with ODE, and after the evolution is done, I take the best ones and "play them back" with graphics and logging and other fun stuff. What I'd really like is for the simulation to go through exactly the same calculations with exactly the same roundoff errors, but at the moment there are small differences that creep up over time. Russ, you mentioned that ODE uses the correction at one timestep to estimate the size of the correction at the next timestep. Is there any way I can reset this between evaluations? Is there anywhere else state is stored? For the curious: I'm currently using the debug build with -ffloat-store, and using exactly the same executable in both cases, so it's guaranteed to have exactly the same compiler options, etc... Thanks, Martin From russ at q12.org Thu Nov 21 17:25:02 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 21 17:25:02 2002 Subject: [ODE] eliminating all state In-Reply-To: <3DDD760D.CE7EF366@metahuman.org> Message-ID: > Russ, you mentioned that ODE uses the correction at one timestep to > estimate the size of the correction at the next timestep. Is there any > way I can reset this between evaluations? Is there anywhere else state is > stored? i hope i didn't mention this, because its not true. each time step is completely independent from the last ... the only information that flows between time steps is the position, orientation and linear/angular velocity of the bodies. but of course all the ODE parameters will have effects that spread throughout time precisely because they affect the positions/velocities. if you're trying to reproduce exact behavior, there's one thing to watch out for when saving and restoring state: save and restore the quaternion, not the rotation matrix, as R is generated from Q not the other way around. saving and restoring R will result in some least-significants-bits errors in the restored state. russ. -- Russ Smith http://www.q12.org/ From martin at metahuman.org Thu Nov 21 18:27:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 21 18:27:02 2002 Subject: [ODE] eliminating all state References: Message-ID: <3DDD87C0.2E18DE49@metahuman.org> Russ Smith wrote: > > > Russ, you mentioned that ODE uses the correction at one timestep to > > estimate the size of the correction at the next timestep. Is there any > > way I can reset this between evaluations? Is there anywhere else state is > > stored? > > i hope i didn't mention this, because its not true. Sorry, I must be confused. But wasn't there some issue with radically changing the size of the time step? e.g. going from 0.01 sec to 1.0 sec or vice versa? - Martin From nnevatie at welho.com Thu Nov 21 22:16:01 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Thu Nov 21 22:16:01 2002 Subject: [ODE] Faster ODE References: Message-ID: <000f01c291e6$2f741ec0$3abdf3d5@wli> I benchmarked 'test_ldlt', here are the results. Configuration: - AMD Athlon TB 800MHz, 384MB RAM, Windows XP - ODE 0.03 built with Borland C++ Builder 6.0 (all optimizations on) Test: - ODE was built including first the original 'fastldlt.c' and then 'fastldlt_henri.c' - test_ldlt was on executed using all available parameters (f, s, t) Results: with 'fastldlt.c': ---- 3449 error = 1.625478e-03, size = 71 error = 2.011657e-04, size = 79 error = 4.785806e-04, size = 83 error = 5.344188e-02, size = 89 error = 3.189385e-03, size = 97 error = 2.305180e-03, size = 101 75 error = 4.673339e-04, size = 71 error = 2.476573e-04, size = 73 error = 1.307763e-03, size = 79 error = 1.248479e-03, size = 83 error = 1.030391e-02, size = 89 error = 1.046956e-03, size = 97 error = 7.226467e-04, size = 101 89 ---- with 'fastldlt_henri.c': ---- 2046 error = 1.625478e-03, size = 71 error = 2.011657e-04, size = 79 error = 4.785806e-04, size = 83 error = 5.344188e-02, size = 89 error = 3.189385e-03, size = 97 error = 2.305180e-03, size = 101 75 error = 4.673339e-04, size = 71 error = 2.476573e-04, size = 73 error = 1.307763e-03, size = 79 error = 1.248479e-03, size = 83 error = 1.030391e-02, size = 89 error = 1.046956e-03, size = 97 error = 7.226467e-04, size = 101 89 ---- Conclusions: - The outputs of the tests are identical. - 'fastldlt_henri.c' consumed ~59% of the time taken by 'fastldlt.c', on the described test configuration. - As mentioned earlier, the results may vary depending on the CPU and cache types. Cheers ----- Original Message ----- From: "Peter Amstutz" To: "Daniel Duhprey" Cc: Sent: Thursday, November 21, 2002 11:59 PM Subject: Re: [ODE] Faster ODE > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I haven't looked any of the code involved, but there is one possible > explanation for it being faster on one CPU and slower on another :-) It > sounds like a cache-size issue. If the Athlon has a bigger L1/L2 cache > then the algorithm might be faster overall but if uses more instructions > or space than the current algorithm it could be too big and incur a large > cache-miss penalty on the Celeron (which if I recall correctly was given a > really wimpy L1/L2 cache to keep costs down). Such are the joys of modern > CPU architechtures... There's been some work on "cache-oblivious" > algorithms, which is essentially a technique of designing the algorithm to > work on small, localized and usually recursive subsets of the total > problem (this is especially useful for divide-and-conquor algorithms) so > that once you have a subproblem which fits in cache, solving that > subproblem is efficient without having to know a priori the size of the > processor cache. > > Just something to think about -- as I said, I haven't looked at the code > involved so I could completely off base :-) > > On Thu, 21 Nov 2002, Daniel Duhprey wrote: > > > On Thu, 21 Nov 2002, Henri Hakl wrote: > > > > -->Please check the accuracy and speed using the testsuite provided with ODE. > > > > If I'm using the numbers from the test_ldlt correctly (as a raw time on > > some scale) then on my athlon its about 38% faster and on my celeron its > > roughly twice as slow :). > > [ Peter Amstutz ][ amstutz@cs.umass.edu ][ tetron@interreality.org ] > [Lead Programmer][Interreality Project][Virtual Reality for the Internet] > [ VOS: Next Generation Internet Communication][ http://interreality.org ] > [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.7 (GNU/Linux) > > iD8DBQE93VdXaeHUyhjCHfcRAiRMAJ9DdwekLZIYJk0n/fAjtcd3aDG0vACfRze6 > mcOSJYkj8/NzQXeW/qoia+k= > =SJZQ > -----END PGP SIGNATURE----- > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From chris.campbell at l8tech.com Thu Nov 21 22:55:02 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Thu Nov 21 22:55:02 2002 Subject: [ODE] eliminating all state Message-ID: > is done, I take the best ones and "play them back" with graphics and > logging and other fun stuff. What I'd really like is for the > simulation > to go through exactly the same calculations with exactly the > same roundoff > errors, but at the moment there are small differences that > creep up over > time. Russ, you mentioned that ODE uses the correction at Using fixed timestep? I am making a racing game using ODE for physics which records only keyboard and mouse inputs to make a replay. That is, to play the replay the entire simulation is recalculated. Initially I was a little worried that error might creep in after a while but after a LONG time experimenting I convinced myself that there was no state held by ODE, and that the idea should work. It does, but only with fixed timestep. Also, a recording made with the debug binary will not replay properly with the release binary and vice versa. Another thing which seems to be necessary is that the cpu should conform to IEEE floating point standards in order for replays to work deterministically on a different computer. ChrisC From dmcclurg at pandemicstudios.com.au Thu Nov 21 23:13:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 21 23:13:02 2002 Subject: [ODE] is ball and socket joint anchor relative to body1? Message-ID: From the docs... --- void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z); Set the joint anchor point. --- it's not clear to me what coordinate frame the anchor point is in... --- For the parameter getting functions, if the system is out of alignment (i.e. there is some joint error) then the anchor/axis values will be correct with respect to body 1 only (or body 2 if you specified body 1 as zero in the dJointAttach() function). The default anchor for all joints is (0,0,0). The default axis for all joints is (1,0,0). --- does this mean the anchor point is relative to body1 ? From dmcclurg at pandemicstudios.com.au Thu Nov 21 23:53:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 21 23:53:02 2002 Subject: [ODE] stress testing and box stacking instability Message-ID: This is a multi-part message in MIME format. ------_=_NextPart_001_01C291F3.A8E1CEDE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm trying to use stacked boxes in my game and I ran into the box = stacking instability mentioned previously on this list. That got me to = reading the Gamasutra article "Product Review of Physics Engines, Part = One: The Stress Tests" and I thought it might be useful to put together = the stress test suite for ODE. It was easy to get tests 1-6 coded and the only one that did badly was = Test 2: "A slightly larger cube is dropped on a smaller cube. This was = a variation on the first test in that the difference between the cubes' = sizes was much smaller. This test was meant to be a "gimme" and should = just work." Expected result: cubes should drop straight on top of each = other and come to immediate rest. I attached a modified test_boxstack.cpp which shows what happens. The = top box dances around for a long time and eventually falls off the top = box. In Havok, i think they might be freezing/sleeping boxes in this = situation. Does the solution lie in proper detection of this situation = or in better contact generation? <>=20 ------_=_NextPart_001_01C291F3.A8E1CEDE Content-Type: application/octet-stream; name="test_boxstack.cpp" Content-Transfer-Encoding: base64 Content-Description: test_boxstack.cpp Content-Disposition: attachment; filename="test_boxstack.cpp" LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioNCiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNCiogT3BlbiBEeW5hbWljcyBFbmdp bmUsIENvcHlyaWdodCAoQykgMjAwMSwyMDAyIFJ1c3NlbGwgTC4gU21pdGguICAgICAgICoNCiog QWxsIHJpZ2h0cyByZXNlcnZlZC4gIEVtYWlsOiBydXNzQHExMi5vcmcgICBXZWI6IHd3dy5xMTIu b3JnICAgICAgICAgICoNCiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNCiogVGhpcyBsaWJyYXJ5IGlzIGZyZWUg c29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciAgICAgICAgICoNCiogbW9k aWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiBFSVRIRVI6ICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICoNCiogICAoMSkgVGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5z ZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgICoNCiogICAgICAgU29mdHdhcmUgRm91bmRhdGlv bjsgZWl0aGVyIHZlcnNpb24gMi4xIG9mIHRoZSBMaWNlbnNlLCBvciAoYXQgICoNCiogICAgICAg eW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiBUaGUgdGV4dCBvZiB0aGUgR05VIExlc3Nl ciAgICAgICoNCiogICAgICAgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBpcyBpbmNsdWRlZCB3aXRo IHRoaXMgbGlicmFyeSBpbiB0aGUgICAgICoNCiogICAgICAgZmlsZSBMSUNFTlNFLlRYVC4gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNCiogICAoMikgVGhl IEJTRC1zdHlsZSBsaWNlbnNlIHRoYXQgaXMgaW5jbHVkZWQgd2l0aCB0aGlzIGxpYnJhcnkgaW4g ICAgICoNCiogICAgICAgdGhlIGZpbGUgTElDRU5TRS1CU0QuVFhULiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICoNCiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNCiogVGhpcyBsaWJyYXJ5 IGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAg ICoNCiogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQg d2FycmFudHkgb2YgICAgICAgICoNCiogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEg UEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIGZpbGVzICAgICoNCiogTElDRU5TRS5UWFQgYW5k IExJQ0VOU0UtQlNELlRYVCBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICoN CiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICoNCioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQoNCiNpbmNsdWRlIDxvZGUvb2Rl Lmg+DQojaW5jbHVkZSA8ZHJhd3N0dWZmL2RyYXdzdHVmZi5oPg0KDQojaWZkZWYgTVNWQw0KI3By YWdtYSB3YXJuaW5nKGRpc2FibGU6NDI0NCA0MzA1KSAgLy8gZm9yIFZDKyssIG5vIHByZWNpc2lv biBsb3NzIGNvbXBsYWludHMN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CBhcmdjLCBjaGFyICoqYXJndikN CnsNCiAgLy8gc2V0dXAgcG9pbnRlcnMgdG8gZHJhd3N0dWZmIGNhbGxiYWNrIGZ1bmN0aW9ucw0K ICBkc0Z1bmN0aW9ucyBmbjsNCiAgZm4udmVyc2lvbiA9IERTX1ZFUlNJT047DQogIGZuLnN0YXJ0 ID0gJnN0YXJ0Ow0KICBmbi5zdGVwID0gJnNpbUxvb3A7DQogIGZuLmNvbW1hbmQgPSAmY29tbWFu ZDsNCiAgZm4uc3RvcCA9IDA7DQogIGZuLnBhdGhfdG9fdGV4dHVyZXMgPSAiLi4vLi4vZHJhd3N0 dWZmL3RleHR1cmVzIjsNCg0KICAvLyBjcmVhdGUgd29ybGQNCg0KICB3b3JsZCA9IGRXb3JsZENy ZWF0ZSgpOw0KICBzcGFjZSA9IGRIYXNoU3BhY2VDcmVhdGUgKDApOw0KICBjb250YWN0Z3JvdXAg PSBkSm9pbnRHcm91cENyZWF0ZSAoMCk7DQogIGRXb3JsZFNldEdyYXZpdHkgKHdvcmxkLDAsMCwt OS44Zik7DQogIGRXb3JsZFNldENGTSAod29ybGQsMWUtNSk7DQogIGRDcmVhdGVQbGFuZSAoc3Bh Y2UsMCwwLDEsMCk7DQogIG1lbXNldCAob2JqLDAsc2l6ZW9mKG9iaikpOw0KDQogIGNvbW1hbmQg KCdyJyk7DQoNCiAgLy8gcnVuIHNpbXVsYXRpb24NCiAgZHNTaW11bGF0aW9uTG9vcCAoYXJnYyxh cmd2LDM1MiwyODgsJmZuKTsNCg0KICBkSm9pbnRHcm91cERlc3Ryb3kgKGNvbnRhY3Rncm91cCk7 DQogIGRTcGFjZURlc3Ryb3kgKHNwYWNlKTsNCiAgZFdvcmxkRGVzdHJveSAod29ybGQpOw0KDQog IHJldHVybiAwOw0KfQ0K ------_=_NextPart_001_01C291F3.A8E1CEDE-- From Nguyen Binh Fri Nov 22 01:23:02 2002 From: Nguyen Binh (Nguyen Binh) Date: Fri Nov 22 01:23:02 2002 Subject: Re[2]: [ODE] Faster ODE In-Reply-To: <000f01c291e6$2f741ec0$3abdf3d5@wli> References: <000f01c291e6$2f741ec0$3abdf3d5@wli> Message-ID: <9822448108.20021122151447@glassegg.com> For me, P III 550 Mhz , XP SP1 ,VS.NET Latest CVS source. Optimize all enable. --------- Use Henri's code : 23805 error = 1.625478e-003, size = 71 error = 2.011657e-004, size = 79 error = 4.785806e-004, size = 83 error = 5.344188e-002, size = 89 error = 3.189385e-003, size = 97 error = 2.305180e-003, size = 101 485 error = 4.673339e-004, size = 71 error = 2.476573e-004, size = 73 error = 1.307763e-003, size = 79 error = 1.248479e-003, size = 83 error = 1.030391e-002, size = 89 error = 1.046956e-003, size = 97 error = 7.226467e-004, size = 101 707 --------- Original code: 23804 error = 1.625478e-003, size = 71 error = 2.011657e-004, size = 79 error = 4.785806e-004, size = 83 error = 5.344188e-002, size = 89 error = 3.189385e-003, size = 97 error = 2.305180e-003, size = 101 485 error = 4.673339e-004, size = 71 error = 2.476573e-004, size = 73 error = 1.307763e-003, size = 79 error = 1.248479e-003, size = 83 error = 1.030391e-002, size = 89 error = 1.046956e-003, size = 97 error = 7.226467e-004, size = 101 707 ------------- My conclusion : + Both exactly the same for my case. Hey Niko! Are you sure about your result? I see your PC run 10 times faster than mine. ( :-( ) . Nguyen Binh From nlin at nlin.net Fri Nov 22 03:15:02 2002 From: nlin at nlin.net (nlin@nlin.net) Date: Fri Nov 22 03:15:02 2002 Subject: ODE Debug behaves differently than ODE release (was Re: [ODE] eliminating all state) Message-ID: <20021122114259.GA29965@nlin.net> On Fri, Nov 22, 2002 at 03:02:44PM +0900, Chris Campbell wrote: > Also, a recording made with the debug binary will not replay > properly with the release binary and vice versa. Recently I have been investigating exactly this determinism problem and have come to the same conclusion as Chris: ODE's behavior can be deterministically reproduced with a fixed timestep, but the debug and release versions act differently. This is somewhat unsettling for me. I am reasonably certain that is is ODE itself which is behaving differently in debug and release modes, not my application. I don't have time to investigate this in detail now, but I wanted to add a second confirmation to Chris's: ODE debug behaves differently than ODE release. One more note which may provide a clue as to the source of the discrepancy. My app access ODE through custom wrapper classes (in file1.cpp), and I also declared a custom collision space (in file2.cpp). If I compile my entire app in debug mode, but compile file1.cpp and file2.cpp in release mode and link the app with the release ODE lib, then behavior of the entire debug app is identical with the behavior of the release app. If I compile file1.cpp in debug mode, OR compile file2.cpp in debug mode, OR link with the ODE debug library, then divergent behavior results. That merely recompiling my *interface* class to ODE causes divergent behavior seems to indicate this may be a data alignment, calling convention, or other subtle compiler flag issue. This is on MSVC 6. If I recall correctly, I believe that even the ODE demos acted differently in debug and release modes, so anyone wishing to reproduce this divergent behavior should be able to do so easily. -Norman From nlin at nlin.net Fri Nov 22 03:35:02 2002 From: nlin at nlin.net (nlin@nlin.net) Date: Fri Nov 22 03:35:02 2002 Subject: [ODE] eliminating all state Message-ID: <20021122120304.GA30898@nlin.net> On Thu, Nov 21, 2002 at 05:24:02PM -0700, Russ Smith wrote: > > Russ, you mentioned that ODE uses the correction at one timestep to > > estimate the size of the correction at the next timestep. Is there any > > way I can reset this between evaluations? Is there anywhere else state is > > stored? > > i hope i didn't mention this, because its not true. each time step is > completely independent from the last ... the only information that flows > between time steps is the position, orientation and linear/angular > velocity of the bodies. but of course all the ODE parameters will have > effects that spread throughout time precisely because they affect the > positions/velocities. Russ, The message from which you are being indirectly quoted is: http://q12.org/pipermail/ode/2002-April/001107.html The relevant passage: On Wed, Apr 10, 2002, Russ Smith wrote: > in the small-large > timestep case it fails, because the velocity correction is timestep > dependent (i.e. the small velocity correction calculated during the > small timestep becomes a much-too-large correction during the large > timestep). there is a good fix for this problem, which i will > eventually add to ODE (as time permits). there'll be a dWorld switch > to turn it on, as there is a slight performance cost. Has the "fix" mentioned above been implemented? What is the idea behind the fix? -Norman From p.terdiman at wanadoo.fr Fri Nov 22 03:57:01 2002 From: p.terdiman at wanadoo.fr (Pierre Terdiman) Date: Fri Nov 22 03:57:01 2002 Subject: ODE Debug behaves differently than ODE release (was Re: [ODE] eliminating all state) References: <20021122114259.GA29965@nlin.net> Message-ID: <00cb01c29215$84b94ca0$0e00000a@pierre> > This is somewhat unsettling for me. I am reasonably certain that is is > ODE itself which is behaving differently in debug and release modes, > not my application. I don't have time to investigate this in detail > now, but I wanted to add a second confirmation to Chris's: ODE debug > behaves differently than ODE release. Well, that's normal. Due to limited FPU precision,simply reordering some operations can produce slightly different results (and reordering happens a lot when the compiler optimizes the code, of course). Also, something like this : a = b / 2.0f; ...can be compiled with the divide in Debug mode, but actually be transformed into : a = b * 0.5f; ...in Release. Producing different results, that can add up quickly in a physics engine. You can try the following compiler option on VC++ : Project Settings -> C/C++ -> Optimizations ->Improve float consistency Sometimes it helps. But in some cases it can be very hard to get the exact same behaviours in Debug & Release. There was a Gamasutra article explaining related problems, when you try to record an animation and replay it in the same exact way. That's surprisingly difficult. Pierre From chris.campbell at l8tech.com Fri Nov 22 03:57:41 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Fri Nov 22 03:57:41 2002 Subject: [ODE] Debug vs Release floating point (MSVC) Message-ID: Hi Norman, > This is somewhat unsettling for me. I am reasonably certain that is is > ODE itself which is behaving differently in debug and release modes, Nah... I'm pretty sure it is to do with the optimizations (for speed) that occur when building for release. In release build floating point exceptions are not checked for, internal representation of the number is different etc - I don't really know the details. If you are using doubles, this might be relevant too: http://support.microsoft.com/default.aspx?scid=KB;en-us;q217033 > convention, or other subtle compiler flag issue. Apparently the /Op switch is supposed to stop optimizations in the release build as well, but whether you want to do that is the question isn't it... ChrisC From henri at cs.sun.ac.za Fri Nov 22 06:34:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Fri Nov 22 06:34:02 2002 Subject: [ODE] Faster ODE References: <000f01c291e6$2f741ec0$3abdf3d5@wli> Message-ID: <006b01c2922b$ec499710$45d4e892@temple> hmmm... the results are quite interesting. I can understand that in the case of Nguyen Binh there is no difference in resultant speed. This is likely to be due to the compiler that is in that case intelligent enough to produce all the optimizations I've set to it. In essence I just realized that there are alot of code redundancies that aren't guaranteed to be compiled away with optimal efficiency by most compilers. VS.NET has a pretty thorough compiler as far as I understand... ;) I have no idea why the Celeron results should be slower - but the 38-59% speed improvement by Niko and Daniel are what I expect from average systems. I'm quite happy with the results upto now then... ;) Henri ----- Original Message ----- From: "Niko Nevatie" To: Sent: Friday, November 22, 2002 7:15 AM Subject: Re: [ODE] Faster ODE > I benchmarked 'test_ldlt', here are the results. > > Configuration: > - AMD Athlon TB 800MHz, 384MB RAM, Windows XP > - ODE 0.03 built with Borland C++ Builder 6.0 (all optimizations on) > > Test: > - ODE was built including first the original 'fastldlt.c' and then > 'fastldlt_henri.c' > - test_ldlt was on executed using all available parameters (f, s, t) > > Results: > > with 'fastldlt.c': > ---- > 3449 > > error = 1.625478e-03, size = 71 > error = 2.011657e-04, size = 79 > error = 4.785806e-04, size = 83 > error = 5.344188e-02, size = 89 > error = 3.189385e-03, size = 97 > error = 2.305180e-03, size = 101 > 75 > > error = 4.673339e-04, size = 71 > error = 2.476573e-04, size = 73 > error = 1.307763e-03, size = 79 > error = 1.248479e-03, size = 83 > error = 1.030391e-02, size = 89 > error = 1.046956e-03, size = 97 > error = 7.226467e-04, size = 101 > 89 > ---- > > > with 'fastldlt_henri.c': > ---- > 2046 > > error = 1.625478e-03, size = 71 > error = 2.011657e-04, size = 79 > error = 4.785806e-04, size = 83 > error = 5.344188e-02, size = 89 > error = 3.189385e-03, size = 97 > error = 2.305180e-03, size = 101 > 75 > > error = 4.673339e-04, size = 71 > error = 2.476573e-04, size = 73 > error = 1.307763e-03, size = 79 > error = 1.248479e-03, size = 83 > error = 1.030391e-02, size = 89 > error = 1.046956e-03, size = 97 > error = 7.226467e-04, size = 101 > 89 > ---- > > > Conclusions: > - The outputs of the tests are identical. > - 'fastldlt_henri.c' consumed ~59% of the time taken by 'fastldlt.c', on the > described test configuration. > - As mentioned earlier, the results may vary depending on the CPU and cache > types. > > > Cheers > > ----- Original Message ----- > From: "Peter Amstutz" > To: "Daniel Duhprey" > Cc: > Sent: Thursday, November 21, 2002 11:59 PM > Subject: Re: [ODE] Faster ODE > > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > I haven't looked any of the code involved, but there is one possible > > explanation for it being faster on one CPU and slower on another :-) It > > sounds like a cache-size issue. If the Athlon has a bigger L1/L2 cache > > then the algorithm might be faster overall but if uses more instructions > > or space than the current algorithm it could be too big and incur a large > > cache-miss penalty on the Celeron (which if I recall correctly was given a > > really wimpy L1/L2 cache to keep costs down). Such are the joys of modern > > CPU architechtures... There's been some work on "cache-oblivious" > > algorithms, which is essentially a technique of designing the algorithm to > > work on small, localized and usually recursive subsets of the total > > problem (this is especially useful for divide-and-conquor algorithms) so > > that once you have a subproblem which fits in cache, solving that > > subproblem is efficient without having to know a priori the size of the > > processor cache. > > > > Just something to think about -- as I said, I haven't looked at the code > > involved so I could completely off base :-) > > > > On Thu, 21 Nov 2002, Daniel Duhprey wrote: > > > > > On Thu, 21 Nov 2002, Henri Hakl wrote: > > > > > > -->Please check the accuracy and speed using the testsuite provided with > ODE. > > > > > > If I'm using the numbers from the test_ldlt correctly (as a raw time on > > > some scale) then on my athlon its about 38% faster and on my celeron its > > > roughly twice as slow :). > > > > [ Peter Amstutz ][ amstutz@cs.umass.edu ][ etron@interreality.org ] > > [Lead Programmer][Interreality Project][Virtual Reality for the Internet] > > [ VOS: Next Generation Internet Communication][ http://interreality.org ] > > [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.0.7 (GNU/Linux) > > > > iD8DBQE93VdXaeHUyhjCHfcRAiRMAJ9DdwekLZIYJk0n/fAjtcd3aDG0vACfRze6 > > mcOSJYkj8/NzQXeW/qoia+k= > > =SJZQ > > -----END PGP SIGNATURE----- > > > > > > _______________________________________________ > > ODE mailing list > > ODE@q12.org > > http://q12.org/mailman/listinfo/ode > > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From martin at metahuman.org Fri Nov 22 09:47:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Fri Nov 22 09:47:01 2002 Subject: [ODE] eliminating all state References: <20021122120304.GA30898@nlin.net> Message-ID: <3DDE5F39.FFA325DC@metahuman.org> > The message from which you are being indirectly quoted is: > > http://q12.org/pipermail/ode/2002-April/001107.html Thanks Norman, I see where he says it's only positions and velocities. For those who are curious, I found the source of the problem: when I was printing out my doubles, I was only printing DBL_DIG many digits (= 15). It turns out, I need to print out 17 digits to be sure the values when read in are exactly the same as before. Thanks, Martin From jeffrey.palmer at acm.org Fri Nov 22 11:07:02 2002 From: jeffrey.palmer at acm.org (Jeffrey Palmer) Date: Fri Nov 22 11:07:02 2002 Subject: [ODE] Faster ODE In-Reply-To: <006b01c2922b$ec499710$45d4e892@temple> References: <000f01c291e6$2f741ec0$3abdf3d5@wli> <006b01c2922b$ec499710$45d4e892@temple> Message-ID: <200211221206.28464.jeffrey.palmer@acm.org> Hello all, I just thought I'd throw out a couple of references I've found useful while developing highly-efficient C++ code (I apologize if these have been brought up before): 1) Blitz++ (http://www.oonumerics.org/blitz) - A template-based C++ library for highly-efficient numerical development. Uses template-metaprogramming to produce code as fast or faster than FORTRAN, while maintaining an intuitive user model. 2) FFTW - The Fastest Fourier Transform in the West (http://www.fftw.org) - Although perhaps not directly applicable to ODE, their approach is a very interesting one if you're *really* concerned about cranking out performance on whatever platform you're running on. I only point these out because we're at a point where it's becoming increasingly difficult to implement a "correct" solution that is highly performant on all possible platforms. So, rather than search for the Holy Grail, these approaches can help to determine an approach that provides the best performance/platform tradeoff. Hope this helps/is interesting, - j -- The river is moving. The blackbird must be flying. From Sergei Eliseev Fri Nov 22 12:30:02 2002 From: Sergei Eliseev (Sergei Eliseev) Date: Fri Nov 22 12:30:02 2002 Subject: [ODE] Can't compile ODE :( Message-ID: <2620020157.20021122223434@cea.ru> Hello, Just downloaded latest ODE source via WinCVS and make.exe from this site, created file config/user-settings for msvc, but can't compile it. I always get the same error: make (e=2): The system cannot find the file specified. make.exe: *** [configurator.exe] Error 2 Moreover when I downloaded ready .lib, under VC++ 6.0 I always get another error during linking: ode.lib(misc.obj) : error LNK2001: unresolved external symbol __ftol2 How can avoid these nasty errors? Any help really appreciated. Best regards, Sergei mailto:sergey_eu@cea.ru From russ at q12.org Fri Nov 22 13:48:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 13:48:02 2002 Subject: [ODE] eliminating all state In-Reply-To: <3DDD81EB.9D7E5C55@metahuman.org> Message-ID: > Sorry, I must be confused. But wasn't there some issue with radically > changing the size of the time step? e.g. going from 0.01 sec to 1.0 sec > or vice versa? yes ... the issue is that the error correcting velocity would be artificially magnified when switching from a small to large time step (e.g. *10). this issue is on the fix-list. russ. -- Russ Smith http://www.q12.org/ From anselm at hook.org Fri Nov 22 14:41:01 2002 From: anselm at hook.org (Anselm Hook) Date: Fri Nov 22 14:41:01 2002 Subject: [ODE] stress testing and box stacking instability In-Reply-To: Message-ID: Hi Dave, I thought everybody knew about this defect by now? It's something that Russ has said he's going to fix for the next big release. If the bug hasn't changed then basically it is just that not enough contacts are being generated between two box surfaces - there needs to be at least 3 but there is only 1 right now. - a On Fri, 22 Nov 2002, David McClurg wrote: > I'm trying to use stacked boxes in my game and I ran into the box > stacking instability mentioned previously on this list. That got me > to reading the Gamasutra article "Product Review of Physics Engines, > Part One: The Stress Tests" and I thought it might be useful to put > together the stress test suite for ODE. > > It was easy to get tests 1-6 coded and the only one that did badly was > Test 2: "A slightly larger cube is dropped on a smaller cube. This > was a variation on the first test in that the difference between the > cubes' sizes was much smaller. This test was meant to be a "gimme" > and should just work." Expected result: cubes should drop straight on > top of each other and come to immediate rest. > > I attached a modified test_boxstack.cpp which shows what happens. The top box dances around for a long time and eventually falls off the top box. In Havok, i think they might be freezing/sleeping boxes in this situation. Does the solution lie in proper detection of this situation or in better contact generation? > <> > From russ at q12.org Fri Nov 22 15:05:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 15:05:02 2002 Subject: [ODE] Faster ODE In-Reply-To: <200211221206.28464.jeffrey.palmer@acm.org> Message-ID: > 1) Blitz++ (http://www.oonumerics.org/blitz) > 2) FFTW - The Fastest Fourier Transform in the West i have used blitz and have found their approach to be more clever than it is productive. the template meta-program idea results in exceptionally long compile times, and not all compilers have the right optimization strategies to take advantage of the generated code. gcc, for example, does not seem to do terribly well at optimizing away the numerous stack-based parameter-passing temporaries that such code generates. i considered blitz for ODE but gave up on it in favour of explicitly written for-loops and hand unrolling because (a) blitz is slower, (b) blitz increases the compile time hugely, (c) blitz syntax sometimes obscures the actual numerical operations that are being performed - and i like things to be obvious and out in the open. FFTW is new to me, thanks for the pointer. there's also ATLAS, http://math-atlas.sourceforge.net/ ODE's factorizer is generated using an ATLAS-like parameter-finding approach (look in the fbuild directory). that's why the fast-ldlt code looks really complicated when the same thing could be implemented using 3 for-loops in about 20 lines of code. ideally the build process for ODE should involve running the fbuild code to get the fastest factorizer on your platform. the 'default' fastldlt etc code is just what happens to work best on whatever platform i ran fbuild on. note that this default code should still be significantly faster than the 3 for-loops approach on all platforms (for matrices of greater than say 5x5 ?). russ. -- Russ Smith http://www.q12.org/ From kale at sagan.usc.edu Fri Nov 22 15:13:02 2002 From: kale at sagan.usc.edu (Kale Harbick) Date: Fri Nov 22 15:13:02 2002 Subject: [ODE] Vortex vs. ODE Message-ID: I started using MathEngine's dynamics toolkit in 2000, and continued with Vortex when they split up. It's time to renew our academic license but the price was increased a lot, so we're reluctant. I'm investigating alternatives and heard about ODE. I was hoping someone here could compare Vortex and ODE. My application is a simulation of a dynamically-stable hopping robot. Other people in my group are working on humanoid robot simulations. Accuracy is more important to me than speed, as it eases the migration of controllers from simulation to the physical robot. thanks very much Kale Harbick USC Robotics Lab From russ at q12.org Fri Nov 22 15:39:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 15:39:02 2002 Subject: [ODE] Vortex vs. ODE In-Reply-To: Message-ID: > Accuracy is more important to me than speed, as it eases the > migration of controllers from simulation to the physical robot. vortex and ODE both use 1st-order accurate implicit integrators. vortex may have a more accurate model of single-rigid-body tumbling, but this is probably not too relevant for robotics work. in my own experience, robot simulator accuracy is rather difficult to achieve because every piece must be accurate before the whole thing is ... not only the integrator but the friction models, the actuator models (hydraulics anyone? pneumatics?), the sensor models, etc. even getting accurate inertia tensors is tricky for lab robots that sometimes are sticky-taped together instead of being bolted. personally, i wouldn't worry about the numerical accuracy of my simulator unless i had all these other things sorted out. russ. -- Russ Smith http://www.q12.org/ From vbz at cs.ucr.edu Fri Nov 22 21:18:01 2002 From: vbz at cs.ucr.edu (Victor Zordan) Date: Fri Nov 22 21:18:01 2002 Subject: [ODE] joint torques Message-ID: <20021123031114.99CAF25A83@snap.cs.ucr.edu> Hello. Comment and a question... In regards to 11/21 USC comments, I too found vortex to be too expensive. Plus, I prefer having the code open and available for reading... (thanks Russ for that.) Also, I've played with Vortex and their contact models were not to my liking... I asked them if they would let me set up my own ground constraints and got a negative response, saying that was in a part of the program that was closed to the users. In a development environment, like mine or USC's, you want to be able to change as much as possible... Now, I have looked thru the archives and saw my question asked by Jon Klein back in June but I didn't find a reply to his question, so I figure I'll repeat the question. I too am trying to apply torques about joints and I built a controller that applied both torque at the body center and a computed force as an equivalent to applying a joint torque. The joint controller appears to move the body in the correct way, but I somehow don't think I am computing things properly b/c some unnatural forces appear at times and cause the body to spin out of control. The bottom-line question: is there a way in ODE to apply torques relative to a point on a body (the joint center), just as you would apply a force at a particular point? Or am I making this too difficult... Thanks much, Victor From russ at q12.org Fri Nov 22 21:25:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 21:25:02 2002 Subject: [ODE] joint torques In-Reply-To: <20021123031114.99CAF25A83@snap.cs.ucr.edu> References: <20021123031114.99CAF25A83@snap.cs.ucr.edu> Message-ID: <20021122202930.3a0a3adc.russ@q12.org> > is there a way in ODE to apply torques relative to a point on a body > (the joint center), just as you would apply a force at a particular > point? physics fact: any torque applied to a body will have the same effect on that body's motion regardless of the point at which it is applied, so there's no reason to specify a position in the dBodyAdd[Rel]Torque() functions. russ. -- Russell Smith http://www.q12.org From mama7121 at student.uu.se Sat Nov 23 05:43:02 2002 From: mama7121 at student.uu.se (Martin Magnusson) Date: Sat Nov 23 05:43:02 2002 Subject: [ODE] Robotics simulation Message-ID: <3DDF77B8.6080804@student.uu.se> Hello everybody. I'm new to this list and thought I'd say hi... Max Lungarella wrote: > my plan is to simulate a humanoid robot with a reduced number of degrees of > freedom, let's say 10. the simulation would have to be fairly accurate, since > i'd like to develop the control architecture in software and use this very > architecture for the control of a real robot in a second time step. That sounds very much like my project. I'm doing my master's thesis on reinforcement learning for balancing a humaoid robot, and I'm looking for a simulation environment to test my algorithms with. How has it turned out for you? Are you happy with ODE? Is Dymamechs any better? / Martin Magnusson From marinescuiulian at yahoo.com Sat Nov 23 06:56:02 2002 From: marinescuiulian at yahoo.com (Marinescu Iulian) Date: Sat Nov 23 06:56:02 2002 Subject: [ODE] Could I simulate a car with ODE ? Message-ID: <20021123135558.68015.qmail@web13007.mail.yahoo.com> --0-285632834-1038059758=:67118 Content-Type: text/plain; charset=us-ascii Hi to everyone! I am a complete beginner regarding ODE. But I would like to learn. I have to do this project of simulation of a car on different types of road, and different types of weather. I would have to input this: The dinamics of the car ( for wind simulation) Type of road ( with holes and stuff) The type tires Type of suspension The vibration of the engine And many other inputs that I didn't think of, yet. The question is if I could do a program, with ODE, to simulate this. Thank You !!! --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-285632834-1038059758=:67118 Content-Type: text/html; charset=us-ascii

Hi to everyone!

I am a complete beginner regarding ODE. But I would like to learn. I have to do this project of simulation of a car on different types of road, and different types of weather. I would have to input this:

  • The dinamics of the car ( for wind simulation)
  • Type of road ( with holes and stuff)
  • The type tires
  • Type of suspension
  • The vibration of the engine

And many other inputs that I didn't think of, yet. The question is if I could do a program, with ODE, to simulate this.

Thank You !!! 



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-285632834-1038059758=:67118-- From erwin at vo.com Sat Nov 23 06:59:01 2002 From: erwin at vo.com (Erwin de Vries) Date: Sat Nov 23 06:59:01 2002 Subject: [ODE] new ODE collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> Message-ID: <064201c292f8$55791ae0$73fefea9@athlon> > > - Should we add support for a user defined, or infinite AABB on demand > > for spaces? This is really useful for the quadtree space containing > > huge (10.000 for example) amounts of geoms. If i would remove a single > > geom it would need to do a lot of work. > > i don't understand this .. ? I'll explain my situation. In my app i have a lot of initially static scenery objects. I place these inside a quadtree space. Once upon a while the main player hits one (or more) of these objects. At this point i remove them from the quadtree, give them a body, and add them to my 'main space'. Now, as this quadtree essentially covers the whole game world i dont _need_ it to have a tight AABB since it is very large anyways. The point where i _require_ it NOT to have a tight AABB is when i change the structure of the quadtree (remove a geom). Imagine a 10.000 geom quadtree having to recompute its bounds. Even if it only involves recomputing the final aabb of 9999 cached and 1 new aabb, it still is a costly process that is essentially useless. Thats why i would like to add an option to spaces to simply return an infinite AABB instead of computing it. Hope this explains. I'm migrating to the new ODE collision detection today. Perhaps some other suggestions will come to my mind. Erwin From p.terdiman at wanadoo.fr Sat Nov 23 08:12:01 2002 From: p.terdiman at wanadoo.fr (Pierre Terdiman) Date: Sat Nov 23 08:12:01 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> Message-ID: <037501c29302$5bde2ce0$0e00000a@pierre> Hi, I was (finally) looking at Erwin's box-mesh collision today, when I noticed something weird : float DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - *ColTri.Vertices[0]); ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); Unless I'm missing something, the local variable DistSq is never used. On the other hand, ColTri.DistSq is used while probably not initialized. I guess the two lines should be : ColTri.DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - *ColTri.Vertices[0]); ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); ...unless, once again, I'm missing something. (I didn't trace it, I'm just browsing the CVS repository) There's also another version from Nolan Walker, based on Magic. Is this better / more recent ? (the question might already have been asked, but I can't remember the answer...) Pierre From facontidavide at hotmail.com Sat Nov 23 12:54:02 2002 From: facontidavide at hotmail.com (Edgard Oscuro) Date: Sat Nov 23 12:54:02 2002 Subject: [ODE] Robotics simulation Message-ID:

Hi!! I am Davide

>Max Lungarella wrote:

> > my plan is to simulate a humanoid robot with a reduced number of degrees of
> > freedom, let's say 10. the simulation would have to be fairly accurate, since
> > i'd like to develop the control architecture in software and use this very
> > architecture for the control of a real robot in a second time step.
>
>That sounds very much like my project. I'm doing my master's thesis on
>reinforcement learning for balancing a humaoid robot, and I'm looking
>for a simulation environment to test my algorithms with. How has it
>turned out for you? Are you happy with ODE? Is Dymamechs any better?
 
It seems that most of us is doing the same!!! As I said before I am going to simulate a humanoid robot as well (that soon we will build in real world). I will be grade to share (pretty soon) my results.
In this moment we are gonna use simulation to understand how strong motors must be (so that we can buy them!)
 
Davide


Comunica in un ’altra dimensione con MSN Extra Storage! Clicca qui From grubertm at hotmail.com Sat Nov 23 14:37:02 2002 From: grubertm at hotmail.com (Marco Grubert) Date: Sat Nov 23 14:37:02 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> <037501c29302$5bde2ce0$0e00000a@pierre> Message-ID: One thing about the Box-Tri collider I noticed is that it assumes the normal to be that of the triangle. This works fine for a box falling onto a triangle, but yields wrong results for a triangle falling onto a box. I am currently working on the tri-tri detection and pick the normal based on which object is moving and which one is static. This avoids some explosions but introduces other instabilities.. - Marco Grubert From coding at natew.com Sat Nov 23 21:26:02 2002 From: coding at natew.com (Nate W) Date: Sat Nov 23 21:26:02 2002 Subject: [ODE] is ball and socket joint anchor relative to body1? In-Reply-To: Message-ID: On Fri, 22 Nov 2002, David McClurg wrote: > void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z); > it's not clear to me what coordinate frame the anchor point is in... World coordinates. Or at least, I assumed world coordinates, and it works like I'd assumed it would, so I feel pretty good about that assumption. :-) -- Nate Waddoups Redmond WA USA http://www.natew.com From russ at q12.org Sun Nov 24 16:36:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 24 16:36:01 2002 Subject: [ODE] multiple box-box contacts Message-ID: <20021124154047.1ca8d686.russ@q12.org> i have just finished an update to the box-box contact generation code. now up to 8 contacts can be generated per box-box collision, although in practice a limit of 3 or 4 is more useful. the test_boxstack demo has been updated to show box stacking in action: press 'r' to drop boxes in a stack, then press b multiple times. press 't' to show the contact points that are generated. you can play with different numbers of contacts by changing the 3rd argument to dCollide() - the default is 4. note that you have to compile ODE *without* ODE_OLD_COLLISION in user-settings to get the new code. be careful in your own code to generate as few box-box contacts as you actually need, as each extra contact point will slow down the simulation some more. this new code contains a number of heuristics that should result in good contact choices - but these algorithms need some more real-world testing. please report any problems you come across. russ. -- Russell Smith http://www.q12.org From martin at metahuman.org Sun Nov 24 16:52:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Sun Nov 24 16:52:01 2002 Subject: [ODE] multiple box-box contacts References: <20021124154047.1ca8d686.russ@q12.org> Message-ID: <3DE165EB.9FC8D9A6@metahuman.org> Hey Russ, > i have just finished an update to the box-box contact generation code. Thanks, that rocks! Better box-box contacts is one of the major capabilities in the list for 0.035. It's been almost a year since 0.03 was released. Any idea when 0.035 will be out? Thanks again, Martin From dmcclurg at pandemicstudios.com.au Sun Nov 24 19:15:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Sun Nov 24 19:15:02 2002 Subject: [ODE] multiple box-box contacts Message-ID: very nice Russ! just a minor thing that my VC7 compiler doesn't like... collision_std.cpp collision_std.cpp(460) : error C2057: expected constant expression collision_std.cpp(460) : error C2466: cannot allocate an array of constant size 0 collision_std.cpp(460) : error C2133: 'avail' : unknown size if you could change int avail[n]; to int* avail = (int*)alloca(n*sizeof(int)); that would fix it. -----Original Message----- From: Russ Smith [mailto:russ@q12.org] Sent: Monday, 25 November 2002 6:41 AM To: ode@q12.org Subject: [ODE] multiple box-box contacts i have just finished an update to the box-box contact generation code. now up to 8 contacts can be generated per box-box collision, although in practice a limit of 3 or 4 is more useful. the test_boxstack demo has been updated to show box stacking in action: press 'r' to drop boxes in a stack, then press b multiple times. press 't' to show the contact points that are generated. you can play with different numbers of contacts by changing the 3rd argument to dCollide() - the default is 4. note that you have to compile ODE *without* ODE_OLD_COLLISION in user-settings to get the new code. be careful in your own code to generate as few box-box contacts as you actually need, as each extra contact point will slow down the simulation some more. this new code contains a number of heuristics that should result in good contact choices - but these algorithms need some more real-world testing. please report any problems you come across. russ. -- Russell Smith http://www.q12.org _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From russ at q12.org Sun Nov 24 19:58:02 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 24 19:58:02 2002 Subject: [ODE] multiple box-box contacts In-Reply-To: References: Message-ID: <20021124190259.4ef95df8.russ@q12.org> > if you could change > int avail[n]; ah yes ... this is now fixed. russ. -- Russell Smith http://www.q12.org From mal at candomultimedia.com Sun Nov 24 20:11:02 2002 From: mal at candomultimedia.com (Mal) Date: Sun Nov 24 20:11:02 2002 Subject: [ODE] OT: Physics based game beta... In-Reply-To: <20021124190259.4ef95df8.russ@q12.org> Message-ID: <000001c29430$209ac470$7600a8c0@MalLaptop> If any of you need a break from coding physics, check this out... http://www.candomultimedia.com/3dStressBall It's the beta of a new game we're developing in our spare time here at canDo, but it's quite fun already. It uses Shockwave 3D and Havok, but the basics could be implemented using any physics engine. You can post your levels to the new forum. The game will be modified a lot over the next 10 weeks or so. Enjoy, and if you like it, check this out too, it's an updated version of the Balls Up game that also uses Havok ( now 3D Balls Up, has a new novel mouse control, as well as joystick control, music, easier learning levels, feature removals ( bug fixes ) etc. http://www.candomultimedia.com/3dBallsUp As physics gurus it might be fun to get away from the compiler and get your hand to eye co-ordination back up to scratch! :) Mal From Nguyen Binh Sun Nov 24 23:08:02 2002 From: Nguyen Binh (Nguyen Binh) Date: Sun Nov 24 23:08:02 2002 Subject: Re[2]: [ODE] Faster ODE In-Reply-To: References: Message-ID: <130756758.20021125101120@glassegg.com> I think the best way to improve ODE speed is using CPU- specialized instructions like MMX,SIMD,SSE(2). The refs can be : http://LibSimd.sourceforge.net SML library of Intel. (Very nice!) -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media Me Linh Point Tower, 10th Floor 2 Ngo Duc Ke District 1, Ho Chi Minh City Vietnam Fax: (84.8)823-8392 www.glassegg.com --------------------------------------------------------------------- From Dominique at SavageSoftware.com.au Mon Nov 25 02:43:02 2002 From: Dominique at SavageSoftware.com.au (Dominique Louis) Date: Mon Nov 25 02:43:02 2002 Subject: [ODE] Silkworm... Message-ID: <3DE1F12E.6090306@SavageSoftware.com.au> Just thought others might be interested to know that todays ( 24th of November ) image of the day on FlipCode ( http://www.flipcode.com/iotd/ ) is an ODE demo called SilkWorm ( http://slickworm.sourceforge.net ). From tetron at interreality.org Mon Nov 25 11:25:02 2002 From: tetron at interreality.org (Peter Amstutz) Date: Mon Nov 25 11:25:02 2002 Subject: [ODE] multiple box-box contacts In-Reply-To: <20021124154047.1ca8d686.russ@q12.org> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Awesome! This is what I've been waiting for -- now I can use ODE for my VR simulation. Oh, and it's really fun to just play with the box stacking demo, to make a huge tower and then knock it down... Great work! Russ, you rule :-) It's amazing to have such excelent code freely available. On Sun, 24 Nov 2002, Russ Smith wrote: > > i have just finished an update to the box-box contact generation code. > now up to 8 contacts can be generated per box-box collision, although in > practice a limit of 3 or 4 is more useful. the test_boxstack demo has > been updated to show box stacking in action: press 'r' to drop boxes in > a stack, then press b multiple times. press 't' to show the contact > points that are generated. you can play with different numbers of > contacts by changing the 3rd argument to dCollide() - the default is 4. > > note that you have to compile ODE *without* ODE_OLD_COLLISION in > user-settings to get the new code. > > be careful in your own code to generate as few box-box contacts as you > actually need, as each extra contact point will slow down the simulation > some more. > > this new code contains a number of heuristics that should result in good > contact choices - but these algorithms need some more real-world > testing. please report any problems you come across. [ Peter Amstutz ][ amstutz@cs.umass.edu ][ tetron@interreality.org ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE94mrHaeHUyhjCHfcRApGmAJ0Rd0ssY0jsemvGVVaSDbqEW9YQbQCfTiWm 9pWajiZt1CU/KJjnff+AHk0= =Blf/ -----END PGP SIGNATURE----- From henri at cs.sun.ac.za Mon Nov 25 13:46:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Mon Nov 25 13:46:01 2002 Subject: Re[2]: [ODE] Faster ODE Message-ID: <032001c294c3$afa33ec0$45d4e892@temple> This is a multi-part message in MIME format. ------=_NextPart_000_031D_01C294D4.732027E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions for = ODE - and it is quite possible that it can bring about harmony and speed. But = one thing that is likely going to cause problems is the SSE(2) code. For optimal performance a number of details need to be implemented. = Vectors and matrices need to be of a horizontal size that is a factor of 4 (this = is implemented and the reason why, for example, a 3x3 matrix is defined as = a 12 TReal (3x4) structure. However, the structures also have to be aligned onto 16-byte boundaries. = To allow for optimal SSE(2) access (using movaps) each 128-bit memory = vector that is accessed has to be alligned on a 16-byte memory boundary. This = is a problem in ODE, as every math structure now is required to be 16-byte aligned; this is difficult to achieve because ODE calls/uses = sub-matrices of matrices, and it may be difficult to guarantee that every sub-matrix is >also< correctly 16-byte aligned. Additionally SSE2 primarily adds double-float functionality to the SIMD instructions. This can help somewhat for speed in the TReal =3D double = case, but isn't likely (just my guess) to have as tremendous a speed bonus as = 4 single floats that can be handled simultaneously for TReal =3D single. Anyway... ;) Henri ----- Original Message ----- From: "Nguyen Binh" To: ; "Russ Smith" Cc: "Jeffrey Palmer" ; Sent: Monday, November 25, 2002 5:11 AM Subject: Re[2]: [ODE] Faster ODE > > I think the best way to improve ODE speed is using CPU- > specialized instructions like MMX,SIMD,SSE(2). > > The refs can be : > http://LibSimd.sourceforge.net > SML library of Intel. (Very nice!) > > -- > Best regards, > > --------------------------------------------------------------------- > Nguyen Binh > Software Engineer > Glass Egg Digital Media > Me Linh Point Tower, 10th Floor > 2 Ngo Duc Ke > District 1, Ho Chi Minh City > Vietnam > Fax: (84.8)823-8392 > www.glassegg.com > --------------------------------------------------------------------- > > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode ------=_NextPart_000_031D_01C294D4.732027E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions = for ODE=20 -
and it is quite possible that it can bring about harmony and speed. = But=20 one
thing that is likely going to cause problems is the SSE(2)=20 code.

For optimal performance a number of details need to be = implemented.=20 Vectors
and matrices need to be of a horizontal size that is a factor = of 4=20 (this is
implemented and the reason why, for example, a 3x3 matrix is = defined=20 as a 12
TReal (3x4) structure.

However, the structures also = have to be=20 aligned onto 16-byte boundaries. To
allow for optimal SSE(2) access = (using=20 movaps) each 128-bit memory vector
that is accessed has to be = alligned on a=20 16-byte memory boundary. This is a
problem in ODE, as every math = structure=20 now is required to be 16-byte
aligned; this is difficult to achieve = because=20 ODE calls/uses sub-matrices of
matrices, and it may be difficult to = guarantee=20 that every sub-matrix is
>also< correctly 16-byte=20 aligned.

Additionally SSE2 primarily adds double-float = functionality to=20 the SIMD
instructions. This can help somewhat for speed in the TReal = =3D double=20 case,
but isn't likely (just my guess) to have as tremendous a speed = bonus as=20 4
single floats that can be handled simultaneously for TReal =3D=20 single.

Anyway... ;)
  Henri


----- Original = Message=20 -----
From: "Nguyen Binh" <ngbinh@glassegg.com>
To: = <ode-admin@q12.org>; "Russ = Smith" <russ@q12.org>
Cc: "Jeffrey = Palmer" <jeffrey.palmer@acm.org>; = <ode@q12.org>
Sent: Monday, = November 25, 2002=20 5:11 AM
Subject: Re[2]: [ODE] Faster=20 ODE


>
>       &nbs= p; I=20 think the best way to improve ODE speed is using=20 CPU-
>         specialized = instructions like=20 MMX,SIMD,SSE(2).
>
>       = ; =20 The refs can be=20 :
>          &nbs= p; =20 http://LibSimd.sourceforge.net
>          &nbs= p; =20 SML library of Intel. (Very nice!)
>
> --
> Best=20 regards,
>
>=20 ---------------------------------------------------------------------
= >   =20 Nguyen Binh
>    Software=20 Engineer
>    Glass Egg Digital=20 Media
>    Me Linh Point Tower, 10th=20 Floor
>    2 Ngo Duc Ke
>    = District=20 1, Ho Chi Minh City
>    = Vietnam
>   =20 Fax:  (84.8)823-8392
>      www.glassegg.com
>=20 ---------------------------------------------------------------------
= >
>
>=20 _______________________________________________
> ODE mailing = list
>=20 ODE@q12.org
> http://q12.org/mailman/listi= nfo/ode
------=_NextPart_000_031D_01C294D4.732027E0-- From swmatthe at nps.navy.mil Mon Nov 25 14:37:02 2002 From: swmatthe at nps.navy.mil (Matthews, Steve) Date: Mon Nov 25 14:37:02 2002 Subject: [ODE] Help with setting and getting rotation Message-ID: <47D23CE95FD22E47B0C927B7F99DAD0C167A95@grasp.ad.nps.navy.mil> Could somebody please look at the following code? I am trying to set the position and rotation of a body from a 4*4 matrix of floats, and I also want to then be able to query that position and rotation. I seem to be able to set the position and retrieve it correctly, but the rotation comes back as garbage when I try to retrieve it and I don't know why. The code will compile as a standalone main with ode as the only dependency. The input matrix (inputMat) is just dummy numbers; if I'm imposing something or assuming something I shouldn't, please tell me. Thanks much, Steve ********************************************** #include "ode/ode.h" void setPhysicsPosition(dBodyID bodyID, float setMat[4][4]) { dBodySetPosition(bodyID, (dReal)setMat[3][0], (dReal)setMat[3][1], (dReal)setMat[3][2]); dMatrix3 R; R[0] = (dReal)setMat[0][0]; R[1] = (dReal)setMat[0][1]; R[2] = (dReal)setMat[0][2]; R[3] = 0.0; R[4] = (dReal)setMat[1][0]; R[5] = (dReal)setMat[1][1]; R[6] = (dReal)setMat[1][2]; R[7] = 0.0; R[8] = (dReal)setMat[2][0]; R[9] = (dReal)setMat[2][1]; R[10] = (dReal)setMat[2][2]; R[11] = 0.0; dBodySetRotation(bodyID, R); } void getPhysicsPosition(dBodyID bodyID, float getMat[4][4]) { const dReal *getPos; getPos = dBodyGetPosition(bodyID); const dReal *getRot; getRot = dBodyGetRotation(bodyID); getMat[0][0] = (float)getRot[0]; getMat[0][1] = (float)getRot[1]; getMat[0][2] = (float)getRot[2]; getMat[0][3] = (float)getRot[3]; getMat[1][0] = (float)getRot[4]; getMat[1][1] = (float)getRot[5]; getMat[1][2] = (float)getRot[6]; getMat[1][3] = (float)getRot[7]; getMat[2][0] = (float)getRot[8]; getMat[2][1] = (float)getRot[9]; getMat[2][2] = (float)getRot[10]; getMat[2][3] = (float)getRot[11]; getMat[3][0] = (float)getPos[0]; getMat[3][1] = (float)getPos[1]; getMat[3][2] = (float)getPos[2]; getMat[3][3] = 1.0f; } int main() { dWorldID worldID = dWorldCreate(); dBodyID bodyID = dBodyCreate(worldID); //create the input matrix float inputMat[4][4] = {{1.0f, 0.1f, 0.2f, 0.0f}, {0.3f, 1.0f, 0.4f, 0.0f}, {0.5f, 0.6f, 1.0f, 0.0f}, {1.0f, 2.0f, 3.0f, 1.0f}}; //set the position of the physics body setPhysicsPosition(bodyID, inputMat); //print the input to console printf("input matrix:\n\n"); printf("%f %f %f %f\n", inputMat[0][0], inputMat[0][1], inputMat[0][2], inputMat[0][3]); printf("%f %f %f %f\n", inputMat[1][0], inputMat[1][1], inputMat[1][2], inputMat[1][3]); printf("%f %f %f %f\n", inputMat[2][0], inputMat[2][1], inputMat[2][2], inputMat[2][3]); printf("%f %f %f %f\n\n", inputMat[3][0], inputMat[3][1], inputMat[3][2], inputMat[3][3]); //initialize the output matrix float outMat[4][4] = {0.f}; //return the position back to 4*4 matrix format in newPos getPhysicsPosition(bodyID, outMat); //print the output to console printf("output matrix:\n\n"); printf("%f %f %f %f\n", outMat[0][0], outMat[0][1], outMat[0][2], outMat[0][3]); printf("%f %f %f %f\n", outMat[1][0], outMat[1][1], outMat[1][2], outMat[1][3]); printf("%f %f %f %f\n", outMat[2][0], outMat[2][1], outMat[2][2], outMat[2][3]); printf("%f %f %f %f\n\n", outMat[3][0], outMat[3][1], outMat[3][2], outMat[3][3]); return 0; } From erwin at vo.com Mon Nov 25 14:52:01 2002 From: erwin at vo.com (Erwin de Vries) Date: Mon Nov 25 14:52:01 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> <037501c29302$5bde2ce0$0e00000a@pierre> Message-ID: <000201c294cc$c0908090$73fefea9@athlon> > Hi, > > I was (finally) looking at Erwin's box-mesh collision today, when I noticed > something weird : > > float DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - > *ColTri.Vertices[0]); > ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); > > Unless I'm missing something, the local variable DistSq is never used. On > the other hand, ColTri.DistSq is used while probably not initialized. I > guess the two lines should be : > > ColTri.DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - > *ColTri.Vertices[0]); > ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); > > ...unless, once again, I'm missing something. (I didn't trace it, I'm just > browsing the CVS repository) .... You're probably right. I cant quite see how this code is supposed to do anything useful. But its been so long since i've written this code, that i have doubts about the reason of existence of other stuff as well. :-) > There's also another version from Nolan Walker, based on Magic. Is this > better / more recent ? (the question might already have been asked, but I > can't remember the answer...) Yes it is better in some ways, but because of some bugs the end result is something not too great. I STILL need to fix this. I'm using the code in my projects and we're nearing the completion of it, so i would need to do it sometime soon. In case you want it. It is in the mail archives somewhere. Erwin From swmatthe at nps.navy.mil Mon Nov 25 15:09:01 2002 From: swmatthe at nps.navy.mil (Matthews, Steve) Date: Mon Nov 25 15:09:01 2002 Subject: [ODE] Help with setting and getting rotation Message-ID: <47D23CE95FD22E47B0C927B7F99DAD0C0DD9C0@grasp.ad.nps.navy.mil> Okay, next time I'll throw real data in. Apparently this does work; my dummy data was too dummy. sorry all. -----Original Message----- From: Matthews, Steve Sent: Monday, November 25, 2002 1:37 PM To: ode@q12.org Subject: [ODE] Help with setting and getting rotation Could somebody please look at the following code? I am trying to set the position and rotation of a body from a 4*4 matrix of floats, and I also want to then be able to query that position and rotation. I seem to be able to set the position and retrieve it correctly, but the rotation comes back as garbage when I try to retrieve it and I don't know why. The code will compile as a standalone main with ode as the only dependency. The input matrix (inputMat) is just dummy numbers; if I'm imposing something or assuming something I shouldn't, please tell me. Thanks much, Steve ********************************************** #include "ode/ode.h" void setPhysicsPosition(dBodyID bodyID, float setMat[4][4]) { dBodySetPosition(bodyID, (dReal)setMat[3][0], (dReal)setMat[3][1], (dReal)setMat[3][2]); dMatrix3 R; R[0] = (dReal)setMat[0][0]; R[1] = (dReal)setMat[0][1]; R[2] = (dReal)setMat[0][2]; R[3] = 0.0; R[4] = (dReal)setMat[1][0]; R[5] = (dReal)setMat[1][1]; R[6] = (dReal)setMat[1][2]; R[7] = 0.0; R[8] = (dReal)setMat[2][0]; R[9] = (dReal)setMat[2][1]; R[10] = (dReal)setMat[2][2]; R[11] = 0.0; dBodySetRotation(bodyID, R); } void getPhysicsPosition(dBodyID bodyID, float getMat[4][4]) { const dReal *getPos; getPos = dBodyGetPosition(bodyID); const dReal *getRot; getRot = dBodyGetRotation(bodyID); getMat[0][0] = (float)getRot[0]; getMat[0][1] = (float)getRot[1]; getMat[0][2] = (float)getRot[2]; getMat[0][3] = (float)getRot[3]; getMat[1][0] = (float)getRot[4]; getMat[1][1] = (float)getRot[5]; getMat[1][2] = (float)getRot[6]; getMat[1][3] = (float)getRot[7]; getMat[2][0] = (float)getRot[8]; getMat[2][1] = (float)getRot[9]; getMat[2][2] = (float)getRot[10]; getMat[2][3] = (float)getRot[11]; getMat[3][0] = (float)getPos[0]; getMat[3][1] = (float)getPos[1]; getMat[3][2] = (float)getPos[2]; getMat[3][3] = 1.0f; } int main() { dWorldID worldID = dWorldCreate(); dBodyID bodyID = dBodyCreate(worldID); //create the input matrix float inputMat[4][4] = {{1.0f, 0.1f, 0.2f, 0.0f}, {0.3f, 1.0f, 0.4f, 0.0f}, {0.5f, 0.6f, 1.0f, 0.0f}, {1.0f, 2.0f, 3.0f, 1.0f}}; //set the position of the physics body setPhysicsPosition(bodyID, inputMat); //print the input to console printf("input matrix:\n\n"); printf("%f %f %f %f\n", inputMat[0][0], inputMat[0][1], inputMat[0][2], inputMat[0][3]); printf("%f %f %f %f\n", inputMat[1][0], inputMat[1][1], inputMat[1][2], inputMat[1][3]); printf("%f %f %f %f\n", inputMat[2][0], inputMat[2][1], inputMat[2][2], inputMat[2][3]); printf("%f %f %f %f\n\n", inputMat[3][0], inputMat[3][1], inputMat[3][2], inputMat[3][3]); //initialize the output matrix float outMat[4][4] = {0.f}; //return the position back to 4*4 matrix format in newPos getPhysicsPosition(bodyID, outMat); //print the output to console printf("output matrix:\n\n"); printf("%f %f %f %f\n", outMat[0][0], outMat[0][1], outMat[0][2], outMat[0][3]); printf("%f %f %f %f\n", outMat[1][0], outMat[1][1], outMat[1][2], outMat[1][3]); printf("%f %f %f %f\n", outMat[2][0], outMat[2][1], outMat[2][2], outMat[2][3]); printf("%f %f %f %f\n\n", outMat[3][0], outMat[3][1], outMat[3][2], outMat[3][3]); return 0; } _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From franjesus at medtelecom.net Mon Nov 25 15:40:02 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-1?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Mon Nov 25 15:40:02 2002 Subject: [ODE] multiple box-box contacts In-Reply-To: References: Message-ID: <200211252337.39769.franjesus@medtelecom.net> El Lun 25 Nov 2002 19:24, Peter Amstutz escribió: > Oh, and it's really fun to just play with the box stacking > demo, to make a huge tower and then knock it down... Try it with spheres ;-) -- Linux: Esa panda de colgaos y piratas que te reprograman la lavadora desde rusia si usas un Windows pirata. .: Bulmailing :. From Nguyen Binh Mon Nov 25 18:49:03 2002 From: Nguyen Binh (Nguyen Binh) Date: Mon Nov 25 18:49:03 2002 Subject: Re[4]: [ODE] Faster ODE In-Reply-To: <032001c294c3$afa33ec0$45d4e892@temple> References: <032001c294c3$afa33ec0$45d4e892@temple> Message-ID: <751181058.20021126085017@glassegg.com> Hi , HH> I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions for ODE - HH> and it is quite possible that it can bring about harmony and speed. But one HH> thing that is likely going to cause problems is the SSE(2) code. HH> For optimal performance a number of details need to be implemented. Vectors HH> and matrices need to be of a horizontal size that is a factor of 4 (this is HH> implemented and the reason why, for example, a 3x3 matrix is defined as a 12 HH> TReal (3x4) structure. Take a look at Small Matrix Lib (SML) of Intel, you'll see that we have at least a way to solve this. HH> However, the structures also have to be aligned onto 16-byte boundaries. To HH> allow for optimal SSE(2) access (using movaps) each 128-bit memory vector HH> that is accessed has to be alligned on a 16-byte memory boundary. This is a HH> problem in ODE, as every math structure now is required to be 16-byte HH> aligned; this is difficult to achieve because ODE calls/uses sub-matrices of HH> matrices, and it may be difficult to guarantee that every sub-matrix is >>also< correctly 16-byte aligned. Also, SML solved these. But we may consider move all matrix, vector,... of ODE to the matrix, vector ,... of SML. I assure it'll not be hard cause right now vectors,matrixs of ODE are barely a typdef TReal* . Moreover, in SML we have a type of dimension-variable matrix that has built-in LU decomposition function. HH> Additionally SSE2 primarily adds double-float functionality to the SIMD HH> instructions. This can help somewhat for speed in the TReal = double case, HH> but isn't likely (just my guess) to have as tremendous a speed bonus as 4 HH> single floats that can be handled simultaneously for TReal = single. OK, just your guess. I'm SIMDing ODE, I'll put my benchmark when it finishes. -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media Me Linh Point Tower, 10th Floor 2 Ngo Duc Ke District 1, Ho Chi Minh City Vietnam Fax: (84.8)823-8392 www.glassegg.com --------------------------------------------------------------------- From nnevatie at welho.com Tue Nov 26 00:58:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Tue Nov 26 00:58:02 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> <037501c29302$5bde2ce0$0e00000a@pierre> <000201c294cc$c0908090$73fefea9@athlon> Message-ID: <001801c29521$72670a10$3abdf3d5@wli> Erwin, can you help me figure out what is wrong here. I tried the newstuff.gz (Base64 encoded new tricollider code) which you had posted to the list a while ago. I got it compiled OK. The problem is: when I tried the box stacking test, the program would always crash after the first collision. It seemed that the dRay.cpp was the cause of the crash. The function dGeomRaySet uses dMatrix3 to represent a rotatation. The function fills up the structure and tries to access element at [3 * 4 + 2], which causes an access violation (because dMatrix3 only has 12 elements?). Otherwise I'm using the code in ODE 0.03 release (I've tried CVS head too) + Opcode 1.2. I would greatly appreciate if you could enlighten me on this. ----- Original Message ----- From: "Erwin de Vries" To: Sent: Monday, November 25, 2002 1:29 AM Subject: Re: [ODE] Box-mesh collision > Yes it is better in some ways, but because of some bugs the end result is > something not too great. I STILL need to fix this. I'm using the code in my > projects and we're nearing the completion of it, so i would need to do it > sometime soon. > > In case you want it. It is in the mail archives somewhere. > > Erwin From tetron at interreality.org Tue Nov 26 01:34:10 2002 From: tetron at interreality.org (Peter Amstutz) Date: Tue Nov 26 01:34:10 2002 Subject: [ODE] box-box performance Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've tried out the new box-box collision code with the "phystut" program in Crystal Space. I first had to fix a problem with the crystal space use of ODE (it didn't use the dContactSoftCFM flag when generating contact joints, which caused terrible instability problems) but now that it works and is stable, I can't have more than ten or so boxes before the simulation bogs down to unusability. The environment consists of six static collision boxes which are walls of a room. The user can move a viewpoint around and toss a box or sphere, which hits the ground, tumbles (or rolls) a bit and comes to rest. As I said, once there are about 10 boxes in the room, the framerate drops precipitously and the simultion totally bogs down, even if all of the boxes have come to rest and arn't moving at all. My suspicion is that there are a lot of contact points being generated and evaluated every step despite the fact that nothing is moving (and in this case, the boxes are colliding with static geometry, which is never going to move). My question is whether this is something that can be fixed in ODE, or whether this is something that should be handled at a higher level? The specific case here is geometry which is occasionally dynamic. This means that most of the time it is sitting around with no forces acting upon it except gravity. The user should be able to interact with it, but most of the time it shouldn't be moving. If two bodies have collided recently (in the previous time step) then it should be possible to avoid re-calculating the collision and collision joints if neither body has moved more than an infintesimal amount since the previous step. How well would this work? [ Peter Amstutz ][ amstutz@cs.umass.edu ][ tetron@interreality.org ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE94zHNaeHUyhjCHfcRAsBzAJ9eESdKUJPIMcQsmGRoilesznHIrwCeIduH O3kRglgKyqjJByCajI8yOvc= =i2G+ -----END PGP SIGNATURE----- From Daniel.Groll at t-online.de Tue Nov 26 03:30:02 2002 From: Daniel.Groll at t-online.de (Daniel.Groll@t-online.de) Date: Tue Nov 26 03:30:02 2002 Subject: [ODE] box-box performance In-Reply-To: References: Message-ID: <1038306297.3de34bf91ea73@webmail.t-online.de> I have implemented this sort of thing on top of ODE. My bodies come to rest if their velocities went under a certain length. But be careful, there are situation where for example a box can stay on an edge. To avoid this you have to take time in concideration. I also have implemented this and it work great. My simulation has got a significant speed up. Nearly all my objects are "quiet" objects in most situations. This boosts the performance enormously! Daniel Groll From henri at cs.sun.ac.za Tue Nov 26 06:43:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Tue Nov 26 06:43:01 2002 Subject: Re[4]: [ODE] Faster ODE References: <032001c294c3$afa33ec0$45d4e892@temple> <751181058.20021126085017@glassegg.com> Message-ID: <03ad01c29552$032098c0$45d4e892@temple> Sounds good. I know Intel's SML - I used it (among other things) to write a small specialized matrix library of my own (only works on 3x1, 4x1 vectors and 3x3, 4x4 matrices. No LU decomposition or other "higher" functionality; but it has damn fast "basic" functionality (normalize, transpose, multiply, arithmetic, etc). If anybody is interested go look at: http://www.cs.sun.ac.za/~henri/aistuff.html You should know that the SML still has some room for improvement; for example their 4x4 matrix multiply can still gain another 10% speed with some clever use of SSE2 instructions. Nonetheless it is in some cases futile to implement SIMD algorithms, as FPU versions are as fast or faster - and less hassle to create. Unforetunately you have to do both before you can figure out which one is more suited... I've written a seperate LDLT decomposition using the "classic" approach (not the one used in ODE) and FPU optimization which is quite fast. And I wrote a seperate assembler FPU version of the replacement unit I provided, but it is only about 1% faster. (So I think the readability is more important in this case.) Oh yea... and don't forget that you should have seperate FPU, MMX, 3DNow, 3DNow!, SSE and SSE2 versions to keep everybody happy and working at the most efficient. (Oh... and don't use an SSE version for the Athlon processors - although they support SSE it is nowhere near as fast as the Intel equivalents.) Still :)) - I'll be happy to look at the code you develop for ODE and see if I can fit some additional speed in there. ;) Henri ----- Original Message ----- From: "Nguyen Binh" To: ; "Henri Hakl" Cc: Sent: Tuesday, November 26, 2002 3:50 AM Subject: Re[4]: [ODE] Faster ODE > Hi , > > HH> I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions for ODE - > HH> and it is quite possible that it can bring about harmony and speed. But one > HH> thing that is likely going to cause problems is the SSE(2) code. > > > HH> For optimal performance a number of details need to be implemented. Vectors > HH> and matrices need to be of a horizontal size that is a factor of 4 (this is > HH> implemented and the reason why, for example, a 3x3 matrix is defined as a 12 > HH> TReal (3x4) structure. > > Take a look at Small Matrix Lib (SML) of Intel, you'll see that we have > at least a way to solve this. > > HH> However, the structures also have to be aligned onto 16-byte boundaries. To > HH> allow for optimal SSE(2) access (using movaps) each 128-bit memory vector > HH> that is accessed has to be alligned on a 16-byte memory boundary. This is a > HH> problem in ODE, as every math structure now is required to be 16-byte > HH> aligned; this is difficult to achieve because ODE calls/uses sub-matrices of > HH> matrices, and it may be difficult to guarantee that every sub-matrix is > >>also< correctly 16-byte aligned. > > Also, SML solved these. > But we may consider move all matrix, vector,... of ODE to the > matrix, vector ,... of SML. I assure it'll not be hard cause right > now vectors,matrixs of ODE are barely a typdef TReal* . > Moreover, in SML we have a type of dimension-variable matrix that > has built-in LU decomposition function. > > HH> Additionally SSE2 primarily adds double-float functionality to the SIMD > HH> instructions. This can help somewhat for speed in the TReal = double case, > HH> but isn't likely (just my guess) to have as tremendous a speed bonus as 4 > HH> single floats that can be handled simultaneously for TReal = single. > > OK, just your guess. I'm SIMDing ODE, I'll put my benchmark when > it finishes. > > -- > Best regards, > > --------------------------------------------------------------------- > Nguyen Binh > Software Engineer > Glass Egg Digital Media > Me Linh Point Tower, 10th Floor > 2 Ngo Duc Ke > District 1, Ho Chi Minh City > Vietnam > Fax: (84.8)823-8392 > www.glassegg.com > --------------------------------------------------------------------- > > From pml_mrawls at yahoo.com Tue Nov 26 09:32:02 2002 From: pml_mrawls at yahoo.com (Mark Rawls) Date: Tue Nov 26 09:32:02 2002 Subject: [ODE] Latest CVS compiling with MSVC7 Message-ID: <20021126163136.28195.qmail@web40504.mail.yahoo.com> --0-1042572177-1038328296=:27505 Content-Type: text/plain; charset=us-ascii Hi. I am attempting to install the latest CVS version of CS. I have windows XP, and am using MSVC7 (the contrib/msvc7 solution however doesn't appear to be up to date; in any case, it isn't working for me). I downloaded the GNU make binary offered at q12.org, but I get problems when I do make ode-lib. In appears it may be a problem with the source code (or how my compiler treats the code more likely?). Here's what happens: make ode-lib cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= /c /GR- /GX- /W3 /GF /Oy /Iinclude /DdNODEBUG /O2 /Foode/src/step.obj ode/src/step.cpp cl : Command line warning D4029 : optimization is not available in the standard edition compiler step.cpp ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(731) : error C2664: 'dSetValue' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called make: *** [ode/src/step.obj] Error 2 Any help would be appreciated. Thanks, Mark Rawls --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-1042572177-1038328296=:27505 Content-Type: text/html; charset=us-ascii

Hi.

I am attempting to install the latest CVS version of CS.  I have windows XP, and am using MSVC7 (the contrib/msvc7 solution however doesn't appear to be up to date; in any case, it isn't working for me).  I downloaded the GNU make binary offered at q12.org, but I get problems when I do make ode-lib.  In appears it may be a problem with the source code (or how my compiler treats the code more likely?).  Here's what happens:

<prompt at ODE dir>make ode-lib <enter>
cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= /c /GR- /GX- /W3
 /GF /Oy /Iinclude  /DdNODEBUG /O2 /Foode/src/step.obj ode/src/step.cpp
cl : Command line warning D4029 : optimization is not available in the standard
edition compiler
step.cpp
ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi
s operator or a conversion to a type acceptable to the predefined operator
ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr
om 'dInfBytes' to 'dReal'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called
ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi
s operator or a conversion to a type acceptable to the predefined operator
ode\src\step.cpp(731) : error C2664: 'dSetValue' : cannot convert parameter 3 fr
om 'dInfBytes' to 'dReal'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called
make: *** [ode/src/step.obj] Error 2

Any help would be appreciated.  Thanks,

Mark Rawls



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-1042572177-1038328296=:27505-- From slipch Tue Nov 26 09:48:02 2002 From: slipch (slipch) Date: Tue Nov 26 09:48:02 2002 Subject: [ODE] using dCreateGeomClass in the last ode version Message-ID: <15831806395.20021126185038@gsc-game.kiev.ua> Hello ODE, Is it a bug? The problem accrues with setting pointer to a function for self collision because when calling dCreateGeomClass the integer class number is not set yet. So, collider function calling by dCreateGeomClass can not return right function pointer. -- Best regards, slipch mailto:slipch@gsc-game.kiev.ua From russ at q12.org Tue Nov 26 11:57:02 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 26 11:57:02 2002 Subject: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <15831806395.20021126185038@gsc-game.kiev.ua> Message-ID: > The problem accrues with setting pointer to a function for self > collision because when calling dCreateGeomClass the integer class > number is not set yet. So, collider function calling by dCreateGeomClass > can not return right function pointer. i don't know what problem you are talking about - can you describe it more precisely? but the new collision system uses constant class numbers, not variable class numbers, so this should not be a problem (except perhaps for user defined classes set up through the C API??). russ. -- Russ Smith http://www.q12.org/ From thomasharte at lycos.co.uk Tue Nov 26 12:40:02 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Tue Nov 26 12:40:02 2002 Subject: [ODE] My Latest Approach to Polyhedron Collision Management Message-ID: <1038339519025448@lycos-europe.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --=_NextPart_Lycos_0254481038339519_ID Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm continuing to make progress in my pursuit of the perfect arbitrary polyhedron on arbitrary polyhedron collision management. I am looking for comments or suggestions regarding my current approach, from those on this list who must have worked on, or be working on, the same thing. In particular, I am worried about the efficiently of my constraint generation calculations. My driving physics engine is fairly typical. It is assumed that at the start of a time step, no objects are inter-penetrating. If, at the end of the time step, there continue to be no objects inter-penetrating, then the time step is complete. If objects do inter-penetrate, then a binary search reveals something very close to the last time before inter-penetration occurred, at which point the relevant constraints are added to prevent that from happening, and the whole process repeats, this time considering only the remaining portion of the time step after the penetration. Therefore, two discrete binary operations are supported on polyhedron types - an overlap test and a constraint calculation. All polyhedron's have BSP trees and hierarchical bounding sphere sets for : - their vertices - their edges In my hierarchy, every sphere has (at most) 8 children. Obviously the number of children represents a balance between hierarchy depth and bredth, and all the related factors when it comes to eliminating possible edge on polygon tests. I picked 8 to match up with the natural geographical division that occurs under an octree. I understand that a sphere probably models the shape of sets of edges and vertices terribly, but on the other hand it is really cheap to test one against a plane. The overlap test can be achieved using the edge and related bounding sphere information from one object with the BSP tree of another. For any given BSP node, if a particular sphere is entirely on one particular side of the plane, then its tests head that way down the tree. If it sits on the plane, then its children are considered. If a leaf node is found to be intersecting a plane, then complete edge on polygon tests are done. If any edge intersects a polygon, then the two objects are said to overlap, and no further tests are carried out. Obviously a first 'quick throwaway' test on distance between the highest level bounding spheres of both objects is performed, but in my simulation there is already a higher order octree related means to calculating which objects are 'near' which other objects, so that test isn't as useful as it might otherwise be. This BSP approach is a smarter version of testing every polygon of one object against every polygon of the other. It therefore is fooled by the same problems, such as one object being totally enclosed by another object - but these are a result of using a discrete model of time, and things my simulation will simply be built to deal with. Most tests performed by my engine when two objects begin contact will be overlap tests due to the binary search for collision time, and the constraint calculation will only occur once. When two objects start a time step rubbing up against each other, the focus will be the constraint calculation, but still this should only be required once per time step. Therefore, in my engine where objects will frequently change what they are rubbing against, it is the overlap test that needs be most optimal. The constraint calculation needs to detect when vertices on one object are very close to polygons on the other, and when edges on one object are very close to edges on the other. My engine attempts to keep all objects seperated by an invisibly small border, negating the need for the binary search for collision time to be desperately accurate, and generally helping smooth numerical accuracy problems. The edges problem isn't hard. Its more or less like the overlap test, but this time edges which are close to a plane in the BSP are tested in addition to those that cross the plane, and all are tested only against original edges that lie on that plane, not against the edges of the polygons used to construct the BSP tree - the distinction being that I am not interested in the artificial edges generated when splitting polygons for BSP purposes. Vertices on planes is slightly more difficult. My current solution is to push each object's vertices down the BSP tree of the other object. But this means that I have to do two BSP traversals per constraint calculation - which I am sure could probably be only 1 if it weren't for some gross thickness on my part. Is there any way to do this more efficiently? -Thomas BA flight sale now at http://www.lycos.co.uk Caracas, =A3129 rtn. including tax, Tues, 11am --=_NextPart_Lycos_0254481038339519_ID-- From jeffrey.palmer at acm.org Tue Nov 26 15:30:02 2002 From: jeffrey.palmer at acm.org (Jeffrey Palmer) Date: Tue Nov 26 15:30:02 2002 Subject: [ODE] ODE/Tricollider on linux? Message-ID: <200211261629.14222.jeffrey.palmer@acm.org> Hello all, I was wondering if anyone has gotten ODE and the tricollider code (I tried the stuff in the NewStuff email to no avail) working under Linux? Alternatively, I understand that the tri code is currently being integrated with ODE - is that in the CVS version yet? If not, is it bothersome to ask for an ETA? I guess I'm just lazy - I'm sort of unwilling to port everything to linux if it's *about* to be released. ;) Thanks, - j -- The river is moving. The blackbird must be flying. From anselm at hook.org Tue Nov 26 15:45:02 2002 From: anselm at hook.org (Anselm Hook) Date: Tue Nov 26 15:45:02 2002 Subject: [ODE] operator new undefined link cygwin gcc In-Reply-To: <200211261629.14222.jeffrey.palmer@acm.org> Message-ID: For some bizarre reason I had to use g++ instead of gcc with my (very recent) version of cygwin and todays verson of ode. I was getting an "operator new undefined" error at the link phase. Anybody else notice the same thing? I had to modify the configurator code a bit to build under g++ also. - a From mama7121 at student.uu.se Tue Nov 26 16:28:02 2002 From: mama7121 at student.uu.se (Martin Magnusson) Date: Tue Nov 26 16:28:02 2002 Subject: [ODE] operator new undefined link cygwin gcc References: Message-ID: <3DE40356.8010604@student.uu.se> I'm having trouble compiling under Cygwin as well. Then again, it could be a Cygwin problem too, since I'm new to Cygwin as well. Anyway, as far as I can understand I've set the user-settings file correctly, and after that a simple 'make' should be enough, right? Using g++ didn't seem to help. My results are posted below. The problem seems to be with lib/libode.a. I don't have a directory called 'lib', and there's no 'libode.a' anywhere on my HDD. Help, comments or flames are appreciated :) / Martin Magnusson ====================================================================== == Contents of ./config/user-settings: =============================== # ODE user settings: the following variables must be set by the user # (1) the platform to use. this name should have a corresponding # makefile.PLATFORM file. currently supported platforms are: # msvc microsoft visual C/C++ # mingw minimalist GNU for windows # cygwin cygnus GNU for windows # unix-gcc GNU gcc on windows # unix-generic generic unix compiler. you may need to edit the CC # variable in makefile.unix-generic # osx Mac OS-X, with the gnu compiler. PLATFORM=cygwin # (2) the floating point precision to use (either "SINGLE" or "DOUBLE") #PRECISION=SINGLE PRECISION=DOUBLE # (3) the library type to build (either "debug" if you are doing development, # or "release" for the optimized library) #BUILD=debug BUILD=release ===================================================================== == Result of make with gcc: ========================================= /home/martin!/ode-0.03> make gcc -DdDOUBLE -DdNODEBUG -o configurator.exe configurator.c ./configurator.exe include/ode/config.h "gcc -DdNODEBUG -o " "rm -f" ./ rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.c rm -f ctest.exe is this a pentium on a gcc-based platform? ... rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.c rm -f ctest.exe integer types (we assume int >= 32 bits) ... select the base floating point type ... the floating point infinity ... rm -f data gcc -DdNODEBUG -o ctest.exe ctest.c ctest.c:5: initializer element is not constant ./ctest.exe ./ctest.exe: not found rm -f data gcc -DdNODEBUG -o ctest.exe ctest.c ./ctest.exe rm -f data gcc -DdNODEBUG -o ctest.exe ctest.c ./ctest.exe rm -f ctest.c rm -f ctest.exe rm -f data *** configurator succeeded *** gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/array.o ode/src/array.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/error.o ode/src/error.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/memory.o ode/src/memory.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/obstack.o ode/src/obstack.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/odemath.o ode/src/odemath.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/matrix.o ode/src/matrix.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/misc.o ode/src/misc.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/rotation.o ode/src/rotation.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/mass.o ode/src/mass.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/ode.o ode/src/ode.cpp ode/src/ode.cpp: In function `void dJointAttach(dxJoint*, dxBody*, dxBody*)': ode/src/ode.cpp:922: warning: unused variable `dxWorld*world' gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/step.o ode/src/step.cpp ode/src/step.cpp:701:5: warning: multi-line comment ode/src/step.cpp:704:5: warning: multi-line comment gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/lcp.o ode/src/lcp.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/joint.o ode/src/joint.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/space.o ode/src/space.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/geom.o ode/src/geom.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/timer.o ode/src/timer.cpp ode/src/timer.cpp:109:17: warning: multi-line string literals are deprecated ode/src/timer.cpp:119:17: warning: multi-line string literals are deprecated gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/mat.o ode/src/mat.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/testing.o ode/src/testing.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastldlt.o ode/src/fastldlt.c gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastlsolve.o ode/src/fastlsolve.c gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastltsolve.o ode/src/fastltsolve. c gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastdot.o ode/src/fastdot.c ar rc lib/libode.a ode/src/array.o ode/src/error.o ode/src/memory.o ode/src/obst ack.o ode/src/odemath.o ode/src/matrix.o ode/src/misc.o ode/src/rotation.o ode/s rc/mass.o ode/src/ode.o ode/src/step.o ode/src/lcp.o ode/src/joint.o ode/src/spa ce.o ode/src/geom.o ode/src/timer.o ode/src/mat.o ode/src/testing.o ode/src/fast ldlt.o ode/src/fastlsolve.o ode/src/fastltsolve.o ode/src/fastdot.o ar: lib/libode.a: No such file or directory make: *** [lib/libode.a] Error 1 ===================================================================== == Result of make with g++: ========================================= /home/martin!/ode-0.03> make g++ -DdDOUBLE -DdNODEBUG -o configurator.exe configurator.c configurator.c: In function `void fatal_error(char*)': configurator.c:112: `exit' undeclared (first use this function) configurator.c:112: (Each undeclared identifier is reported only once for each function it appears in.) configurator.c: In function `void delete_file(char*)': configurator.c:167: `system' undeclared (first use this function) make: *** [configurator.exe] Error 1 From harleybl at hotmail.com Tue Nov 26 16:53:01 2002 From: harleybl at hotmail.com (Harley Blumenfeld) Date: Tue Nov 26 16:53:01 2002 Subject: [ODE] Unhandled exception - access violation Message-ID:
Has anyone else been getting an Unhandled exception - access violation,when calling dGeomDestroy? I got the latest from cvs this morning and have run into this problem when my application closes.
 
All I did was make a sub folder under test, and created a project which contains a copy of the buggy_test.cpp. The program runs fine, except when the window is closed I get an access violation. It seems to be happening when the box is destroyed in the line dGeomDestroy( box[0] );
 
When I look up the call stack it is failing at this place in the chain dxGeom::bodyRemove( void ).
 
Here is my configuration:
msvc version 6.0
Ode from this morning compiled with build=debug
Windows 2000 SP 2
 
Is there a setting that I am missing in my project? I noticed that there was a warning about a conflicting library and the linker said that I should be using /NODEFAULTLIB: libc.
Which library should I be using instead?
 
Thanks,
-Harley Blumenfeld
 


Tired of spam? Get advanced junk mail protection with MSN 8. From russ at q12.org Tue Nov 26 19:56:02 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 26 19:56:02 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: References: Message-ID: <20021126190026.00c5f3ed.russ@q12.org> > It seems to be happening when the box is destroyed in the line > dGeomDestroy( box[0] ); is the error happening within dGeomDestroy() or within main(). are you using an unaltered copy of test_buggy? russ. -- Russell Smith http://www.q12.org From Nguyen Binh Tue Nov 26 20:32:02 2002 From: Nguyen Binh (Nguyen Binh) Date: Tue Nov 26 20:32:02 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <20021126190026.00c5f3ed.russ@q12.org> References: <20021126190026.00c5f3ed.russ@q12.org> Message-ID: <931545011.20021127103524@glassegg.com> >> It seems to be happening when the box is destroyed in the line >> dGeomDestroy( box[0] ); It's the same for me. I'm using the latest test_buggt.cpp in CVS. RS> is the error happening within dGeomDestroy() or within main(). are you RS> using an unaltered copy of test_buggy? I solved it by bring the dGeomDestroy()... to front like this: dGeomDestroy (box[0]); dGeomDestroy (sphere[0]); dGeomDestroy (sphere[1]); dGeomDestroy (sphere[2]); dJointGroupDestroy (contactgroup); dSpaceDestroy (space); dWorldDestroy (world); -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media E.Town Building 7th Floor, 364 CongHoa Street Tan Binh District, HoChiMinh City, VietNam, Phone : +84 8 8109018 Fax : +84 8 8109013 www.glassegg.com --------------------------------------------------------------------- From anselm at hook.org Tue Nov 26 20:43:01 2002 From: anselm at hook.org (Anselm Hook) Date: Tue Nov 26 20:43:01 2002 Subject: [ODE] operator new undefined link cygwin gcc In-Reply-To: <3DE40356.8010604@student.uu.se> Message-ID: For the default compiler in makefile.cygwin to be g++ you have to wrap extern "C" { } around your includes in the configurator source. Also just remove exit() - it isn't important. The configurator could be generalized to support this overall but I guess it's pretty obvious. As for your bug with not being able to link - I did see some comment about that earlier on the list. Try cvs to head revision and see if it is fixed. Otherwise try see if your cygwin is older... - a > ===================================================================== > == Result of make with g++: ========================================= > > /home/martin!/ode-0.03> make > g++ -DdDOUBLE -DdNODEBUG -o configurator.exe configurator.c > configurator.c: In function `void fatal_error(char*)': > configurator.c:112: `exit' undeclared (first use this function) > configurator.c:112: (Each undeclared identifier is reported only once > for each > function it appears in.) > configurator.c: In function `void delete_file(char*)': > configurator.c:167: `system' undeclared (first use this function) > make: *** [configurator.exe] Error 1 > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From g.r.vansickle at worldnet.att.net Tue Nov 26 23:53:02 2002 From: g.r.vansickle at worldnet.att.net (Gary R. Van Sickle) Date: Tue Nov 26 23:53:02 2002 Subject: [ODE] box-box performance In-Reply-To: <1038306297.3de34bf91ea73@webmail.t-online.de> Message-ID: > I have implemented this sort of thing on top of ODE. My bodies come to > rest if their velocities went under a certain length. But be careful, > there are situation where for example a box can stay on an edge. To > avoid this you have to take time in concideration. Instead of time, could this take "stability" into account instead? e.g. something like this: if( (body.KineticEnergy() < epsilon) // i.e. velocity ~= 0 && (body.PotentialEnergyRelativeTo(body_it_is_contacting) < epsilon) // i.e. it isn't going to change on us on its own. ) { // "Freeze" body until something hits it etc. // ... } Seems to me that this would be pretty much foolproof, and better yet instantaneously-acting; there'd be no need to wait until you were reasonably sure the body had "really" stopped moving, you could lock the body down as soon as these conditions became true and know you were doing the right thing. Or is there a conceptual or implementational issue here I'm missing? -- Gary R. Van Sickle Brewer. Patriot. From muellerptr at kimweb.de Wed Nov 27 00:19:02 2002 From: muellerptr at kimweb.de (=?iso-8859-1?Q?Patrik_M=FCller?=) Date: Wed Nov 27 00:19:02 2002 Subject: [ODE] Collision detection Message-ID: Hi all, I'm observing the list some times now and it seems ODE is the tool I need. Now my question: I want to include the collision test to a modeller I write at the moment. But the problem are my input files: CAD data. That means I get huge triangle objects. Do you think I can use it with the tri-collider? Or has anyone a better idea (physics is not my world!)? Do i still need Opcode for the actual tri-collider code? Best regards, Patrik Müller From chris.campbell at l8tech.com Wed Nov 27 00:23:02 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Wed Nov 27 00:23:02 2002 Subject: [ODE] box-box performance Message-ID: Like Daniel says you might find that for example as a rolling box (dice maybe?) comes to a stop, it might teeter on one edge for a second before deciding which face it will eventually fall onto. At that point the kinetic energy would be near to zero. Also consider if you threw a body straight up. At some point it will have near zero kinetic energy, then start coming down. With an extremely small epsilon it might work out most of the time but I think it's safer to judge by distance travelled/over a few consecutive time steps. ChrisC > > there are situation where for example a box can stay on an edge. To > > avoid this you have to take time in concideration. > > Instead of time, could this take "stability" into account instead? > > e.g. something like this: > > if( > (body.KineticEnergy() < epsilon) // i.e. velocity ~= 0 > && > (body.PotentialEnergyRelativeTo(body_it_is_contacting) < epsilon) > // i.e. it isn't going to change on us on its own. > ) > { > // "Freeze" body until something hits it etc. > // ... > } > > Seems to me that this would be pretty much foolproof, and better yet > instantaneously-acting; there'd be no need to wait until you > were reasonably > sure the body had "really" stopped moving, you could lock the > body down as soon > as these conditions became true and know you were doing the > right thing. Or is > there a conceptual or implementational issue here I'm missing? From russ at q12.org Wed Nov 27 01:23:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 01:23:02 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <931545011.20021127103524@glassegg.com> References: <20021126190026.00c5f3ed.russ@q12.org> <931545011.20021127103524@glassegg.com> Message-ID: <20021127002815.74167e9e.russ@q12.org> > It's the same for me. I'm using the latest test_buggt.cpp in CVS. i've tried a fresh checked out CVS head under both linux and windows (cygwin) and i don't see any problem. could one of you track this problem down further so that it can be fixed?? russ. -- Russell Smith http://www.q12.org From g.r.vansickle at worldnet.att.net Wed Nov 27 01:54:02 2002 From: g.r.vansickle at worldnet.att.net (Gary R. Van Sickle) Date: Wed Nov 27 01:54:02 2002 Subject: [ODE] box-box performance In-Reply-To: Message-ID: > Like Daniel says you might find that for example as a rolling box > (dice maybe?) comes to a stop, it might teeter on one edge for > a second before deciding which face it will eventually fall onto. > At that point the kinetic energy would be near to zero. Right, but the *potential* energy will not be zero. It can still move to a lower total energy state. > Also > consider if you threw a body straight up. At some point it will > have near zero kinetic energy, then start coming down. Again though, potential energy != 0. > With an extremely small epsilon it might work out most of the > time but I think it's safer to judge by distance travelled/over a > few consecutive time steps. But that's where the "lockups" tend to come from; whether it's every step or a number of steps (and how do you chose that number?), you can get into a wildly wrong physical situation. E.g., the "body straight up" problem. How long is your rocket going to sit at its apogee, say over a low-gravity planet, with velocity ~= 0, before starting to fall back? Pick a just-too-long max time before you lock it down, and the rocket stays up there forever. If it's possible to base the lockdown decision on potential energy, you will at least never get into wildly wrong situations like that; they'd at worst be "epsilon-total-energy-is-still-left wrong", which should always be less than any velocity-only-based solution. All that said, I can't offhand come up with an algorithm to do the potential-energy measurement, which would be the key to have this work at all. I would think it would involve some relation between the center of mass, any contacts, and the total forces & torques applied at each timestep. But as is all too often the case, more thinking required.... -- Gary R. Van Sickle Brewer. Patriot. > > > there are situation where for example a box can stay on an edge. To > > > avoid this you have to take time in concideration. > > > > Instead of time, could this take "stability" into account instead? > > > > e.g. something like this: > > > > if( > > (body.KineticEnergy() < epsilon) // i.e. velocity ~= 0 > > && > > (body.PotentialEnergyRelativeTo(body_it_is_contacting) < epsilon) > > // i.e. it isn't going to change on us on its own. > > ) > > { > > // "Freeze" body until something hits it etc. > > // ... > > } > > > > Seems to me that this would be pretty much foolproof, and better yet > > instantaneously-acting; there'd be no need to wait until you > > were reasonably > > sure the body had "really" stopped moving, you could lock the > > body down as soon > > as these conditions became true and know you were doing the > > right thing. Or is > > there a conceptual or implementational issue here I'm missing? > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode From slipch Wed Nov 27 01:55:01 2002 From: slipch (slipch) Date: Wed Nov 27 01:55:01 2002 Subject: Re[2]: [ODE] using dCreateGeomClass in the last ode version Message-ID: <1044162224.20021127105729@gsc-game.kiev.ua> Hello Russ, Tuesday, November 26, 2002, 8:55:31 PM, you wrote: RS> i don't know what problem you are talking about - can you describe it more RS> precisely? but the new collision system uses constant class numbers, not RS> variable class numbers, so this should not be a problem (except perhaps RS> for user defined classes set up through the C API??). Yes, I mean user definite classes. When I create geometry class ////////////////////////////////////////////// dGeomClass c; c.bytes = sizeof (dxCylinder); c.collider = &dMyClassColliderFn; c.aabb = &dMyClassAABB; c.aabb_test = 0; c.dtor = 0; dMyClass=dCreateGeomClass (&c); ////////////////////////////////////////// static dColliderFn * dMyClassColliderFn (int num) { if (num == dBoxClass) return (dColliderFn *) &dCollideMyClassBox; if (num == dSphereClass) return (dColliderFn *) &dCollideMyClasSphere; if (num == dMyClass) return (dColliderFn *)&dCollideMyClassMyClass; if (num == dPlaneClass) return (dColliderFn *) &dCollideMyClassPlane; return 0; } dMyClassColliderFn do not return dCollideMyClassMyClass in dCreateGeomClass because dMyClass is not set until it return and dCollideMyClassMyClass do not set in colliders array. It is not a bug but I do not know how to set collider for MyClass - MyClass collision. -- Best regards, Konstantin Slipchenko mailto:slipch@gsc-game.kiev.ua Sorry for sometimes I use reply button by mistake :). From slipch Wed Nov 27 02:18:02 2002 From: slipch (slipch) Date: Wed Nov 27 02:18:02 2002 Subject: [ODE] unresolved external symbol __ftol2 Message-ID: <95565933.20021127112053@gsc-game.kiev.ua> Hello ODE, I can not build last ode version with MS VC 6.0. C:\SDK\odeLast\!new-ode_lib!>make link /dll /nologo /SUBSYSTEM:WINDOWS /LIBPATH:"C:\Programme\Micros~2\VC98\Lib" / def:config/msvcdefs.def Comctl32.lib kernel32.lib user32.lib gdi32.lib OpenGL32. lib Glu32.lib /OUT:lib/ode.dll ode/src/array.obj ode/src/error.obj ode/src/memor y.obj ode/src/obstack.obj ode/src/odemath.obj ode/src/matrix.obj ode/src/misc.ob j ode/src/rotation.obj ode/src/mass.obj ode/src/ode.obj ode/src/step.obj ode/src /lcp.obj ode/src/joint.obj ode/src/timer.obj ode/src/mat.obj ode/src/testing.obj ode/src/collision_kernel.obj ode/src/collision_util.obj ode/src/collision_std.o bj ode/src/collision_space.obj ode/src/collision_transform.obj ode/src/fastldlt. obj ode/src/fastlsolve.obj ode/src/fastltsolve.obj ode/src/fastdot.obj Creating library lib/ode.lib and object lib/ode.exp LINK : warning LNK4049: locally defined symbol "_dInfinityValue" imported misc.obj : error LNK2001: unresolved external symbol __ftol2 collision_space.obj : error LNK2001: unresolved external symbol __ftol2 lib/ode.dll : fatal error LNK1120: 1 unresolved externals make: *** [lib/ode.lib] Error 1120 I also can not find any reference on even occurrence of "__ftol2". I will very appreciate any suggestion. -- Best regards, slipch mailto:slipch@gsc-game.kiev.ua From slipch Wed Nov 27 02:21:02 2002 From: slipch (slipch) Date: Wed Nov 27 02:21:02 2002 Subject: [ODE] unresolved external symbol __ftol2 In-Reply-To: <95565933.20021127112053@gsc-game.kiev.ua> References: <95565933.20021127112053@gsc-game.kiev.ua> Message-ID: <835760062.20021127112407@gsc-game.kiev.ua> Hello ODE, I can not build last ode version with MS VC 6.0. C:\SDK\odeLast\!new-ode_lib!>make link /dll /nologo /SUBSYSTEM:WINDOWS /LIBPATH:"C:\Programme\Micros~2\VC98\Lib" / def:config/msvcdefs.def Comctl32.lib kernel32.lib user32.lib gdi32.lib OpenGL32. lib Glu32.lib /OUT:lib/ode.dll ode/src/array.obj ode/src/error.obj ode/src/memor y.obj ode/src/obstack.obj ode/src/odemath.obj ode/src/matrix.obj ode/src/misc.ob j ode/src/rotation.obj ode/src/mass.obj ode/src/ode.obj ode/src/step.obj ode/src /lcp.obj ode/src/joint.obj ode/src/timer.obj ode/src/mat.obj ode/src/testing.obj ode/src/collision_kernel.obj ode/src/collision_util.obj ode/src/collision_std.o bj ode/src/collision_space.obj ode/src/collision_transform.obj ode/src/fastldlt. obj ode/src/fastlsolve.obj ode/src/fastltsolve.obj ode/src/fastdot.obj Creating library lib/ode.lib and object lib/ode.exp LINK : warning LNK4049: locally defined symbol "_dInfinityValue" imported misc.obj : error LNK2001: unresolved external symbol __ftol2 collision_space.obj : error LNK2001: unresolved external symbol __ftol2 lib/ode.dll : fatal error LNK1120: 1 unresolved externals make: *** [lib/ode.lib] Error 1120 I also can not find any reference or even occurrence of "__ftol2". I will very appreciate any suggestion. -- Best regards, slipch mailto:slipch@gsc-game.kiev.ua From anselm at hook.org Wed Nov 27 04:21:02 2002 From: anselm at hook.org (Anselm Hook) Date: Wed Nov 27 04:21:02 2002 Subject: [ODE] networking demo In-Reply-To: <20021127002815.74167e9e.russ@q12.org> Message-ID: Hi all, I'm playing around with a little networking demo that is gradually getting better. Now it networks all the state of the little cars including the user events - this makes it fairly smooth. Also it uses udp - although I still have a defect in that area which will prevent more than 2 connections at a time (you can turn off udp though and have an arbitrary number of clients). http://hook.org/anselm/test_buggy.cpp Next I have to do compression, blending, distance attenuation and a few things like that... In any case some of you may find it interesting. - a From mama7121 at student.uu.se Wed Nov 27 04:28:01 2002 From: mama7121 at student.uu.se (Martin Magnusson) Date: Wed Nov 27 04:28:01 2002 Subject: [ODE] operator new undefined link cygwin gcc References: Message-ID: <3DE4AC0E.3070304@student.uu.se> OK, thanks for your help everybody. After creating lib/ manually both configurator and ode-lib compile properly (although with a couple of warnings about multi line strings and one or two unused variables), but when it comes to ode-test and drawstuff-test I get undefined references to new[] (when I compile with gcc in Cygwin/Windows). lib/libdrawstuff.a(drawstuff.o)(.text+0x393):drawstuff.cpp: undefined reference to `operator new[](unsigned)' Anselm Hook wrote: > For the default compiler in makefile.cygwin to be g++ you have to wrap > extern "C" { } around your includes in the configurator source. Also just > remove exit() - it isn't important. The configurator could be generalized > to support this overall but I guess it's pretty obvious. I wrapped the entire configurator.c in #ifdef __cplusplus extern "C" { #endif ... #ifdef __cplusplus } #endif #endif and commented out the exit() line, but that didn't help (g++ complained about the system() calls in configurator.c and lots of other stuff as well). I installed Cygwin a couple of days ago, so it should be recent enough. My ./include/ode/config.h looks like this - if that matters: == config.h: ========================================================= /* per-machine configuration. this file is automatically generated. */ #ifndef _ODE_CONFIG_H_ #define _ODE_CONFIG_H_ /* shared lib definitions */ #ifndef SHAREDLIBIMPORT #define SHAREDLIBIMPORT #endif #ifndef SHAREDLIBEXPORT #define SHAREDLIBEXPORT #endif /* standard system headers */ #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* is this a pentium on a gcc-based platform? */ #define PENTIUM 1 /* integer types (we assume int >= 32 bits) */ typedef char int8; typedef unsigned char uint8; typedef int int32; typedef unsigned int uint32; /* an integer type that we can safely cast a pointer to and * from without loss of bits. */ typedef unsigned int intP; /* select the base floating point type */ #define dDOUBLE 1 /* the floating point infinity */ #define DINFINITY_DECL SHAREDLIBEXPORT union dInfBytes dInfinityValue = {{0,0,0,0,0,0,0xf0,0x7f}}; #if defined SHARED_CONFIG_H_INCLUDED_FROM_DEFINING_FILE #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBEXPORT #else #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBIMPORT #endif union dInfBytes { unsigned char c[8]; double d; }; extern GLOBAL_SHAREDLIB_SPEC union dInfBytes dInfinityValue; #define dInfinity (dInfinityValue.d) #undef GLOBAL_SHAREDLIB_SPEC /* ODE feature configuration */ #ifdef __cplusplus } #endif #endif ====================================================================== / Martin Magnusson From harleybl at hotmail.com Wed Nov 27 08:51:02 2002 From: harleybl at hotmail.com (Harley Blumenfeld) Date: Wed Nov 27 08:51:02 2002 Subject: [ODE] Unhandled exception - access violation Message-ID:


Yes I am using an unaltered version of test_buggy.cpp. I just recopied it from test to make sure.

Yes the error is happening within dGeomDestroy( box[ 0 ] );

Here is what the stack looks like when it happens ( from MSVC Context: bar )

MYBUGGY! dxGeom::bodyRemove( void )

MYBUGGY! dxGeom::~dxGeom( void )

MYBUGGY! dxBox::~dxBox( void )

MYBUGGY! dxBox: `vector deleting destructor'(unsigned int )

MYBUGGY! dxGeomDestroy

I tried the solution of moving the dGeomDestroy code to the first line after dsSimulationLoop and that seemed to work... is there a specific ordering in which things should be deleted?

-Harley Blumenfeld

 

 


 

>From: Russ Smith
>To: "Harley Blumenfeld"
>CC: ode@q12.org
>Subject: Re: [ODE] Unhandled exception - access violation
>Date: Tue, 26 Nov 2002 19:00:26 -0500
>
>
> > It seems to be happening when the box is destroyed in the line
> > dGeomDestroy( box[0] );
>
>is the error happening within dGeomDestroy() or within main(). are you
>using an unaltered copy of test_buggy?
>
>russ.
>
>--
>Russell Smith
>http://www.q12.org


Protect your PC - Click here for McAfee.com VirusScan Online From thomas_buehrmann at web.de Wed Nov 27 09:31:02 2002 From: thomas_buehrmann at web.de (Thomas Buehmann) Date: Wed Nov 27 09:31:02 2002 Subject: [ODE] drawstuff problems: "pulsating" spheres Message-ID: <200211271630.gARGULX20996@mailgate5.cinetic.de> hi, i get some weird looking spheres if i encapsulate my models as well as the world and space in c++ classes. The first object(consisting of several bodies and spheres) looks fine, but if i add another object to the world its spheres look as if there are shadows rotating around them. the speed of that rotatiion is somehow depend on the first object in the world. is that anything i got wrong about drawstuff? thanks for help, thomas. ______________________________________________________________________________ Schon wieder Viren-Alarm? Bei WEB.DE FreeMail ist das kein Problem, hier ist der Virencheck inklusive! http://freemail.web.de/features/?mc=021158 From tirobu at gmx.de Wed Nov 27 10:22:01 2002 From: tirobu at gmx.de (Tim) Date: Wed Nov 27 10:22:01 2002 Subject: [ODE] compiling CVS Message-ID: <003b01c29639$5a4886c0$0200a8c0@P4> This is a multi-part message in MIME format. ------=_NextPart_000_0038_01C29641.BBA6B2E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello. I want to use ODE - but I don=B4t get it compiled... I am using Windows (msvc) and modified the user-settings.example file as it is explained in the howto. For sure I made a copy of this file and renamed it to user-settings. Now I wanted to use the just downloaded GNU make for windows file to compile as it is explained in the manual. But when I try "make configure" I get the following error message: cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT=3D /DSHAREDLIBIMPORT=3D = /DdDOUBLE /DdDE BUG_ALLOC /DODE_OLD_COLLISION /Feconfigurator.exe configurator.c process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT =3D /DSHAREDLIBIMPORT=3D /DdDOUBLE /DdDEBUG_ALLOC /DODE_OLD_COLLISION /Feconfigurato r.exe configurator.c, ...) failed. make (e=3D2): The system can not find the specifed file make: *** [configurator.exe] Error 2 I tried several things but nothing helped! Hope someone can help me! Thanks a lot, Tim. ------=_NextPart_000_0038_01C29641.BBA6B2E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello.

I want to use ODE - but I don=B4t get it = compiled...
I am=20 using Windows (msvc) and modified the user-settings.example
file as = it is=20 explained in the howto. For sure I made a copy of this
file and = renamed it to=20 user-settings.

Now I wanted to use the just downloaded GNU make = for=20 windows file
to compile as it is explained in the manual. But when I=20 try
"make configure"
I get the following error message:

cl = /nologo=20 /DWIN32 /DMSVC /DSHAREDLIBEXPORT=3D /DSHAREDLIBIMPORT=3D=20 /DdDOUBLE
/DdDE
BUG_ALLOC /DODE_OLD_COLLISION /Feconfigurator.exe=20 configurator.c
process_begin: CreateProcess((null), cl /nologo = /DWIN32=20 /DMSVC
/DSHAREDLIBEXPORT
=3D /DSHAREDLIBIMPORT=3D /DdDOUBLE = /DdDEBUG_ALLOC=20 /DODE_OLD_COLLISION
/Feconfigurato
r.exe configurator.c, ...)=20 failed.
make (e=3D2): The system can not find the specifed = file
make: ***=20 [configurator.exe] Error 2

I tried several things but nothing=20 helped!
Hope someone can help me!
Thanks a lot, = Tim.
------=_NextPart_000_0038_01C29641.BBA6B2E0-- From leaf at tataput.com Wed Nov 27 10:39:02 2002 From: leaf at tataput.com (Leaf Garland) Date: Wed Nov 27 10:39:02 2002 Subject: [ODE] compiling CVS In-Reply-To: <003b01c29639$5a4886c0$0200a8c0@P4> Message-ID: <001c01c2963b$da7b0f50$8e130750@mumu> I noticed this same problem when compiling on one pc, but not on another. Strange. Anyway I fixed it by adding the ode dir to the path. Eg. PATH=%PATH%;c:\dev\ode I also had to create the ode/lib dir, as mentioned in a previous post, and change a line in test_boxstack.cpp where there were two "for(int i..." in the same function, which msvc6 can't handle. Cheers, Leaf. -----Original Message----- From: ode-admin@q12.org [mailto:ode-admin@q12.org] On Behalf Of Tim Sent: 27 November 2002 17:21 To: ode@q12.org Subject: [ODE] compiling CVS Hello. I want to use ODE - but I don´t get it compiled... I am using Windows (msvc) and modified the user-settings.example file as it is explained in the howto. For sure I made a copy of this file and renamed it to user-settings. Now I wanted to use the just downloaded GNU make for windows file to compile as it is explained in the manual. But when I try "make configure" I get the following error message: cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= /DdDOUBLE /DdDE BUG_ALLOC /DODE_OLD_COLLISION /Feconfigurator.exe configurator.c process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT = /DSHAREDLIBIMPORT= /DdDOUBLE /DdDEBUG_ALLOC /DODE_OLD_COLLISION /Feconfigurato r.exe configurator.c, ...) failed. make (e=2): The system can not find the specifed file make: *** [configurator.exe] Error 2 I tried several things but nothing helped! Hope someone can help me! Thanks a lot, Tim. From baas at ira.uka.de Wed Nov 27 10:57:01 2002 From: baas at ira.uka.de (Matthias Baas) Date: Wed Nov 27 10:57:01 2002 Subject: [ODE] compiling CVS In-Reply-To: <003b01c29639$5a4886c0$0200a8c0@P4> Message-ID: <5.1.0.14.0.20021127184821.00cdaa68@i31i33mail.informatik.uni-karlsruhe.de> At 18:20 27.11.2002 +0100, you wrote: >r.exe configurator.c, ...) failed. >make (e=2): The system can not find the specifed file >make: *** [configurator.exe] Error 2 Looks like the same problem I had, too. It can be fixed with a little modification in the Makefile. Change the line CONFIGURATOR_SRC=configurator.c into the following: CONFIGURATOR_SRC=./configurator.c BTW, would it be possible to do this small modification in the cvs tree? (I hope it won't break any other build processes...) - Matthias - From tirobu at gmx.de Wed Nov 27 11:17:02 2002 From: tirobu at gmx.de (Tim) Date: Wed Nov 27 11:17:02 2002 Subject: [ODE] compiling CVS Message-ID: <007b01c29641$03084730$0200a8c0@P4> This is a multi-part message in MIME format. ------=_NextPart_000_0078_01C29649.645890A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi. Thanks for your answers! Using MSVC7 I get the following error: d:\ode\ode\src\dcTriListCollider.h(4): fatal error C1083: Cannot open = include file: 'Opcode.h': No such file or directory The problem is, that there is no file named Opcode.h at all! So what about that? Thanks Tim. ------=_NextPart_000_0078_01C29649.645890A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi.
 
Thanks for your answers!
Using MSVC7 I get the following = error:
 
d:\ode\ode\src\dcTriListCollider.h(4): = fatal error=20 C1083: Cannot open include file: 'Opcode.h': No such file or=20 directory
 
The problem is, that there is no file = named=20 Opcode.h at all!
So what about that?
Thanks Tim.

------=_NextPart_000_0078_01C29649.645890A0-- From thomasharte at lycos.co.uk Wed Nov 27 11:25:02 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Wed Nov 27 11:25:02 2002 Subject: [ODE] My Latest Approach to Polyhedron Collision Management Message-ID: <1038421390011900@lycos-europe.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --=_NextPart_Lycos_0119001038421390_ID Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit >First a question/suggestion regarding the type of BSP tree - have you
>considered (or are you using) a solid-BSP tree? I would imagine that several
>vertexoverlapping tests would become unnecessary as it is sufficient to find
>a vertex that is in a "solid" (illegal) region of the tree to determine that
>a collision must have occured (thus only requiring single point tests
>against the BSP tree).

I'm no BSP expert, but I have the unfortunate problem (unavoidably so) that some of my
models include two sided polygons - i.e. infinitely flat sections of model. This means that
a vertex may penetrated a model but never be inside the model, and is why I am using
edge through polygon tests to detect when intersection has occurred, and applying
constraints to prevent any interpenetration _before_ it occurs. I believe this means that
solid BSPs wouldn't help me much?

>Regarding the vertices on planes problem (and sending the data down bo th BSP
>trees, twice) - won't the one traversal of a BSP tree just yield the
>inverted result of the other BSP traversal? (i.e: case 1: point penetrates
>plane; case 2: plane is penetrated by point)

If I were sending polygons down either BSP tree, this would be true, but if I send
polygons down then I usually have a worse set of bounding hierarchies, leading to
greater inefficiency that way, and it is also more work to make sure I am not testing my
vertices many times. Therefore I send down just the vertices. In doing so, 1 BSP
traversal only checks for when the vertices of one model are rubbing against the
polygons of the other, and in fact I care about when vertices from either model are
rubbing against polygons from the other, leading me to do two traversals in the current
implementation.

This is all based on 'gut feeling' rather than actual practical investigation and comparison,
and I am open to other opinions so - do you think that sending groups of polygons down
the BSP tree, and checking edges/vertices as they are implicitly defined by virtue of the
polygons in question and not worrying too much about doing the same tests multiple
times, or indeed implementing a safeguard against repeated testing, would yield a better
implementation given that I'd save a BSP traversal? My models tend to be 'simple'.

-Thomas

------------------------------------------------------
BA flight sale now at www.lycos.co.uk
Boston, £129 rtn. including tax, Wednesday, 1pm --=_NextPart_Lycos_0119001038421390_ID-- From nnevatie at welho.com Wed Nov 27 11:39:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Wed Nov 27 11:39:02 2002 Subject: [ODE] compiling CVS References: <007b01c29641$03084730$0200a8c0@P4> Message-ID: <001201c29642$bc6b9410$3abdf3d5@wli> Go to: http://www.codercorner.com/Opcode.htm Opcode is an external package specializing in collision detection. I have succesfully used the version 1.2. Compile Opcode to another lib and link with ODE. Cheers ----- Original Message ----- From: "Tim" To: Sent: Wednesday, November 27, 2002 8:15 PM Subject: [ODE] compiling CVS Hi. Thanks for your answers! Using MSVC7 I get the following error: d:\ode\ode\src\dcTriListCollider.h(4): fatal error C1083: Cannot open include file: 'Opcode.h': No such file or directory The problem is, that there is no file named Opcode.h at all! So what about that? Thanks Tim. From thomasharte at lycos.co.uk Wed Nov 27 11:39:44 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Wed Nov 27 11:39:44 2002 Subject: [ODE] Contact Constraints: First Order Slip? Message-ID: <1038421837001983@lycos-europe.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --=_NextPart_Lycos_0019831038421837_ID Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Can anyone explain to me the purpose of the first order slip variables within the dSurfaceParameters structure contained within the dContact structre, used when establishing a contact constraint? My understanding of slip is that it is the difference between the linear velocity a particle wants to travel at by virtue of the body it is attached to, and the speed at which it is travelling over a surface. In the general case, the coefficient of friction is a function of slip - although often it isn't related to slip at all. E.g. if we have a box scraping along a surface, the slip is simply the linear velocity of the body. However, if we are talking about a car wheel, then the slip is the difference between the linear velocity of the outside of the tyre and the speed at which the wheel is moving along the ground. This is important for rubber tyres because the coefficient of friction for rubber is most certainly a function of slip, and a fairly interesting one at that. Anyway, I therefore don't see why I must express 'first order slip', surely ODE already has enough information to calculate it internally? I notice the paramter is described next to the relevant contact flag simply as 'slip', and only later by the corresponding dReal as 'first order slip'. It therefore strikes me that it is probably not asking me for the first order differential of slip (e.g. if the motor attached to my car wheel is changing speed) in order to help with numerical accuracy regarding the discrete model of time. But perhaps that is exactly what it is asking me for? One thing I can understand from the documentation : "this needs more description". -Thomas ------------------------------------------------------ BA flight sale now at http://www.lycos.co.uk. Boston, =A3129 rtn. including tax, Wednesday, 1pm --=_NextPart_Lycos_0019831038421837_ID-- From maddocks at metservice.com Wed Nov 27 12:45:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Wed Nov 27 12:45:02 2002 Subject: [ODE] ODE/Tricollider on linux? Message-ID: <8C058A1A-0240-11D7-92B8-00039394FB86@metservice.com> I did some initial work on a port to gcc (MAC OS X) based on Opcode from the F4 engine. It should work for linux without much hassle. I asked for feedback but no one seemed interested. You can download what I did from... http://homepages.paradise.net.nz/henryj/code/index.html Tricollider has been updated since then, but I'm not going to do anymore until tricollider is integrated because the VCC code is a nightmare. Henry On Wednesday, November 27, 2002, at 11:29 AM, Jeffrey Palmer wrote: > Hello all, > > I was wondering if anyone has gotten ODE and the tricollider code (I > tried the stuff in the NewStuff email to no avail) working under Linux? > > Alternatively, I understand that the tri code is currently being > integrated with ODE - is that in the CVS version yet? If not, is it > bothersome to ask for an ETA? > > I guess I'm just lazy - I'm sort of unwilling to port everything to > linux if it's *about* to be released. ;) > > Thanks, > > - j > > -- > The river is moving. > The blackbird must be flying. > > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From russ at q12.org Wed Nov 27 20:55:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 20:55:02 2002 Subject: Re[2]: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <1044162224.20021127105729@gsc-game.kiev.ua> References: <1044162224.20021127105729@gsc-game.kiev.ua> Message-ID: <20021127195951.0c303209.russ@q12.org> > dMyClassColliderFn do not return dCollideMyClassMyClass in > dCreateGeomClass because dMyClass is not set until it return and > dCollideMyClassMyClass do not set in colliders array. ah yes ... i see the problem. i have fixed the code in collision_kernel.cpp. but i don't have a good test case for this right now - i would appreciate if you can try it out and report any problems. russ. -- Russell Smith http://www.q12.org From russ at q12.org Wed Nov 27 21:15:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 21:15:02 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: References: Message-ID: <20021127202012.0ef3615c.russ@q12.org> > Yes the error is happening within dGeomDestroy( box[ 0 ] ); > Here is what the stack looks like when it happens ( from MSVC Context: > bar ) okay, i've found the issue i think. when dBodyDestroy() is being called it was not notifying any attached geoms that it is going to disappear, so when those geoms are destroyed they try to remove themselves from nonexistant linked lists. it's a classic 'accessing freed memory' bug. update from CVS and try it again. let me know what happens. russ. -- Russell Smith http://www.q12.org From nnevatie at welho.com Wed Nov 27 23:13:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Wed Nov 27 23:13:02 2002 Subject: [ODE] Tricollider status clarification Message-ID: <000901c296a5$2bd0f540$3abdf3d5@wli> I'm trying to figure out which one of the many triangle collider combinations associated with ODE is the newest, the fastest or otherwise the best one currently: - ODE 0.03 release package (ODE 0.03 + tricollider in contrib/tri-collider directory) - Current CVS head version (ODE in CVS or ODE 0.0.3 + tricollider in contrib/tri-collider CVS directory) - Erwin's newstuff.gz + patch sent later (both sent to mailing list August-September) (ODE in CVS or ODE 0.0.3) Future development of the triangle collider? How about Opcode? Does the newest version 1.2 work OK with the triangle colliders? If you have tested some or all of these combinations, please share your experiences. Keep up the good work! Cheers From russ at q12.org Wed Nov 27 23:29:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 23:29:02 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: <1038421837001983@lycos-europe.com> References: <1038421837001983@lycos-europe.com> Message-ID: <20021127223342.4a68a6cc.russ@q12.org> > One thing I can understand from the documentation : "this needs more > description". i started to write a long email reply about this then realized that was dumb - i updated the documentation instead. look at the latest userguide, section "7.3.7. Contact" - there a bigger description of the slip parameters. in hindsight calling these numbers 'slip' was a mistake because 'slip' is such an overloaded word in ODE - i should have called them 'FDS' or something else. there's no pictures to accompany the description although there should be ... unfortunately drawing pictures takes a lot of time that i don't have :( russ. -- Russell Smith http://www.q12.org From Nguyen Binh Wed Nov 27 23:35:03 2002 From: Nguyen Binh (Nguyen Binh) Date: Wed Nov 27 23:35:03 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <20021127202012.0ef3615c.russ@q12.org> References: <20021127202012.0ef3615c.russ@q12.org> Message-ID: <6311874734.20021128133956@glassegg.com> Hi , RS> okay, i've found the issue i think. when dBodyDestroy() is being called RS> it was not notifying any attached geoms that it is going to disappear, so RS> when those geoms are destroyed they try to remove themselves from RS> nonexistant linked lists. it's a classic 'accessing freed memory' bug. I think we should follow the FIFO-style in new / delete . We create World first so destroy it last. Then if we move the DestroyGeom to front, everything's OK. RS> update from CVS and try it again. let me know what happens. RS> russ. -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media E.Town Building 7th Floor, 364 CongHoa Street Tan Binh District, HoChiMinh City, VietNam, Phone : +84 8 8109018 Fax : +84 8 8109013 www.glassegg.com --------------------------------------------------------------------- From russ at q12.org Wed Nov 27 23:39:01 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 23:39:01 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <6311874734.20021128133956@glassegg.com> References: <20021127202012.0ef3615c.russ@q12.org> <6311874734.20021128133956@glassegg.com> Message-ID: <20021127224341.55bb6de6.russ@q12.org> > I think we should follow the FIFO-style in new / delete . > We create World first so destroy it last. Then if we move the > DestroyGeom to front, everything's OK. sure, but geoms and bodys can be created/destroyed independently of each other, so ODE should handle whatever order you chose to destroy geoms in. russ. -- Russell Smith http://www.q12.org From russ at q12.org Wed Nov 27 23:44:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 23:44:02 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: <20021127223342.4a68a6cc.russ@q12.org> References: <1038421837001983@lycos-europe.com> <20021127223342.4a68a6cc.russ@q12.org> Message-ID: <20021127224824.3a373168.russ@q12.org> it has just occured to me ... i can't think of any ODE base vehicle sim that actually takes full advantage of ODE's contact modeling capabilities to model different road surfaces. asphalt, concrete, gravel, ice and mud will all have different mu, slip(FDS), soft_cfm and soft_erp parameters. there's potential here for somebody to do a really good job... russ. -- Russell Smith http://www.q12.org From anselm at hook.org Thu Nov 28 00:46:02 2002 From: anselm at hook.org (Anselm Hook) Date: Thu Nov 28 00:46:02 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: <20021127224824.3a373168.russ@q12.org> Message-ID: Hi Russ, What about finding a way to generalize material properties such that contacts could be generated automatically? I'd sure enjoy finding a way to remove the collision callback. In your opinion is this really such a difficult problem or is there some way that the intersection of material properties could be computed reasonably - say as a third party contrib item? One would have to be able to say that a surface is ice, or velcro, or rubber, or gravel and then calculate reasonable mu, slip, soft_cfm, soft_erp out of the intersection of each pair. Even if this can't be automated maybe common intersections could be manually defined by the community and added or maintained as a contribs lib...? - a On Wed, 27 Nov 2002, Russ Smith wrote: > > it has just occured to me ... i can't think of any ODE base vehicle sim > that actually takes full advantage of ODE's contact modeling > capabilities to model different road surfaces. asphalt, concrete, > gravel, ice and mud will all have different mu, slip(FDS), soft_cfm and > soft_erp parameters. there's potential here for somebody to do a really > good job... > > russ. > > -- > Russell Smith > http://www.q12.org > _______________________________________________ > ODE mailing list > ODE@q12.org > http://q12.org/mailman/listinfo/ode > From slipch Thu Nov 28 02:56:02 2002 From: slipch (slipch) Date: Thu Nov 28 02:56:02 2002 Subject: Re[4]: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <20021127195951.0c303209.russ@q12.org> References: <1044162224.20021127105729@gsc-game.kiev.ua> <20021127195951.0c303209.russ@q12.org> Message-ID: <1086558160.20021128115858@gsc-game.kiev.ua> Hello Russ, Thursday, November 28, 2002, 2:59:51 AM, you wrote: RS> ah yes ... i see the problem. i have fixed the code in RS> collision_kernel.cpp. but i don't have a good test case RS> for this right now - i would appreciate if you can try RS> it out and report any problems. RS> russ. Seems it works all right. But one problem still remains for user definite geometry classes. If I have some user definite classes it always necessary to support right sequence of their creating or colliders would not be set in colliders array again. Of course I can register all user classes in right order before start my simulation. But if I want to support ode stile of creating geometry classes when creating geometries, it is very inconvenient. Why not open setCollider function? It may be useful to have a possibility even reset colliders for all classes. -- Best regards, Konstantin Slipchenko mailto:slipch@gsc-game.kiev.ua From jon_lgridge at hotmail.com Thu Nov 28 06:35:02 2002 From: jon_lgridge at hotmail.com (Jonathan Langridge) Date: Thu Nov 28 06:35:02 2002 Subject: [ODE] Re: Contact Constraints: First Order Slip? Message-ID: As far as I can tell from experimentation, "slip" as defined in the ODE interface is sort of fudge factor. Instead of trying to pull the relative velocities of touching surfaces towards zero by friction, the system will only pull them towards a relative velocity of "slip". In other words, a sliding box will be slowed down until it reaches slip velocity, then it will continue to slide at that velocity forever. I guess this helps simplify constraint calculations. (note: somebody scream if this explanation is rubbish!) On the topic of contacts, I've thought of a couple of things that would help a fair bit in the usual car game that everyone makes with ODE. Since I find the source code fairly impenetrable (Jacobian matrix??) I can't yet implement this stuff myself, but perhaps others will agree that: + it would be nice to have an accurate (conical) friction model available, even if this caused a big performance hit. When objects are near the friction force limit, dependance on friction axes can be quite noticeable. + some feedback from contact joints would be good. For example, the normal force that has been used to correct object velocities (or would normal impulse be more appropriate?) in order to choose appropriate impact sound effect volume. Also, an indication of how much friction force was used (two applications: switching to dynamic friction, and again sound effects depending on the amount of "scraping") Maybe I'll eventually understand how ODE works and be able to code this for my lazy self ;) In the mean time however, ODE is a godsend, and great fun too! Many thanks to Russ & contributors for this masterpiece. Colas, Jon _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From ruud at marketgraph.nl Thu Nov 28 12:23:01 2002 From: ruud at marketgraph.nl (Ruud van Gaal) Date: Thu Nov 28 12:23:01 2002 Subject: [ODE] Contact Constraints: First Order Slip? Message-ID: <20C09F811939D311BA694854E86C778233E4B5@raptor> ... > it has just occured to me ... i can't think of any ODE base > vehicle sim > that actually takes full advantage of ODE's contact modeling > capabilities to model different road surfaces. asphalt, concrete, > gravel, ice and mud will all have different mu, slip(FDS), > soft_cfm and > soft_erp parameters. there's potential here for somebody to > do a really > good job... Actually, mu changes quite considerably with load, slip ratio, temperature etc. :) You would get somewhere with the above, but nothing like a Pacejka model. Ruud (www.racer.nl) From russ at q12.org Thu Nov 28 13:43:01 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 13:43:01 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: References: <20021127224824.3a373168.russ@q12.org> Message-ID: <20021128124744.1d9badff.russ@q12.org> > What about finding a way to generalize material properties such that > contacts could be generated automatically? the trouble is, there are many schemes for generating contact parameters from material properties, and most of the useful schemes are rather ad-hoc. it's impossible to come up with a single scheme that will please everybody. the near-callback provides a convenient place to compute contact parameters, and this is also where contact culling decisions can be made. the alternative to a near-callback is a "get list of all potentially colliding objects" function - but then you have the problem of the caller having to allocate a maximum size return array. consider the case where only 10% of near object-object cases will lead to contacts - the user is required to allocate an array of 10 times the potential maximum number of object-object intersections - not always an easy thing to do. russ. -- Russell Smith http://www.q12.org From c.haarmeijer at keepitsimple.nl Thu Nov 28 13:48:02 2002 From: c.haarmeijer at keepitsimple.nl (Chris Haarmeijer) Date: Thu Nov 28 13:48:02 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: <20021127224341.55bb6de6.russ@q12.org> Message-ID: Why not use reference counting on objects? This way, objects are freed whenever they're not in use anymore.... Chris -----Original Message----- From: ode-admin@q12.org [mailto:ode-admin@q12.org]On Behalf Of Russ Smith Sent: donderdag 28 november 2002 4:44 To: Nguyen Binh Cc: ode@q12.org Subject: Re: Re[2]: [ODE] Unhandled exception - access violation > I think we should follow the FIFO-style in new / delete . > We create World first so destroy it last. Then if we move the > DestroyGeom to front, everything's OK. sure, but geoms and bodys can be created/destroyed independently of each other, so ODE should handle whatever order you chose to destroy geoms in. russ. -- Russell Smith http://www.q12.org _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From russ at q12.org Thu Nov 28 13:56:01 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 13:56:01 2002 Subject: [ODE] Re: Contact Constraints: First Order Slip? In-Reply-To: References: Message-ID: <20021128130045.24a94b37.russ@q12.org> > In other words, a sliding box will be slowed down until it reaches > slip velocity, then it will continue to slide at that velocity > forever. I guess this helps simplify constraint calculations. ermmm ... it might look that way, but this is the wrong way to interpret things. see the recently updated documentation. > + it would be nice to have an accurate (conical) friction model yes it would be nice - but it's rather hard to implement the way that ODE is designed right now. but for most applications the friction pyramid approximation model is visually indistinguishable from the real thing. > + some feedback from contact joints would be good. this is not so hard to implement, there is already a dJointSetFeedback() function that provides some information, but this is not exactly what you want. it's on my to-do list to extend dJointSetFeedback() to provide the computed force values *before* they are applied to bodies, so that you can get contact normal force, motor force, etc. russ. -- Russell Smith http://www.q12.org From russ at q12.org Thu Nov 28 13:58:02 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 13:58:02 2002 Subject: Re[2]: [ODE] Unhandled exception - access violation In-Reply-To: References: <20021127224341.55bb6de6.russ@q12.org> Message-ID: <20021128130304.7cef8101.russ@q12.org> > Why not use reference counting on objects? This way, objects are freed > whenever they're not in use anymore.... this is not the point. we *want* be able to forcibly remove a body when it's still referenced by a geom. russ. -- Russell Smith http://www.q12.org From russ at q12.org Thu Nov 28 14:05:02 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 14:05:02 2002 Subject: Re[4]: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <1086558160.20021128115858@gsc-game.kiev.ua> References: <1044162224.20021127105729@gsc-game.kiev.ua> <20021127195951.0c303209.russ@q12.org> <1086558160.20021128115858@gsc-game.kiev.ua> Message-ID: <20021128130914.3a2ad978.russ@q12.org> > Seems it works all right. good. > But one problem still remains for user definite geometry classes. > If I have some user definite classes it always necessary to support > right sequence of their creating or colliders would not be set in > colliders array again. Of course I can register all user classes in > right order before start my simulation. But if I want to support > ode stile of creating geometry classes when creating geometries, it is > very inconvenient. can you show me a situation that fails? - because i thought i had allowed for arbitrary creation order. dCreateGeomClass() sets a default collider (dCollideUserGeomWithGeom) and does not call the supplied colliders function. it returns the geom class number. the collider function is only referenced by dCollideUserGeomWithGeom() ... so i don't see how creation order makes any difference. > Why not open setCollider function? this is not a good option, because this function exposes some of the internals of the way dCollide() works. exposing this will prevent any further major overhaul of the collision system (not that i have one planned). russ. -- Russell Smith http://www.q12.org From dmcclurg at pandemicstudios.com.au Thu Nov 28 17:35:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 28 17:35:02 2002 Subject: [ODE] new ODE collision Message-ID: should it be allowable to have an empty space in another space? it is convenient for my application because i add/remove geoms to/from groups on the fly to optimize collisions. if it's ok and i'm pretty sure it used to work with an empty group inside a hash space, then i think there is a problem. currently, i get a floating point invalid operation in findLevel() because q=dInfinity frexp (q,&level); this is because the AABB for an empty group (ie, simple space) is set to infinities in dxSpace::computeAABB() in collision_space.cpp From dmcclurg at pandemicstudios.com.au Thu Nov 28 17:44:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 28 17:44:02 2002 Subject: [ODE] new ODE collision Message-ID: In findLevel(), just check for -dInfinity too because... bounds[0] == dInfinity; bounds[1] == -dInfinity; (bounds[1] - bounds[0]) => -dInfinity Here's the patch to findLevel(): static int findLevel (dReal bounds[6]) { // compute q dReal q,q2; q = bounds[1] - bounds[0]; // x bounds q2 = bounds[3] - bounds[2]; // y bounds if (q2 > q) q = q2; q2 = bounds[5] - bounds[4]; // z bounds if (q2 > q) q = q2; if (q == dInfinity || q == -dInfinity) return MAXINT; // find level such that 0.5 * 2^level < q <= 2^level int level; frexp (q,&level); // q = (0.5 .. 1.0) * 2^level (definition of frexp) return level; } -----Original Message----- From: David McClurg Sent: Friday, 29 November 2002 10:34 AM To: ode@q12.org Subject: RE: [ODE] new ODE collision should it be allowable to have an empty space in another space? it is convenient for my application because i add/remove geoms to/from groups on the fly to optimize collisions. if it's ok and i'm pretty sure it used to work with an empty group inside a hash space, then i think there is a problem. currently, i get a floating point invalid operation in findLevel() because q=dInfinity frexp (q,&level); this is because the AABB for an empty group (ie, simple space) is set to infinities in dxSpace::computeAABB() in collision_space.cpp _______________________________________________ ODE mailing list ODE@q12.org http://q12.org/mailman/listinfo/ode From coding at natew.com Fri Nov 29 00:33:01 2002 From: coding at natew.com (Nate W) Date: Fri Nov 29 00:33:01 2002 Subject: [ODE] Contacts and materials In-Reply-To: Message-ID: On Thu, 28 Nov 2002, Anselm Hook wrote: > What about finding a way to generalize material properties such that > contacts could be generated automatically? I'd sure enjoy finding a way > to remove the collision callback. As would I - probably because I've been having fun with C# and I'm eager to put your wrappers to work. :-) Here's how I was thinking the problem might be approached: The wrapper (your C# wrapper, or probably any wrapper) would define a material data structure, something like: typedef struct { void *pUserData; dReal Mu; dReal Bounce; dReal SoftERP; dReal SoftCFM; // etc } Material; All geom objects would have Material pointers in their dGeomGetData / dGeomSetData members, and the wrapper would implement those methods as follows: // GetData implementation return ((Material*) dGeomGetData())->m_Data; // SetData implementation ((Material*) dGeomGetData())->m_Data = p; Then, a wrapper-defined collision callback would work something like this: void Callback (void *, dGeomID o1, dGeomID o2) { int iCount = dCollide (o1, o2, iContacts, &contact[0].geom, sizeof (dContact)); if (iCount) { int iMax = min (iCount, iContacts); for (int iContact = 0; iContact < iMax; iContact++) { Material *pMaterial1 = null; Material *pMaterial2 = null; if (o1) pMaterial1 = dGeomGetData (o1); if (o2) pMaterial2 = dGeomGetData (o2); SetContactParameters (&contact[iContact], pMaterial1, pMaterial2); dJointID ContactJoint = dJointCreateContact (WorldID, CollisionJointGroupID, &contact[iContact]); dJointAttach (ContactJoint, Body1, Body2); } } } The implementation of SetContactParameters is left as an exercise for the reader. :-) But, as Anselm suggested, I think it would make a nice contrib. It would make the C# wrapper considerably more useful, and would probably be helpful for most non-C/C++ applications that want to use ODE, since there would no longer be a need for a callback into the application language. Instead, applications would just set material properties for all of the Geoms, and the SetContactParameters method would take care of material interactions. Comments? -- Nate Waddoups Redmond WA USA http://www.natew.com From russ at q12.org Fri Nov 29 00:37:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 29 00:37:02 2002 Subject: [ODE] new ODE collision In-Reply-To: References: Message-ID: <20021128234118.0f966fb5.russ@q12.org> > In findLevel(), just check for -dInfinity too because... fixed. i also fixed the root of the problem, which is that an empty space was giving a 'backwards infinite' AABB. now it gives a zero AABB. russ. -- Russell Smith http://www.q12.org From slipch Fri Nov 29 01:20:02 2002 From: slipch (slipch) Date: Fri Nov 29 01:20:02 2002 Subject: Re[6]: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <20021128130914.3a2ad978.russ@q12.org> References: <1044162224.20021127105729@gsc-game.kiev.ua> <20021127195951.0c303209.russ@q12.org> <1086558160.20021128115858@gsc-game.kiev.ua> <20021128130914.3a2ad978.russ@q12.org> Message-ID: <992103885.20021129102325@gsc-game.kiev.ua> Hello Russ, Thursday, November 28, 2002, 8:09:14 PM, you wrote: >> Seems it works all right. RS> good. >> But one problem still remains for user definite geometry classes. >> If I have some user definite classes it always necessary to support >> right sequence of their creating or colliders would not be set in >> colliders array again. Of course I can register all user classes in >> right order before start my simulation. But if I want to support >> ode stile of creating geometry classes when creating geometries, it is >> very inconvenient. RS> can you show me a situation that fails? - because i thought i had RS> allowed for arbitrary creation order. dCreateGeomClass() sets a default RS> collider (dCollideUserGeomWithGeom) and does not call the supplied RS> colliders function. it returns the geom class number. the collider RS> function is only referenced by dCollideUserGeomWithGeom() ... so i don't RS> see how creation order makes any difference. I am sorry. It seems to be my fault. I have currently two user classes - tri-mesh and cylinders. When I move creating of tri-mesh before creating cylinders they fall through while all other things remain on tri-mesh. Before this I try cylinder - cylinder collision and it works. Now I try to create tri-mesh before cylinders again and everything works. I is a puzzle for me how it may happen before, maybe I mixed lib ang dll somehow. Now it works grate. -- Best regards, Konstantin Slipchenko mailto:slipch@gsc-game.kiev.ua From franjesus at medtelecom.net Fri Nov 29 12:35:02 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-15?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Fri Nov 29 12:35:02 2002 Subject: [ODE] CVS not working Message-ID: <200211292033.10697.franjesus@medtelecom.net> Having some problems with the access violation/dGeomDestroy issue, i tried to update, but: fran@avalon fran $ cd develop/ode/ fran@avalon ode $ cvs up cvs [update aborted]: connect to q12.org(209.115.250.14):2401 failed: Connection refused -- En fin... que me estoy quitando, ya sólo me pongo de vez en cuando. .: Bulmailing :. From mborigin at hotmail.com Fri Nov 29 16:33:02 2002 From: mborigin at hotmail.com (Malcolm Burton) Date: Fri Nov 29 16:33:02 2002 Subject: [ODE] Opcode and Win32.cpp Message-ID: Hi this is Malcolm... I have WinCVS working fine and have downloaded the latest CVS, I also downloaded the 0.03 tgz. I cannot find Opcode.h, or the Win32.cpp files. VC++7, and Visual Studio .NET compile is working as per the notes for vs7 but complains about opcode.h not found, Win32.cpp not found - and halts. I do not seem to have all the files! Malcolm _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From coding at natew.com Fri Nov 29 23:09:02 2002 From: coding at natew.com (Nate W) Date: Fri Nov 29 23:09:02 2002 Subject: [ODE] Opcode and Win32.cpp In-Reply-To: Message-ID: On Fri, 29 Nov 2002, Malcolm Burton wrote: > downloaded the 0.03 tgz. I cannot find Opcode.h, or the Win32.cpp files. Opcode comes separately: http://www.codercorner.com/Opcode.htm Win32.cpp is not needed. Just delete it from the project and all will be well. I removed it from mine, but apparently not until after I uploaded the contrib. Sorry about that. -- Nate Waddoups Redmond WA USA http://www.natew.com From pml_mrawls at yahoo.com Sat Nov 30 14:28:02 2002 From: pml_mrawls at yahoo.com (Mark Rawls) Date: Sat Nov 30 14:28:02 2002 Subject: [ODE] cvs compiling issues Message-ID: <20021130212752.13403.qmail@web40504.mail.yahoo.com> --0-2059245022-1038691672=:12812 Content-Type: text/plain; charset=us-ascii Hi. I've attempted to compile the cvs version of ODE using msvc7 and also GNU make. MSVC7 complained about external ref to dInfinityValue (maybe this was meant to be dInfinity which I see is used in the code several times, but not dInifnityValue?), and some other things; I got the impression it wasn't up to date with the latest cvs version: is this true? Because of this, I tried to use GNU make. Using GNU make, I get these errors which I believe might be problems with the source code... step.cpp ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(731) : error C2664: 'dSet! Value' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called make: *** [ode/src/step.obj] Error 2 Also, I tried to get a more recent version of cvs to see if this has been fixed, but WinCVS gives me this message: connect to q12.org(q12.org):2401 failed: No connection could be made because the target machine actively refused it. Is there something going on with the server that connections are being refused for a certain amount of time, or is this something wrong with my configuration (which worked before)? --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-2059245022-1038691672=:12812 Content-Type: text/html; charset=us-ascii

Hi.

I've attempted to compile the cvs version of ODE using msvc7 and also GNU make.  MSVC7 complained about external ref to dInfinityValue (maybe this was meant to be dInfinity which I see is used in the code several times, but not dInifnityValue?), and some other things; I got the impression it wasn't up to date with the latest cvs version: is this true?   Because of this, I tried to use GNU make.

Using GNU make, I get these errors which I believe might be problems with the source code...

step.cpp
ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi
s operator or a conversion to a type acceptable to the predefined operator

ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr
om 'dInfBytes' to 'dReal'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called

ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi
s operator or a conversion to a type acceptable to the predefined operator

ode\src\step.cpp(731) : error C2664: 'dSet! Value' : cannot convert parameter 3 fr
om 'dInfBytes' to 'dReal'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called
make: *** [ode/src/step.obj] Error 2

Also, I tried to get a more recent version of cvs to see if this has been fixed, but WinCVS gives me this message:

connect to q12.org(q12.org):2401 failed: No connection could be made because the target machine actively refused it.

Is there something going on with the server that connections are being refused for a certain amount of time, or is this something wrong with my configuration (which worked before)?



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-2059245022-1038691672=:12812-- From coding at natew.com Sat Nov 30 14:56:01 2002 From: coding at natew.com (Nate W) Date: Sat Nov 30 14:56:01 2002 Subject: [ODE] cvs compiling issues In-Reply-To: <20021130212752.13403.qmail@web40504.mail.yahoo.com> Message-ID: On Sat, 30 Nov 2002, Mark Rawls wrote: > I've attempted to compile the cvs version of ODE using msvc7 [...] I > got the impression it wasn't up to date with the latest cvs version: > is this true? Because of this, I tried to use GNU make. That's true. I submitted the msvc7 project quite a while ago, and I know there have been a number of changes to ODE since then. I'll update the msvc7 contrib as soon as I get around up updating my local ODE code... unless someone else gets to it first (hint, hint). -- Nate Waddoups Redmond WA USA http://www.natew.com From russ at q12.org Sat Nov 30 16:21:01 2002 From: russ at q12.org (Russ Smith) Date: Sat Nov 30 16:21:01 2002 Subject: [ODE] cvs compiling issues In-Reply-To: <20021130212752.13403.qmail@web40504.mail.yahoo.com> References: <20021130212752.13403.qmail@web40504.mail.yahoo.com> Message-ID: <20021130152618.6e6dc902.russ@q12.org> > Also, I tried to get a more recent version of cvs to see if this has > been fixed, but WinCVS gives me this message: > > connect to q12.org(q12.org):2401 failed: No connection could be made > because the target machine actively refused it. the CVS server is down, i'm hoping to get it fixed shortly. russ. -- Russell Smith http://www.q12.org From russ at q12.org Sat Nov 30 17:00:02 2002 From: russ at q12.org (Russ Smith) Date: Sat Nov 30 17:00:02 2002 Subject: [ODE] cvs compiling issues In-Reply-To: <20021130152618.6e6dc902.russ@q12.org> References: <20021130212752.13403.qmail@web40504.mail.yahoo.com> <20021130152618.6e6dc902.russ@q12.org> Message-ID: <20021130160426.4dcd1863.russ@q12.org> > the CVS server is down, i'm hoping to get it fixed shortly. the CVS server is up again. russ. -- Russell Smith http://www.q12.org From stephan at eisscholle.de Fri Nov 1 02:09:02 2002 From: stephan at eisscholle.de (Stephan Heigl) Date: Fri Nov 1 02:09:02 2002 Subject: [ODE] Tri-Collider code and OpCode 1.2? Message-ID: <000c01c28187$268650e0$0411a8c0@tonline> Hi, how does opcode 1.2 support for the tri-collider come along? I am looking forward to it since opcode 1.0 isn't available for Unix. Thanks. - Stephan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021101/2cd2f4fc/attachment.htm From Remko at act-3d.com Fri Nov 1 06:16:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Fri Nov 1 06:16:02 2002 Subject: [ODE] GTA3 and Physics Message-ID: <278777570.1387675341.98@server> Hi, We implemented ODE in our real-time 3D authoring tool. I created a demo called 'Monster Mayhem' that demonstrates the vehicle simulation capabilities of ODE. You get to drive around in stunt level with ramps, loopings and jumps. There are power-ups spread trough the level that change the car into a monster truck, reduce gravity, speed up time, or give the car a turbo engine. The results are just as good as the physics in GTA3. The capabilities of ODE really amazed me. To be honest, the results are better than I expected. To get everything working, we added several extensions to ODE. We made the collision routine work with our binary partitioning tree and we implemented better polygon collision. We also build in a feature so you can pin the simulation down to a certain frequency. This is VERY important because this ensures your perfectly tweaked simulation will run the same way on any system. The source is available in our SDK. The SDK is downloadable in our support section. Another important feature we added is angular velocity damping. We simply reduce the angular velocity each step so rotating objects can come to a halt (simulated rotational friction). This feature is very important to get stable vehicles. By applying an angular velocity damping to the body of the car, you prevent it from tipping over too quickly (keeping the simulation fun). These are the bottlenecks of ODE I found during a month of full time testing: - Lack of certain collision shapes (cylinder, cone, pyramid) - Stack overflow when there are too many collisions (because of a recursive function) If this occurs, the simulation is too slow anyway. - Box stacking problem (a lot of info about this in the mailing list) - 'Bending wheels' when the wheel rotate extremely fast (this can be prevented by tweaking the simulation) - Except for the hinge2 joint, the joints are not really usable, they are very un-rigid and they have a hard time keeping bodies together. The joints can only keep bodies together if the bodies are not too heavy.(Maybe we did something wrong here but I can't get a regular hinge to behave as you would expect. At first, I planned a bridge in the demo but the hinge could not keep the bridge into its place. Tweaking the CFM and ERP values made some improvements but they did not solve the problem.) - The way ODE works, makes heavy objects or objects that are under a lot of stress behave in a spongy way. This is not a real problem because you can solve it by tweaking the simulation and it is the reason why ODE is so very stable. You can see this effect at the beginning of the demo where you see the balls squash into each other because the ball at the bottom is under so much stress. In some cases, this is actually a nice side effect. - It is impossible to prevent bodies from rotating. This is important if you want to make a 1st person camera using ODE. Now, the character will always roll down a shallow slope. Maybe this is solvable now, suggestions are welcome. In the end, I must say ODE does a great job. The lack of certain collision shapes can be solved by coding them yourself and there already is a cylinder shape in development. The box-stacking problem is not an ODE problem but just a problem in the collision detection routine. This problem can be solved with not to much effort it is just a matter of waiting until someone finds some time to fix it. I do not have a clue about the hinges but there is a lot you can do without using hinges :) ODE is very forgiving when it comes to errors. I can throw in random objects and ODE solves the physics perfectly. ODE is a great alternative to commercial physics engines although it is more limited of course. Hey, its free and it works like a charm so why should you complain about it? Have a look: http://www.quest3d.com You can download the demo version of Quest3D and experiment with ODE yourself. -Remko (P.S. Russ, If you read this, can you put our page on your community list? http://www.quest3d.com/index.php3?id=116) -----Original Message----- From: Aanand Narayanan.P.P [mailto:aanand at milestoneindia.com] Sent: Wednesday, October 30, 2002 10:05 AM To: ode at q12.org; Remko Jacobs (act-3d.com) Subject: [ODE] GTA3 and Physics Does anybody know which method (direct LCP, iterative LCP, penalty etc) was used in the (vehicle) physics for GTA3? Is it possible to achieve the same level of stability with ODE? I would like to hear from other people who have used ODE for full fledged physics simulations. Thanks AN --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/2002 _______________________________________________ ODE mailing list ODE at q12.org http://q12.org/mailman/listinfo/ode From martin at metahuman.org Fri Nov 1 06:33:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Fri Nov 1 06:33:02 2002 Subject: [ODE] GTA3 and Physics References: <278777570.1387675341.98@server> Message-ID: <3DC28266.C376AC14@metahuman.org> "Remko Jacobs (act-3d.com)" wrote: > > Hi, > > - Except for the hinge2 joint, the joints are not really usable, ... > I do not have a clue > about the hinges but there is a lot you can do without using hinges :) When you say "the joints are not really usable," did you mean hinges? Or, for example, do you consider the ball and socket joints to also be usable? > - The way ODE works, makes heavy objects or objects that are under a lot > of stress behave in a spongy way. I wonder whether this could be reduced by adding a constraint a timestep early, to help prevent objects from penetrating in the first place. From mattias at cambrianlabs.com Fri Nov 1 11:14:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Fri Nov 1 11:14:02 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> References: <278777570.1387675341.98@server> Message-ID: > (P.S. Russ, If you read this, can you put our page on your community > list? http://www.quest3d.com/index.php3?id=116) Excellent game! cheers, m From russ at q12.org Fri Nov 1 12:11:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 1 12:11:02 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: > We implemented ODE in our real-time 3D authoring tool. I created a demo > called 'Monster Mayhem' that demonstrates the vehicle simulation nice! > - Stack overflow when there are too many collisions (because of a > recursive function) If this occurs, the simulation is too slow anyway. what recursive function do you mean? perhaps you mean a stack overflow in the main ODE solver function - because too many collisions = too many contacts = a big matrix that is slow to solve. if ODE moves to an iterative LCP method then this problem might go away (lots of experiments to do here). > - 'Bending wheels' when the wheel rotate extremely fast (this can be > prevented by tweaking the simulation) yes ... when i get all the other things on the TO-DO out of the way, i'd like to try some solutions for this problem (i.e. 'glue the wheels back on'). > - Except for the hinge2 joint, the joints are not really usable, they are > very un-rigid and they have a hard time keeping bodies together. this is surprising ... but i can think of two ways this could happen. (1) if the vehicle is rotating quickly through the air, errors in the simulation may cause the wheels to pull apart. (2) if you are directly setting the velocity of individual bodies to implement damping, the joints will certainly pull apart, as the velocities at the joint points will no longer match up. also on the TO-DO list is stable rotational damping. > - The way ODE works, makes heavy objects or objects that are under a lot > of stress behave in a spongy way. this should only be the case if that CFM number is high. > (P.S. Russ, If you read this, can you put our page on your community > list? http://www.quest3d.com/index.php3?id=116) sure, this might take until after the weekend though. russ. -- Russ Smith http://www.q12.org/ From gazza at shaw.ca Fri Nov 1 17:10:02 2002 From: gazza at shaw.ca (Gazza) Date: Fri Nov 1 17:10:02 2002 Subject: [ODE] How do I code my own constraints ? Message-ID: <000a01c281be$11650e40$03324c18@vf.shawcable.net> Hi, I'm trying to understand how to compute the constraints matrix for a particular constraint. I'm of the understanding that a 'contact' constraint would remove a DOF along the contact normal, thus requiring 1 value. When solved, the force/impulse is applied along the normal. For a ball joint, 3 DOF's are removed - x,y,z translations, and for a hinge, 5 DOF's are removed - x,y,z translation and say x,y rotation. Am I correct in these assumptions ? What I don't understand (or can find any documentation/papers on) is how the value(s) are computed for the A(n*n) matrix and b(n*1) for each constraint, which tell the system to remove these DOF's. Any help given is most appreciated. Thanks in advance. Gazza -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021101/64a65798/attachment.htm From aanand_pp at myrealbox.com Fri Nov 1 17:11:44 2002 From: aanand_pp at myrealbox.com (Aanand Narayanan.P.P) Date: Fri Nov 1 17:11:44 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: <000001c281cd$f6ae6be0$4ac1c0cb@digitalcrusher> Hi Thanks for all that info from everyone. > The source is available in our SDK. The SDK > is downloadable in our support section. Is it freely downloadable? > - The way ODE works, makes heavy objects or objects that are under a lot > of stress behave in a spongy way. ... I guess that's the reason why it is safer to limit the mass of objects between 1.0 and 10.0. Am I right, Russ? Thanks for the info, it was really useful and I should watch out for that stack overflow problem :). Cheers AN From coding at natew.com Fri Nov 1 18:10:02 2002 From: coding at natew.com (Nate W) Date: Fri Nov 1 18:10:02 2002 Subject: [ODE] msvc dlls? In-Reply-To: Message-ID: On Thu, 31 Oct 2002, Anselm Hook wrote: > Using msvc 7.0 I think that I have to have __dllexport... defined - but > none of the methods in objects.h have SHAREDLIBEXPORT as a prefix. [...] > > But I am a bit baffled about how I did it last time - I don't think I was > using cygwin... maybe these define prefixes were removed? Did you run the configurator? SHAREDLIBEXPORT is my my config.h, which if I recall correctly is generated by the configurator program. I haven't actually generated my config.h in a long time since I've just been copying that file from previous build trees. > Also I noticed that there's an include of alloca.h - msdev doesn't have > that. I think that may be another configurator/config.h thing. -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Fri Nov 1 22:13:01 2002 From: coding at natew.com (Nate W) Date: Fri Nov 1 22:13:01 2002 Subject: [ODE] slider trouble In-Reply-To: <20021031221053.291c8cac.russ@q12.org> Message-ID: On Thu, 31 Oct 2002, Russ Smith wrote: > nate, can you verify the fix? Unfortunately, no... I've attached another test that bounces things off the ground a bit differently, and you can watch two blocks bounce skyward and then gradually spin up to an explosion. How's this for an alternate approach: apply the linear force created by the joint stop at each body's center of mass, but apply it in the direction of the other body's center of mass, rather than along the slider axis (project the force vector along the direction of the other body's center of mass). Would that also cancel out the torque effect, without adding torques to the bodies explicitly? Also, could this problem be related to the problem where a single flying spinning body also gains angular momentum? I actually saw the slider-limit acceleration problem months ago, but I mistook it for the explicit integration problem described in the FAQ in 11.12. -- Nate Waddoups Redmond WA USA http://www.natew.com -------------- next part -------------- /************************************************************************* * * * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * * All rights reserved. Email: russ at q12.org Web: www.q12.org * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * * Software Foundation; either version 2.1 of the License, or (at * * your option) any later version. The text of the GNU Lesser * * General Public License is included with this library in the * * file LICENSE.TXT. * * (2) The BSD-style license that is included with this library in * * the file LICENSE-BSD.TXT. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * * LICENSE.TXT and LICENSE-BSD.TXT for more details. * * * *************************************************************************/ #include #include #ifdef MSVC #pragma warning(disable:4244 4305) // for VC++, no precision loss complaints #endif // select correct drawing functions #ifdef dDOUBLE #define dsDrawBox dsDrawBoxD #endif // some constants #define SIDE (1.0f) // side length of a box #define MASS (1.0) // mass of a box // dynamics and collision objects static dWorldID world; static dSpaceID space; static dBodyID body[2]; static dGeomID box[2]; static dJointID slider; static dGeomID ground; static dJointGroupID contactgroup; // start simulation - set viewpoint static void start() { static float xyz[3] = {5.0382f,-5.0811f,1.4700f}; static float hpr[3] = {120.0000f,45.0f,0.0000f}; dsSetViewpoint (xyz,hpr); printf ("Press 'e' to start/stop occasional error.\n"); } // called when a key pressed static void command (int cmd) { } // collision callback static void nearCallback (void *data, dGeomID o1, dGeomID o2) { int i,n; // don't collide boxes with each other if ((o1 == box[0]) && (o2 == box[1])) return; if ((o1 == box[1]) && (o2 == box[0])) return; const int N = 10; dContact contact[N]; n = dCollide (o1,o2,N,&contact[0].geom,sizeof(dContact)); if (n > 0) { for (i=0; i References: <20021031221053.291c8cac.russ@q12.org> Message-ID: <20021101225009.53deb28e.russ@q12.org> > > nate, can you verify the fix? > > Unfortunately, no... I've attached another test that bounces things off > the ground a bit differently, and you can watch two blocks bounce skyward > and then gradually spin up to an explosion. i'll check this out after the weekend. russ. -- Russell Smith http://www.q12.org From jeffreyweber at hotmail.com Sat Nov 2 08:07:01 2002 From: jeffreyweber at hotmail.com (Jeff Weber) Date: Sat Nov 2 08:07:01 2002 Subject: [ODE] GTA3 and Physics Message-ID: Quick question. What "geometry" are you using for you wheels? Are you using one of the built in ode geometries, or your own? ----Original Message Follows---- From: "Remko Jacobs (act-3d.com)" To: "ODE at q12.org" Subject: RE: [ODE] GTA3 and Physics Date: Fri, 1 Nov 2002 14:13:00 +0100 Hi, We implemented ODE in our real-time 3D authoring tool. I created a demo called 'Monster Mayhem' that demonstrates the vehicle simulation capabilities of ODE. You get to drive around in stunt level with ramps, loopings and jumps. There are power-ups spread trough the level that change the car into a monster truck, reduce gravity, speed up time, or give the car a turbo engine. The results are just as good as the physics in GTA3. The capabilities of ODE really amazed me. To be honest, the results are better than I expected. To get everything working, we added several extensions to ODE. We made the collision routine work with our binary partitioning tree and we implemented better polygon collision. We also build in a feature so you can pin the simulation down to a certain frequency. This is VERY important because this ensures your perfectly tweaked simulation will run the same way on any system. The source is available in our SDK. The SDK is downloadable in our support section. Another important feature we added is angular velocity damping. We simply reduce the angular velocity each step so rotating objects can come to a halt (simulated rotational friction). This feature is very important to get stable vehicles. By applying an angular velocity damping to the body of the car, you prevent it from tipping over too quickly (keeping the simulation fun). These are the bottlenecks of ODE I found during a month of full time testing: - Lack of certain collision shapes (cylinder, cone, pyramid) - Stack overflow when there are too many collisions (because of a recursive function) If this occurs, the simulation is too slow anyway. - Box stacking problem (a lot of info about this in the mailing list) - 'Bending wheels' when the wheel rotate extremely fast (this can be prevented by tweaking the simulation) - Except for the hinge2 joint, the joints are not really usable, they are very un-rigid and they have a hard time keeping bodies together. The joints can only keep bodies together if the bodies are not too heavy.(Maybe we did something wrong here but I can't get a regular hinge to behave as you would expect. At first, I planned a bridge in the demo but the hinge could not keep the bridge into its place. Tweaking the CFM and ERP values made some improvements but they did not solve the problem.) - The way ODE works, makes heavy objects or objects that are under a lot of stress behave in a spongy way. This is not a real problem because you can solve it by tweaking the simulation and it is the reason why ODE is so very stable. You can see this effect at the beginning of the demo where you see the balls squash into each other because the ball at the bottom is under so much stress. In some cases, this is actually a nice side effect. - It is impossible to prevent bodies from rotating. This is important if you want to make a 1st person camera using ODE. Now, the character will always roll down a shallow slope. Maybe this is solvable now, suggestions are welcome. In the end, I must say ODE does a great job. The lack of certain collision shapes can be solved by coding them yourself and there already is a cylinder shape in development. The box-stacking problem is not an ODE problem but just a problem in the collision detection routine. This problem can be solved with not to much effort it is just a matter of waiting until someone finds some time to fix it. I do not have a clue about the hinges but there is a lot you can do without using hinges :) ODE is very forgiving when it comes to errors. I can throw in random objects and ODE solves the physics perfectly. ODE is a great alternative to commercial physics engines although it is more limited of course. Hey, its free and it works like a charm so why should you complain about it? Have a look: http://www.quest3d.com You can download the demo version of Quest3D and experiment with ODE yourself. -Remko (P.S. Russ, If you read this, can you put our page on your community list? http://www.quest3d.com/index.php3?id=116) -----Original Message----- From: Aanand Narayanan.P.P [mailto:aanand at milestoneindia.com] Sent: Wednesday, October 30, 2002 10:05 AM To: ode at q12.org; Remko Jacobs (act-3d.com) Subject: [ODE] GTA3 and Physics Does anybody know which method (direct LCP, iterative LCP, penalty etc) was used in the (vehicle) physics for GTA3? Is it possible to achieve the same level of stability with ODE? I would like to hear from other people who have used ODE for full fledged physics simulations. Thanks AN --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/2002 _______________________________________________ ODE mailing list ODE at q12.org http://q12.org/mailman/listinfo/ode _______________________________________________ ODE mailing list ODE at q12.org http://q12.org/mailman/listinfo/ode _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp From filipe.dias at mind.pt Sat Nov 2 08:51:01 2002 From: filipe.dias at mind.pt (Filipe Dias) Date: Sat Nov 2 08:51:01 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: <200211021550.gA2FoSu02059@hook.org> I liked it much! the only criticism I have is that I find the car to stable... What are you doing to make the car always stand up? My guess is you have a "weight" under the wheels of the car.. Oh, and it is nearly impossible to make the loop.. Fil. -----Original Message----- From: "Remko Jacobs (act-3d.com)" To: "ODE at q12.org" Date: Fri, 1 Nov 2002 14:13:00 +0100 Subject: RE: [ODE] GTA3 and Physics > Hi, > > We implemented ODE in our real-time 3D authoring tool. I created a demo > > called 'Monster Mayhem' that demonstrates the vehicle simulation > capabilities of ODE. You get to drive around in stunt level with ramps, > > loopings and jumps. There are power-ups spread trough the level that > change the car into a monster truck, reduce gravity, speed up time, or > > give the car a turbo engine. The results are just as good as the > physics > in GTA3. The capabilities of ODE really amazed me. To be honest, the > results are better than I expected. > > To get everything working, we added several extensions to ODE. We made > > the collision routine work with our binary partitioning tree and we > implemented better polygon collision. We also build in a feature so you > > can pin the simulation down to a certain frequency. This is VERY > important because this ensures your perfectly tweaked simulation will > run > the same way on any system. The source is available in our SDK. The SDK > > is downloadable in our support section. > > Another important feature we added is angular velocity damping. We > simply > reduce the angular velocity each step so rotating objects can come to a > > halt (simulated rotational friction). This feature is very important to > > get stable vehicles. By applying an angular velocity damping to the > body > of the car, you prevent it from tipping over too quickly (keeping the > simulation fun). > > These are the bottlenecks of ODE I found during a month of full time > testing: > > - Lack of certain collision shapes (cylinder, cone, pyramid) > - Stack overflow when there are too many collisions (because of a > recursive function) If this occurs, the simulation is too slow anyway. > - Box stacking problem (a lot of info about this in the mailing list) > - 'Bending wheels' when the wheel rotate extremely fast (this can be > prevented by tweaking the simulation) > - Except for the hinge2 joint, the joints are not really usable, they > are > very un-rigid and they have a hard time keeping bodies together. The > joints can only keep bodies together if the bodies are not too > heavy.(Maybe we did something wrong here but I can't get a regular > hinge > to behave as you would expect. At first, I planned a bridge in the demo > > but the hinge could not keep the bridge into its place. Tweaking the > CFM > and ERP values made some improvements but they did not solve the > problem.) > - The way ODE works, makes heavy objects or objects that are under a > lot > of stress behave in a spongy way. This is not a real problem because > you > can solve it by tweaking the simulation and it is the reason why ODE is > > so very stable. You can see this effect at the beginning of the demo > where you see the balls squash into each other because the ball at the > > bottom is under so much stress. In some cases, this is actually a nice > > side effect. > - It is impossible to prevent bodies from rotating. This is important > if > you want to make a 1st person camera using ODE. Now, the character will > > always roll down a shallow slope. Maybe this is solvable now, > suggestions > are welcome. > > In the end, I must say ODE does a great job. The lack of certain > collision shapes can be solved by coding them yourself and there > already > is a cylinder shape in development. The box-stacking problem is not an > > ODE problem but just a problem in the collision detection routine. This > > problem can be solved with not to much effort it is just a matter of > waiting until someone finds some time to fix it. I do not have a clue > about the hinges but there is a lot you can do without using hinges :) > > ODE is very forgiving when it comes to errors. I can throw in random > objects and ODE solves the physics perfectly. ODE is a great > alternative > to commercial physics engines although it is more limited of course. > Hey, > its free and it works like a charm so why should you complain about it? > > Have a look: > http://www.quest3d.com > > You can download the demo version of Quest3D and experiment with ODE > yourself. > > -Remko > > (P.S. Russ, If you read this, can you put our page on your community > list? http://www.quest3d.com/index.php3?id=116) > > > -----Original Message----- > From: Aanand Narayanan.P.P [mailto:aanand at milestoneindia.com] > Sent: Wednesday, October 30, 2002 10:05 AM > To: ode at q12.org; Remko Jacobs (act-3d.com) > Subject: [ODE] GTA3 and Physics > > > > > Does anybody know which method (direct LCP, iterative LCP, penalty etc) > was used in the (vehicle) physics for GTA3? > Is it possible to achieve the same level of stability with ODE? I would > like to hear from other people who have used ODE for full fledged > physics simulations. > > Thanks > AN > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/2002 > > > > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode > From ander_taylor at hotmail.com Sat Nov 2 16:21:02 2002 From: ander_taylor at hotmail.com (Ander Taylor) Date: Sat Nov 2 16:21:02 2002 Subject: [ODE] Complie to a Lib Message-ID: Hi, I am new to ODE and C++. I am working on a wrapper to allow the use of ODE from .Net, extending the work already done by Jeff Weber. Anyway, my qestion, how should I complie ODE to a Lib from VC++7? Does anyone know the settings I should use? Cheers, Ander _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From coding at natew.com Sat Nov 2 23:49:02 2002 From: coding at natew.com (Nate W) Date: Sat Nov 2 23:49:02 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: On Sat, 2 Nov 2002, Ander Taylor wrote: > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > from .Net, extending the work already done by Jeff Weber. Have a look at Anselm Hook's work too, if you haven't seen it yet: http://p2pmap.org/cgi-bin/cvsweb.cgi/p2pmap/src/ode/ode.cs?rev=1.3&content-type=text/x-cvsweb-markup > Anyway, my qestion, how should I compile ODE to a Lib from VC++7? Does > anyone know the settings I should use? If you want to build a DLL, have a look at the contrib/msvc7/ CVS folder, it's got .sln files for regular ODE and ODE with the tri-collider extension. -- Nate Waddoups Redmond WA USA http://www.natew.com From ps_yumemi at yahoo.com Sun Nov 3 02:10:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sun Nov 3 02:10:02 2002 Subject: [ODE] rotation matrix Message-ID: <20021103090928.66813.qmail@web40509.mail.yahoo.com> hello, i have a simple question: how do you access the contents of the rotation matrix that the function dGeomGetRotation or dBodyGetRotation give out? I know that the pointer is only a dReal and the matrix i need is a dMatrix3. How do you resolve this? i really need to pass that info somehow. thanks pia __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From coding at natew.com Sun Nov 3 03:10:02 2002 From: coding at natew.com (Nate W) Date: Sun Nov 3 03:10:02 2002 Subject: [ODE] rotation matrix In-Reply-To: <20021103090928.66813.qmail@web40509.mail.yahoo.com> Message-ID: On Sun, 3 Nov 2002, pia dalusong wrote: > i have a simple question: how do you access the > contents of the rotation matrix that the function > dGeomGetRotation or dBodyGetRotation give out? > I know that the pointer is only a dReal and the matrix > i need is a dMatrix3. How do you resolve this? > i really need to pass that info somehow. Have a look at the setTransform function in drawstuff.cpp, around line 325. This shows how to use the array of values returned by a dBodyGetRotation call to populate a matrix for OpenGL. Note that dBodyGetRotation returns a 4x3 matrix, so every fourth scalar is ignored during the conversion. -- Nate Waddoups Redmond WA USA http://www.natew.com From kaffiene at xtra.co.nz Sun Nov 3 12:31:01 2002 From: kaffiene at xtra.co.nz (Peter) Date: Sun Nov 3 12:31:01 2002 Subject: [ODE] GTA3 and Physics In-Reply-To: <278777570.1387675341.98@server> Message-ID: <001301c2836f$78a17190$5c02a8c0@peter> > - 'Bending wheels' when the wheel rotate extremely fast (this can be > prevented by tweaking the simulation) Can I ask which tweaks you used? Peter. From anselm at hook.org Sun Nov 3 20:12:02 2002 From: anselm at hook.org (Anselm Hook) Date: Sun Nov 3 20:12:02 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: > On Sat, 2 Nov 2002, Ander Taylor wrote: > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > from .Net, extending the work already done by Jeff Weber. Cool! > Have a look at Anselm Hook's work too, if you haven't seen it yet: I recently moved my version here - you'll want this copy if you use this: http://p2pmap.org/cgi-bin/cvsweb.cgi/p2pmap/src/ode/contrib/csharp/ > > Anyway, my qestion, how should I compile ODE to a Lib from VC++7? Does > > anyone know the settings I should use? > > If you want to build a DLL, have a look at the contrib/msvc7/ CVS folder, > it's got .sln files for regular ODE and ODE with the tri-collider > extension. Some misc thoughts re C# ODE bindings: I think it's a good idea to do a C# wrapper. I have one that you can grab pieces from as Nate pointed out - although I simply haven't had time to finish it up. There might be some merit in my approach however - regardless of if you do your own or not: 1) I made C# methods that directly bind to all DLL methods. All of the raw dll methods I stuck into a single class - and made them static. (so effectively I have a big bucket of static methods) 2) Then - separately - I made C# classes that called the static methods. 3) I used no-arg constructors so that it was easier to manufacture my ODE objects using an XML notation. The factory methods that discover the ODE objects (using the C# type reflection) are easier to deal with if you can invoke no-arg constructors on them... This *is* a bit of a hassle; it means that you have to 'late submit' ODE bodies to the world... my code does that. Oh, one other reason for no-arg constructors - it allows out of order instantiation of objects. The reason for the two stage approach is that it allows other developers to build their own class abstraction layer on top of the ODE API. ...um... otherwise I think the only thing that I did that (while actually pretty lame and pretty incomplete) was to try to keep the collision callback in C. I slightly extended the ODE DLL to have a new self managing callback method for collision. [ The reason that Russ makes us normally handle collision ourselves is because collision is subjective to the application. There are many ways two surfaces can interact. Imagine sandpaper and granite, or granite and granite, or gummy bears and ceramic tile... It turns out that finding ways to abstract surface properties in the general case is not easy to solve.] In the case of C# you really don't want to have an inner loop like this being exposed to C# - my own tests and others show that it is slow: http://www.tempest-sw.com/benchmark/ http://www.kuro5hin.org/story/2002/6/25/122237/078 (although I expect that this will be untrue soon) It might be possible to build intersection tables that are exposed to C# - you could define the intersection of material properties. Finally... I just gave a little talk recently on using C# for games - I will post my notes somewhere on my website - I'll make a link at: http://p2pmap.org/technology/csharp.html for now. Basically I think binding ODE to C# is good but I wouldn't use C# for the mainloop if you want performance... - a From anselm at hook.org Sun Nov 3 22:30:02 2002 From: anselm at hook.org (Anselm Hook) Date: Sun Nov 3 22:30:02 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: There is one good reason not to use my C# binding - I am relying on a class based Vector and Matrix math library (that I ported from an open source clone of Java3D). I strongly suggest using a struct based Vector and Matrix library such as http://www.exocortex.org/3dengine or others (his starting point is BSD licenced). I'll bet Jeff Weber has solved this correctly - where is Jeff's site? Jeff? - a > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > > from .Net, extending the work already done by Jeff Weber. From ps_yumemi at yahoo.com Mon Nov 4 00:31:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Mon Nov 4 00:31:02 2002 Subject: [ODE] rotation matrix Message-ID: <20021104073051.52060.qmail@web40507.mail.yahoo.com> hello, first of all thanks for replying. i tried to pass the values to the dMatrix3 the same way in the setTransform function in the drawstuff.cpp file. unfortunately, my mobot is heading towards the opposite direction now. what i did was this : const dReal *mobot_pos; const dReal *mobot_rot; mobot_rot = dBodyGetRotation (mobot.chassis.body); mobot_pos = dBodyGetPosition (mobot.chassis.body); mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[4]; mobotdata.rota[2]=mobot_rot[8]; mobotdata.rota[3]=0; mobotdata.rota[4]=mobot_rot[1]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[9]; mobotdata.rota[7]=0; mobotdata.rota[8]=mobot_rot[2]; mobotdata.rota[9]=mobot_rot[6]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=0; i also tried this mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[1]; mobotdata.rota[2]=mobot_rot[2]; mobotdata.rota[3]=mobot_rot[3]; mobotdata.rota[4]=mobot_rot[4]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[6]; mobotdata.rota[7]=mobot_rot[7]; mobotdata.rota[8]=mobot_rot[8]; mobotdata.rota[9]=mobot_rot[9]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=mobot_rot[11]; __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From ps_yumemi at yahoo.com Mon Nov 4 00:33:01 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Mon Nov 4 00:33:01 2002 Subject: [ODE] rotation matrix Message-ID: <20021104073214.21133.qmail@web40509.mail.yahoo.com> hello, first of all thanks for replying. i tried to pass the values to the dMatrix3 the same way in the setTransform function in the drawstuff.cpp file. unfortunately, my mobot is heading towards the opposite direction now. what i did was this : const dReal *mobot_pos; const dReal *mobot_rot; mobot_rot = dBodyGetRotation (mobot.chassis.body); mobot_pos = dBodyGetPosition (mobot.chassis.body); mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[4]; mobotdata.rota[2]=mobot_rot[8]; mobotdata.rota[3]=0; mobotdata.rota[4]=mobot_rot[1]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[9]; mobotdata.rota[7]=0; mobotdata.rota[8]=mobot_rot[2]; mobotdata.rota[9]=mobot_rot[6]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=0; i also tried this mobotdata.rota[0]=mobot_rot[0]; mobotdata.rota[1]=mobot_rot[1]; mobotdata.rota[2]=mobot_rot[2]; mobotdata.rota[3]=mobot_rot[3]; mobotdata.rota[4]=mobot_rot[4]; mobotdata.rota[5]=mobot_rot[5]; mobotdata.rota[6]=mobot_rot[6]; mobotdata.rota[7]=mobot_rot[7]; mobotdata.rota[8]=mobot_rot[8]; mobotdata.rota[9]=mobot_rot[9]; mobotdata.rota[10]=mobot_rot[10]; mobotdata.rota[11]=mobot_rot[11]; and the mobot went 90 degrees away from the rotation it was suppose to have. it only works when the values are 1 0 0 0 0 1 0 0 0 0 1 0 and that's it. what else can i do? pia __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From ps_yumemi at yahoo.com Mon Nov 4 04:55:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Mon Nov 4 04:55:02 2002 Subject: [ODE] rotation matrix In-Reply-To: <3DC64BDF.8070505@oracle.com> Message-ID: <20021104115420.48967.qmail@web40506.mail.yahoo.com> hello, ummm, what did you use to set the rotation and position of the mobots? did you still use dBodySetRotation and dBodySetPosition? or settransform? and how did you do it exactly? sorry. got confused. pia --- Ed Jones wrote: > Hiya, > > I've done exactly the same and just pinched (ahem, > "reused") this code > from drawstuff. > > As far as I know; if you define "mobotdata.rota" as > "GLfloat rota[16]" > (something like "mobotdata.transform" would probably > make more sense) > then you just need to do exactly what you've already > done, plus; > > mobotdata.rota[12] = mobot_pos[0]; > mobotdata.rota[13] = mobot_pos[1]; > mobotdata.rota[14] = mobot_pos[2]; > mobotdata.rota[15] = 1; > > ...and that works fine for me. > > I hope I'm right in saying that if things are going > in the wrong > direction then there's probably just some signs > wrong somewhere. > > Cheers, > Ed. > __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From jeffreyweber at hotmail.com Mon Nov 4 05:29:02 2002 From: jeffreyweber at hotmail.com (Jeff Weber) Date: Mon Nov 4 05:29:02 2002 Subject: [ODE] Complie to a Lib Message-ID: I just made my own vector and matrix structs. One other thing that is different about my approach is I used a "Managed C++" wrapper rather than the PInvoke method. It seemed to work great considering my lack of any true C++ experience. I'll be getting back to it eventually, but currently I'm busy "faking" some vehicle physics for a demo that is due in december. I didn't want to chance using ode as I wasn't sure I'd be able to get things running correctly by then and still have time to work on the other things that need to be in the demo. -jeff ----Original Message Follows---- From: Anselm Hook To: Nate W CC: Subject: Re: [ODE] Complie to a Lib Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) There is one good reason not to use my C# binding - I am relying on a class based Vector and Matrix math library (that I ported from an open source clone of Java3D). I strongly suggest using a struct based Vector and Matrix library such as http://www.exocortex.org/3dengine or others (his starting point is BSD licenced). I'll bet Jeff Weber has solved this correctly - where is Jeff's site? Jeff? - a > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > > from .Net, extending the work already done by Jeff Weber. _______________________________________________ ODE mailing list ODE at q12.org http://q12.org/mailman/listinfo/ode _________________________________________________________________ Unlimited Internet access -- and 2 months free!  Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.asp From ander_taylor at hotmail.com Mon Nov 4 06:17:02 2002 From: ander_taylor at hotmail.com (Ander Taylor) Date: Mon Nov 4 06:17:02 2002 Subject: [ODE] Complie to a Lib Message-ID: I just worked out that I dont need the lib. I can compile the whole lot, managed bits and everything, to a DLL. Finished Space, AMotor and Geom, also added Params to JointHinge. Works great. Ander ----Original Message Follows---- From: "Jeff Weber" To: ode at q12.org I just made my own vector and matrix structs. One other thing that is different about my approach is I used a "Managed C++" wrapper rather than the PInvoke method. It seemed to work great considering my lack of any true C++ experience. I'll be getting back to it eventually, but currently I'm busy "faking" some vehicle physics for a demo that is due in december. I didn't want to chance using ode as I wasn't sure I'd be able to get things running correctly by then and still have time to work on the other things that need to be in the demo. -jeff ----Original Message Follows---- From: Anselm Hook To: Nate W CC: Subject: Re: [ODE] Complie to a Lib Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) There is one good reason not to use my C# binding - I am relying on a class based Vector and Matrix math library (that I ported from an open source clone of Java3D). I strongly suggest using a struct based Vector and Matrix library such as http://www.exocortex.org/3dengine or others (his starting point is BSD licenced). I'll bet Jeff Weber has solved this correctly - where is Jeff's site? Jeff? - a > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > I am new to ODE and C++. I am working on a wrapper to allow the use of ODE > > > from .Net, extending the work already done by Jeff Weber. _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp From ed.jones at oracle.com Mon Nov 4 08:55:02 2002 From: ed.jones at oracle.com (Ed Jones) Date: Mon Nov 4 08:55:02 2002 Subject: [ODE] CVS is Scary Message-ID: <3DC6981D.5080408@oracle.com> Hi Folks, I've been fiddling about with ODE v0.03 for a while yet, and I think it's probably best if I get my head around CVS, so I can get the latest stuff, specifically to do with the recent "dContactApprox1 mode" updates. Not having used CVS before I've tried to get the latest version of everything using WinCVS and it seems to have worked. I set the CVSROOT in the Preferences, set authentication to the "passwd" option, logged in, and used the Admin->Command Line option to type in "cvs co ode". That seemed to copy everything out of CVS and it all builds fine. Presumably, I now just need to do "cvs update" in future to pick up any changes? I assume that the "anonymous" user I logged in as doesn't have permissions to lock or change any files within CVS? So there's no danger that me being crap at using WinCVS can cause any damage to the code tree? I've seen other CVS based projects that produce a "nightly tarball" from their repositories. Is this something that's been considered for ODE? To save me worrying about accidentally deleting all the code. Or something. ;-) Cheers, Ed. From wristy_j at yahoo.com Mon Nov 4 09:00:02 2002 From: wristy_j at yahoo.com (Jason Gott) Date: Mon Nov 4 09:00:02 2002 Subject: [ODE] How do I code my own constraints ? In-Reply-To: <000a01c281be$11650e40$03324c18@vf.shawcable.net> Message-ID: <20021104155943.53446.qmail@web40804.mail.yahoo.com> Hello, The best paper I've found for describing the A matrix and B (right hand side) vector is "Linear-Time Dynamics Using Lagrange Multipliers" by David Baraff. It was in Siggraph '96. Search for it by name and you'll find .pdf's. "Fast Contact Force Computation for Nonpenetrating Rigid Bodies", also by Baraff (Siggraph '94) is also helpful. It talks about LCP's and Dantzig's algorithm. As far as figuring out what to put in J (the constraint matrices), look at ODE's source code for the different joint types. Hope that helps! J --- Gazza wrote: > Hi, > > I'm trying to understand how to compute the > constraints matrix for a particular constraint. > > I'm of the understanding that a 'contact' constraint > would remove a DOF along the contact normal, thus > requiring 1 value. When solved, the force/impulse > is applied along the normal. For a ball joint, 3 > DOF's are removed - x,y,z translations, and for a > hinge, 5 DOF's are removed - x,y,z translation and > say x,y rotation. Am I correct in these assumptions > ? > > What I don't understand (or can find any > documentation/papers on) is how the value(s) are > computed for the A(n*n) matrix and b(n*1) for each > constraint, which tell the system to remove these > DOF's. > > Any help given is most appreciated. > > Thanks in advance. > Gazza > __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From anselm at hook.org Mon Nov 4 09:33:01 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 4 09:33:01 2002 Subject: [ODE] Complie to a Lib In-Reply-To: Message-ID: do you have a site for your stuff or is it something you're not sharing yet? just curious because i'd like to see your approach. -a On Mon, 4 Nov 2002, Ander Taylor wrote: > I just worked out that I dont need the lib. > > I can compile the whole lot, managed bits and everything, to a DLL. > > Finished Space, AMotor and Geom, also added Params to JointHinge. > > Works great. > > Ander > > > ----Original Message Follows---- > From: "Jeff Weber" > To: ode at q12.org > > > I just made my own vector and matrix structs. > > One other thing that is different about my approach is I used a "Managed > C++" wrapper rather than the PInvoke method. > > It seemed to work great considering my lack of any true C++ experience. > I'll be getting back to it eventually, but currently I'm busy "faking" some > vehicle physics for a demo that is due in december. I didn't want to chance > using ode as I wasn't sure I'd be able to get things running correctly by > then and still have time to work on the other things that need to be in the > demo. > > -jeff > > > ----Original Message Follows---- > From: Anselm Hook > To: Nate W > CC: > Subject: Re: [ODE] Complie to a Lib > Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) > > > There is one good reason not to use my C# binding - I am relying on a > class based Vector and Matrix math library (that I ported from an open > source clone of Java3D). I strongly suggest using a struct based Vector > and Matrix library such as http://www.exocortex.org/3dengine or others > (his starting point is BSD licenced). > > I'll bet Jeff Weber has solved this correctly - where is Jeff's site? > Jeff? > > - a > > > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > > I am new to ODE and C++. I am working on a wrapper to allow the use > of ODE > > > > from .Net, extending the work already done by Jeff Weber. > > > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode > From anselm at hook.org Mon Nov 4 09:43:01 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 4 09:43:01 2002 Subject: [ODE] CVS is Scary In-Reply-To: <3DC6981D.5080408@oracle.com> Message-ID: > Presumably, I now just need to do "cvs update" in future to pick up any > changes? Yup. > I assume that the "anonymous" user I logged in as doesn't have > permissions to lock or change any files within CVS? So there's no danger > that me being crap at using WinCVS can cause any damage to the code tree? Right - there's no way you can cause any damage. It's totally safe. > I've seen other CVS based projects that produce a "nightly tarball" from > their repositories. Is this something that's been considered for ODE? To > save me worrying about accidentally deleting all the code. Or something. ;-) Russ has to answer that. I suppose once it moves to sourceforge this will happen. - a From adam.moravanszky at novodex.com Mon Nov 4 10:19:02 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [Novodex]) Date: Mon Nov 4 10:19:02 2002 Subject: [ODE] Joint Naming Message-ID: <00ae01c28425$ebdb2820$17a08481@nxcommanche> Hi, while working on improving joint support for an app that will support both ODE and Nx physics back ends, it occurred to me that there is a good opportunity for misunderstandings regarding joint naming. In particular, I think the picture for slider joint in the ODE user's guide is misleading. The joint has a circular shaft, which makes one think that rotation around the shaft may be possible. However, when one considers that such a joint would need an additional anchor parameter, it becomes clear that rotation around the axis is in fact not possible. It says this too in section 3.5, though not later in the section on slider: "... a slider joint that constraints the ``piston'' and ``socket'' to line up, and additionally constraints the two bodies to have the same orientation." We call such a joint a Prismatic joint, and draw it in the manual with a square shaft. We also have joints called sliders, with circular shafts, which is what can be created in ODE by combining a slider and a hinge through a proxy body. Obviously it is inconvenient to do any sort of renaming, but I would suggest changing the picture in ODE. --Adam -- Adam Moravanszky /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From coding at natew.com Mon Nov 4 13:18:01 2002 From: coding at natew.com (Nate W) Date: Mon Nov 4 13:18:01 2002 Subject: [ODE] CVS is Scary In-Reply-To: <3DC6981D.5080408@oracle.com> Message-ID: On Mon, 4 Nov 2002, Ed Jones wrote: > Not having used CVS before I've tried to get the latest version of > everything using WinCVS and it seems to have worked. I was using WinCVS myself until a couple weeks ago when someone suggested I try this instead: http://www.tortoisecvs.org/ It's MUCH more user-friendly. WinCVS GUI just made me want to learn the command line syntax so I wouldn't have to be confronted with all those cryptic buttons. :-) Tortoise is probably not as powerful, but all I need is to stay current with ODE and one other project I'm peripherally involved with, so I'm happy with it. It's also implemented as a shell extension, which is kind of neat. -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Mon Nov 4 13:38:02 2002 From: coding at natew.com (Nate W) Date: Mon Nov 4 13:38:02 2002 Subject: [ODE] Joint Naming In-Reply-To: <00ae01c28425$ebdb2820$17a08481@nxcommanche> Message-ID: On Mon, 4 Nov 2002, Adam Moravanszky [Novodex] wrote: > The joint has a circular shaft, which makes one think that rotation > around the shaft may be possible. [.....] We call such a joint a > Prismatic joint, and draw it in the manual with a square shaft. FWIW, I feel the same way. I use the "prismatic" term in the XML generated by Juice. It's called "slider" in the UI, but I think that was a mistake, as the term is ambiguous. > We also have joints called sliders, with circular shafts [....] So long as we're talking about naming, how about "cylindrical joint" for those? -- Nate Waddoups Redmond WA USA http://www.natew.com From adam.moravanszky at novodex.com Mon Nov 4 14:22:02 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [NovodeX]) Date: Mon Nov 4 14:22:02 2002 Subject: [ODE] Joint Naming References: Message-ID: <004001c28440$1ca4a200$f311da50@powerhouse> > > We also have joints called sliders, with circular shafts [....] > > So long as we're talking about naming, how about "cylindrical joint" for > those? > Perhaps -- I like it because it describes a shape like 'spherical' and 'prismatic' do. I'd have to ask someone with a robotics background what the 'official' term is. Not that I insist on using those -- sometimes they are confusing to novices: For example "prismatic" isn't exactly intuitive: most people will think of optics when they hear that. We still use it to avoid ambiguity. -- Adam /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From ander_taylor at hotmail.com Mon Nov 4 14:35:02 2002 From: ander_taylor at hotmail.com (Ander Taylor) Date: Mon Nov 4 14:35:02 2002 Subject: [ODE] Complie to a Lib Message-ID: No I don't have a site. I will ask Jeff if I can put it on his. I will keep you posted. Ander ----Original Message Follows---- From: Anselm Hook To: Ander Taylor do you have a site for your stuff or is it something you're not sharing yet? just curious because i'd like to see your approach. -a On Mon, 4 Nov 2002, Ander Taylor wrote: > I just worked out that I dont need the lib. > > I can compile the whole lot, managed bits and everything, to a DLL. > > Finished Space, AMotor and Geom, also added Params to JointHinge. > > Works great. > > Ander > > > ----Original Message Follows---- > From: "Jeff Weber" > To: ode at q12.org > > > I just made my own vector and matrix structs. > > One other thing that is different about my approach is I used a "Managed > C++" wrapper rather than the PInvoke method. > > It seemed to work great considering my lack of any true C++ experience. > I'll be getting back to it eventually, but currently I'm busy "faking" some > vehicle physics for a demo that is due in december. I didn't want to chance > using ode as I wasn't sure I'd be able to get things running correctly by > then and still have time to work on the other things that need to be in the > demo. > > -jeff > > > ----Original Message Follows---- > From: Anselm Hook > To: Nate W > CC: > Subject: Re: [ODE] Complie to a Lib > Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) > > > There is one good reason not to use my C# binding - I am relying on a > class based Vector and Matrix math library (that I ported from an open > source clone of Java3D). I strongly suggest using a struct based Vector > and Matrix library such as http://www.exocortex.org/3dengine or others > (his starting point is BSD licenced). > > I'll bet Jeff Weber has solved this correctly - where is Jeff's site? > Jeff? > > - a > > > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > > I am new to ODE and C++. I am working on a wrapper to allow the use > of ODE > > > > from .Net, extending the work already done by Jeff Weber. > > > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode > _________________________________________________________________ Internet access plans that fit your lifestyle -- join MSN. http://resourcecenter.msn.com/access/plans/default.asp From p.terdiman at wanadoo.fr Mon Nov 4 15:09:02 2002 From: p.terdiman at wanadoo.fr (Pierre Terdiman) Date: Mon Nov 4 15:09:02 2002 Subject: [ODE] Joint Naming References: <004001c28440$1ca4a200$f311da50@powerhouse> Message-ID: <001d01c2844e$76582980$0e00000a@pierre> "Cylindrical" seems nice : http://www.solid-dynamics.com/mwfunctionalities/index.htm Pierre > > > We also have joints called sliders, with circular shafts [....] > > > > So long as we're talking about naming, how about "cylindrical joint" for > > those? > > > > Perhaps -- I like it because it describes a shape like 'spherical' and > 'prismatic' do. I'd have to ask someone with a robotics background what the > 'official' term is. Not that I insist on using those -- sometimes they are > confusing to novices: For example "prismatic" isn't exactly intuitive: most > people will think of optics when they hear that. We still use it to avoid > ambiguity. > > -- Adam > > /*================*\ > |Chief Software Architect > |NovodeX AG > |physics middleware > |www.novodex.com > \*================*/ > > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode From adam.moravanszky at novodex.com Mon Nov 4 15:46:01 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [NovodeX]) Date: Mon Nov 4 15:46:01 2002 Subject: [ODE] Joint Naming References: <004001c28440$1ca4a200$f311da50@powerhouse> <001d01c2844e$76582980$0e00000a@pierre> Message-ID: <019101c2844b$df61fdf0$f311da50@powerhouse> Cool site. Too bad the tiny pictures don't always make sense. So "cylindrical" it is, then. -- Adam Moravanszky /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From henri at cs.sun.ac.za Mon Nov 4 15:46:50 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Mon Nov 4 15:46:50 2002 Subject: [ODE] Optimization maybe? Message-ID: <012801c28454$367ee3c0$45d4e892@temple> Hi everybody :) I'm your newest newcomer... *grinZ* I've been very impressed with what I've seen of ODE upto now (not that I've had much exposure yet) - enough to consider porting the entire code to Delphi just to understand it better (but after looking at that whirlwind that is the code for ODE I decided to be less ambitious for the time being... ;) Nonetheless, I'd like to see if I can help a little; one of the things I have some experience in is low-level programming. I'd appreciate if somebody could show me to the part of the ODE code that is the most CPU intensive (presumably the big Jacobian matrix solving) I'd like to give a crack at optimizing the code (not the algorithm!!) manually. Maybe its possible to wring a couple of speed increases out of it. hmmm... and maybe somebody should tell me how the matrix would typically look (random values all over, mostly just a diagonal, or whatever) so I can setup test cases. And what would a suitable matrix size be for testing purposes? (50x50, 200x200, smaller, bigger?) Anything else I should know? (Maybe give-up now, before its too late?) thanks :) Henri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021104/ba03f4e9/attachment.htm From jeffreyweber at hotmail.com Mon Nov 4 16:59:02 2002 From: jeffreyweber at hotmail.com (Jeff Weber) Date: Mon Nov 4 16:59:02 2002 Subject: [ODE] Complie to a Lib Message-ID: My site is at www.farseer.com. The ode stuff is in the downloads section. It's not finished, but Ander Taylor has picked up where I left off. He's going to send me his code and I'll post it on my site. -jeff ----Original Message Follows---- From: Anselm Hook To: Ander Taylor CC: Subject: Re: [ODE] Complie to a Lib Date: Mon, 4 Nov 2002 09:32:30 -0700 (MST) do you have a site for your stuff or is it something you're not sharing yet? just curious because i'd like to see your approach. -a On Mon, 4 Nov 2002, Ander Taylor wrote: > I just worked out that I dont need the lib. > > I can compile the whole lot, managed bits and everything, to a DLL. > > Finished Space, AMotor and Geom, also added Params to JointHinge. > > Works great. > > Ander > > > ----Original Message Follows---- > From: "Jeff Weber" > To: ode at q12.org > > > I just made my own vector and matrix structs. > > One other thing that is different about my approach is I used a "Managed > C++" wrapper rather than the PInvoke method. > > It seemed to work great considering my lack of any true C++ experience. > I'll be getting back to it eventually, but currently I'm busy "faking" some > vehicle physics for a demo that is due in december. I didn't want to chance > using ode as I wasn't sure I'd be able to get things running correctly by > then and still have time to work on the other things that need to be in the > demo. > > -jeff > > > ----Original Message Follows---- > From: Anselm Hook > To: Nate W > CC: > Subject: Re: [ODE] Complie to a Lib > Date: Sun, 3 Nov 2002 22:29:55 -0700 (MST) > > > There is one good reason not to use my C# binding - I am relying on a > class based Vector and Matrix math library (that I ported from an open > source clone of Java3D). I strongly suggest using a struct based Vector > and Matrix library such as http://www.exocortex.org/3dengine or others > (his starting point is BSD licenced). > > I'll bet Jeff Weber has solved this correctly - where is Jeff's site? > Jeff? > > - a > > > > On Sat, 2 Nov 2002, Ander Taylor wrote: > > > > I am new to ODE and C++. I am working on a wrapper to allow the use > of ODE > > > > from .Net, extending the work already done by Jeff Weber. > > > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode > _______________________________________________ ODE mailing list ODE at q12.org http://q12.org/mailman/listinfo/ode _________________________________________________________________ Get a speedy connection with MSN Broadband.  Join now! http://resourcecenter.msn.com/access/plans/freeactivation.asp From russ at q12.org Mon Nov 4 17:30:02 2002 From: russ at q12.org (Russ Smith) Date: Mon Nov 4 17:30:02 2002 Subject: [ODE] Optimization maybe? In-Reply-To: <012801c28454$367ee3c0$45d4e892@temple> Message-ID: > Nonetheless, I'd like to see if I can help a little; one of the things > I have some experience in is low-level programming. I'd appreciate if > somebody could show me to the part of the ODE code that is the most CPU > intensive there are two things right now: (A) the factorization of large matrices (fast_ldlt.c) and solving right hand sides (fast_lsolve.c) and (B) the formation of that matrix in the first place (parts of step.cpp). problem (A) can be made faster by rewriting the factorizer/solver functions to use SIMD assembly, for various platforms (XMM, altivec, whatever). problem (B) is harder because it's a mix of detailed algorithm and many small matrix multiplies - probably implementing XMM versions of the small matrix multiplies would make it faster. note that there has been some talk about using some other, faster (but less precise) dynamics algorithms instead of the big-matrix-factorizing technique (e.g. iterative LCP), but there are still plenty of reasons to optimize the big-matrix algorithms: - they're faster for systems less than N*N, where N is maybe around 20. - they're more precise, and will give good answers in some cases where iterative LCP might fail. - the work done (and experience gained) optimizing the big-matrix algorithms will also apply to optimizing the other algorithms that come along later. - they'll probably be easier to optimize this way. > hmmm... and maybe somebody should tell me how the matrix would > typically look (random values all over, mostly just a diagonal, or > whatever) the big system matrix 'A' is block-sparse. get some test cases by printing out A at the entry to dSolveLCP() in lcp.cpp. > And what would a suitable matrix > size be for testing purposes? (50x50, 200x200, smaller, bigger?) it depends - you can optimize for large or small problems. i would optimize for 20x20 to 50x50 sizes, as systems larger than this will benefit (eventually) from other solver algorithms. > Anything else I should know? (Maybe give-up now, before its too late?) don't give up just yet! search the archive of this mailing list for messages of mine that mention SIMD, XMM or the factorizer, because i've written about this topic before. you'll also want to look at the factorizer builder code in ode/fbuild for an idea of how the current code is constructed. also reading a good book on numerical code will help, e.g. "numerical recipes in C, 2nd ed". (before someone retorts that NRC is not a good book ... on the subject of factorizers it has a good introduction and coverage of the basic issues, even though the code examples they provide are either lame, broken or both). russ. -- Russ Smith http://www.q12.org/ From ps_yumemi at yahoo.com Tue Nov 5 02:15:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Tue Nov 5 02:15:02 2002 Subject: [ODE] rotation Message-ID: <20021105091356.64536.qmail@web40510.mail.yahoo.com> hello, again... sorry people. i really don't get what i'm doing wrong or why my rotation matrix doesn't work. i have two variables: dMatrix3 mobot_rotation const dReal *mobot_rot i use the following code to pass the rotation matrix mobot_rot = dBodyGetRotation(bodyID) mobot_rotation[0]=mobot_rot[0] ... mobot_rotation[11]=mobot_rot[11] dBodySetRotation(bodyID, mobot_rotation) it doesn't work? the bodies end up rotated wrong. i also tried to use the same technique as the settransform function in drawstuff.cpp mobot_rotation[0]=mobot_rot[0] mobot_rotation[1]=mobot_rot[4] ... mobot_rotation[11]=0 and it still didn't turn out right. please help. i really need to solve this problem. __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From ed.jones at oracle.com Tue Nov 5 03:22:01 2002 From: ed.jones at oracle.com (Ed Jones) Date: Tue Nov 5 03:22:01 2002 Subject: [ODE] rotation References: <20021105091356.64536.qmail@web40510.mail.yahoo.com> Message-ID: <3DC79BC2.6050402@oracle.com> Hi, So you are doing this; Get the rotation of "bodyID". Copy that into another matrix. Use that matrix to set the rotation of "bodyID" I think I'm misunderstanding what you're trying to do. My example code, which was nabbed directly from drawstuff does this; Gets the rotation of a body according to ODE Copies that ODE flavoured matrix to an OpenGL matrix Sets the OpenGL transform so that the box (or whatever) gets drawn in its "correct" place, according to ODE What is the effect you're trying to achieve? Cheers, Ed. pia dalusong wrote: >hello, > >again... sorry people. i really don't get what i'm >doing wrong or why my rotation matrix doesn't work. > >i have two variables: >dMatrix3 mobot_rotation >const dReal *mobot_rot > >i use the following code to pass the rotation matrix > >mobot_rot = dBodyGetRotation(bodyID) >mobot_rotation[0]=mobot_rot[0] >... >mobot_rotation[11]=mobot_rot[11] > >dBodySetRotation(bodyID, mobot_rotation) > >it doesn't work? the bodies end up rotated wrong. > >i also tried to use the same technique as the >settransform function in drawstuff.cpp > >mobot_rotation[0]=mobot_rot[0] >mobot_rotation[1]=mobot_rot[4] >... >mobot_rotation[11]=0 > >and it still didn't turn out right. > >please help. i really need to solve this problem. > > >__________________________________________________ >Do you Yahoo!? >HotJobs - Search new jobs daily now >http://hotjobs.yahoo.com/ >_______________________________________________ >ODE mailing list >ODE at q12.org >http://q12.org/mailman/listinfo/ode > > From paul.chavent at fnac.net Tue Nov 5 03:52:02 2002 From: paul.chavent at fnac.net (Chavent Paul) Date: Tue Nov 5 03:52:02 2002 Subject: [ODE] Can i access each geom of a space? Message-ID: <3DC7956A.6040608@fnac.net> Can i access each geom of a space? Yes, it seams possible. But i need to do : dGeomGroupGetNumGeoms() dGeomGroupGetGeom() i wonder if it couldn't be fastest to access geoms with the "first" pointer that is in the "space" structure. Unfortunately, the structure isn't declared in the includes. Is there someone that can say to me if my idea is wrong and/or if there is a solution to access "geoms" without having to do a geomgroup containing all my scene ? From n_di_leva at hotmail.com Tue Nov 5 05:49:02 2002 From: n_di_leva at hotmail.com (Nicola Di Leva) Date: Tue Nov 5 05:49:02 2002 Subject: [ODE] bending wheels again? Message-ID: Hi everybody, done enough RDTL, so don't complain about the overused topic;) Just to be original, I've started my own car simulator using ODE, stealing code..ehm, taking inspiration from the freefall buggy demo ( very stable and smooth indeed ). When it's just a matter of going back and forth, the car behaves quite well, but as soon as it starts turning, the wheels progressively lose their alignment with the relative joint axes. Previous posts mentioned high rotation speeds and friction coefficients, but this is not the case ( i won't list the details of the simulation since they are the same of the freefall buggy demo ). I've read something about problems using directx with ODE too, can someone tell me more? ps. ODE is great, keep up the good work Russ! _________________________________________________________________ Unlimited Internet access for only $21.95/month.  Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp From Remko at act-3d.com Tue Nov 5 07:32:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Tue Nov 5 07:32:02 2002 Subject: [ODE] bending wheels again? Message-ID: <279127752.1737917222.98@server> Maybe you have set the ERP value of the hinge2 to 0.0? We are using ODE with DirectX 8.1 for quite a while now and I do not know of any problems :) -----Original Message----- From: Nicola Di Leva [mailto:n_di_leva at hotmail.com] Sent: Tuesday, November 05, 2002 12:48 PM To: ode at q12.org; Remko Jacobs (act-3d.com) Subject: [ODE] bending wheels again? Hi everybody, done enough RDTL, so don't complain about the overused topic;) Just to be original, I've started my own car simulator using ODE, stealing code..ehm, taking inspiration from the freefall buggy demo ( very stable and smooth indeed ). When it's just a matter of going back and forth, the car behaves quite well, but as soon as it starts turning, the wheels progressively lose their alignment with the relative joint axes. Previous posts mentioned high rotation speeds and friction coefficients, but this is not the case ( i won't list the details of the simulation since they are the same of the freefall buggy demo ). I've read something about problems using directx with ODE too, can someone tell me more? ps. ODE is great, keep up the good work Russ! _________________________________________________________________ Unlimited Internet access for only $21.95/month.? Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp _______________________________________________ ODE mailing list ODE at q12.org http://q12.org/mailman/listinfo/ode From marco.koegler at web.de Tue Nov 5 07:38:02 2002 From: marco.koegler at web.de (=?ISO-8859-2?Q?Marco_K=F6gler?=) Date: Tue Nov 5 07:38:02 2002 Subject: [ODE] Tri-Collider ... confused Message-ID: <3DC7D7A7.7010507@web.de> Hi! I was wondering whether somebody on the list would be kind enough to shed some light regarding the tricollider. There is a tricollider in the CVS repository, but it seems 'oldish' ... is that still the tricollider to use? I'm using Opcode 1.2 in my project and fear that this will conflict with the tricollider in the CVS (as it needs Opcode 1.0). Erwin posted an update to the list sometime in August (newstuff.gz). This uses Opcode 1.2, so that should solve that problem. A bit later Erwin posted something about this code having problems with large triangles and other issues ... he also said that he was glad he didn't commit the changes in the CVS. So, I don't know which code to use :( Should I use the version in the CVS or the one posted in August? Is there a possibility of a more stable/current version in the near future? Questions over questions *sigh* Anyways, ODE rocks ... -Marco From n_di_leva at hotmail.com Tue Nov 5 10:14:01 2002 From: n_di_leva at hotmail.com (Nicola Di Leva) Date: Tue Nov 5 10:14:01 2002 Subject: [ODE] bending wheels again? Message-ID: >Maybe you have set the ERP value of the hinge2 to 0.0? We are using ODE >with DirectX 8.1 for quite a while now and I do not know of any problems >:) No, joint erp and cfm are always set. I've tried several combinations of values for them, but the bending is still there. _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From russ at q12.org Tue Nov 5 11:54:01 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 5 11:54:01 2002 Subject: [ODE] Can i access each geom of a space? In-Reply-To: <3DC7956A.6040608@fnac.net> Message-ID: > Can i access each geom of a space? Yes, it seams possible. the new collision code i'm working on will allow this (and many other things). it'll be checked into CVS hopefully by the end of this week (gotta work the bugs out first). russ. -- Russ Smith http://www.q12.org/ From coding at natew.com Tue Nov 5 12:04:01 2002 From: coding at natew.com (Nate W) Date: Tue Nov 5 12:04:01 2002 Subject: [ODE] bending wheels again? In-Reply-To: Message-ID: On Tue, 5 Nov 2002, Nicola Di Leva wrote: > When it's just a matter of going back and forth, the car behaves quite > well, but as soon as it starts turning, the wheels progressively lose their > alignment with the relative joint axes. > Previous posts mentioned high rotation speeds and friction coefficients, but > this is not the case [...]/ I think you're describing something that I also noticed with the freefall demo on my machine, and my guess is that it could be corrected by tweaking the CFM. Try making it an order of magnitude smaller... e.g. if it's 0.001, change it to 0.0001 (more zeroes). I didn't actually test this theory, but it looks similar to what simulations in Juice do when the CFM is too high, so I think it could be the same thing. The catch is that turning down the CFM makes the simulation more rigid, thus less forgiving, thus more prone to instability or explosion. It's a compromise. It may well be possible to stiffen it a bit before any problems appear, it's impossible to say without trying. -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Tue Nov 5 12:35:02 2002 From: coding at natew.com (Nate W) Date: Tue Nov 5 12:35:02 2002 Subject: [ODE] bending wheels again? In-Reply-To: Message-ID: On Tue, 5 Nov 2002, Nicola Di Leva wrote: > >Maybe you have set the ERP value of the hinge2 to 0.0? > > No, joint erp and cfm are always set. I've tried several combinations of > values for them, but the bending is still there. That reminds me, I should have been more clear in my last message... when I suggested changing CFM, I was referring to the world CFM (set with dWorldSetCFM()). -- Nate Waddoups Redmond WA USA http://www.natew.com From coding at natew.com Tue Nov 5 17:20:02 2002 From: coding at natew.com (Nate W) Date: Tue Nov 5 17:20:02 2002 Subject: [ODE] LMotor? Message-ID: While talking off-list with Adam M about motors, I had an idea that I want to share here, in hopes of elongating Russ' to-do list. ODE has angular motors, but how about linear motors? I'd like to be able to define an 'anchor' body and one to three axes relative to that body, and then constrain the position of a second body along those axes... sorta like the angular motors do now, but with position rather than orientation. The thing I like about this approach to motorization is that AMotors and LMotors together will allow me to create gaits for walking creatures using a higher-level "language." It's basically a way to use ODE's solver to do reverse kinematics. For example, rather than commanding the hip to flex 5 degrees, the knee to bend 10 degrees, and the ankle to flex 5 degrees, the control system could just attach the foot to the hip via an LMotor and command the foot to move up a couple inches. It should allow creature motions to be controlled in a more intuitive way - and in a way that should still work with little or tuning even if the creature's limbs get lengthened or shortened or placed at different angles. From the user's perspective, it turns the problem of foot or hand placement from a nonlinear problem with as many variables as there are joints in the limb, to a linear problem with only as many variables as the user wants to bother with. Comments? Volunteers? I started trying to implement this myself, but couldn't shake the feeling that I was getting in way over my head and would have no idea how to debug what I was writing. Math is hard. :-) -- Nate Waddoups Redmond WA USA http://www.natew.com From n_di_leva at hotmail.com Tue Nov 5 19:31:01 2002 From: n_di_leva at hotmail.com (Nicola Di Leva) Date: Tue Nov 5 19:31:01 2002 Subject: [ODE] bending wheels again? Message-ID: A weird demo is better than 1000 words, so if you want take a look at http://ndileva.250free.com/ToyCar.zip. Any suggestion will be appreciated ( especially on turning the car, which is still a hard task ). ps. i noticed that the freefall demo does not set world's cfm and erp at all, shouldn't it blow up? _________________________________________________________________ Broadband? Dial-up? Get reliable MSN Internet Access. http://resourcecenter.msn.com/access/plans/default.asp From russ at q12.org Tue Nov 5 23:41:01 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 5 23:41:01 2002 Subject: [ODE] slider trouble In-Reply-To: References: <20021031221053.291c8cac.russ@q12.org> Message-ID: <20021105224532.446b7061.russ@q12.org> > I've attached another test that bounces things off > the ground a bit differently, and you can watch two blocks bounce > skyward and then gradually spin up to an explosion. i'm chalking this one up to integrator error - if you lower the timestep, the effect disappears. i'm pretty sure that there are no non-physical forces being applied to the system (as was the case with your previous slider-stop problem). unfortunately this kind of thing (integrator error) is unavoidable with ODE's current integrator in some situations where you have rapidly rotating bodies. > Also, could this problem be related to the problem where a single > flying spinning body also gains angular momentum? yes, it's the same kind of thing. i'll do some more experiments and see if something can be done about this. in the meantime, use a smaller timestep, or less bounce, or larger mass - anything to reduce the amount of rotation experienced per time step. russ. -- Russell Smith http://www.q12.org From adam.moravanszky at novodex.com Wed Nov 6 01:46:01 2002 From: adam.moravanszky at novodex.com (Adam Moravanszky [Novodex]) Date: Wed Nov 6 01:46:01 2002 Subject: [ODE] bending wheels again? References: Message-ID: <003201c28570$8c555870$17a08481@nxcommanche> From: "Nicola Di Leva" > Any suggestion will be appreciated ( especially on turning the car, > which is still a hard task ). Automobile manufacturers have tried in the past to make cars with four wheel steering, but it did not turn out to be a good idea. I would recommend sticking to front wheel steering only when making virtual cars as well. Not sure why the primary ODE buggy demo has this absolutely undriveable configuration either. I tried setting "turnable" to false in your car config file for the rear wheels, but it didn't make a difference. Also: I can still drive the car when it is flipped over! -- Adam Moravanszky /*================*\ |Chief Software Architect |NovodeX AG |physics middleware |www.novodex.com \*================*/ From max.lungarella at aist.go.jp Wed Nov 6 02:21:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 02:21:02 2002 Subject: [ODE] joint friction Message-ID: <20021106181905.203257ac.max.lungarella@aist.go.jp> hi there, i may be asking something that is documented somewhere. but anyhow ... is there a way to enable friction in the joints? in ball and socket joints, for instance? or do i need to implement my own friction model? or do i need to play around with the joint related ERP and CFM? the API does not feature a dJointSetBallAndSocketParam() though! thanks a lot for any sort of feedback! cheers, max From mattias at cambrianlabs.com Wed Nov 6 02:32:01 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Wed Nov 6 02:32:01 2002 Subject: [ODE] bending wheels again? In-Reply-To: <003201c28570$8c555870$17a08481@nxcommanche> References: <003201c28570$8c555870$17a08481@nxcommanche> Message-ID: You must reduce friction if you don't want the car to turn over. cheers, m From Daniel.Groll at t-online.de Wed Nov 6 03:42:02 2002 From: Daniel.Groll at t-online.de (Daniel.Groll@t-online.de) Date: Wed Nov 6 03:42:02 2002 Subject: [ODE] bending wheels again? In-Reply-To: References: <003201c28570$8c555870$17a08481@nxcommanche> Message-ID: <1036578694.3dc8ef864be07@webmail.t-online.de> Hi! I made the wheel bending problem go away by adjusting the rotation of the steering wheels every 6-10th timestep. I calculate which direction they should have and set it with dBodySetQuaternion (or dBodySetRotation). To prevent the car from turning over, I check if all four wheels have contact with the ground. If yes, I apply small forces to them as a "glue" and I reduce the angular velocity of the car body. On an even surface it's almost impossible to tip over now. The behaviour of the car when jumping or flying around seems to be ok because the the tweaks are only applied when the car touches the ground as said before. From neo-nb at gmx.de Wed Nov 6 07:01:01 2002 From: neo-nb at gmx.de (Stefan Werner) Date: Wed Nov 6 07:01:01 2002 Subject: [ODE] Suddenly Disappearing ODE Objects Message-ID: <002401c2859c$f2cba560$1701a8c0@cion> Hello, I've created a simple car sim with ODE and everything works fine. I can drive through my landscape and can jump over other objects. But there is still one problem. If my car doesn't move, then after a few seconds it completely disappears. I get my position out of const dReal *pos; pos = dBodyGetPosition(carbody[0]); I've also noticed, that when my car disappears, "pos" is not a number anymore, it contains a string: "QNAN". I programm with MS VC++ .Net. What does this mean? Does anyone knows this problem? I can't explain it because everything works fine when my car moves around, it happens only when the car doesn't move. I hope someone can help me. Karl Koch From russ at q12.org Wed Nov 6 12:12:01 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 6 12:12:01 2002 Subject: [ODE] joint friction In-Reply-To: <20021106181905.203257ac.max.lungarella@aist.go.jp> Message-ID: > i may be asking something that is documented somewhere. > but anyhow ... is there a way to enable friction in the joints? there is a good and simple way to do this. set the joint 'fmax' parameter to some (positive) value. set the desired velocity parameter to 0. now the joint will exert a force up to fmax to bring the joint velocity down to 0. this is actually a pretty good model of coulomb friction for a joint. changing fmax to be higher will give more friction - and there's no stability problem with choosing any value of fmax >= 0. russ. -- Russ Smith http://www.q12.org/ From neo-nb at gmx.de Wed Nov 6 15:01:01 2002 From: neo-nb at gmx.de (Stefan Werner) Date: Wed Nov 6 15:01:01 2002 Subject: [ODE] Suddenly Disappearing ODE Objects Message-ID: <001201c285df$ec009ea0$1701a8c0@cion> I found out that when my object disappears, the dJointGetHinge2Angle1(Joints[0]) retrieves exactly PI or -PI. When my car move this value lies between -0.5 and 0.5; I think that the reason why dBodyGetPosition retrieves a wrong value. Now does anyone know why suddenly the value jumps to "PI"? And what's about "single" and "double" ODE? What shall I use and how can I switch between both precisions in C++? > Hello, > > I've created a simple car sim with ODE and everything works fine. I can > drive through my landscape and can jump over other objects. But there is > still one problem. If my car doesn't move, then after a few seconds it > completely disappears. I get my position out of > const dReal *pos; > pos = dBodyGetPosition(carbody[0]); > I've also noticed, that when my car disappears, "pos" is not a number > anymore, it contains a string: "QNAN". I programm with MS VC++ .Net. > What does this mean? Does anyone knows this problem? I can't explain it > because everything works fine when my car moves around, it happens only when > the car doesn't move. > I hope someone can help me. > Karl Koch From max.lungarella at aist.go.jp Wed Nov 6 17:07:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 17:07:02 2002 Subject: [ODE] joint friction In-Reply-To: References: <20021106181905.203257ac.max.lungarella@aist.go.jp> Message-ID: <20021107090532.54d375b5.max.lungarella@aist.go.jp> hi russ, yes, your model sounds perfectly reasonable to me. thank you very much. but what about ball and socket joints? is there a way to set something similar to an "fmax" parameter for them? was not able to figure out any function dealing with it. thanks a lot! cheers, max > > i may be asking something that is documented somewhere. > > but anyhow ... is there a way to enable friction in the joints? > > there is a good and simple way to do this. set the joint 'fmax' parameter > to some (positive) value. set the desired velocity parameter to 0. now the > joint will exert a force up to fmax to bring the joint velocity down to 0. > this is actually a pretty good model of coulomb friction for a joint. > changing fmax to be higher will give more friction - and there's no > stability problem with choosing any value of fmax >= 0. > > russ. > > -- > Russ Smith > http://www.q12.org/ > From russ at q12.org Wed Nov 6 17:35:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 6 17:35:02 2002 Subject: [ODE] joint friction In-Reply-To: <20021107090532.54d375b5.max.lungarella@aist.go.jp> Message-ID: friction can be applied to ball and socket joints using the amotor joint - again setting fmax=something and vel=0 for the three axes. note that this is not as general as for the hinge and slider joints - for three free axes there are many ways to derive three (or one or two) friction forces to get various effects. the amotor joint will implement friction as though there were three hinge-type linkages connecting the two bodies - but this is different from what you would get if there was an actual ball fitting into an actual socket, for example. russ. -- Russ Smith http://www.q12.org/ From max.lungarella at aist.go.jp Wed Nov 6 17:43:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 17:43:02 2002 Subject: [ODE] joint friction In-Reply-To: References: <20021107090532.54d375b5.max.lungarella@aist.go.jp> Message-ID: <20021107094110.1651031d.max.lungarella@aist.go.jp> thank you very much for the hint. i'll give it a try right away. keep up the good work! max > friction can be applied to ball and socket joints using the amotor joint - > again setting fmax=something and vel=0 for the three axes. note that this > is not as general as for the hinge and slider joints - for three free axes > there are many ways to derive three (or one or two) friction forces to get > various effects. the amotor joint will implement friction as though there > were three hinge-type linkages connecting the two bodies - but this > is different from what you would get if there was an actual ball fitting > into an actual socket, for example. > > russ. > > -- > Russ Smith > http://www.q12.org/ > From erickt at andrew.cmu.edu Wed Nov 6 18:42:01 2002 From: erickt at andrew.cmu.edu (Erick Tryzelaar) Date: Wed Nov 6 18:42:01 2002 Subject: [ODE] Slip friction coefficient In-Reply-To: Message-ID: Hello all, I was just wondering if the slip friction coefficient corresponds to one to one with dynamic friction. Or is it something else? -Erick From thomas_buehrmann at web.de Wed Nov 6 19:09:02 2002 From: thomas_buehrmann at web.de (Thomas Buehmann) Date: Wed Nov 6 19:09:02 2002 Subject: [ODE] Message-ID: <200211070208.gA728bX26148@mailgate5.cinetic.de> Hi, i'm new to ODE and just tried to install the last release on WinXP. Unfortunately, the make just fails displaying following error code: D:\Development\ODE\ode-0.03>make cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC /Feconfigurator.exe configur ator.c process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBU G_ALLOC /Feconfigurator.exe configurator.c, ...) failed. make (e=2): Das System kann die angegebene Datei nicht finden. make: *** [configurator.exe] Error 2 (sorry for the german stuff in the line before the last; it just means the system wasn't able to find the specified file). i have to admit i'm a make dummy, but it seems as if make fails while trying to build the configurator.exe, right? is there supposed to be a config.h file somewhere (e.g. in include\ode), cause there is none? at least in the doc it's saying you could as well just set the condiguration yourself in that file. or am i just too stupid? any help would be great. thanks, thomas. ________________________________________________________________ Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 From max.lungarella at aist.go.jp Wed Nov 6 19:28:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 19:28:02 2002 Subject: [ODE] In-Reply-To: <200211070208.gA728bX26148@mailgate5.cinetic.de> References: <200211070208.gA728bX26148@mailgate5.cinetic.de> Message-ID: <20021107112605.294d406e.max.lungarella@aist.go.jp> you've got to properly set your "path" environment variable, i guess. apparently your makefile is not able to find "Feconfigurator.exe". try to type "path" in the console (if winXP's got one) and check the output. the directory where "Feconfigurator.exe" is installed should be there. if not, add it to "path". hope this works. cheers, max > Hi, > i'm new to ODE and just tried to install the last release on WinXP. > Unfortunately, the make just fails displaying following error code: > > D:\Development\ODE\ode-0.03>make > cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC > /Feconfigurator.exe configur ator.c > process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC > /DdDOUBLE /DdDEBU G_ALLOC /Feconfigurator.exe configurator.c, ...) > failed. make (e=2): Das System kann die angegebene Datei nicht finden. > make: *** [configurator.exe] Error 2 > > (sorry for the german stuff in the line before the last; it just means > the system wasn't able to find the specified file). > > i have to admit i'm a make dummy, but it seems as if make fails while > trying to build the configurator.exe, right? is there supposed to be a > config.h file somewhere (e.g. in include\ode), cause there is none? at > least in the doc it's saying you could as well just set the > condiguration yourself in that file. > > or am i just too stupid? > any help would be great. > > thanks, > thomas. > > ________________________________________________________________ > Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! > Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 > > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode From max.lungarella at aist.go.jp Wed Nov 6 19:36:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Wed Nov 6 19:36:02 2002 Subject: [ODE] : update In-Reply-To: <200211070208.gA728bX26148@mailgate5.cinetic.de> References: <200211070208.gA728bX26148@mailgate5.cinetic.de> Message-ID: <20021107113406.7b685a55.max.lungarella@aist.go.jp> i'm sorry ... thomas, you should be looking for "cl.exe"'s (the compiler's) directory and NOT for "configurator.exe"'s! cheers, max > Hi, > i'm new to ODE and just tried to install the last release on WinXP. Unfortunately, the make just fails displaying following error code: > > D:\Development\ODE\ode-0.03>make > cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC /Feconfigurator.exe configur > ator.c > process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBU > G_ALLOC /Feconfigurator.exe configurator.c, ...) failed. > make (e=2): Das System kann die angegebene Datei nicht finden. > make: *** [configurator.exe] Error 2 > > (sorry for the german stuff in the line before the last; it just means the system > wasn't able to find the specified file). > > i have to admit i'm a make dummy, but it seems as if make fails while trying to build > the configurator.exe, right? is there supposed to be a config.h file somewhere (e.g. in > include\ode), cause there is none? at least in the doc it's saying you could as well just > set the condiguration yourself in that file. > > or am i just too stupid? > any help would be great. > > thanks, > thomas. > > ________________________________________________________________ > Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! > Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 > > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode From gene at erachampion.com Wed Nov 6 22:31:02 2002 From: gene at erachampion.com (Gene Ruebsamen) Date: Wed Nov 6 22:31:02 2002 Subject: [ODE] Thesis on Evolving Virtual Creatures Message-ID: <1036656107.5212.7.camel@aludra.eranet.com> Hello Everybody, Just finished my thesis on evolving intelligent behaviors in embodied agents. I've updated my page with new videos and information at: http://www.erachampion.com/ai/ I am very happy I selected to use ODE as the physics engine, and I wanted to thank all of you who have offered your input over the past year. Now that I have more time, I will try and make further optimizations and improvements to my work, and hopefully release the code soon (have to clean it up first!). For those of you that are not familiar with my work, I have been evolving locomotive strategies in virtual creatures in a 3D environment. The creatures try to "survive" by evolving faster and more efficient means of locomotion. I am utilizing the ANN/GA paradigm that several of you have discussed in earlier posts. Thanks again! Gene Ruebsamen From coding at natew.com Wed Nov 6 23:23:02 2002 From: coding at natew.com (Nate W) Date: Wed Nov 6 23:23:02 2002 Subject: [ODE] Thesis on Evolving Virtual Creatures In-Reply-To: <1036656107.5212.7.camel@aludra.eranet.com> Message-ID: On 7 Nov 2002, Gene Ruebsamen wrote: > Just finished my thesis on evolving intelligent behaviors in embodied > agents. [...] Nice work! -- Nate Waddoups Redmond WA USA http://www.natew.com From minorlogic at yahoo.com Thu Nov 7 01:16:02 2002 From: minorlogic at yahoo.com (Michael Norel) Date: Thu Nov 7 01:16:02 2002 Subject: [ODE] Optimization again Message-ID: <20021107081527.91338.qmail@web11703.mail.yahoo.com> Have a look at ODE sources, and have a quest : code such this is not very important but calculated every step and for every object: ............ for (i=0; ifacc[0] += body[i]->mass.mass * world->gravity[0]; body[i]->facc[1] += body[i]->mass.mass * world->gravity[1]; body[i]->facc[2] += body[i]->mass.mass * world->gravity[2]; } ............. Is this possible to ilolate such a code and optimaze it ? I think it will not change often ? ............ // some example for C like style code for (i=0; ifacc; dReal mass = body[i]->mass.mass; dReal * gravity = world->gravity; // some isolated performance primitives MULTYPLY_BLOCK( facc, gravity, mass, 3 ); // MULTYPLY_BLOCK( dest, src, multer, counter ); } } __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ed.jones at oracle.com Thu Nov 7 03:11:02 2002 From: ed.jones at oracle.com (Ed Jones) Date: Thu Nov 7 03:11:02 2002 Subject: [ODE] References: <200211070208.gA728bX26148@mailgate5.cinetic.de> <20021107112605.294d406e.max.lungarella@aist.go.jp> Message-ID: <3DCA3C01.4020800@oracle.com> Hi, I don't know which compiler you're using, but for Visual C/C++ 6.0 I type something like; "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat" ...(including the quotes) at the command prompt, before typing "make", and that seems to work just fine. In the olden days you'd probably be able to call this script from your autoexec.bat file, but I'm not sure if recent versions of Windows have such a thing. Alternatively, when I install VC there's an option which says something like "Register the environment variables" which I guess sets the environment properly within Windows, so you don't have to type this everytime. Alternatively (again), you could look in that script and register all environment variables manually, with Windows, yourself. Mind you, that's on Win2k and VC6, dunno about XP. ;-) Hope that's useful. Cheers, Ed. Max Lungarella wrote: >you've got to properly set your "path" environment variable, i guess. >apparently your makefile is not able to find "Feconfigurator.exe". try >to type "path" in the console (if winXP's got one) and check the output. >the directory where "Feconfigurator.exe" is installed should be there. >if not, add it to "path". > >hope this works. > >cheers, > max > > > > >>Hi, >>i'm new to ODE and just tried to install the last release on WinXP. >>Unfortunately, the make just fails displaying following error code: >> >>D:\Development\ODE\ode-0.03>make >>cl /nologo /DWIN32 /DMSVC /DdDOUBLE /DdDEBUG_ALLOC >>/Feconfigurator.exe configur ator.c >>process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC >>/DdDOUBLE /DdDEBU G_ALLOC /Feconfigurator.exe configurator.c, ...) >>failed. make (e=2): Das System kann die angegebene Datei nicht finden. >>make: *** [configurator.exe] Error 2 >> >>(sorry for the german stuff in the line before the last; it just means >>the system wasn't able to find the specified file). >> >>i have to admit i'm a make dummy, but it seems as if make fails while >>trying to build the configurator.exe, right? is there supposed to be a >>config.h file somewhere (e.g. in include\ode), cause there is none? at >>least in the doc it's saying you could as well just set the >>condiguration yourself in that file. >> >>or am i just too stupid? >>any help would be great. >> >>thanks, >>thomas. >> >>________________________________________________________________ >>Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! >>Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 >> >> >>_______________________________________________ >>ODE mailing list >>ODE at q12.org >>http://q12.org/mailman/listinfo/ode >> >> >_______________________________________________ >ODE mailing list >ODE at q12.org >http://q12.org/mailman/listinfo/ode > > From ps_yumemi at yahoo.com Thu Nov 7 08:55:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Thu Nov 7 08:55:02 2002 Subject: [ODE] rotation Message-ID: <20021107155451.29271.qmail@web40506.mail.yahoo.com> hello, ok, i finally got my variables right. i have another question though. i got my rotation matrix using const dReal dBodyGetRotation(bodyID) and then i got the values using a dReal matrix[12]; i then to transfer it to a dMatrix3 rotation_matrix and use dBodySetRotation(bodyID,rotation_matrix) however, i'm not getting the result i want. is there any way to get the euler angles from the matrix? if i'm using it on a car just on the chassis body after i attach everything else is that ok? is there any reason for this not to work? pia __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From coding at natew.com Thu Nov 7 10:27:01 2002 From: coding at natew.com (Nate W) Date: Thu Nov 7 10:27:01 2002 Subject: [ODE] rotation In-Reply-To: <20021107155451.29271.qmail@web40506.mail.yahoo.com> Message-ID: On Thu, 7 Nov 2002, pia dalusong wrote: > is there any way to get the euler angles from the > matrix? I'm not sure, but a google search on "euler angle matrix conversion" does turn up a bunch of pages that I think show how to extract euler angles from a quaternion. I only skimmed the results, but it looks promising. > if i'm using it on a car just on the chassis body > after i attach everything else is that ok? > is there any reason for this not to work? If "it" refers to dBodySetRotation, then I think you're going to get some weird behavior if you're rotating the body more than a tiny amount. ODE will try to bring the wheels back into alignment during the next timestep, and that could take huge forces, and that could lead to explosive behavior. At the very least I would expect the car to wiggle a lot during the first few timesteps. -- Nate Waddoups Redmond WA USA http://www.natew.com From erwin at vo.com Thu Nov 7 11:05:02 2002 From: erwin at vo.com (Erwin de Vries) Date: Thu Nov 7 11:05:02 2002 Subject: [ODE] Tri-Collider ... confused References: <3DC7D7A7.7010507@web.de> Message-ID: <000201c28688$0983c4e0$73fefea9@athlon> You should try both and see which works best for you. Both are very similar, and its pretty trivial to convert the CVS version to Opcode 1.2. If you need your trilist to be transformed dynamically, you can only use the one posted on this list. The tricollider will be integrated into ODE at some point in the future. I will fix the issues i reported to this list earlier, sometime soon. I've been saying this for a while.. Busy.. :-( But it will happen this year! :-P Erwin ----- Original Message ----- From: "Marco K?gler" To: Sent: Tuesday, November 05, 2002 15:37 Subject: [ODE] Tri-Collider ... confused > Hi! > > I was wondering whether somebody on the list would be kind enough to > shed some light regarding the tricollider. > > There is a tricollider in the CVS repository, but it seems 'oldish' ... > is that still the tricollider to use? > > I'm using Opcode 1.2 in my project and fear that this will conflict with > the tricollider in the CVS (as it needs Opcode 1.0). Erwin posted an > update to the list sometime in August (newstuff.gz). This uses Opcode > 1.2, so that should solve that problem. A bit later Erwin posted > something about this code having problems with large triangles and other > issues ... he also said that he was glad he didn't commit the changes in > the CVS. > > So, I don't know which code to use :( > > Should I use the version in the CVS or the one posted in August? Is > there a possibility of a more stable/current version in the near future? > > Questions over questions *sigh* > > Anyways, ODE rocks ... > > -Marco > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode > > From mattias at cambrianlabs.com Thu Nov 7 11:32:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Thu Nov 7 11:32:02 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: <000201c28688$0983c4e0$73fefea9@athlon> References: <3DC7D7A7.7010507@web.de> <000201c28688$0983c4e0$73fefea9@athlon> Message-ID: > The tricollider will be integrated into ODE at some point > in the future. If I recall correctly, the tri-collider requires ODE to be compiled in single precision - will this change for the integration, or will tri- collider not be available when compiling to double precision? cheers, m From stephan at eisscholle.de Thu Nov 7 12:19:02 2002 From: stephan at eisscholle.de (Stephan Heigl) Date: Thu Nov 7 12:19:02 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: <000201c28688$0983c4e0$73fefea9@athlon> References: <3DC7D7A7.7010507@web.de> <000201c28688$0983c4e0$73fefea9@athlon> Message-ID: <200211072018.29994.stephan@eisscholle.de> Since i haven't been subscribed that long to that list, what patches are you refering to? I've searched through the the ml archive of August, but i haven't found the mentioned patch. Thanks alot. - Stephan On Wednesday 06 November 2002 22:58, Erwin de Vries wrote: > You should try both and see which works best for you. Both are very > similar, and its pretty trivial to convert the CVS version to Opcode 1.2. > If you need your trilist to be transformed dynamically, you can only use > the one posted on this list. The tricollider will be integrated into ODE at > some point in the future. > > I will fix the issues i reported to this list earlier, sometime soon. I've > been saying this for a while.. Busy.. :-( > > But it will happen this year! :-P > > Erwin > > ----- Original Message ----- > From: "Marco K?gler" > To: > Sent: Tuesday, November 05, 2002 15:37 > Subject: [ODE] Tri-Collider ... confused > > > Hi! > > > > I was wondering whether somebody on the list would be kind enough to > > shed some light regarding the tricollider. > > > > There is a tricollider in the CVS repository, but it seems 'oldish' ... > > is that still the tricollider to use? > > > > I'm using Opcode 1.2 in my project and fear that this will conflict with > > the tricollider in the CVS (as it needs Opcode 1.0). Erwin posted an > > update to the list sometime in August (newstuff.gz). This uses Opcode > > 1.2, so that should solve that problem. A bit later Erwin posted > > something about this code having problems with large triangles and other > > issues ... he also said that he was glad he didn't commit the changes in > > the CVS. > > > > So, I don't know which code to use :( > > > > Should I use the version in the CVS or the one posted in August? Is > > there a possibility of a more stable/current version in the near future? > > > > Questions over questions *sigh* > > > > Anyways, ODE rocks ... > > > > -Marco > > > > _______________________________________________ > > ODE mailing list > > ODE at q12.org > > http://q12.org/mailman/listinfo/ode > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode From erickt at andrew.cmu.edu Thu Nov 7 12:25:02 2002 From: erickt at andrew.cmu.edu (Erick Tryzelaar) Date: Thu Nov 7 12:25:02 2002 Subject: [ODE] rotation In-Reply-To: Message-ID: Sure there is: This is from David Eberly's (chief architect behind the netimmerse engine) webpage: http://www.magic-software.com/Documentation/EulerAngles.pdf Also, if you're interested, the rest of that site has an amazing amount of useful information. Its good stuff. -Erick On Thu, 7 Nov 2002, Nate W wrote: > On Thu, 7 Nov 2002, pia dalusong wrote: > > > is there any way to get the euler angles from the > > matrix? > > I'm not sure, but a google search on "euler angle matrix conversion" does > turn up a bunch of pages that I think show how to extract euler angles > from a quaternion. I only skimmed the results, but it looks promising. > > > if i'm using it on a car just on the chassis body > > after i attach everything else is that ok? > > is there any reason for this not to work? > > If "it" refers to dBodySetRotation, then I think you're going to get some > weird behavior if you're rotating the body more than a tiny amount. ODE > will try to bring the wheels back into alignment during the next timestep, > and that could take huge forces, and that could lead to explosive > behavior. At the very least I would expect the car to wiggle a lot during > the first few timesteps. > > -- > > Nate Waddoups > Redmond WA USA > http://www.natew.com > > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode > > From marco.koegler at web.de Thu Nov 7 13:09:02 2002 From: marco.koegler at web.de (=?ISO-8859-2?Q?Marco_K=F6gler?=) Date: Thu Nov 7 13:09:02 2002 Subject: [ODE] Tri-Collider ... confused References: <3DC7D7A7.7010507@web.de> <000201c28688$0983c4e0$73fefea9@athlon> <200211072018.29994.stephan@eisscholle.de> Message-ID: <3DCAC82E.8020404@web.de> Stephan Heigl wrote: > Since i haven't been subscribed that long to that list, what patches are you > refering to? I've searched through the the ml archive of August, but i > haven't found the mentioned patch. You can find it here: http://q12.org/pipermail/ode/2002-August/001646.html I had to copy/paste the base64 encoded stuff into a file and then decode it with the 'base64' command-line tool. Should be standard on Linux/Unix ... a Windows version can be found here: http://www.fourmilab.ch/webtools/base64/ -Marco From coding at natew.com Thu Nov 7 13:49:01 2002 From: coding at natew.com (Nate W) Date: Thu Nov 7 13:49:01 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: Message-ID: On Thu, 7 Nov 2002, Mattias Fagerlund wrote: > > The tricollider will be integrated into ODE at some point > > in the future. > > If I recall correctly, the tri-collider requires ODE to be compiled in > single precision - will this change for the integration, or will tri- > collider not be available when compiling to double precision? I am using tri-collider with single-precision ODE right now with good results. I tried compiling both with double-precision and although the build worked I couldn't get it work at run time. I think the run-time problem was caused by pointer confusion - something expecting an arry of single-precision values received an array of doubles, or vice versa. I really don't think it would take much effort to get it work with doubles, but at the time this happened the CRCRLF bug in VS.Net was making some of the tri-collider source files impossible for me to work with. FWIW, my app doesn't behave noticably different when built with dSINGLE vs dDOUBLE. Juice started out in dDOUBLE mode, but has been released in dSINGLE mode since I integrated Demeter and the tri collider. If anyone noticed the change they haven't mentioned it to me. -- Nate Waddoups Redmond WA USA http://www.natew.com From mattias at cambrianlabs.com Thu Nov 7 14:03:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Thu Nov 7 14:03:02 2002 Subject: [ODE] Tri-Collider ... confused In-Reply-To: References: Message-ID: > > > The tricollider will be integrated into ODE at some point > > > in the future. > > > > If I recall correctly, the tri-collider requires ODE to be compiled > in > > single precision - will this change for the integration, or will tri- > > collider not be available when compiling to double precision? > > I am using tri-collider with single-precision ODE right now with good > results. I tried compiling both with double-precision and although the > build worked I couldn't get it work at run time. My evolved demos exploded spectacularly when I used single precision. I mean, my hopper left for saturn or something. I haven't seen it since. In double precision, things work just fine. That could be some bug on my part, but nothing I could track down. > I really don't think it would take much effort to get > it > work with doubles, but at the time this happened the CRCRLF bug in > VS.Net > was making some of the tri-collider source files impossible for me to > work with. I made a small util that loads all files that match a pattern and re- saves them, fixing all lines with CrLf (i recurses into subdirs as well). Let me know if you're interested. cheers, m From russ at q12.org Fri Nov 8 00:58:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 8 00:58:02 2002 Subject: [ODE] new ODE collision Message-ID: <20021108000235.5bc25ca1.russ@q12.org> if you're curious, the source files for the new collision infrastructure have been checked into CVS (collision_*.h, collision_*.cpp). it has not been hooked up to the rest of ODE yet, so the only reason i mention it is for the curious. note that there's still a bunch of stuff to do, in particular to hook up the ray, trimesh and cylinder classes, and to convert the hash table space to use an incremental approach ... but you can get an idea of the new layout. the new collision infrastructure is 99% API compatible with the old, but i'll provide an ODE 'legacy' collision option so that existing code is guaranteed not to break - but all new collision development will go on the new infrastructure. russ. -- Russell Smith http://www.q12.org From ps_yumemi at yahoo.com Fri Nov 8 08:12:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Fri Nov 8 08:12:02 2002 Subject: [ODE] missing function Message-ID: <20021108151058.35692.qmail@web40510.mail.yahoo.com> hello, do these functions exist and what do they do? dStopwatchReset dStopwatchStop dStopwatchStart i know they probably work the way they sound but are they in ode? pia __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From espmiii at yahoo.com Fri Nov 8 10:26:03 2002 From: espmiii at yahoo.com (James Myers) Date: Fri Nov 8 10:26:03 2002 Subject: [ODE] Pool table physics Message-ID: <20021108172523.74417.qmail@web11303.mail.yahoo.com> Hello all, new user here... Is ODE appropriate for simulating a game of pool? I ask because I'm either modifying the wrong parameters or barking up the wrong library. There are two big problems I'm having: The first problem is that the balls are not "rolling". The friction from the table should put torque on the ball and cause angular acceleration until the ball reaches natural rolling. The balls orientation as returned by dBodyGetRotation doesn't reflect this. Eventually the balls' orientation does change a little, but only after a lot of playing. I'm using dBodyAddForce, so there shouldn't be any english applied to the cue ball. The second problem is that as the balls start to slow down, they will not travel in a straight line. This is hard to describe but if I apply a small force at about a 35 degree angle around the y axis parallel to the xz plane, the cue ball will travel straight for a bit, then start to curve in the +x direction, then roll straight along +x until it stops. The same happens if I hit on an angle closer to + or - z, it will start to head along that axis. It also happens on say, a break shot, where all the balls will eventually be traveling in + or - x or z near the end of the shot. I'm guessing there's just something wrong with my surface parameters. I am only using the dContactBounce flag and changing the mu and bounce parameters based on the type of collision (bumper-ball, ball-floor, ball-ball). I'm not a real physics genius, which is why I switched to ODE in the first place. I am using my own collision functions right now, perhaps there should be more than a single contact joint where the ball meets the table? They tend to jitter a bit every 50 frames (which is about 200 world ticks). Maybe that's due to using the double precision ode and performing my collision detection with single precision? It does happen in both the 0.03 release and whatever was in cvs wednesday afternoon. Any advice would be appreciated greatly. Is more information needed? Thanks much, James __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ps_yumemi at yahoo.com Sat Nov 9 02:27:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sat Nov 9 02:27:02 2002 Subject: [ODE] need to understand this Message-ID: <20021109092556.77275.qmail@web40507.mail.yahoo.com> hello, after a lot of digging, i saw this void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal theta, dReal psi) { dReal sphi,cphi,stheta,ctheta,spsi,cpsi; dAASSERT (R); sphi = dSin(phi); cphi = dCos(phi); stheta = dSin(theta); ctheta = dCos(theta); spsi = dSin(psi); cpsi = dCos(psi); _R(0,0) = cpsi*ctheta; _R(0,1) = spsi*ctheta; _R(0,2) =-stheta; _R(1,0) = cpsi*stheta*sphi - spsi*cphi; _R(1,1) = spsi*stheta*sphi + cpsi*cphi; _R(1,2) = ctheta*sphi; _R(2,0) = cpsi*stheta*cphi + spsi*sphi; _R(2,1) = spsi*stheta*cphi - cpsi*sphi; _R(2,2) = ctheta*cphi; } i'm a little confused as to how you put values into a dMatrix and how do you call it? if i have a variable const dReal *R and dMatrix3 M is R[0]=m[0,0] ? i'm sorry but i don't understand what happens when you write _R(2,1) is it an 2d array matrix[3][3] or a 1d matrix[12]? thanks __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ps_yumemi at yahoo.com Sat Nov 9 04:42:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sat Nov 9 04:42:02 2002 Subject: [ODE] speed control Message-ID: <20021109114122.66919.qmail@web40508.mail.yahoo.com> hi, how do you best control the speed and orientation of your mobot when you have specific values in mind? how can i control the time it stays that way? is using dbodysetlinearvel and dbodysetangular vel during a simloop wrong? what else can i use? thanks __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From erwin at vo.com Sat Nov 9 05:37:02 2002 From: erwin at vo.com (Erwin de Vries) Date: Sat Nov 9 05:37:02 2002 Subject: [ODE] new ODE collision References: <20021108000235.5bc25ca1.russ@q12.org> Message-ID: <000401c287ec$8c862b70$73fefea9@athlon> Looking good. Some comments: - Remember to add dGeomMoved() calls inside of all Set functions of a geom. Also SetRadius, etc. - I think the destructor of a geom needs to tell the body it might be attached to that it wants to remove itself. Otherwise the body will use this geom in its linked list after it has been destroyed, which crashes. - When adding the ray class we should think about what the 'penetration depth' should be. Do you have any thoughts on this? - Why do you memcopy inside the dxSpace::computeAABB() function? - Should we add support for a user defined, or infinite AABB on demand for spaces? This is really useful for the quadtree space containing huge (10.000 for example) amounts of geoms. If i would remove a single geom it would need to do a lot of work. Its very nice to see how you transformed parts of my code to work with your (existing) code, resulting in the best of both worlds. Great job. Erwin ----- Original Message ----- From: "Russ Smith" To: Sent: Friday, November 08, 2002 06:02 Subject: [ODE] new ODE collision > > if you're curious, the source files for the new collision infrastructure > have been checked into CVS (collision_*.h, collision_*.cpp). it has not > been hooked up to the rest of ODE yet, so the only reason i mention it > is for the curious. note that there's still a bunch of stuff to do, in > particular to hook up the ray, trimesh and cylinder classes, and to > convert the hash table space to use an incremental approach ... but you > can get an idea of the new layout. > > the new collision infrastructure is 99% API compatible with the old, but > i'll provide an ODE 'legacy' collision option so that existing code is > guaranteed not to break - but all new collision development will go on > the new infrastructure. > > russ. > > -- > Russell Smith > http://www.q12.org > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode > > From Daniel.Groll at t-online.de Sat Nov 9 07:19:02 2002 From: Daniel.Groll at t-online.de (Daniel.Groll@t-online.de) Date: Sat Nov 9 07:19:02 2002 Subject: [ODE] rate for fixed timesteps Message-ID: <1036851471.3dcd190fc0ebf@webmail.t-online.de> I use fixed timesteps to run my car simulation game. With a rate of 60 Hz the simulation runs smooth and seemed to be stable but now with further testing I encountered some stability problems when cars or objects move fast. Sometimes they seem to break through geometry or "caught" in geometry. Is this the cause of a relatively low rate of world timesteps? Or are there other reasons for instability? At which rates run phyiscs simulations in common? From ps_yumemi at yahoo.com Sat Nov 9 10:35:02 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sat Nov 9 10:35:02 2002 Subject: [ODE] no rotation Message-ID: <20021109173403.55406.qmail@web40513.mail.yahoo.com> hello, i called a dBodySetRotation and the program doesn't go through it. all the other functions work but that particular pair. i called dRFromEulerAngles before i called dbodysetrotation before i joined the wheels to my chassis but the chassis doesn't rotate at all. i even put different values to check dRFromEulerAngles (bodyID,0,0,270) and it still doesn't turn? what could possibly wrong with it? btw this is the second mobot in the system can that affect it? thanks __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From ps_yumemi at yahoo.com Sun Nov 10 10:03:01 2002 From: ps_yumemi at yahoo.com (pia dalusong) Date: Sun Nov 10 10:03:01 2002 Subject: [ODE] matrix Message-ID: <20021110170253.68888.qmail@web40508.mail.yahoo.com> is the rotation matrix unique for ANY combination of theta, phi and psi? or do they have their drawbacks? are the linear and angular velocities related to euler angles? __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From thomasharte at lycos.co.uk Sun Nov 10 15:51:02 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Sun Nov 10 15:51:02 2002 Subject: [ODE] matrix Message-ID: <1036968557010081@lycos-europe.com> An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021110/9b2acb74/attachment.htm From russ at q12.org Sun Nov 10 18:54:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 18:54:01 2002 Subject: [ODE] ODE's new collision system Message-ID: <20021110175837.73e010cb.russ@q12.org> ODE's new collision system has been hooked up to the rest of ODE. here's the docs for the new API, as well as a porting guide. http://q12.org/ode/ode-docs.html note that the user can activate either the old or new collision API when ODE is compiled, by setting the ODE_OLD_COLLISION variable in config/user-settings. BUT NOTE, even if the old ODE collision code is used, spaces must still be created with the new API, using a parent argument or 0. work is continuing on adding features to the new collision code. russ. -- Russell Smith http://www.q12.org From russ at q12.org Sun Nov 10 19:09:02 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 19:09:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <000401c287ec$8c862b70$73fefea9@athlon> References: <20021108000235.5bc25ca1.russ@q12.org> <000401c287ec$8c862b70$73fefea9@athlon> Message-ID: <20021110181315.7c8dcc2e.russ@q12.org> > - Remember to add dGeomMoved() calls inside of all Set functions of a > geom. Also SetRadius, etc. yup, i'm on it. > - I think the destructor of a geom needs to tell the body it might be > attached to that it wants to remove itself. Otherwise the body will > use this geom in its linked list after it has been destroyed, which > crashes. quite right - i'll do this too. > - When adding the ray class we should think about what the > 'penetration depth' should be. Do you have any thoughts on this? i'm not sure that dRay will ever be attached to a body, in which case penetration depth does not have much use for the dynamics. perhaps you can think of a non-dynamics use/definition for the penetration depth? > - Why do you memcopy inside the dxSpace::computeAABB() function? no good reason. it may actually be marginally faster because the g->recomputeAABB() call will cause a reload of the class aabb pointer, but not the stack aabb buffer. it's an optimization, but i doubt anyone would notice the extra cycles. > - Should we add support for a user defined, or infinite AABB on demand > for spaces? This is really useful for the quadtree space containing > huge (10.000 for example) amounts of geoms. If i would remove a single > geom it would need to do a lot of work. i don't understand this .. ? russ. -- Russell Smith http://www.q12.org From russ at q12.org Sun Nov 10 20:44:02 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 20:44:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <000401c287ec$8c862b70$73fefea9@athlon> References: <20021108000235.5bc25ca1.russ@q12.org> <000401c287ec$8c862b70$73fefea9@athlon> Message-ID: <20021110194819.0b0957de.russ@q12.org> > - Remember to add dGeomMoved() calls inside of all Set functions of a > geom. Also SetRadius, etc. done. > - I think the destructor of a geom needs to tell the body it might be > attached to that it wants to remove itself. Otherwise the body will > use this geom in its linked list after it has been destroyed, which > crashes. done. also the previous dGeomSetBody(0) code was completely broken, this is fixed too (hopefully). russ. -- Russell Smith http://www.q12.org From mein at cs.umn.edu Sun Nov 10 20:54:01 2002 From: mein at cs.umn.edu (Kent Mein) Date: Sun Nov 10 20:54:01 2002 Subject: [ODE] another small patch to the ode source Message-ID: <20021105201649.A4038@cs.umn.edu> At the end of the build: My machine is trying to link the following with gcc, it should be g++. (I'm on a Sparc running SunOS5.8 useing gcc-3.2) Example: gcc -o ode/test/test_chain2.exe ode/test/test_chain2.o lib/libode.a lib/libdrawstuff.a -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib/X11R6 -L/usr/lib/X11 -lX11 -lGL -lGLU -lm Kent -- mein at cs.umn.edu http://www.cs.umn.edu/~mein From si at freefall.freehosting.net Sun Nov 10 21:02:35 2002 From: si at freefall.freehosting.net (Si Brown) Date: Sun Nov 10 21:02:35 2002 Subject: [ODE] bending wheels again? Message-ID: <200211061355.gA6DtVu11493@hook.org> Hi, >I've read something about problems using directx with ODE too, can someone >tell me more? The only problem I had was with getting DirectX to preserve the FPU exception behaviour, which can be achieved by creating the device with the D3DCREATE_FPU_PRESERVE flag set. Failing to do so broke some of the ODE internals (in the version I was using). Ta, Si From maddocks at metservice.com Sun Nov 10 21:15:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Sun Nov 10 21:15:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <20021110194819.0b0957de.russ@q12.org> Message-ID: <1B6F5262-F52C-11D6-8ACD-00039394FB86@metservice.com> Does all this mean that tricollider is now part of the core distribution? Henry On Monday, November 11, 2002, at 01:48 PM, Russ Smith wrote: > > russ. > From russ at q12.org Sun Nov 10 21:38:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 21:38:01 2002 Subject: [ODE] credit Message-ID: <20021110204247.41e37209.russ@q12.org> in the spirit of giving credit where it is due, i've created a list of ODE contributors and their contributions: http://q12.org/cgi-bin/wiki.pl?ContributorsToODE if i forgot your name or what you did, can you edit this page accordingly? (it's a wiki, so everyone can edit it). i'll move this list to the ODE main page when it's accurate. russ. -- Russell Smith http://www.q12.org From russ at q12.org Sun Nov 10 21:47:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 10 21:47:01 2002 Subject: [ODE] new ODE collision In-Reply-To: <1B6F5262-F52C-11D6-8ACD-00039394FB86@metservice.com> References: <20021110194819.0b0957de.russ@q12.org> <1B6F5262-F52C-11D6-8ACD-00039394FB86@metservice.com> Message-ID: <20021110204313.0f068550.russ@q12.org> > Does all this mean that tricollider is now part of the core > distribution? not quite yet, but it will be. russ. -- Russell Smith http://www.q12.org From maddocks at metservice.com Sun Nov 10 21:56:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Sun Nov 10 21:56:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <20021110204313.0f068550.russ@q12.org> Message-ID: kewl...I can't wait:) On Monday, November 11, 2002, at 02:43 PM, Russ Smith wrote: > not quite yet, but it will be. From dmcclurg at pandemicstudios.com.au Sun Nov 10 22:04:43 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Sun Nov 10 22:04:43 2002 Subject: [ODE] rate for fixed timesteps Message-ID: To avoid breaking through geometry or generating large collision penetration depths, you'll need use a step value which scales to your velocity. step = 1/60 speed = length(vel) if (speed * step) > max_depth then step = max_depth / speed endif dWorldStep(world, step) just make sure max_depth is less than the radius of your moving vehicle. ideally, it would be small enough not to visually notice either (eg. radius * 0.1f) if you really want to use a fixed time step, step = max_depth / max_speed -----Original Message----- From: Daniel.Groll at t-online.de [mailto:Daniel.Groll at t-online.de] Sent: Sunday, 10 November 2002 12:18 AM To: ode at q12.org Subject: [ODE] rate for fixed timesteps I use fixed timesteps to run my car simulation game. With a rate of 60 Hz the simulation runs smooth and seemed to be stable but now with further testing I encountered some stability problems when cars or objects move fast. Sometimes they seem to break through geometry or "caught" in geometry. Is this the cause of a relatively low rate of world timesteps? Or are there other reasons for instability? At which rates run phyiscs simulations in common? From chris.campbell at l8tech.com Sun Nov 10 22:38:01 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Sun Nov 10 22:38:01 2002 Subject: [ODE] bang! Message-ID: Sometimes having explosions in a physics simulation is a good thing :) http://oscar.lincmedia.co.jp:58080/bang.zip Press h to get some instructions - you should really be inside the room to throw the dynamite properly. This is from the final (?) tutorial on how to use a game engine I have been working on which has a small amount of integration with ODE. I'm hoping to get my website organised and up sometime in the next few weeks. ChrisC From coding at natew.com Mon Nov 11 01:44:02 2002 From: coding at natew.com (Nate W) Date: Mon Nov 11 01:44:02 2002 Subject: [ODE] new ODE collision In-Reply-To: <20021110181315.7c8dcc2e.russ@q12.org> Message-ID: On Sun, 10 Nov 2002, Russ Smith wrote: > > - When adding the ray class we should think about what the > > 'penetration depth' should be. Do you have any thoughts on this? > > i'm not sure that dRay will ever be attached to a body, in which case > penetration depth does not have much use for the dynamics. perhaps you > can think of a non-dynamics use/definition for the penetration depth? The first thing that came to my mind when I heard about the ray class was sensors for the critters I'm making in Juice, sort of like IR or ultrasonic rangefinders in robots, or like whiskers on cats. I'd want to know the distance from the ray's origin to the first object it collides with. Second, I think they might be useful for fast-moving objects - if you project a ray forward along a missile's direction of travel, you could get "collision" info in cases where the missile would otherwise teleport around an object due to its position changing by a distance greater than its length. In that case, could the ray intersection be used to generate a contact joint, to stop the missile from penetrating? -- Nate Waddoups Redmond WA USA http://www.natew.com From Remko at act-3d.com Mon Nov 11 03:33:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Mon Nov 11 03:33:02 2002 Subject: [ODE] Universal joint Message-ID: <279631823.2242109102.98@server> Is it possible to include parameters that limit the rotation of a universal joint? This way you could create a rag doll with ODE. This is very useful in games, like Doom 3 where a character drops of the stairs after dying instead of playing a standard animation. From ed.jones at oracle.com Mon Nov 11 04:11:02 2002 From: ed.jones at oracle.com (Ed Jones) Date: Mon Nov 11 04:11:02 2002 Subject: [ODE] need to understand this References: <20021109092556.77275.qmail@web40507.mail.yahoo.com> Message-ID: <3DCF9028.4040402@oracle.com> Hi, From "common.h"... typedef dReal dMatrix3[4*3]; and from the top of "rotation.cpp"... #define _R(i,j) R[(i)*4+(j)] ;-) Cheers, Ed. pia dalusong wrote: >hello, > >after a lot of digging, i saw this >void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal >theta, dReal psi) >{ > dReal sphi,cphi,stheta,ctheta,spsi,cpsi; > dAASSERT (R); > sphi = dSin(phi); > cphi = dCos(phi); > stheta = dSin(theta); > ctheta = dCos(theta); > spsi = dSin(psi); > cpsi = dCos(psi); > _R(0,0) = cpsi*ctheta; > _R(0,1) = spsi*ctheta; > _R(0,2) =-stheta; > _R(1,0) = cpsi*stheta*sphi - spsi*cphi; > _R(1,1) = spsi*stheta*sphi + cpsi*cphi; > _R(1,2) = ctheta*sphi; > _R(2,0) = cpsi*stheta*cphi + spsi*sphi; > _R(2,1) = spsi*stheta*cphi - cpsi*sphi; > _R(2,2) = ctheta*cphi; >} >i'm a little confused as to how you put values into a >dMatrix and how do you call it? >if i have a variable >const dReal *R >and >dMatrix3 M > >is R[0]=m[0,0] ? >i'm sorry but i don't understand what happens when you >write _R(2,1) > >is it an 2d array matrix[3][3] or a 1d matrix[12]? > >thanks > > > >__________________________________________________ >Do you Yahoo!? >U2 on LAUNCH - Exclusive greatest hits videos >http://launch.yahoo.com/u2 >_______________________________________________ >ODE mailing list >ODE at q12.org >http://q12.org/mailman/listinfo/ode > > From dominicmorris2 at yahoo.com Mon Nov 11 07:32:01 2002 From: dominicmorris2 at yahoo.com (Dominic Morris) Date: Mon Nov 11 07:32:01 2002 Subject: [ODE] Car handling - Overturning too easily Message-ID: <20021111143146.93605.qmail@web80305.mail.yahoo.com> Hello all, I'm sure that there must be a simple solution to this, so if anybody can advise me I'd be very grateful. I've got my car driving over my terrain mesh using the contrib tri-collider, and the one remaining problem I have is that when I steer the car when it's travelling quickly, it overturns much too easily. I've based my code on the buggy example, so the geoms are four spheres and a box. Is this down to the use of spheres for the wheels? If so, what is the solution? Capped Cylinders don't seem any better, as they don't seem to fit the geometery of wheels any better than spheres, and I'm not sure of a user tri-collider for CCylinders. I've played about with masses, and friction models etc, and I can tune down the overturning tendancy, at the expense of the car's grip by using the Slip1 and Slip2 parameters (not that I fully understand these either!) Any help is appreciated, DM. __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From henri at cs.sun.ac.za Mon Nov 11 08:35:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Mon Nov 11 08:35:02 2002 Subject: [ODE] Faster replacement for fastldlt.c Message-ID: <000d01c28997$fcabf4f0$39d4e892@shrine> Hi ODE fans and perpetrators :) I've been looking into various ways to optimize the LDLT factorization which is one of the computationally intensive tasks in ODE. Unforetunately I cannot directly test alot of my results due to not having a C(++) compiler around. Nonetheless, I've restructured the original "fastldlt.c" file which should be functionally equivalent to the original but considerably faster. (Russ... the version I send you had a bug in it - this version here should be correct.) I hope the version I provide is correct, this is difficult to ascertain just by inspection though, as the code is heavily interdependent. Please can somebody that is "in the know" test the replacement file for correctness and speed. If it gets the thumbs-up I'd be happy to see it integrated into the ODE package. You can find the file at: http://www.cs.sun.ac.za/~henri/fastldlt_henri.c thanks Henri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021111/b6ea0f59/attachment.htm From anselm at hook.org Mon Nov 11 09:54:02 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 11 09:54:02 2002 Subject: [ODE] Car handling - Overturning too easily In-Reply-To: <20021111143146.93605.qmail@web80305.mail.yahoo.com> Message-ID: Hi Dominic, You can put a weight far below the car's chassis - the Monster Mayhem demo does this. - a On Mon, 11 Nov 2002, Dominic Morris wrote: > Hello all, > > I'm sure that there must be a simple solution to this, > so if anybody can advise me I'd be very grateful. > > I've got my car driving over my terrain mesh using the > contrib tri-collider, and the one remaining problem I > have is that when I steer the car when it's travelling > quickly, it overturns much too easily. > > I've based my code on the buggy example, so the geoms > are four spheres and a box. Is this down to the use of > spheres for the wheels? If so, what is the solution? > Capped Cylinders don't seem any better, as they don't > seem to fit the geometery of wheels any better than > spheres, and I'm not sure of a user tri-collider for > CCylinders. > > I've played about with masses, and friction models > etc, and I can tune down the overturning tendancy, at > the expense of the car's grip by using the Slip1 and > Slip2 parameters (not that I fully understand these > either!) > > Any help is appreciated, > > DM. > > __________________________________________________ > Do you Yahoo!? > New DSL Internet Access from SBC & Yahoo! > http://sbc.yahoo.com > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode > From coding at natew.com Mon Nov 11 11:30:02 2002 From: coding at natew.com (Nate W) Date: Mon Nov 11 11:30:02 2002 Subject: [ODE] Car handling - Overturning too easily In-Reply-To: <20021111143146.93605.qmail@web80305.mail.yahoo.com> Message-ID: On Mon, 11 Nov 2002, Dominic Morris wrote: > I'm sure that there must be a simple solution to this, > so if anybody can advise me I'd be very grateful. > > I've got my car driving over my terrain mesh using the > contrib tri-collider, and the one remaining problem I > have is that when I steer the car when it's travelling > quickly, it overturns much too easily. I ran into this as well. I've mostly just been tuning the tire-ground friction, so it is more likely to slide sideways than flip onto its roof. You might also want to try lowering the car's center of gravity, either by changing the chassis' inertial tensor or by reducing the 'ride height' of the suspension. I think you have to expect a certain amount of rollover, since it's a problem with real off-road racing as well. Also, are you steering with a joystick, or are you using the keyboard? If the latter, you might want to try slowing down the steering response, or reducing the steering angle as the car gains speed. > Capped Cylinders don't seem any better, as they don't > seem to fit the geometery of wheels any better than > spheres, and I'm not sure of a user tri-collider for > CCylinders. I'm using spheres for driving over terrain, and flat-ended cylinders for driving over ground planes. I've been wondering if it might be useful to have a "tire" collision hull - something similar to a cylinder but simplified. For example, just the ends of a flat-end cylinder, or just the middle section of a capped cylinder (not the caps). It might be more trouble than it's worth, but then again it might be possible to save some clock cycles by using a shape that is correct 99% of the time. -- Nate Waddoups Redmond WA USA http://www.natew.com From erwin at vo.com Mon Nov 11 12:04:02 2002 From: erwin at vo.com (Erwin de Vries) Date: Mon Nov 11 12:04:02 2002 Subject: [ODE] new ODE collision References: Message-ID: <004401c289b5$109f81d0$73fefea9@athlon> > On Sun, 10 Nov 2002, Russ Smith wrote: > > > > - When adding the ray class we should think about what the > > > 'penetration depth' should be. Do you have any thoughts on this? > > > > i'm not sure that dRay will ever be attached to a body, in which case > > penetration depth does not have much use for the dynamics. perhaps you > > can think of a non-dynamics use/definition for the penetration depth? > > The first thing that came to my mind when I heard about the ray class was > sensors for the critters I'm making in Juice, sort of like IR or > ultrasonic rangefinders in robots, or like whiskers on cats. I'd want to > know the distance from the ray's origin to the first object it collides > with. Thats also what i'm thinking of. Its not what it currently does, but i believe this would be more useful than the current version. > Second, I think they might be useful for fast-moving objects - if you > project a ray forward along a missile's direction of travel, you could get > "collision" info in cases where the missile would otherwise teleport > around an object due to its position changing by a distance greater than > its length. In that case, could the ray intersection be used to generate > a contact joint, to stop the missile from penetrating? I'd say it would be more appropriate to use a ccylinder here. Unless you want it to bounce off of course. Erwin From maddocks at metservice.com Mon Nov 11 12:50:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Mon Nov 11 12:50:02 2002 Subject: Fwd: [ODE] Car handling - Overturning too easily Message-ID: On Tuesday, November 12, 2002, at 03:31 AM, Dominic Morris wrote: > I've got my car driving over my terrain mesh using the > contrib tri-collider, and the one remaining problem I > have is that when I steer the car when it's travelling > quickly, it overturns much too easily. > I had this problem too. > I've based my code on the buggy example, so the geoms > are four spheres and a box. I didn't base my code on the buggy but I've got a box and four spheres. > > I've played about with masses, and friction models > etc, and I can tune down the overturning tendancy, at > the expense of the car's grip by using the Slip1 and > Slip2 parameters (not that I fully understand these > either!) > That's how I fixed it. It took a while to get a good balance between too much grip (overturning) and not enough (skidding). My car still over turns sometimes which I think is because my centre of gravity is too high. And anyway, cars do turn over in real life, I know:) henry From filipe.dias at mind.pt Mon Nov 11 13:06:02 2002 From: filipe.dias at mind.pt (Filipe Dias) Date: Mon Nov 11 13:06:02 2002 Subject: [ODE] Car handling - Overturning too easily References: Message-ID: <001601c289bd$21d47070$4601a8c0@mind.pt> I don't know how many turning wheels you guys have (assuming the front 2), but shifting the center of gravity forward or backwards will also affect the turning... more weight on the front wheels will turn more (the back slips easyer), but I like to place more wieght on the back wheels.. But don't exagerate!! Fil. From dmcclurg at pandemicstudios.com.au Mon Nov 11 16:55:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Mon Nov 11 16:55:02 2002 Subject: [ODE] new ODE collision Message-ID: >>> - When adding the ray class we should think about what the 'penetration depth' should be. Do you have any thoughts on this? The way a ray works is that you get one contact point where the ray first hits something. Penetration depth doesn't mean anything but it is very convenient to know the distance from the origin of the ray to the contact position. Storing that in the 'depth' field would make alot of sense for rays. >> i'm not sure that dRay will ever be attached to a body, in which case penetration depth does not have much use for the dynamics. perhaps you can think of a non-dynamics use/definition for the penetration depth? I'm finding two uses for rays in my game. 1) Ground Height Detection 2) LOS - line of sight The rays are almost always associated with a moving body! Perhaps some examples will clarify... - cameras: i don't want the chase camera going under the ground or perhaps i want to look at the ground point under the puppet so i don't have to head bob when he jumps. two rays are useful here-- one for the target and one for the eye. also the camera will need to cast a LOS ray to determine if there is an obstruction. - floating prizes: i detect the ground height so that prizes can automatically find a convenient home position where the player can grab them. in this situation, the ray is used for one HIT and then the ray is destroyed. Hope that helps! From claytonious at cox.net Mon Nov 11 18:02:02 2002 From: claytonious at cox.net (Clay Fowler) Date: Mon Nov 11 18:02:02 2002 Subject: [ODE] Weird collision/force problem Message-ID: <006a01c289e6$fe384860$0500a8c0@angus> Hello, everyone. I have a problem with forces being applied to my rigid body. My vehicle's "front" is along the positive Y-Axis, its "right" is along the positive X-axis and it's "up" is positive-Z. When I call dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"), specifying the rear-right of the vehicle as the point (so it's, for example, an X of 1 and a Y of -1), for some reason the FRONT LEFT of the vehicle gets pushed up into the air. This is the opposite corner of the point I am specifying! When I swap the coordinates and apply an upward force at the point (-1,1), the REAR RIGHT of the vehicle gets pushed up. I have verified that ODE and my app both have the same idea of what the world coordinate axes are by applying forces to the center of mass to move the vehicle along the world's X, Y, and Z axes and these all behave exactly as I would expect. But when I apply a force at a point, it seems like the point I'm passing is "mirrored" on the axes. I am specifying the mass of the vehicle with a simple dMassSetBox() and I have visually verified that the box is a very good fit to the vehicle. Any ideas on why the axes are "mirrored" this way for applying forces? The reason this is such a big problem is because I am doing my own collision detection with the terrain beneath the vehicle by creating my own Contact joints where the vehicle touches the terrain. Of course, the vehicle responds incorrectly to these points because of the mirroring problem. Thanks for any help! - Clay -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021111/b63ce3e3/attachment.htm From mal at candomultimedia.com Tue Nov 12 05:54:02 2002 From: mal at candomultimedia.com (Mal) Date: Tue Nov 12 05:54:02 2002 Subject: [ODE] ODE / Blender news... In-Reply-To: <006a01c289e6$fe384860$0500a8c0@angus> Message-ID: <000101c28a4a$7c2f1ab0$b000a8c0@MalLaptop> Here's some ODE related news regarding Blender... http://www.blender.org/modules.php?op=modload&name=News&file=article&sid =15&mode=thread&order=0&thold=0 " No new functionality is added in Blender, with one exception: ODE. Commits in this part of Blender should be aimed at getting Blender not crashing, and preferably running (some) of the old demos again. The current Blender physics system (nicked SUMO) will be entirely replaced with ODE later. That might give a compatibility problem, but at least it will provide quite some cool new features." Sounds like things are flying along! Norman, do you have any binary beta files with ODE support that we can test out? :) I'm just recovering from a pretty bad PC crash, and have lost all my old eMails, so I don't have your direct eMail anymore! Mal From anselm at hook.org Tue Nov 12 12:11:01 2002 From: anselm at hook.org (Anselm Hook) Date: Tue Nov 12 12:11:01 2002 Subject: [ODE] irc? In-Reply-To: <000101c28a4a$7c2f1ab0$b000a8c0@MalLaptop> Message-ID: Where was that irc channel again for ode? Which server? - a From Alan_Gordie at payformance.com Tue Nov 12 12:39:02 2002 From: Alan_Gordie at payformance.com (Alan Gordie) Date: Tue Nov 12 12:39:02 2002 Subject: [ODE] irc? Message-ID: It's #ode on EFNet Alan -----Original Message----- From: Anselm Hook [mailto:anselm at hook.org] Sent: Tuesday, November 12, 2002 2:11 PM To: ode at q12.org Subject: [ODE] irc? Where was that irc channel again for ode? Which server? - a _______________________________________________ ODE mailing list ODE at q12.org http://q12.org/mailman/listinfo/ode From colire02 at noa.nintendo.com Wed Nov 13 11:32:02 2002 From: colire02 at noa.nintendo.com (Colin Reed) Date: Wed Nov 13 11:32:02 2002 Subject: [ODE] Convex hulls Message-ID: How difficult would it be to get convex hulls working as a more general collision type as opposed to box collisions? For me this would be really helpfull, I was just wondering how much work it would be. Colin From dmcclurg at pandemicstudios.com.au Wed Nov 13 17:51:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Wed Nov 13 17:51:02 2002 Subject: [ODE] Convex hulls Message-ID: > if you're curious, the source files for the new collision infrastructure have been checked into CVS (collision_*.h, collision_*.cpp). it has not been hooked up to the rest of ODE yet, so the only reason i mention it is for the curious. note that there's still a bunch of stuff to do, in particular to hook up the ray, trimesh and cylinder classes, and to convert the hash table space to use an incremental approach ... but you can get an idea of the new layout. i think the trimesh, when completed, should work for you. -----Original Message----- From: Colin Reed [mailto:colire02 at noa.nintendo.com] Sent: Wednesday, 13 November 2002 1:53 PM To: ode at q12.org Subject: [ODE] Convex hulls How difficult would it be to get convex hulls working as a more general collision type as opposed to box collisions? For me this would be really helpfull, I was just wondering how much work it would be. Colin From claytonious at cox.net Wed Nov 13 18:45:02 2002 From: claytonious at cox.net (Clay Fowler) Date: Wed Nov 13 18:45:02 2002 Subject: [ODE] Weird collision/force problem References: <006a01c289e6$fe384860$0500a8c0@angus> Message-ID: <003d01c28b7f$50820180$0500a8c0@angus> In case anyone else runs into this, here is the solution... The axes seemed inverted because I was incorrectly copying the transformation matrix from ODE into OSG. I finally looked at the code in the drawstuff lib to see how to fill an OpenGL-style 4x4 matrix with values, and I was doing it backwards. Now that I'm filling xform matrices properly, everything works wonderfully. ----- Original Message ----- From: Clay Fowler To: ode at q12.org Sent: Monday, November 11, 2002 6:01 PM Subject: [ODE] Weird collision/force problem Hello, everyone. I have a problem with forces being applied to my rigid body. My vehicle's "front" is along the positive Y-Axis, its "right" is along the positive X-axis and it's "up" is positive-Z. When I call dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"), specifying the rear-right of the vehicle as the point (so it's, for example, an X of 1 and a Y of -1), for some reason the FRONT LEFT of the vehicle gets pushed up into the air. This is the opposite corner of the point I am specifying! When I swap the coordinates and apply an upward force at the point (-1,1), the REAR RIGHT of the vehicle gets pushed up. I have verified that ODE and my app both have the same idea of what the world coordinate axes are by applying forces to the center of mass to move the vehicle along the world's X, Y, and Z axes and these all behave exactly as I would expect. But when I apply a force at a point, it seems like the point I'm passing is "mirrored" on the axes. I am specifying the mass of the vehicle with a simple dMassSetBox() and I have visually verified that the box is a very good fit to the vehicle. Any ideas on why the axes are "mirrored" this way for applying forces? The reason this is such a big problem is because I am doing my own collision detection with the terrain beneath the vehicle by creating my own Contact joints where the vehicle touches the terrain. Of course, the vehicle responds incorrectly to these points because of the mirroring problem. Thanks for any help! - Clay -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021113/ed714be6/attachment.htm From claytonious at cox.net Wed Nov 13 22:42:01 2002 From: claytonious at cox.net (Clay Fowler) Date: Wed Nov 13 22:42:01 2002 Subject: [ODE] slip1 and slip2 Message-ID: <000e01c28ba0$7f74e270$0500a8c0@angus> What do the slip1 and slip2 parameters in a contact structure do? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021113/2da26590/attachment.htm From Tony.Peguero at xtra.co.nz Wed Nov 13 23:53:01 2002 From: Tony.Peguero at xtra.co.nz (Tony Peguero) Date: Wed Nov 13 23:53:01 2002 Subject: [ODE] more physics In-Reply-To: Message-ID: >Costs in what way? It does say memory usage and how much of >the cpu per frame the physics system takes. What other costs >are there? He he. You must have been working with open source projects for quite a while to have forgotten that some things cost money. Some physics engines cost a LOT of money. >Also is it just me or do the chain and hinge behave strangly? >If you continue to force it upwards it starts to wobble. Like >a snake or something. Maybe it's just me and thats how it >should behave. I noticed that too. I think it's because of the way the keyboard controls were written, rather than a problem with the engine. When you press the lift key, it applies a momentary impulse to the end of the chain. When you hold the button down it applies repeated impulses, not a constant force, so the end of the chain is basically being shaken up and down. -----Original Message----- From: ode-admin at q12.org [mailto:ode-admin at q12.org]On Behalf Of Joakim Eriksson Sent: Friday, 1 November 2002 10:27 a.m. To: ode at q12.org Subject: SV: [ODE] more physics > > looks like another physics engine... > > > > www.tokamakphysics.com > > interesting. yet another mention of iterative constraint > solving methods here. the demos are kind of bare bones >(i.e., like ODE's bare bones demos). no mention of the cost. Costs in what way? It does say memory usage and how much of the cpu per frame the physics system takes. What other costs are there? > the box stack demo has an interesting flaw: a nudged stack > will tip over, then freeze part of the way down. this suggests > that 'stable' box stacking is achieved through simply turning >off the phisics for a stationary stack Yes, seems like the objects sleep VERY quickly. After just a few tries I manage to get it to sleep in a physicly impossible position. (If the simulation had run for just a few ticks more the boxes would have fallen over) but they quickly froze in place. > the collision looks like it allows penetration, like ODE. if > you collapse the chain on top of itself it will squish into > itself a bit then expand out. It does indeed allow penetration. Just move closer to a object and spawn a sphere or something. You can see that even if the object is inside another object he can handle it. Its also a dead give away that he for the moment only handles primitives vs primitives and primitives vs static triangle meshes. It seems to be able to handle quite a lot. It does use a bit of memory 500Kb in some cases but they do contain quite a lot of objects. Too bad they dont have any more information on thier method. Also is it just me or do the chain and hinge behave strangly? If you continue to force it upwards it starts to wobble. Like a snake or something. Maybe it's just me and thats how it should behave. /Joakim E. - www.planestate.net _______________________________________________ ODE mailing list ODE at q12.org http://q12.org/mailman/listinfo/ode From Remko at act-3d.com Thu Nov 14 03:54:01 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Thu Nov 14 03:54:01 2002 Subject: [ODE] Universal joint Message-ID: <279892225.2502571807.98@server> I noticed that two bodies that are connected by a joint do not have collision with each other. Am I missing something here? The ODE examples show the same behavior between connected bodies. -----Original Message----- From: Martin C. Martin [mailto:martin at metahuman.org] Sent: Monday, November 11, 2002 8:58 AM To: Remko Jacobs (act-3d.com) Subject: Re: [ODE] Universal joint Hi, The way I do it is to use collisions with the body to limit the rotation. That looks pretty natural... - Martin "Remko Jacobs (act-3d.com)" wrote: > > Is it possible to include parameters that limit the rotation of a > universal joint? This way you could create a rag doll with ODE. This is > very useful in games, like Doom 3 where a character drops of the stairs > after dying instead of playing a standard animation. > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode From Remko at act-3d.com Thu Nov 14 04:00:02 2002 From: Remko at act-3d.com (Remko Jacobs (act-3d.com)) Date: Thu Nov 14 04:00:02 2002 Subject: [ODE] rate for fixed timesteps Message-ID: <279892645.2502991882.98@server> Using a fixed time step is the way to go. The problem is that the frame rate is not constant. We solved this by using a constant update rate (in Hz) for ODE that is independent of the program updates. CFM and ERP values work differently with different time steps so you should avoid using more than one different time step for one project. Using a constant update frequency means that for some frames there might be 10 time steps calculated for ODE and other frames ODE does not update at all. From: David McClurg [mailto:dmcclurg at pandemicstudios.com.au] >To avoid breaking through geometry or generating large collision >penetration depths, you'll need use a step value which scales to your >velocity. > > step = 1/60 > speed = length(vel) > if (speed * step) > max_depth then > step = max_depth / speed > endif > dWorldStep(world, step) > >just make sure max_depth is less than the radius of your moving vehicle. >ideally, it would be small enough not to visually notice either (eg. radius * 0.1f) >if you really want to use a fixed time step, > > step = max_depth / max_speed From martin at metahuman.org Thu Nov 14 06:41:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 14 06:41:02 2002 Subject: [ODE] Universal joint References: <279892225.2502571807.98@server> Message-ID: <3DD3A7AB.4A2594E9@metahuman.org> "Remko Jacobs (act-3d.com)" wrote: > > I noticed that two bodies that are connected by a joint do not have > collision with each other. They do in my application. Does your near callback create collision constraints for them? Are you sure the size/location/orientation/shape that you're drawing are the same as ODE is using? - Martin From ykhun at singnet.com.sg Thu Nov 14 08:23:02 2002 From: ykhun at singnet.com.sg (ykhun) Date: Thu Nov 14 08:23:02 2002 Subject: [ODE] Help for beginners Message-ID: <000a01c28bf2$1cf993a0$889f15a5@dune> Hi, i'm very new to ODE and rigid body physics. I found that there isn't much stuff to help newbies like me to kickstart using ODE. Read the docs and learn much about how ODE works but not how to use it! Is there any resource to help beginners up and running with ODE in a short time?? Cheers! ykhun -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021114/73fd29cb/attachment.htm From martin at metahuman.org Thu Nov 14 08:43:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 14 08:43:02 2002 Subject: [ODE] Help for beginners References: <000a01c28bf2$1cf993a0$889f15a5@dune> Message-ID: <3DD3C44B.1F9A8A9C@metahuman.org> You can take a look at the examples included with ODE, especially the boxstack and buggy demos. - Martin > ykhun wrote: > > Hi, > i'm very new to ODE and rigid body physics. I found that there isn't > much stuff to help newbies like me to kickstart using ODE. Read the docs > and learn much about how ODE works but not how to use it! > > Is there any resource to help beginners up and running with ODE in a > short time?? > Cheers! > > ykhun From max.lungarella at aist.go.jp Thu Nov 14 08:59:02 2002 From: max.lungarella at aist.go.jp (Max Lungarella) Date: Thu Nov 14 08:59:02 2002 Subject: [ODE] Help for beginners In-Reply-To: <000a01c28bf2$1cf993a0$889f15a5@dune> References: <000a01c28bf2$1cf993a0$889f15a5@dune> Message-ID: <20021115005725.5ff946cb.max.lungarella@aist.go.jp> hi, you can also learn a lot by browsing through the archives of this mailing list. cheerio, max > i'm very new to ODE and rigid body physics. I found that there isn't > much stuff to help newbies like me to kickstart using ODE. Read the > docs and learn much about how ODE works but not how to use it! > > Is there any resource to help beginners up and running with ODE in a > short time?? Cheers! > > ykhun From christian.verbeek at ais.fraunhofer.de Thu Nov 14 10:57:01 2002 From: christian.verbeek at ais.fraunhofer.de (Christian Verbeek) Date: Thu Nov 14 10:57:01 2002 Subject: [ODE] test_buggy with 13 buggys Message-ID: <3DD3E3E6.C600B51@ais.fraunhofer.de> dear ode-users, i am quite new to ode. but it took me half a day to write a program that will crash. you can find it under http://ais.gmd.de/~verbeek/ode/ this is the test_buggy example modularised. for the buggy i made a class RBuggy where i am deriving 13 objects from. when the buggys collide the program crashes. when i do the same with 12 buggys, everthing is ok. i tested it with ode-0.03 and the latest cvs-version under cygwin and windowsXP. dont blame me, but linux does not support the graficsadapter of my laptop. compiling this with linux works, but execution of the program is really really slow. i used gdb to find out, where the program crashes. i think it is somewhere in the collision detection routines. at least these are called right before the program crashes. help needed, c. -- -__________________________________________ Dr. rer. nat. Dipl.-Phys. C. Verbeek email: christian.verbeek at ais.fraunhofer.de room: C2-214 http://www.ais.fraunhofer.de/~verbeek phone: +49 2241 14 2057 fax : +49 2241 14 2384 From ericc at xenopi.com Thu Nov 14 11:08:02 2002 From: ericc at xenopi.com (Eric Cha) Date: Thu Nov 14 11:08:02 2002 Subject: [ODE] test_buggy with 13 buggys In-Reply-To: <3DD3E3E6.C600B51@ais.fraunhofer.de> Message-ID: <005701c28c09$37a798c0$6401a8c0@donald> Sounds like stack overflow to me... I could see that happening with 13 buggies rolling around.. > -----Original Message----- > From: ode-admin at q12.org [mailto:ode-admin at q12.org] On Behalf > Of Christian Verbeek > Sent: Thursday, November 14, 2002 9:57 AM > To: ode at q12.org > Subject: [ODE] test_buggy with 13 buggys > > > dear ode-users, > > i am quite new to ode. but it took me half a day to write a > program that will crash. you can find it under > http://ais.gmd.de/~verbeek/ode/ this is the test_buggy example modularised. for the buggy i made a class RBuggy where i am deriving 13 objects from. when the buggys collide the program crashes. when i do the same with 12 buggys, everthing is ok. i tested it with ode-0.03 and the latest cvs-version under cygwin and windowsXP. dont blame me, but linux does not support the graficsadapter of my laptop. compiling this with linux works, but execution of the program is really really slow. i used gdb to find out, where the program crashes. i think it is somewhere in the collision detection routines. at least these are called right before the program crashes. help needed, c. -- -__________________________________________ Dr. rer. nat. Dipl.-Phys. C. Verbeek email: christian.verbeek at ais.fraunhofer.de room: C2-214 http://www.ais.fraunhofer.de/~verbeek phone: +49 2241 14 2057 fax : +49 2241 14 2384 _______________________________________________ ODE mailing list ODE at q12.org http://q12.org/mailman/listinfo/ode --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.410 / Virus Database: 231 - Release Date: 10/31/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.410 / Virus Database: 231 - Release Date: 10/31/2002 From coding at natew.com Thu Nov 14 11:42:02 2002 From: coding at natew.com (Nate W) Date: Thu Nov 14 11:42:02 2002 Subject: [ODE] test_buggy with 13 buggys In-Reply-To: <3DD3E3E6.C600B51@ais.fraunhofer.de> Message-ID: On Thu, 14 Nov 2002, Christian Verbeek wrote: > this is the test_buggy example modularised. for the buggy i made a class > RBuggy where i am deriving 13 objects from. when the buggys collide the > program crashes. when i do the same with 12 buggys, everthing is ok. > > i tested it with ode-0.03 and the latest cvs-version under cygwin and > windowsXP. Try doubling the size of the stack. There should be a linker option for that. Windows doesn't grow the stack automatically, and ODE uses a lot of stack for complex worlds. -- Nate Waddoups Redmond WA USA http://www.natew.com From christian.verbeek at ais.fraunhofer.de Fri Nov 15 03:35:02 2002 From: christian.verbeek at ais.fraunhofer.de (Christian Verbeek) Date: Fri Nov 15 03:35:02 2002 Subject: [ODE] test_buggy with 13 buggys References: Message-ID: <3DD4CD9A.4BCA2A58@ais.fraunhofer.de> i did not find out how to increase the stack size with cygwin. but i compiled the program on linux and there it works. i tried 100 buggys. no crash, but simulation goes very slow, when all 100 buggys collide. when are the first THz processors coming out? does anyone know how to increase the stack size under cygwin? something like gcc -Wl,--stack,4096 does not help. c. Nate W wrote: > On Thu, 14 Nov 2002, Christian Verbeek wrote: > > > this is the test_buggy example modularised. for the buggy i made a class > > RBuggy where i am deriving 13 objects from. when the buggys collide the > > program crashes. when i do the same with 12 buggys, everthing is ok. > > > > i tested it with ode-0.03 and the latest cvs-version under cygwin and > > windowsXP. > > Try doubling the size of the stack. There should be a linker option for > that. Windows doesn't grow the stack automatically, and ODE uses a lot of > stack for complex worlds. > > -- > > Nate Waddoups > Redmond WA USA > http://www.natew.com > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode -- -__________________________________________ Dr. rer. nat. Dipl.-Phys. C. Verbeek email: christian.verbeek at ais.fraunhofer.de room: C2-214 http://www.ais.fraunhofer.de/~verbeek phone: +49 2241 14 2057 fax : +49 2241 14 2384 From hans at tat.physik.uni-tuebingen.de Fri Nov 15 06:30:02 2002 From: hans at tat.physik.uni-tuebingen.de (Torsten Hans) Date: Fri Nov 15 06:30:02 2002 Subject: [ODE] what integration method is used ? In-Reply-To: <200211151243.gAFCh2u15455@hook.org> Message-ID: hello, i recently came across ode. its seems like an interesting project. however i couldn't find out an important information: what basic integration scheme does ODE use ? is it an explicit or implicit integration method ? does it use runge kutta or something else ? is it possible to use a different integration scheme ? any information would be appreciated. kind regards, torsten hans From henri at cs.sun.ac.za Fri Nov 15 08:30:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Fri Nov 15 08:30:02 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? Message-ID: <00ba01c28cbc$227f17d0$45d4e892@temple> Hi :) I've played with the hinge-joint recently and figured out how to use lo and hi stops to limit rotations. My problem now is to have a similar system for ball-socket joints. The idea is to have limited range of motions similar to (for example) the joint holding arm and shoulder together. It should have some degree of mobility to rotate around an arbitrary axis of motion, and it should be able to deviate from the initial axis of rotation to some degree. Essentially it should be able to move inside a cone-of-freedom (plus it is only allowed to twist to a certain extend). Help please. Henri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021115/d56b7e60/attachment.htm From pete_graves at hotmail.com Fri Nov 15 14:21:01 2002 From: pete_graves at hotmail.com (Pete Graves) Date: Fri Nov 15 14:21:01 2002 Subject: [ODE] Problems installing ODE 0.03 Message-ID: I'm new to ODE, and inexperienced with C++ and the Microsoft Visual C/C++ 6.0 IDE, so please bear with me. I wanted to try out ODE and some of the test programs. I downloaded ODE 0.03, and followed the installation instructions in the User Guide. I set MSVC's path variables during its installation, downloaded the GNU make tool from the ODE web site, left the user-settings with PLATFORM=msvc and PRECISION=DOUBLE, and ran make in the ODE directory. This is some clips of the results: ... ctest.c(1) : fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory ... ctest.c(2) : error C2143: syntax error : missing ')' before ':' ctest.c(2) : error C2059: syntax error : ')' ... *** configurator succeeded *** ... cl /nologo /DWIN32 /DMSVC /c /GR- /GX- /W3 /GF /Oy /Iinclude /DdNODEBUG /O2 /Fo ode/src/array.obj ode/src/array.cpp Command line warning D4002 : ignoring unknown option '/Oy' (this is shown loads of times} ... LIB : fatal error LNK1104: cannot open file "lib/ode.lib" MAKE: *** [lib/ode.lib] Error 1104 I don't appear to have a lib/ directory at all. Am I missing something? Could anyone suggest what I am doing wrong? Thanks, Pete. _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From coding at natew.com Fri Nov 15 21:29:01 2002 From: coding at natew.com (Nate W) Date: Fri Nov 15 21:29:01 2002 Subject: [ODE] Problems installing ODE 0.03 In-Reply-To: Message-ID: On Fri, 15 Nov 2002, Pete Graves wrote: > ctest.c(1) : fatal error C1083: Cannot open include file: 'alloca.h': No > such file or directory Change that to "malloc.h" instead. I'm not sure about the rest though. -- Nate Waddoups Redmond WA USA http://www.natew.com From pete_graves at hotmail.com Sat Nov 16 08:49:01 2002 From: pete_graves at hotmail.com (Pete Graves) Date: Sat Nov 16 08:49:01 2002 Subject: [ODE] Re: Problems installing ODE 0.03 Message-ID: The only file I can find that contains 'alloca.h' is 'configurator.c': 229: char *header[7] = {"stdio.h", "stdlib.h", "math.h", "string.h", 330: "stdarg.h", "malloc.h", "alloca.h"}; ~~~~~~~~ Can I just remove this? 'malloc.h' is already there? Am I looking in the right place? _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From martin at metahuman.org Sat Nov 16 09:06:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Sat Nov 16 09:06:01 2002 Subject: [ODE] Re: Problems installing ODE 0.03 References: Message-ID: <3DD66C9A.B8FA8884@metahuman.org> You don't need to replace alloca with anything. What the configurator does is see how your computer is set up by compiling a bunch of programs. So the fact that some of them fail is normal. It said "configurator succeeded" so you can ignore all messages above that. Try making an empty "lib" directory. I think that's your only problem. - Martin Pete Graves wrote: > > The only file I can find that contains 'alloca.h' is 'configurator.c': > > 229: char *header[7] = {"stdio.h", "stdlib.h", "math.h", "string.h", > 330: "stdarg.h", "malloc.h", "alloca.h"}; > ~~~~~~~~ > > Can I just remove this? 'malloc.h' is already there? Am I looking in the > right place? > > _________________________________________________________________ > The new MSN 8: smart spam protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode From coding at natew.com Sat Nov 16 11:24:01 2002 From: coding at natew.com (Nate W) Date: Sat Nov 16 11:24:01 2002 Subject: [ODE] Re: Problems installing ODE 0.03 In-Reply-To: Message-ID: On Sat, 16 Nov 2002, Pete Graves wrote: > The only file I can find that contains 'alloca.h' is 'configurator.c': > > 229: char *header[7] = {"stdio.h", "stdlib.h", "math.h", "string.h", > 330: "stdarg.h", "malloc.h", "alloca.h"}; > > Can I just remove this? 'malloc.h' is already there? Am I looking in the > right place? When configurator gets run, it creates a header file called config.h. Once I got a working config.h (I may have edited this file by hand, I don't recall as it was quite a while ago), I took the configurator out of my build process. -- Nate Waddoups Redmond WA USA http://www.natew.com From henri at cs.sun.ac.za Sat Nov 16 11:30:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Sat Nov 16 11:30:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? References: <00ba01c28cbc$227f17d0$45d4e892@temple> Message-ID: <004701c28d9e$70bd7990$45d4e892@temple> Anybody??? ----- Original Message ----- From: Henri Hakl To: ode at q12.org Sent: Friday, November 15, 2002 5:31 PM Subject: [ODE] Lo/Hi Stops for ball-sockets? Hi :) I've played with the hinge-joint recently and figured out how to use lo and hi stops to limit rotations. My problem now is to have a similar system for ball-socket joints. The idea is to have limited range of motions similar to (for example) the joint holding arm and shoulder together. It should have some degree of mobility to rotate around an arbitrary axis of motion, and it should be able to deviate from the initial axis of rotation to some degree. Essentially it should be able to move inside a cone-of-freedom (plus it is only allowed to twist to a certain extend). Help please. Henri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021116/1ee5411c/attachment.htm From coding at natew.com Sat Nov 16 11:46:01 2002 From: coding at natew.com (Nate W) Date: Sat Nov 16 11:46:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? In-Reply-To: <004701c28d9e$70bd7990$45d4e892@temple> Message-ID: On Sat, 16 Nov 2002, Henri Hakl wrote: > Essentially it should be able to move inside a cone-of-freedom (plus > it is only allowed to twist to a certain extend). > > Anybody??? Have you tried using an AMotor to set the limits? I haven't tried this myself, but looking at 7.5.1. of the documentation it seem like it should be possible to apply an AMotor to the two bodies and set limits using dParamSetHiStopN where N is empty, 2 or 3 for each of the AMotor's axes. Especially look at the last part of 7.5.1, below the table of parameters. Like I said, I haven't tried it, but from a quick look at the docs I think it might do what you want. -- Nate Waddoups Redmond WA USA http://www.natew.com From henri at cs.sun.ac.za Sat Nov 16 17:44:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Sat Nov 16 17:44:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? References: Message-ID: <006901c28dd2$ab7efcf0$45d4e892@temple> hmmmm... thanks Nate... - it looks like something that might work. :) It would help to see an example or something that uses the AMotorJoint (prefably with limits and everything) - can anybody point me to some simple program that makes use of it? None of the examples seem to make use of it (I'm using the DelphiODE). ----- Original Message ----- From: "Nate W" To: Sent: Saturday, November 16, 2002 8:46 PM Subject: Re: [ODE] Lo/Hi Stops for ball-sockets? > On Sat, 16 Nov 2002, Henri Hakl wrote: > > > Essentially it should be able to move inside a cone-of-freedom (plus > > it is only allowed to twist to a certain extend). > > > > Anybody??? > > Have you tried using an AMotor to set the limits? I haven't tried this > myself, but looking at 7.5.1. of the documentation it seem like it should > be possible to apply an AMotor to the two bodies and set limits using > dParamSetHiStopN where N is empty, 2 or 3 for each of the AMotor's axes. > Especially look at the last part of 7.5.1, below the table of parameters. > > Like I said, I haven't tried it, but from a quick look at the docs I think > it might do what you want. > > -- > > Nate Waddoups > Redmond WA USA > http://www.natew.com > > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode From mattias at cambrianlabs.com Sun Nov 17 03:44:01 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Sun Nov 17 03:44:01 2002 Subject: [ODE] Lo/Hi Stops for ball-sockets? In-Reply-To: <006901c28dd2$ab7efcf0$45d4e892@temple> References: <006901c28dd2$ab7efcf0$45d4e892@temple> Message-ID: > It would help to see an example or something that uses the AMotorJoint > (prefably with limits and everything) - can anybody point me to some > simple > program that makes use of it? None of the examples seem to make use of > it (I'm using the DelphiODE). I was going to say "I have some examples, but they're built using delphi", but now that's not a problem; // Create a AMotor AMotor := dJointCreateAMotor(world, 0); dJointAttach(AMotor, MainBody, UpperLeg); BallLimit := pi*0.15; dJointSetAMotorNumAxes (AMotor,2); dJointSetAMotorAxis (AMotor, 0, 1, 1,0,0); dJointSetAMotorAxis (AMotor, 1, 1, 0,0,1); // AUTO AXIS BY EULER MOTOR dJointSetAMotorAxis (AMotor, 2, 2, 0,1,0); dJointSetAMotorParam (AMotor, dParamLoStop, -BallLimit); dJointSetAMotorParam (AMotor, dParamHiStop, BallLimit); dJointSetAMotorParam (AMotor, dParamFudgeFactor, 0.01);//} // This axis of the motor isn't used with EULER (?) dJointSetAMotorParam (AMotor, dParamLoStop2, -0.01); dJointSetAMotorParam (AMotor, dParamHiStop2, 0.01); dJointSetAMotorParam (AMotor, dParamFudgeFactor2, 0.01);//} dJointSetAMotorParam (AMotor, dParamLoStop3, -BallLimit); dJointSetAMotorParam (AMotor, dParamHiStop3, BallLimit); dJointSetAMotorParam (AMotor, dParamFudgeFactor3, 0.01);//} dJointSetAMotorMode (AMotor, dAMotorEuler); cheers, m From laury.michel at free.fr Sun Nov 17 17:42:02 2002 From: laury.michel at free.fr (Laury MICHEL) Date: Sun Nov 17 17:42:02 2002 Subject: [ODE] Collision problem with geomGroups Message-ID: <016c01c28e9b$5b79cfe0$9cdc933e@hal9000> Hello! I'm quite new to ODE, but I did a little "buggy-like" program that works! The problem is that when I want to use a geomGroup for my buggy, it does not collide with the "world geometry" anymore... My "world geometry" consists of a large box with a smaller rotated box in the middle playing the role of a ramp... The buggy geometry is created in space 0 then added to a geomGroup wich is created in the same space as the world geometry. But, when running the program the buggy falls through the "world"! Before, without geomGroups, it worked well beside the fact that I couldn't put the vehicle wheels too close from the chassis as they collided resulting in strange behavior as soon as the sim started... I'm using ode v0.03, I've read the doc and I think I understood the part on geomGroups so I don't see what I've missed :-( Please help! Here is part of the code I use: void odeBox::InitOde(dWorldID _worldID, dSpaceID _spaceID, dReal _fMass) { m_bodyID = dBodyCreate(_worldID); dBodySetPosition(m_bodyID, 0, 0, 0); const dReal fDensity = 1.0f; dMassSetBox(&m_mass, fDensity, m_fLength, m_fWidth, m_fHeight); dMassAdjust (&m_mass, _fMass); dBodySetMass(m_bodyID, &m_mass); m_geomID = dCreateBox(_spaceID, m_fLength, m_fWidth, m_fHeight); dGeomSetBody(m_geomID, m_bodyID); } void odeCar::CreateChassis(float _fWidth, float _fLength, float _fHeight) { m_geomGroupID = dCreateGeomGroup (m_spaceID); m_pChassis = new odeBox; dReal fMass = 10.0f; ((odeBox*) m_pChassis)->InitBox(_fWidth, _fLength, _fHeight); m_pChassis->InitOde(m_worldID, 0, fMass); // 0 for space as it is added to a geomGroup m_pChassis->SetPosition(5,0,35); dGeomGroupAdd (m_geomGroupID, m_pChassis->GetGeomID()); } void odeWheel::InitOde(dWorldID _worldID, dSpaceID _spaceID, dReal _fMass) { m_bodyID = dBodyCreate(_worldID); dBodySetPosition(m_bodyID, 0, 0, 0); const dReal fDensity = 1.0f; dMassSetSphere(&m_mass, fDensity, m_fRadius); dMassAdjust (&m_mass, _fMass); dBodySetMass(m_bodyID, &m_mass); m_geomID = dCreateSphere(_spaceID, m_fRadius); dGeomSetBody(m_geomID, m_bodyID); } void odeCar::AddWheel(dReal _posX, dReal _posY, dReal _posZ, float _fRadius, float _fWidth) { // odeWheel odeWheel* pWheel = new odeWheel; pWheel->InitWheel(_fRadius, _fWidth); pWheel->InitOde(m_worldID, 0, m_fDefaultWheelMass); // 0 for space as it is added to a geomGroup const dReal *a = dBodyGetPosition(m_pChassis->GetBodyID()); dBodySetPosition(pWheel->GetBodyID(), a[0] + _posX, a[1] + _posY, a[2] + _posZ); m_vpWheel.push_back(pWheel); // Joint dJointID jointID = dJointCreateHinge2(m_worldID, 0); dJointAttach(jointID, m_pChassis->GetBodyID(), pWheel->GetBodyID()); dJointSetHinge2Anchor(jointID, a[0] + _posX, a[1] + _posY, a[2] + _posZ); dJointSetHinge2Axis1(jointID, 0, 0, 1); dJointSetHinge2Axis2(jointID, 1, 0, 0); dJointSetHinge2Param(jointID, dParamSuspensionERP, 0.6f); dJointSetHinge2Param(jointID, dParamSuspensionCFM, 0.08f); dJointSetHinge2Param(jointID, dParamLoStop, 0); dJointSetHinge2Param(jointID, dParamHiStop, 0); m_vJoint.push_back(jointID); m_vPowered.push_back(false); m_vSteered.push_back(false); dGeomGroupAdd (m_geomGroupID, pWheel->GetGeomID()); } From ngbinh at glassegg.com Sun Nov 17 21:23:03 2002 From: ngbinh at glassegg.com (Nguyen Binh) Date: Sun Nov 17 21:23:03 2002 Subject: [ODE] what integration method is used ? In-Reply-To: References: Message-ID: <301716267.20021118105438@glassegg.com> Hi , TH> what basic integration scheme does ODE use ? is it an TH> explicit or implicit integration method ? does it use TH> runge kutta or something else ? Refer to the 0.3 docs, you'll see that ODE curently use basic Euler integration. TH> is it possible to use a different integration scheme ? Sure, But maybe you'll have to do it yourself or waiting for future ODE release. -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media Me Linh Point Tower, 10th Floor 2 Ngo Duc Ke District 1, Ho Chi Minh City Vietnam Fax: (84.8)823-8392 www.glassegg.com --------------------------------------------------------------------- From franjesus at medtelecom.net Mon Nov 18 02:59:02 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-15?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Mon Nov 18 02:59:02 2002 Subject: [ODE] Bug in documentation? Message-ID: <200211181055.20531.franjesus@medtelecom.net> In section 3.2 documentation states: - Position of the center of mass with respect to the point of reference. In the current implementation the center of mass and the point of reference must coincide. But later, in section 8.2: void dMassTranslate (dMass *, dReal x, dReal y, dReal z); Given mass parameters for some object, adjust them to represent the object displaced by (x,y,z) relative to the body frame. void dMassRotate (dMass *, const dMatrix3 R); Given mass parameters for some object, adjust them to represent the object rotated by R relative to the body frame. So, can the center of mass be displaced wrt. the body frame or I'm missing something? -- "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989 From nlin at nlin.net Mon Nov 18 03:35:02 2002 From: nlin at nlin.net (nlin@nlin.net) Date: Mon Nov 18 03:35:02 2002 Subject: [ODE] what integration method is used ? Message-ID: <20021118120342.GA1863@nlin.net> Nguyen Binh wrote: > On Fri, Nov 15, 2002 at 02:28:59PM +0100, Torsten Hans wrote: > TH> what basic integration scheme does ODE use ? is it an > TH> explicit or implicit integration method ? does it use > TH> runge kutta or something else ? > > Refer to the 0.3 docs, you'll see that ODE curently use basic Euler > integration. Not quite. Somewhere in the docs is mentioned that ODE uses a _time_ _stepping_ Euler integration scheme. This is a bit more hairy to extend to higher order schemes. For the gory details and some links to research papers see the thread started in April 2002 at http://q12.org/pipermail/ode/2002-April/001175.html > TH> is it possible to use a different integration scheme ? > Sure, But maybe you'll have to do it yourself or waiting for future > ODE release. A discussion on this topic in March 2002: nlin> The problem with all of this ... is the interplay of all of this nlin> with the time-stepping scheme. russ>actually i'm not sure what a higher order time stepping scheme russ>will look like in this case. i'd have to sit down and read some russ>papers and write some equations. it's not a problem i have russ>considered yet. Don't let this stop you - I'd also be interested in seeing the performance and accuracy of higher-order integration schemes with ODE - but be aware that this isn't a completely trivial thing to do because of the time-stepping (rather than instantaneous) view of the equations to be solved. -Norman From Dominique at SavageSoftware.com.au Mon Nov 18 03:49:02 2002 From: Dominique at SavageSoftware.com.au (Dominique Louis) Date: Mon Nov 18 03:49:02 2002 Subject: [ODE] Rag Doll Demo? Message-ID: <3DD8C604.8000203@SavageSoftware.com.au> I was recently playing the Unreal Tournament demo and was impressed by the rag doll physics they used, though it still did not look 100% realistic. I beleive they used the MathEngine for their physics. It is still a very cool game. I was wondering if anyone has used ODE to create a rag doll type demo, and also if anyone knows where I can get or find information on the UT model format. Thanks, Dominique. From mattias at cambrianlabs.com Mon Nov 18 03:56:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Mon Nov 18 03:56:02 2002 Subject: [ODE] Rag Doll Demo? In-Reply-To: <3DD8C604.8000203@SavageSoftware.com.au> References: <3DD8C604.8000203@SavageSoftware.com.au> Message-ID: Have a look at this site; http://taat.fi/taat/porrasturvat/ cheers, m -----Original Message----- From: Dominique Louis To: ode at q12.org Date: Mon, 18 Nov 2002 10:50:44 +0000 Subject: [ODE] Rag Doll Demo? > I was recently playing the Unreal Tournament demo and was impressed by > the rag doll physics they used, though it still did not look 100% > realistic. I beleive they used the MathEngine for their physics. It is > still a very cool game. > > I was wondering if anyone has used ODE to create a rag doll type demo, > and also if anyone knows where I can get or find information on the UT > model format. > > Thanks, > > > > Dominique. > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode From Dominique at SavageSoftware.com.au Mon Nov 18 05:22:02 2002 From: Dominique at SavageSoftware.com.au (Dominique Louis) Date: Mon Nov 18 05:22:02 2002 Subject: [ODE] Rag Doll Demo? References: <3DD8C604.8000203@SavageSoftware.com.au> Message-ID: <3DD8DBE5.4040506@SavageSoftware.com.au> That is an excellent demo! Will a similar type demo be included as part of the "standard" demos that ship with ODE? Thanks again, Dominique. Mattias Fagerlund wrote: > Have a look at this site; http://taat.fi/taat/porrasturvat/ > > cheers, > m > > -----Original Message----- > From: Dominique Louis > To: ode at q12.org > Date: Mon, 18 Nov 2002 10:50:44 +0000 > Subject: [ODE] Rag Doll Demo? > > >>I was recently playing the Unreal Tournament demo and was impressed by >>the rag doll physics they used, though it still did not look 100% >>realistic. I beleive they used the MathEngine for their physics. It is >>still a very cool game. >> >>I was wondering if anyone has used ODE to create a rag doll type demo, >>and also if anyone knows where I can get or find information on the UT >>model format. >> >>Thanks, >> >> >> >>Dominique. >> >>_______________________________________________ >>ODE mailing list >>ODE at q12.org >>http://q12.org/mailman/listinfo/ode > > > From anselm at hook.org Mon Nov 18 12:06:02 2002 From: anselm at hook.org (Anselm Hook) Date: Mon Nov 18 12:06:02 2002 Subject: [ODE] ode networking code snippet In-Reply-To: <301716267.20021118105438@glassegg.com> Message-ID: Here's a small hack to network a couple of ODE cars together. I had a couple of hours and I was thinking about a comment somebody asked earlier - so I threw this together... I'll probably improve it later since it is really crude right now. It really just hammers on objects positions and it doesn't network all of the state of each object so it doesn't look very good - although this could be improved. The networking layer itself might be useful as a test-bench for people to explore other more effacious networking strategies. The theory is that even if object physics state is hammered on, one will still get the appearance of reasonably believable physical interaction simply because of the way each machine will simulate forward the whole system. But in practice since not all state is networked properly, the first pass at least looks pretty poor - however I do think the theory is still sound. If this theory doesn't pan out then (if I have time) I may modify the code to try out a variety of other approaches. For example the simplest approach is simply to integrate everything on the server. To build it replace the test_buggy.cpp code with the below, and compile ODE as usual under cygwin. It doesn't build under msvc because I haven't bothered fully implementing the berkeley sockets for msvc. To run a server type: test_buggy To run a client type: test_buggy be a client It networks on 127.0.0.1:8000 so you can run multiple instances on one machine to fiddle with it... BTW I *really* like the geomgroups stuff now... way better! Have fun! - a /* "bangup" - a small testbed for ode networking. The code is broken up into a number of pieces, 1) NetSocket - a network abstraction layer (runs under cygwin only - not ported to windows) 2) SimObject - a generic type of simulation object 3) Dynamics - the basic ODE dynamics (world, space, ground ) 4) Car - a car 5) Main - handles network traffic and overall event stuff In general the networking scheme here is: 1) There is a server and a number of clients. 2) A server is similar to a client in that it also has a window and a pov 3) Each machine is locally authoritative for some objects 4) Other objects on a machine are considered to be driven by some remote authority 5) In the tests so far the clients are authoritative for the local participants pov. 6) In the tests so far the server is authoritative for its pov 7) The clients and server echo to each other any state that they are authoritative for. 8) The server additionally re-echoes out all state so that other clients can be advised of changes. 9) Rather than publishing a database on new client connections; clients dynamically create missing objects. This is extremely crude... and one will see that it does not behave well. Not much state is networked so things tend to jump around and misbehave terribly. It may improve over time. */ /**************************************************************/ // network stuff /**************************************************************/ //#if defined( WIN32 ) || defined( __CYGWIN32__ ) //#include //#else #include #include #include #include #define _USE_BSD #include #include #include #include #include #include #include #include #include #include #include typedef int SOCKET; //#endif #include class NetSocket { public: struct sockaddr_in sa; struct hostent *hp; SOCKET sock; FILE* sockin; FILE* sockout; NetSocket* next; #define MAXHOSTNAME 64 char myname[MAXHOSTNAME+1]; int isserver; int key; void error_fail(char* str,...) { puts(str); } void init() { isserver = 0; sock = 0; next = 0; sockin = 0; sockout = 0; myname[0] = 0; key = 0; } NetSocket() { init(); } NetSocket(SOCKET _s) { init(); attach(_s); } ~NetSocket() { disconnect(); // xxx remove from list } void attach(SOCKET _s) { sock = _s; int opts = fcntl(sock,F_GETFL); opts = opts | O_NONBLOCK; fcntl(sock,F_SETFL,opts); sockin = fdopen(sock,"r"); sockout = fdopen(sock,"w"); } void disconnect() { if( sockout ) { fflush(sockout); fclose(sockout); sockout = 0; } if( sockin ) { fclose(sockin); sockin = 0; } if( sock ) { #ifdef USEWIN32 closesocket(sock); #else close(sock); #endif sock = 0; } } bool serve(int portnum = 8700 ) { isserver = 1; #ifdef USEWIN32 WSAData ws; if( WSAStartup(0x0101,&ws) < 0 ) { error_fail("TcpServer: tcp does not seem to be supported"); return 0; } #endif struct protoent *tcp_prot = getprotobyname("tcp"); if(!tcp_prot) { error_fail("TcpServer: tcp does not seem to be supported"); return 0; } sock = socket(AF_INET,SOCK_STREAM,tcp_prot->p_proto); if( sock < 0 ) { error_fail(" can't make server socket: %s", strerror(errno)); return 0; } int one = 1; if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(int)) < 0) { error_fail("failed on setsockopt(): %s", strerror(errno)); return 0; } gethostname(myname, MAXHOSTNAME); if ((hp= gethostbyname(myname)) == NULL) { disconnect(); return 0; } memset(&sa, 0, sizeof(struct sockaddr_in)); sa.sin_family= hp->h_addrtype; sa.sin_port= htons(portnum); sa.sin_family = AF_INET; sa.sin_addr.s_addr = htonl(INADDR_ANY); if( bind(sock,(struct sockaddr *)&sa,sizeof(sa)) == -1 ) { error_fail("server count not bind"); disconnect(); return 0; } #ifdef USEWIN32 WSAAsyncSelect(sock,GetForegroundWindow(),WM_USER+1,FD_ACCEPT | FD_CLOSE | FD_READ | FD_WRITE ); #endif if( listen(sock,100) < 0 ) { disconnect(); return 0; } return 1; } void update() { if( !isserver ) { return; } if( !sock ) { return; } timeval tv; tv.tv_sec = 0; tv.tv_usec = 10; fd_set readmask,writemask,exceptmask; FD_ZERO( &readmask ); FD_ZERO( &writemask ); FD_ZERO( &exceptmask ); FD_SET( sock, &readmask ); int results = select( FD_SETSIZE, &readmask, &writemask, &exceptmask, &tv ); if( !results ) { return; } int conn; if( (conn = accept(sock,NULL,NULL)) < 0 ) { printf("failed conn\n"); return; } printf("new conn\n"); NetSocket* cl = new NetSocket( conn ); cl->next = next; next = cl; } void client(const char* hostname = "localhost", unsigned short portnum = 8700 ) { isserver = 0; if ((hp= gethostbyname(hostname)) == NULL) { return; } printf("got localhost\n"); memset(&sa, 0, sizeof(struct sockaddr_in)); memcpy((char *)&sa.sin_addr,hp->h_addr,hp->h_length); sa.sin_family= hp->h_addrtype; sa.sin_port= htons((u_short)portnum); if ((sock= socket(hp->h_addrtype,SOCK_STREAM,0)) < 0) { return; } if (connect(sock,(struct sockaddr *)&sa,sizeof sa) < 0) { disconnect(); return; } attach( sock ); printf("conned %x,%x,%x\n",sock,(int)sockin,(int)sockout); } void publish(char* str) { if( sockout ) { fputs(str,sockout); fflush(sockout); } } }; #if 0 /* // some inactivated code - idea here was to run 2 sims, one at present moment, and one in past that is synced. // but i am concerned that ode is not deterministic between machines; there might be strange rounding errors. // non deterministic input event structure class ndi_event { public: struct ndi_event* next; struct ndi_event* prev; time_t timenow; int key; int cmd; ndi_event( int key, int cmd) { next = prev = 0; time(&timenow); this->key = key; this->cmd = cmd; } }; // data structures static ndi_event* ndi_head = 0; static ndi_event* ndi_tail = 0; // insert event into temporally sorted queue void ndi_hold_event(ndi_event* event) { event->next = event->prev = 0; for( ndi_event* cursor = ndi_tail ; cursor ; cursor = cursor->prev ) { if( cursor->time < event->time ) { event->next = cursor->next; event->prev = cursor; if( cursor->next ) cursor->next->prev = event; cursor->next = event; return; } } event->next = ndi_head; ndi_head = event; } void system_command( int key, int cmd ); // do all events up to the current time void ndi_advance(int current_time) { for( ndi_event* cursor = ndi_head ; cursor ; ) { if( cursor->time > current_time ) { return; } ndi_head = cursor->next; system_command(cursor->key, cursor->cmd ); cursor = cursor->next free cursor->prev; } } void network_publish_event(int key, int cmd) { // ndi_hold_event( new ndi_event(key,cmd) ); // - send over net now also - except maybe updates // for updates we want to do this general bookkeeping // accept new pending connections and fire off a copy of my objects once only as well as pending state // get current time // ndi_advance( to current time - 1 ); // and do a local command update too... or heart beated } */ #endif /**********************************************************************/ // game stuff /**********************************************************************/ #ifdef USE_WIN32 #define __USE_W32_SOCKETS 1 #include #include #ifdef MSVC #pragma warning(disable:4244 4305) // for VC++, no precision loss complaints #endif #endif #include #include // select correct drawing functions #ifdef dDOUBLE #define dsDrawBox dsDrawBoxD #define dsDrawSphere dsDrawSphereD #define dsDrawCylinder dsDrawCylinderD #define dsDrawCappedCylinder dsDrawCappedCylinderD #endif /**********************************************************************/ // simobject - game object management /**********************************************************************/ class SimObject { public: SimObject* next; int key; static class SimObject* objects; SimObject() { next = objects; objects = this; } virtual ~SimObject() { for(SimObject** obj = &objects; *obj; obj = &((*obj)->next)) { if( *obj == this ) { *obj = (*obj)->next; break; } } } virtual void draw() {} virtual void update() {} virtual void command(char *cmd) {} }; SimObject* SimObject::objects = 0; /**********************************************************************/ // a dynamics object /**********************************************************************/ class Dynamics { public: dWorldID world; dSpaceID space; dGeomID ground; dJointGroupID contactgroup; Dynamics* next; // this is called by dSpaceCollide when two objects in space are potentially colliding. void nearCallback2 (void *data, dGeomID o1, dGeomID o2) { int i,n; const int N = 10; dContact contact[N]; n = dCollide (o1,o2,N,&contact[0].geom,sizeof(dContact)); if (n > 0) { for (i=0; inearCallback2(0,o1,o2); } Dynamics() { world = dWorldCreate(); space = dHashSpaceCreate(); contactgroup = dJointGroupCreate (0); dWorldSetGravity (world,0,0,-0.5); ground = dCreatePlane (space,0,0,1,0); } void draw() {} void update() { dSpaceCollide (space,this,&nearCallback); dWorldStep (world,0.05); dJointGroupEmpty (contactgroup); } void command(char* cmd) {} ~Dynamics() { dJointGroupDestroy (contactgroup); dSpaceDestroy (space); dWorldDestroy (world); } }; /**********************************************************************/ // a car /**********************************************************************/ class Car: public SimObject { public: // some constants #define LENGTH 0.7 // chassis length #define WIDTH 0.5 // chassis width #define HEIGHT 0.2 // chassis height #define RADIUS 0.18 // wheel radius #define STARTZ 0.5 // starting height of chassis #define CMASS 1 // chassis mass #define WMASS 0.2 // wheel mass // dynamics and collision objects (chassis, 3 wheels ) dBodyID body[4]; dJointID joint[3]; // joint[0] is the front wheel dGeomID geom_group; dGeomID box[1]; dGeomID sphere[3]; double speed,steer; Dynamics* parent; Car(Dynamics* parent, dReal x, dReal y, dReal z); virtual ~Car(); virtual void update(); virtual void draw(); virtual void command(char *); }; Car::Car(Dynamics* parent, dReal x, dReal y, dReal z): SimObject() { this->parent = parent; int i; dMass m; // chassis body body[0] = dBodyCreate (parent->world); dBodySetPosition (body[0],x+0,y+0,z+STARTZ); dMassSetBox (&m,1,LENGTH,WIDTH,HEIGHT); dMassAdjust (&m,CMASS); dBodySetMass (body[0],&m); box[0] = dCreateBox (0,LENGTH,WIDTH,HEIGHT); dGeomSetBody (box[0],body[0]); // wheel bodies for (i=1; i<=3; i++) { body[i] = dBodyCreate ( parent->world); dQuaternion q; dQFromAxisAndAngle (q,1,0,0,M_PI*0.5); dBodySetQuaternion (body[i],q); dMassSetSphere (&m,1,RADIUS); dMassAdjust (&m,WMASS); dBodySetMass (body[i],&m); sphere[i-1] = dCreateSphere (0,RADIUS); dGeomSetBody (sphere[i-1],body[i]); } dBodySetPosition (body[1],x+ 0.5*LENGTH,y+ 0,z + STARTZ-HEIGHT*0.5); dBodySetPosition (body[2],x+ -0.5*LENGTH,y+ WIDTH*0.5,z + STARTZ-HEIGHT*0.5); dBodySetPosition (body[3],x+ -0.5*LENGTH,y+ -WIDTH*0.5,z + STARTZ-HEIGHT*0.5); // front and back wheel hinges for (i=0; i<3; i++) { joint[i] = dJointCreateHinge2 (parent->world,0); dJointAttach (joint[i],body[0],body[i+1]); const dReal *a = dBodyGetPosition (body[i+1]); dJointSetHinge2Anchor (joint[i],a[0],a[1],a[2]); dJointSetHinge2Axis1 (joint[i],0,0,1); dJointSetHinge2Axis2 (joint[i],0,1,0); } // set joint suspension for (i=0; i<3; i++) { dJointSetHinge2Param (joint[i],dParamSuspensionERP,0.4); dJointSetHinge2Param (joint[i],dParamSuspensionCFM,0.8); } // lock back wheels along the steering axis for (i=1; i<3; i++) { // set stops to make sure wheels always stay in alignment dJointSetHinge2Param (joint[i],dParamLoStop,0); dJointSetHinge2Param (joint[i],dParamHiStop,0); // the following alternative method is no good as the wheels may get out // of alignment: // dJointSetHinge2Param (joint[i],dParamVel,0); // dJointSetHinge2Param (joint[i],dParamFMax,dInfinity); } // create geometry group and add it to the space geom_group = dCreateGeomGroup ( parent->space ); dGeomGroupAdd (geom_group,box[0]); dGeomGroupAdd (geom_group,sphere[0]); dGeomGroupAdd (geom_group,sphere[1]); dGeomGroupAdd (geom_group,sphere[2]); speed = 0; steer = 0; } Car::~Car() { // destroy body xxx dGeomDestroy (box[0]); dGeomDestroy (sphere[0]); dGeomDestroy (sphere[1]); dGeomDestroy (sphere[2]); } void Car::update() { // motor dJointSetHinge2Param (joint[0],dParamVel2,-speed); dJointSetHinge2Param (joint[0],dParamFMax2,0.1); // steering dReal v = steer - dJointGetHinge2Angle1 (joint[0]); if (v > 0.1) v = 0.1; if (v < -0.1) v = -0.1; v *= 10.0; dJointSetHinge2Param (joint[0],dParamVel,v); dJointSetHinge2Param (joint[0],dParamFMax,0.2); dJointSetHinge2Param (joint[0],dParamLoStop,-0.75); dJointSetHinge2Param (joint[0],dParamHiStop,0.75); dJointSetHinge2Param (joint[0],dParamFudgeFactor,0.1); } void Car::draw() { dsSetColor (0,1,1); dsSetTexture (DS_WOOD); dReal sides[3] = {LENGTH,WIDTH,HEIGHT}; dsDrawBox (dBodyGetPosition(body[0]),dBodyGetRotation(body[0]),sides); dsSetColor (1,1,1); int i; for (i=1; i<=3; i++) dsDrawCylinder (dBodyGetPosition(body[i]),dBodyGetRotation(body[i]),0.02f,RADIUS); } void Car::command(char* command) { int cmd; float x,y,z; sscanf(command,"%d %f %f %f",&cmd,&x,&y,&z); switch( cmd ) { case 'a': case 'A': speed += 0.3; break; case 'z': case 'Z': speed -= 0.3; break; case ',': steer -= 0.5; break; case '.': steer += 0.5; break; case ' ': speed = 0.0; steer = 0.0; default: break; } } /**************************************************************************************/ // main /**************************************************************************************/ static NetSocket network; static Dynamics* dynamics; static int local_sim_key_code = 0x00010000; static int remote_machine_code = 0x00010000; static void network_command(NetSocket* s,char* buffer) { if(!strncmp(buffer,"login",5)) { // remote has logged into me; accept their login printf("got login\n"); remote_machine_code += 0x00010000; if( s ) { fprintf(s->sockout,"id %x\n",remote_machine_code); // tell client to make an obj fprintf(s->sockout,"new %x %d %f %f %f\n",remote_machine_code + 1, 0, 0.0f,0.0f,0.0f); fflush(s->sockout); s->key = remote_machine_code; } } else if(!strncmp(buffer,"id",2)) { // remote sent us our own unique id sscanf(buffer+2,"%x",&local_sim_key_code); printf("local is is now %x\n",local_sim_key_code); remote_machine_code = local_sim_key_code; } else if(!strncmp(buffer,"new",3)) { // remote has asked us to make something at location xyz int id,type; float x,y,z; sscanf(buffer+3,"%x %d %f %f %f",&id,&type,&x,&y,&z); printf("got new request: 0x%x,%d,%f,%f,%f\n",id,type,x,y,z); Car* car = new Car(dynamics,x,y,z); car->key = id; } else if(!strncmp(buffer,"update",3)) { int key; float x,y,z; float rotf[12]; double rot[12]; sscanf(buffer+6,"%x %f %f %f\n",&key,&x,&y,&z); sscanf(buffer+6,"%x %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f\n", &key,&x,&y,&z, &rotf[0],&rotf[1],&rotf[2],&rotf[3], &rotf[4],&rotf[5],&rotf[6],&rotf[7], &rotf[8],&rotf[9],&rotf[10],&rotf[11] ); rot[0] = rotf[0]; rot[1] = rotf[1]; rot[2] = rotf[2]; rot[3] = rotf[3]; rot[4] = rotf[4]; rot[5] = rotf[5]; rot[6] = rotf[6]; rot[7] = rotf[7]; rot[8] = rotf[8]; rot[9] = rotf[9]; rot[10] = rotf[10]; rot[11] = rotf[11]; for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { if( obj->key == key ) { Car* car = (Car*)obj; dBodySetPosition( car->body[0],x,y,z); dBodySetRotation( car->body[0], rot ); return; } } // if not found then add Car* car = new Car(dynamics,x,y,z); car->key = key; } } static void network_input_events() { // handle incoming traffic from any port for(NetSocket* s = &network; s ; s = s->next ) { if(! s->sockin ) continue; char buffer[2048]; while( fgets(buffer,2040,s->sockin) ) { network_command(s,buffer); } } } static void network_output_events() { // for all machines that have observers here, tell them about all objects we are responsible for static int counter = 0; if( counter++ < 16 ) { return; } counter = 0; for(NetSocket* s = &network; s ; s = s->next ) { if( !s->sockout ) continue; for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { if(network.sockout) { // if we are a client then emit information about our objects only - else emit all if( (obj->key & 0xffff0000) != (local_sim_key_code & 0xffff0000) ) { continue; } } else { // if we are a server - emit all objects to all machines except real owners if( (obj->key & 0xffff0000) == ( s->key & 0xffff0000) ) { continue; } } Car* car = (Car*)obj; const dReal* pos = dBodyGetPosition( car->body[0] ); const dReal* rot = dBodyGetRotation( car->body[0] ); float x = pos[0]; float y = pos[1]; float z = pos[2]; fprintf(s->sockout,"update %x %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f\n", obj->key,x,y,z, (float)rot[0],(float)rot[1],(float)rot[2],(float)rot[3], (float)rot[4],(float)rot[5],(float)rot[6],(float)rot[7], (float)rot[8],(float)rot[9],(float)rot[10],(float)rot[11] ); fflush(s->sockout); } } } static void mainLoop (int pause) { // for server only - look for new socket connections network.update(); // for servers and clients - deal with any remote commands network_input_events(); // for servers and clients - emit anything anybody else might be interested in network_output_events(); // update... could be done before outputting state for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { obj->update(); } if( dynamics ) { dynamics->update(); } // redraw... best done after updating state for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { obj->draw(); } } void key_events(int cmd ) { switch(cmd) { default: int key = ( local_sim_key_code & 0xffff0000 ) + 1; for(SimObject* obj = SimObject::objects; obj; obj = obj->next ) { printf("%x %x\n",obj->key,key); if( obj->key == key ) { char buffer[512]; sprintf(buffer,"%d 0 0 0\n",cmd); obj->command(buffer); return; } } } } void start() { printf ("Press:\t'a' to increase speed.\n" "\t'z' to decrease speed.\n" "\t',' to steer left.\n" "\t'.' to steer right.\n" "\t' ' to reset speed and steering.\n"); // move camera somewhere useful { //const dReal* pos = dBodyGetPosition(body[0]); float pos[3] = { 3,-3,2 }; // xxx move viewpoint behind car - xxx wrong - do dynamically static float xyz[3] = {0.8317f,-0.9817f,0.8000f}; static float hpr[3] = {121.0000f,-27.5000f,0.0000f}; xyz[0] = pos[0] + 0.8317f; xyz[1] = pos[1] - 0.9817f; xyz[2] = pos[2] + 0.8000f; dsSetViewpoint (xyz,hpr); } } int main (int argc, char **argv) { dynamics = new Dynamics(); if( argc < 2 ) { // be a server - server will always start up one dynamics engine and always add one car to kickstart itself. printf("server\n"); network.serve(); network_command(0,"id 0x00010000\n"); // server id network_command(0,"new 0x00010001 0 2.0 0 0\n"); // server car location } else { // be a client - client explicitly logs in and waits for reply with an id before doing anything network.client(); if( network.sockout ) { network.publish("login joe\n"); printf("client: network up - logging in\n"); } else { printf("client: no network :-(\n"); } } // setup pointers to drawstuff callback functions and run forever dsFunctions fn; fn.version = DS_VERSION; fn.start = &start; fn.step = &mainLoop; fn.command = &key_events; fn.stop = 0; fn.path_to_textures = "../../drawstuff/textures"; dsSimulationLoop (0,0,352,288,&fn); // exit... network.disconnect(); } From ccos at bigpond.com Tue Nov 19 01:07:01 2002 From: ccos at bigpond.com (ccos) Date: Tue Nov 19 01:07:01 2002 Subject: [ODE] os x compile probs Message-ID: <6FC6A94D-FB95-11D6-9679-000393722276@bigpond.com> hello everybody, i'm trying to build ode on os x 10.1.5 and this is what i'm doing (from the docs): > Step 1: Unpack the ODE archive. done > Step 2: Get the GNU make tool. Many Unix platforms come with this, > although sometimes it is called gmake. I have provided a version of GNU > make for windows here. done, ( default os x make ) > Step 3: Edit the settings in the file config/user-settings. The list of > supported platforms is given in that file. done, set it to osx > Step 4: Run make to configure and build ODE and the graphical test > programs. > Be sure you are using the correct version of GNU make. which is the correct version? > The make targets for building the parts of ODE are: > * make configure : Create the configuration file include/ode/config.h. i get: *** configurator succeeded *** > * make ode-lib : Build the core ODE library. seems to work these are all i can make because i don't have X11, but i don't really need to run the drawing library, so i should be fine right? > Step 5: To install the ODE library onto your system you should copy the > lib/ and include/ directories to a suitable place, e.g. on Unix: > > * include/ode/ --> /usr/local/include/ode/ > * lib/libode.a --> /usr/local/lib/libode.a done ok, so everything seems alright, but when i try to compile with #include i get: /usr/bin/ld: archive: /usr/local/lib/libode.a has no table of contents, add one with ranlib(1) (can't load from it) hints very well appreciated. has anybody here built ode on os x? thanks much, c From nnevatie at welho.com Tue Nov 19 10:31:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Tue Nov 19 10:31:02 2002 Subject: [ODE] Step size vs. frame rate + building ODE Message-ID: <000b01c28ff1$62b90c60$3abdf3d5@wli> I read in the ODE documentation that "10*0.1 not the same as 5*0.2". So, my guestion is, can I use frame processing time to scale the step? E.g.: dWorldStep(dWorldID, 0.05 * scaler); where scaler is somehow dependent of the frame processing time BTW, I was able to build ODE with Borland C++ Builder 6.0 Pro (+ CVS Tricollider & Opcode 1.2). One thing is still not clear to me: Which one is the newer version of tricollider - Erwin's base64 patch ('newstuff.gz') or the version in CVS? I wasn't able to build the contents of 'newstuff.gz', a function in dRay.cpp used Matrix3 and caused some access violations by accessing element at [3 * 4 + 2] (Matrix3 seems to have 4x3 elements). -- Niko From franjesus at medtelecom.net Tue Nov 19 16:06:01 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-1?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Tue Nov 19 16:06:01 2002 Subject: [ODE] os x compile probs Message-ID: <200211200001.37100.franjesus@medtelecom.net> El Mar 19 Nov 2002 09:03, ccos escribi?: > hints very well appreciated. > has anybody here built ode on os x? try running ldconfig I believe OSX uses libtool, so you need to run ldconfig each time you add libraries to your system. -- Tienes mal la zona, sin embargo te marca bien la hora local, ergo tienes mal ambas. .: Bulmailing :. From coding at natew.com Tue Nov 19 22:48:01 2002 From: coding at natew.com (Nate W) Date: Tue Nov 19 22:48:01 2002 Subject: [ODE] Step size vs. frame rate + building ODE In-Reply-To: <000b01c28ff1$62b90c60$3abdf3d5@wli> Message-ID: On Tue, 19 Nov 2002, Niko Nevatie wrote: > Can I use frame processing time to scale the step? E.g.: > > dWorldStep(dWorldID, 0.05 * scaler); > > where scaler is somehow dependent of the frame processing time That's what I do in Juice, and I'm happy with the results. I also clamp the 'frame time' to within a minimum and maximum range, to avoid getting instabilities with large frame times or divide-by-zero with a zero frame time. If you check the archives, I wrote something a while back that goes into more detail. I like the variable time step approach for my app so far. Theoretically there are some potential problems with variable time steps, but in practice I'm happy with the way things work in Juice. If repeatability or consistency across network machines is important, you might want to use fixed time steps. -- Nate Waddoups Redmond WA USA http://www.natew.com From thomas_buehrmann at web.de Wed Nov 20 06:55:02 2002 From: thomas_buehrmann at web.de (Thomas Buehmann) Date: Wed Nov 20 06:55:02 2002 Subject: [ODE] dRay, c++ interface, khepera model? Message-ID: <200211201354.gAKDs3X30804@mailgate5.cinetic.de> hi, is it possible to get the c++ interface by martin c. martin and the dRay contribution without having to use cvs or copy and paste? apart from that, is anyone aware of a good khepera-style two-wheeled differential-steering model? if i use two wheels in front of my vehicle to drive and steer and an additional supporting wheel in the back, the latter tends to bend if the distance between front-wheels and supporting wheel is small (all use hinge2). is that model too simple or is it just a matter of tweaking cfm etc...? thanks, thomas. sorry if this mail got posted twice. i send it earlier from an unlisted address. ______________________________________________________________________________ Der Anrufbeantworter f?r Ihre E-Mail-Korrespondenz - WEB.DE FreeMail http://freemail.web.de/features/?mc=021137 From anselm at hook.org Wed Nov 20 14:12:02 2002 From: anselm at hook.org (Anselm Hook) Date: Wed Nov 20 14:12:02 2002 Subject: [ODE] dRay, c++ interface, khepera model? In-Reply-To: <200211201354.gAKDs3X30804@mailgate5.cinetic.de> Message-ID: > hi, > is it possible to get the c++ interface by martin c. martin and the dRay > contribution without having to use cvs or copy and paste? http://q12.org/cgi-bin/cvsweb.cgi/ode/ From henri at cs.sun.ac.za Thu Nov 21 02:48:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Thu Nov 21 02:48:02 2002 Subject: [ODE] Faster ODE Message-ID: <021b01c29143$46622a30$45d4e892@temple> Hi ODE :) Please can somebody look at this and experiment with the file? LDLT decomposition is one of the primary computational activities in ODE's physics engine. LDLT = Lower Diagonal Lower Transposed, meaning a constraint matrix A (that describes the physics of a world) can be decomposed into two matrices (L and D, where L is a lower triangular matrix (all entries above the diagonal are zero) and D is a diagonal matrix (all entries except the diagonal are zero)). Now A = L D L' (A equals the lower matrix times the diagonal matrix times the transposed lower matrix.) The A matrix varies in size and is typically between 10x10 and 500x500 for ODE (depending on how many constraints/collisions/etc need to be solved for a given simulation step). This LDLT decomposition needs to be solved with every step and is quite computationally intensive. I've looked at the stldlt.c file that is part of the ODE source and it looks to me like it could be improved upon. Unforetunately I use Delphi, so I cannot test my suggested modifications directly (though the Delphi version seems fine and considerably faster then the original). The file http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a replacement for fastldlt.c and should (barring errors) work flawlessly and faster then the original. Let me know if it works, thanks :) Henri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021121/86538fb8/attachment.htm From ruud at marketgraph.nl Thu Nov 21 03:48:01 2002 From: ruud at marketgraph.nl (Ruud van Gaal) Date: Thu Nov 21 03:48:01 2002 Subject: [ODE] os x compile probs Message-ID: <20C09F811939D311BA694854E86C778233E42D@raptor> > El Mar 19 Nov 2002 09:03, ccos escribi?: > > hints very well appreciated. > > has anybody here built ode on os x? > > try running ldconfig I just took the error's advice and did 'ranlib libode.a' and that worked. Ruud From jnilson_99 at yahoo.com Thu Nov 21 11:16:01 2002 From: jnilson_99 at yahoo.com (jnilson_99@yahoo.com) Date: Thu Nov 21 11:16:01 2002 Subject: [ODE] Faster ODE In-Reply-To: <021b01c29143$46622a30$45d4e892@temple> Message-ID: <20021121181503.47334.qmail@web40111.mail.yahoo.com> Hi, The mathematics behind what you're talking about sounds really cool but over my head. Do you know of any resource (web page or book) that provides a background on LDLT, Lower Diagonal Lower Transposed? thanks, john --- Henri Hakl wrote: > Hi ODE :) > > Please can somebody look at this and experiment with > the file? > > LDLT decomposition is one of the primary > computational activities in ODE's physics engine. > LDLT = Lower Diagonal Lower Transposed, meaning a > constraint matrix A (that describes the physics of a > world) can be decomposed into two matrices (L and D, > where L is a lower triangular matrix (all entries > above the diagonal are zero) and D is a diagonal > matrix (all entries except the diagonal are zero)). > Now A = L D L' (A equals the lower matrix times > the diagonal matrix times the transposed lower > matrix.) The A matrix varies in size and is > typically between 10x10 and 500x500 for ODE > (depending on > how many constraints/collisions/etc need to be > solved for a given simulation step). > > This LDLT decomposition needs to be solved with > every step and is quite computationally intensive. > I've looked at the stldlt.c file that is part of the > ODE source and it looks to me like it could be > improved upon. Unforetunately I use Delphi, so I > cannot test my suggested modifications directly > (though the Delphi version seems fine and > considerably faster then the original). > > The file > http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a > replacement for fastldlt.c and should (barring > errors) work flawlessly and faster then the > original. > > Let me know if it works, thanks :) > Henri > > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus – Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From henri at cs.sun.ac.za Thu Nov 21 11:53:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Thu Nov 21 11:53:01 2002 Subject: [ODE] Faster ODE References: <20021121181503.47334.qmail@web40111.mail.yahoo.com> Message-ID: <002701c2918f$77a973e0$45d4e892@temple> hmmm... no website springs to mind, but you can probably find one. The basic algorithm for factorizing A into LDL' runs as follows: initialize L and D to zero matrices for i = 1 to n do for j = 1 to i - 1 do Vj = LijDjj Dii = Aii - SUM(from j = 1 to i - 1): LijVj for j = i + 1 to n do Lji = (Aji - SUM(from k = 1 to i - 1)LjkVk) / Dii This creates matrices L and D such that: A = L D L' holds. ODE uses a similar approach, it still has the same big-O of n^3, but is still faster then the vanilla version from above. The original ODE version is in "fastldlt.c" of the ODE source; I've maintained the algorithm but modified the code executing it in "fastldlt_henri.c" (available at: http://www.cs.sun.ac.za/~henri/fastldlt_henri.c) in theory the replacement should be faster then the original. I cannot be sure until somebody verifies that it is correct and indeed faster. In ODE the "A" matrix is infact the Jacobian matrix that contains the current-step world constraint details. hope this helps to start off :) Henri >Hi, > >The mathematics behind what you're talking about >sounds really cool but over my head. > >Do you know of any resource (web page or book) that >provides a background on LDLT, Lower Diagonal Lower >Transposed? > >thanks, > >john From nnevatie at welho.com Thu Nov 21 12:00:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Thu Nov 21 12:00:02 2002 Subject: [ODE] Faster ODE References: <021b01c29143$46622a30$45d4e892@temple> Message-ID: <001001c29190$2c35d9c0$3abdf3d5@wli> I tried out the code in 'fastldlt_henri.c'. It works as expected. There was a small typo somewhere in the beginning of one function, but it caused no probs. I cannot say anything about the speed of the code, as I haven't benchmarked anything yet. But hey, if you say it's faster than the original, I'll take your word on it :) ----- Original Message ----- From: Henri Hakl To: ode at q12.org Sent: Thursday, November 21, 2002 11:49 AM Subject: [ODE] Faster ODE Hi ODE :) Please can somebody look at this and experiment with the file? LDLT decomposition is one of the primary computational activities in ODE's physics engine. LDLT = Lower Diagonal Lower Transposed, meaning a constraint matrix A (that describes the physics of a world) can be decomposed into two matrices (L and D, where L is a lower triangular matrix (all entries above the diagonal are zero) and D is a diagonal matrix (all entries except the diagonal are zero)). Now A = L D L' (A equals the lower matrix times the diagonal matrix times the transposed lower matrix.) The A matrix varies in size and is typically between 10x10 and 500x500 for ODE (depending on how many constraints/collisions/etc need to be solved for a given simulation step). This LDLT decomposition needs to be solved with every step and is quite computationally intensive. I've looked at the stldlt.c file that is part of the ODE source and it looks to me like it could be improved upon. Unforetunately I use Delphi, so I cannot test my suggested modifications directly (though the Delphi version seems fine and considerably faster then the original). The file http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a replacement for fastldlt.c and should (barring errors) work flawlessly and faster then the original. Let me know if it works, thanks :) Henri From henri at cs.sun.ac.za Thu Nov 21 13:24:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Thu Nov 21 13:24:02 2002 Subject: [ODE] Faster ODE References: <021b01c29143$46622a30$45d4e892@temple> <001001c29190$2c35d9c0$3abdf3d5@wli> Message-ID: <001301c2919c$37c07280$45d4e892@temple> Hey! :) you're right... I found the missing comma - the file on the website has been updated to reflect that as well. Please check the accuracy and speed using the testsuite provided with ODE. In the fbuild subdirectory there is a "test_ldlt.cpp" - compile it and run with parameter f ("test_ldlt f"). This should test both the speed and the accuracy of the factorizer. Try to compare both the original and the replacement version... - just because I think it is faster doesn't mean much - there may be compiler optimizations that I'm not aware of and other subtle issues that I'm not taking into account. thanks :) Henri ----- Original Message ----- From: "Niko Nevatie" To: Sent: Thursday, November 21, 2002 8:59 PM Subject: Re: [ODE] Faster ODE > I tried out the code in 'fastldlt_henri.c'. It works as expected. There was > a small typo somewhere in the beginning of one function, but it caused no > probs. I cannot say anything about the speed of the code, as I haven't > benchmarked anything yet. But hey, if you say it's faster than the original, > I'll take your word on it :) > > ----- Original Message ----- > From: Henri Hakl > To: ode at q12.org > Sent: Thursday, November 21, 2002 11:49 AM > Subject: [ODE] Faster ODE > > > Hi ODE :) > > Please can somebody look at this and experiment with the file? > > LDLT decomposition is one of the primary computational activities in ODE's > physics engine. LDLT = Lower Diagonal Lower Transposed, meaning a constraint > matrix A (that describes the physics of a world) can be decomposed into two > matrices (L and D, where L is a lower triangular matrix (all entries above > the diagonal are zero) and D is a diagonal matrix (all entries except the > diagonal are zero)). Now A = L D L' (A equals the lower matrix times the > diagonal matrix times the transposed lower matrix.) The A matrix varies in > size and is typically between 10x10 and 500x500 for ODE (depending on > how many constraints/collisions/etc need to be solved for a given simulation > step). > > This LDLT decomposition needs to be solved with every step and is quite > computationally intensive. I've looked at the stldlt.c file that is part of > the ODE source and it looks to me like it could be improved upon. > Unforetunately I use Delphi, so I cannot test my suggested modifications > directly (though the Delphi version seems fine and considerably faster then > the original). > > The file http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a replacement > for fastldlt.c and should (barring errors) work flawlessly and faster then > the original. > > Let me know if it works, thanks :) > Henri > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode From mattias at cambrianlabs.com Thu Nov 21 13:36:02 2002 From: mattias at cambrianlabs.com (Mattias Fagerlund) Date: Thu Nov 21 13:36:02 2002 Subject: [ODE] Faster ODE In-Reply-To: <001001c29190$2c35d9c0$3abdf3d5@wli> References: <021b01c29143$46622a30$45d4e892@temple> <001001c29190$2c35d9c0$3abdf3d5@wli> Message-ID: > But hey, if you say it's faster than the original, > I'll take your word on it :) No chance you could time it? I'd be very interested to see what the differences are... cheers, m From nnevatie at welho.com Thu Nov 21 14:12:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Thu Nov 21 14:12:02 2002 Subject: [ODE] Faster ODE References: <021b01c29143$46622a30$45d4e892@temple> <001001c29190$2c35d9c0$3abdf3d5@wli> Message-ID: <001501c291a2$9f68a500$3abdf3d5@wli> Ok, why not, as soon as I have some spare hacking time. I'll post the results here... ----- Original Message ----- From: "Mattias Fagerlund" To: "Niko Nevatie" ; Sent: Thursday, November 21, 2002 10:31 PM Subject: Re: [ODE] Faster ODE > > But hey, if you say it's faster than the original, > > I'll take your word on it :) > > No chance you could time it? I'd be very interested to see what the > differences are... > > cheers, > m > > From duhprey at yahoo.com Thu Nov 21 14:13:01 2002 From: duhprey at yahoo.com (Daniel Duhprey) Date: Thu Nov 21 14:13:01 2002 Subject: [ODE] Faster ODE In-Reply-To: <001301c2919c$37c07280$45d4e892@temple> Message-ID: On Thu, 21 Nov 2002, Henri Hakl wrote: -->Please check the accuracy and speed using the testsuite provided with ODE. If I'm using the numbers from the test_ldlt correctly (as a raw time on some scale) then on my athlon its about 38% faster and on my celeron its roughly twice as slow :). -- ------------ email: duhprey at tosos.com www: http://paradox.tosos.com/~duhprey icq: 129354442 She's got a whole brood of kids, like Sendmail, and Postfix, and Apache, and Perl. And some of 'em die young, and some are mentally retarded. Sterling The European finds intercourse with Americans easy and agreeable. Einstein Not a shred of evidence exists in favor of the idea that life is serious. Gill From martin at metahuman.org Thu Nov 21 14:38:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 21 14:38:01 2002 Subject: [ODE] dRay, c++ interface, khepera model? References: <200211201354.gAKDs3X30804@mailgate5.cinetic.de> Message-ID: <3DDB966D.F1954CFB@metahuman.org> Here's the new C++ interface. It most likely won't compile out of the box with ODE 0.03, since it uses some of the newer features in the CVS version. But it shouldn't be hard to port, more or less just comment out lines that don't compile. - Martin Thomas Buehmann wrote: > > hi, > is it possible to get the c++ interface by martin c. martin and the dRay > contribution without having to use cvs or copy and paste? > apart from that, is anyone aware of a good khepera-style two-wheeled > differential-steering model? if i use two wheels in front of my vehicle to drive > and steer and an additional supporting wheel in the back, the latter tends to > bend if the distance between front-wheels and supporting wheel is small (all use > hinge2). is that model too simple or is it just a matter of tweaking cfm etc...? > > thanks, > thomas. > > sorry if this mail got posted twice. i send it earlier from an unlisted address. > ______________________________________________________________________________ > Der Anrufbeantworter f?r Ihre E-Mail-Korrespondenz - WEB.DE FreeMail > http://freemail.web.de/features/?mc=021137 > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode -------------- next part -------------- A non-text attachment was scrubbed... Name: odecpp_new.h Type: application/x-unknown-content-type-hfile Size: 22586 bytes Desc: not available Url : http://q12.org/pipermail/ode/attachments/20021121/07ec42f4/odecpp_new.bin From tetron at interreality.org Thu Nov 21 15:00:02 2002 From: tetron at interreality.org (Peter Amstutz) Date: Thu Nov 21 15:00:02 2002 Subject: [ODE] Faster ODE In-Reply-To: Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I haven't looked any of the code involved, but there is one possible explanation for it being faster on one CPU and slower on another :-) It sounds like a cache-size issue. If the Athlon has a bigger L1/L2 cache then the algorithm might be faster overall but if uses more instructions or space than the current algorithm it could be too big and incur a large cache-miss penalty on the Celeron (which if I recall correctly was given a really wimpy L1/L2 cache to keep costs down). Such are the joys of modern CPU architechtures... There's been some work on "cache-oblivious" algorithms, which is essentially a technique of designing the algorithm to work on small, localized and usually recursive subsets of the total problem (this is especially useful for divide-and-conquor algorithms) so that once you have a subproblem which fits in cache, solving that subproblem is efficient without having to know a priori the size of the processor cache. Just something to think about -- as I said, I haven't looked at the code involved so I could completely off base :-) On Thu, 21 Nov 2002, Daniel Duhprey wrote: > On Thu, 21 Nov 2002, Henri Hakl wrote: > > -->Please check the accuracy and speed using the testsuite provided with ODE. > > If I'm using the numbers from the test_ldlt correctly (as a raw time on > some scale) then on my athlon its about 38% faster and on my celeron its > roughly twice as slow :). [ Peter Amstutz ][ amstutz at cs.umass.edu ][ tetron at interreality.org ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE93VdXaeHUyhjCHfcRAiRMAJ9DdwekLZIYJk0n/fAjtcd3aDG0vACfRze6 mcOSJYkj8/NzQXeW/qoia+k= =SJZQ -----END PGP SIGNATURE----- From martin at metahuman.org Thu Nov 21 17:12:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 21 17:12:02 2002 Subject: [ODE] eliminating all state Message-ID: <3DDD760D.CE7EF366@metahuman.org> Hey, So I'm evolving little virtual creatures with ODE, and after the evolution is done, I take the best ones and "play them back" with graphics and logging and other fun stuff. What I'd really like is for the simulation to go through exactly the same calculations with exactly the same roundoff errors, but at the moment there are small differences that creep up over time. Russ, you mentioned that ODE uses the correction at one timestep to estimate the size of the correction at the next timestep. Is there any way I can reset this between evaluations? Is there anywhere else state is stored? For the curious: I'm currently using the debug build with -ffloat-store, and using exactly the same executable in both cases, so it's guaranteed to have exactly the same compiler options, etc... Thanks, Martin From russ at q12.org Thu Nov 21 17:25:02 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 21 17:25:02 2002 Subject: [ODE] eliminating all state In-Reply-To: <3DDD760D.CE7EF366@metahuman.org> Message-ID: > Russ, you mentioned that ODE uses the correction at one timestep to > estimate the size of the correction at the next timestep. Is there any > way I can reset this between evaluations? Is there anywhere else state is > stored? i hope i didn't mention this, because its not true. each time step is completely independent from the last ... the only information that flows between time steps is the position, orientation and linear/angular velocity of the bodies. but of course all the ODE parameters will have effects that spread throughout time precisely because they affect the positions/velocities. if you're trying to reproduce exact behavior, there's one thing to watch out for when saving and restoring state: save and restore the quaternion, not the rotation matrix, as R is generated from Q not the other way around. saving and restoring R will result in some least-significants-bits errors in the restored state. russ. -- Russ Smith http://www.q12.org/ From martin at metahuman.org Thu Nov 21 18:27:02 2002 From: martin at metahuman.org (Martin C. Martin) Date: Thu Nov 21 18:27:02 2002 Subject: [ODE] eliminating all state References: Message-ID: <3DDD87C0.2E18DE49@metahuman.org> Russ Smith wrote: > > > Russ, you mentioned that ODE uses the correction at one timestep to > > estimate the size of the correction at the next timestep. Is there any > > way I can reset this between evaluations? Is there anywhere else state is > > stored? > > i hope i didn't mention this, because its not true. Sorry, I must be confused. But wasn't there some issue with radically changing the size of the time step? e.g. going from 0.01 sec to 1.0 sec or vice versa? - Martin From nnevatie at welho.com Thu Nov 21 22:16:01 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Thu Nov 21 22:16:01 2002 Subject: [ODE] Faster ODE References: Message-ID: <000f01c291e6$2f741ec0$3abdf3d5@wli> I benchmarked 'test_ldlt', here are the results. Configuration: - AMD Athlon TB 800MHz, 384MB RAM, Windows XP - ODE 0.03 built with Borland C++ Builder 6.0 (all optimizations on) Test: - ODE was built including first the original 'fastldlt.c' and then 'fastldlt_henri.c' - test_ldlt was on executed using all available parameters (f, s, t) Results: with 'fastldlt.c': ---- 3449 error = 1.625478e-03, size = 71 error = 2.011657e-04, size = 79 error = 4.785806e-04, size = 83 error = 5.344188e-02, size = 89 error = 3.189385e-03, size = 97 error = 2.305180e-03, size = 101 75 error = 4.673339e-04, size = 71 error = 2.476573e-04, size = 73 error = 1.307763e-03, size = 79 error = 1.248479e-03, size = 83 error = 1.030391e-02, size = 89 error = 1.046956e-03, size = 97 error = 7.226467e-04, size = 101 89 ---- with 'fastldlt_henri.c': ---- 2046 error = 1.625478e-03, size = 71 error = 2.011657e-04, size = 79 error = 4.785806e-04, size = 83 error = 5.344188e-02, size = 89 error = 3.189385e-03, size = 97 error = 2.305180e-03, size = 101 75 error = 4.673339e-04, size = 71 error = 2.476573e-04, size = 73 error = 1.307763e-03, size = 79 error = 1.248479e-03, size = 83 error = 1.030391e-02, size = 89 error = 1.046956e-03, size = 97 error = 7.226467e-04, size = 101 89 ---- Conclusions: - The outputs of the tests are identical. - 'fastldlt_henri.c' consumed ~59% of the time taken by 'fastldlt.c', on the described test configuration. - As mentioned earlier, the results may vary depending on the CPU and cache types. Cheers ----- Original Message ----- From: "Peter Amstutz" To: "Daniel Duhprey" Cc: Sent: Thursday, November 21, 2002 11:59 PM Subject: Re: [ODE] Faster ODE > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I haven't looked any of the code involved, but there is one possible > explanation for it being faster on one CPU and slower on another :-) It > sounds like a cache-size issue. If the Athlon has a bigger L1/L2 cache > then the algorithm might be faster overall but if uses more instructions > or space than the current algorithm it could be too big and incur a large > cache-miss penalty on the Celeron (which if I recall correctly was given a > really wimpy L1/L2 cache to keep costs down). Such are the joys of modern > CPU architechtures... There's been some work on "cache-oblivious" > algorithms, which is essentially a technique of designing the algorithm to > work on small, localized and usually recursive subsets of the total > problem (this is especially useful for divide-and-conquor algorithms) so > that once you have a subproblem which fits in cache, solving that > subproblem is efficient without having to know a priori the size of the > processor cache. > > Just something to think about -- as I said, I haven't looked at the code > involved so I could completely off base :-) > > On Thu, 21 Nov 2002, Daniel Duhprey wrote: > > > On Thu, 21 Nov 2002, Henri Hakl wrote: > > > > -->Please check the accuracy and speed using the testsuite provided with ODE. > > > > If I'm using the numbers from the test_ldlt correctly (as a raw time on > > some scale) then on my athlon its about 38% faster and on my celeron its > > roughly twice as slow :). > > [ Peter Amstutz ][ amstutz at cs.umass.edu ][ tetron at interreality.org ] > [Lead Programmer][Interreality Project][Virtual Reality for the Internet] > [ VOS: Next Generation Internet Communication][ http://interreality.org ] > [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.7 (GNU/Linux) > > iD8DBQE93VdXaeHUyhjCHfcRAiRMAJ9DdwekLZIYJk0n/fAjtcd3aDG0vACfRze6 > mcOSJYkj8/NzQXeW/qoia+k= > =SJZQ > -----END PGP SIGNATURE----- > > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode > From chris.campbell at l8tech.com Thu Nov 21 22:55:02 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Thu Nov 21 22:55:02 2002 Subject: [ODE] eliminating all state Message-ID: > is done, I take the best ones and "play them back" with graphics and > logging and other fun stuff. What I'd really like is for the > simulation > to go through exactly the same calculations with exactly the > same roundoff > errors, but at the moment there are small differences that > creep up over > time. Russ, you mentioned that ODE uses the correction at Using fixed timestep? I am making a racing game using ODE for physics which records only keyboard and mouse inputs to make a replay. That is, to play the replay the entire simulation is recalculated. Initially I was a little worried that error might creep in after a while but after a LONG time experimenting I convinced myself that there was no state held by ODE, and that the idea should work. It does, but only with fixed timestep. Also, a recording made with the debug binary will not replay properly with the release binary and vice versa. Another thing which seems to be necessary is that the cpu should conform to IEEE floating point standards in order for replays to work deterministically on a different computer. ChrisC From dmcclurg at pandemicstudios.com.au Thu Nov 21 23:13:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 21 23:13:02 2002 Subject: [ODE] is ball and socket joint anchor relative to body1? Message-ID: From dmcclurg at pandemicstudios.com.au Thu Nov 21 23:53:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 21 23:53:02 2002 Subject: [ODE] stress testing and box stacking instability Message-ID: I'm trying to use stacked boxes in my game and I ran into the box stacking instability mentioned previously on this list. That got me to reading the Gamasutra article "Product Review of Physics Engines, Part One: The Stress Tests" and I thought it might be useful to put together the stress test suite for ODE. It was easy to get tests 1-6 coded and the only one that did badly was Test 2: "A slightly larger cube is dropped on a smaller cube. This was a variation on the first test in that the difference between the cubes' sizes was much smaller. This test was meant to be a "gimme" and should just work." Expected result: cubes should drop straight on top of each other and come to immediate rest. I attached a modified test_boxstack.cpp which shows what happens. The top box dances around for a long time and eventually falls off the top box. In Havok, i think they might be freezing/sleeping boxes in this situation. Does the solution lie in proper detection of this situation or in better contact generation? <> -------------- next part -------------- A non-text attachment was scrubbed... Name: test_boxstack.cpp Type: application/octet-stream Size: 8109 bytes Desc: test_boxstack.cpp Url : http://q12.org/pipermail/ode/attachments/20021121/9c10cbe2/test_boxstack.obj From ngbinh at glassegg.com Fri Nov 22 01:23:02 2002 From: ngbinh at glassegg.com (Nguyen Binh) Date: Fri Nov 22 01:23:02 2002 Subject: [ODE] Faster ODE In-Reply-To: <000f01c291e6$2f741ec0$3abdf3d5@wli> References: <000f01c291e6$2f741ec0$3abdf3d5@wli> Message-ID: <9822448108.20021122151447@glassegg.com> For me, P III 550 Mhz , XP SP1 ,VS.NET Latest CVS source. Optimize all enable. --------- Use Henri's code : 23805 error = 1.625478e-003, size = 71 error = 2.011657e-004, size = 79 error = 4.785806e-004, size = 83 error = 5.344188e-002, size = 89 error = 3.189385e-003, size = 97 error = 2.305180e-003, size = 101 485 error = 4.673339e-004, size = 71 error = 2.476573e-004, size = 73 error = 1.307763e-003, size = 79 error = 1.248479e-003, size = 83 error = 1.030391e-002, size = 89 error = 1.046956e-003, size = 97 error = 7.226467e-004, size = 101 707 --------- Original code: 23804 error = 1.625478e-003, size = 71 error = 2.011657e-004, size = 79 error = 4.785806e-004, size = 83 error = 5.344188e-002, size = 89 error = 3.189385e-003, size = 97 error = 2.305180e-003, size = 101 485 error = 4.673339e-004, size = 71 error = 2.476573e-004, size = 73 error = 1.307763e-003, size = 79 error = 1.248479e-003, size = 83 error = 1.030391e-002, size = 89 error = 1.046956e-003, size = 97 error = 7.226467e-004, size = 101 707 ------------- My conclusion : + Both exactly the same for my case. Hey Niko! Are you sure about your result? I see your PC run 10 times faster than mine. ( :-( ) . Nguyen Binh From nlin at nlin.net Fri Nov 22 03:15:02 2002 From: nlin at nlin.net (nlin@nlin.net) Date: Fri Nov 22 03:15:02 2002 Subject: ODE Debug behaves differently than ODE release (was Re: [ODE] eliminating all state) Message-ID: <20021122114259.GA29965@nlin.net> On Fri, Nov 22, 2002 at 03:02:44PM +0900, Chris Campbell wrote: > Also, a recording made with the debug binary will not replay > properly with the release binary and vice versa. Recently I have been investigating exactly this determinism problem and have come to the same conclusion as Chris: ODE's behavior can be deterministically reproduced with a fixed timestep, but the debug and release versions act differently. This is somewhat unsettling for me. I am reasonably certain that is is ODE itself which is behaving differently in debug and release modes, not my application. I don't have time to investigate this in detail now, but I wanted to add a second confirmation to Chris's: ODE debug behaves differently than ODE release. One more note which may provide a clue as to the source of the discrepancy. My app access ODE through custom wrapper classes (in file1.cpp), and I also declared a custom collision space (in file2.cpp). If I compile my entire app in debug mode, but compile file1.cpp and file2.cpp in release mode and link the app with the release ODE lib, then behavior of the entire debug app is identical with the behavior of the release app. If I compile file1.cpp in debug mode, OR compile file2.cpp in debug mode, OR link with the ODE debug library, then divergent behavior results. That merely recompiling my *interface* class to ODE causes divergent behavior seems to indicate this may be a data alignment, calling convention, or other subtle compiler flag issue. This is on MSVC 6. If I recall correctly, I believe that even the ODE demos acted differently in debug and release modes, so anyone wishing to reproduce this divergent behavior should be able to do so easily. -Norman From nlin at nlin.net Fri Nov 22 03:35:02 2002 From: nlin at nlin.net (nlin@nlin.net) Date: Fri Nov 22 03:35:02 2002 Subject: [ODE] eliminating all state Message-ID: <20021122120304.GA30898@nlin.net> On Thu, Nov 21, 2002 at 05:24:02PM -0700, Russ Smith wrote: > > Russ, you mentioned that ODE uses the correction at one timestep to > > estimate the size of the correction at the next timestep. Is there any > > way I can reset this between evaluations? Is there anywhere else state is > > stored? > > i hope i didn't mention this, because its not true. each time step is > completely independent from the last ... the only information that flows > between time steps is the position, orientation and linear/angular > velocity of the bodies. but of course all the ODE parameters will have > effects that spread throughout time precisely because they affect the > positions/velocities. Russ, The message from which you are being indirectly quoted is: http://q12.org/pipermail/ode/2002-April/001107.html The relevant passage: On Wed, Apr 10, 2002, Russ Smith wrote: > in the small-large > timestep case it fails, because the velocity correction is timestep > dependent (i.e. the small velocity correction calculated during the > small timestep becomes a much-too-large correction during the large > timestep). there is a good fix for this problem, which i will > eventually add to ODE (as time permits). there'll be a dWorld switch > to turn it on, as there is a slight performance cost. Has the "fix" mentioned above been implemented? What is the idea behind the fix? -Norman From p.terdiman at wanadoo.fr Fri Nov 22 03:57:01 2002 From: p.terdiman at wanadoo.fr (Pierre Terdiman) Date: Fri Nov 22 03:57:01 2002 Subject: ODE Debug behaves differently than ODE release (was Re: [ODE] eliminating all state) References: <20021122114259.GA29965@nlin.net> Message-ID: <00cb01c29215$84b94ca0$0e00000a@pierre> > This is somewhat unsettling for me. I am reasonably certain that is is > ODE itself which is behaving differently in debug and release modes, > not my application. I don't have time to investigate this in detail > now, but I wanted to add a second confirmation to Chris's: ODE debug > behaves differently than ODE release. Well, that's normal. Due to limited FPU precision,simply reordering some operations can produce slightly different results (and reordering happens a lot when the compiler optimizes the code, of course). Also, something like this : a = b / 2.0f; ...can be compiled with the divide in Debug mode, but actually be transformed into : a = b * 0.5f; ...in Release. Producing different results, that can add up quickly in a physics engine. You can try the following compiler option on VC++ : Project Settings -> C/C++ -> Optimizations ->Improve float consistency Sometimes it helps. But in some cases it can be very hard to get the exact same behaviours in Debug & Release. There was a Gamasutra article explaining related problems, when you try to record an animation and replay it in the same exact way. That's surprisingly difficult. Pierre From chris.campbell at l8tech.com Fri Nov 22 03:57:41 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Fri Nov 22 03:57:41 2002 Subject: [ODE] Debug vs Release floating point (MSVC) Message-ID: Hi Norman, > This is somewhat unsettling for me. I am reasonably certain that is is > ODE itself which is behaving differently in debug and release modes, Nah... I'm pretty sure it is to do with the optimizations (for speed) that occur when building for release. In release build floating point exceptions are not checked for, internal representation of the number is different etc - I don't really know the details. If you are using doubles, this might be relevant too: http://support.microsoft.com/default.aspx?scid=KB;en-us;q217033 > convention, or other subtle compiler flag issue. Apparently the /Op switch is supposed to stop optimizations in the release build as well, but whether you want to do that is the question isn't it... ChrisC From henri at cs.sun.ac.za Fri Nov 22 06:34:02 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Fri Nov 22 06:34:02 2002 Subject: [ODE] Faster ODE References: <000f01c291e6$2f741ec0$3abdf3d5@wli> Message-ID: <006b01c2922b$ec499710$45d4e892@temple> hmmm... the results are quite interesting. I can understand that in the case of Nguyen Binh there is no difference in resultant speed. This is likely to be due to the compiler that is in that case intelligent enough to produce all the optimizations I've set to it. In essence I just realized that there are alot of code redundancies that aren't guaranteed to be compiled away with optimal efficiency by most compilers. VS.NET has a pretty thorough compiler as far as I understand... ;) I have no idea why the Celeron results should be slower - but the 38-59% speed improvement by Niko and Daniel are what I expect from average systems. I'm quite happy with the results upto now then... ;) Henri ----- Original Message ----- From: "Niko Nevatie" To: Sent: Friday, November 22, 2002 7:15 AM Subject: Re: [ODE] Faster ODE > I benchmarked 'test_ldlt', here are the results. > > Configuration: > - AMD Athlon TB 800MHz, 384MB RAM, Windows XP > - ODE 0.03 built with Borland C++ Builder 6.0 (all optimizations on) > > Test: > - ODE was built including first the original 'fastldlt.c' and then > 'fastldlt_henri.c' > - test_ldlt was on executed using all available parameters (f, s, t) > > Results: > > with 'fastldlt.c': > ---- > 3449 > > error = 1.625478e-03, size = 71 > error = 2.011657e-04, size = 79 > error = 4.785806e-04, size = 83 > error = 5.344188e-02, size = 89 > error = 3.189385e-03, size = 97 > error = 2.305180e-03, size = 101 > 75 > > error = 4.673339e-04, size = 71 > error = 2.476573e-04, size = 73 > error = 1.307763e-03, size = 79 > error = 1.248479e-03, size = 83 > error = 1.030391e-02, size = 89 > error = 1.046956e-03, size = 97 > error = 7.226467e-04, size = 101 > 89 > ---- > > > with 'fastldlt_henri.c': > ---- > 2046 > > error = 1.625478e-03, size = 71 > error = 2.011657e-04, size = 79 > error = 4.785806e-04, size = 83 > error = 5.344188e-02, size = 89 > error = 3.189385e-03, size = 97 > error = 2.305180e-03, size = 101 > 75 > > error = 4.673339e-04, size = 71 > error = 2.476573e-04, size = 73 > error = 1.307763e-03, size = 79 > error = 1.248479e-03, size = 83 > error = 1.030391e-02, size = 89 > error = 1.046956e-03, size = 97 > error = 7.226467e-04, size = 101 > 89 > ---- > > > Conclusions: > - The outputs of the tests are identical. > - 'fastldlt_henri.c' consumed ~59% of the time taken by 'fastldlt.c', on the > described test configuration. > - As mentioned earlier, the results may vary depending on the CPU and cache > types. > > > Cheers > > ----- Original Message ----- > From: "Peter Amstutz" > To: "Daniel Duhprey" > Cc: > Sent: Thursday, November 21, 2002 11:59 PM > Subject: Re: [ODE] Faster ODE > > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > I haven't looked any of the code involved, but there is one possible > > explanation for it being faster on one CPU and slower on another :-) It > > sounds like a cache-size issue. If the Athlon has a bigger L1/L2 cache > > then the algorithm might be faster overall but if uses more instructions > > or space than the current algorithm it could be too big and incur a large > > cache-miss penalty on the Celeron (which if I recall correctly was given a > > really wimpy L1/L2 cache to keep costs down). Such are the joys of modern > > CPU architechtures... There's been some work on "cache-oblivious" > > algorithms, which is essentially a technique of designing the algorithm to > > work on small, localized and usually recursive subsets of the total > > problem (this is especially useful for divide-and-conquor algorithms) so > > that once you have a subproblem which fits in cache, solving that > > subproblem is efficient without having to know a priori the size of the > > processor cache. > > > > Just something to think about -- as I said, I haven't looked at the code > > involved so I could completely off base :-) > > > > On Thu, 21 Nov 2002, Daniel Duhprey wrote: > > > > > On Thu, 21 Nov 2002, Henri Hakl wrote: > > > > > > -->Please check the accuracy and speed using the testsuite provided with > ODE. > > > > > > If I'm using the numbers from the test_ldlt correctly (as a raw time on > > > some scale) then on my athlon its about 38% faster and on my celeron its > > > roughly twice as slow :). > > > > [ Peter Amstutz ][ amstutz at cs.umass.edu ][ etron at interreality.org ] > > [Lead Programmer][Interreality Project][Virtual Reality for the Internet] > > [ VOS: Next Generation Internet Communication][ http://interreality.org ] > > [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.0.7 (GNU/Linux) > > > > iD8DBQE93VdXaeHUyhjCHfcRAiRMAJ9DdwekLZIYJk0n/fAjtcd3aDG0vACfRze6 > > mcOSJYkj8/NzQXeW/qoia+k= > > =SJZQ > > -----END PGP SIGNATURE----- > > > > > > _______________________________________________ > > ODE mailing list > > ODE at q12.org > > http://q12.org/mailman/listinfo/ode > > > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode From martin at metahuman.org Fri Nov 22 09:47:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Fri Nov 22 09:47:01 2002 Subject: [ODE] eliminating all state References: <20021122120304.GA30898@nlin.net> Message-ID: <3DDE5F39.FFA325DC@metahuman.org> > The message from which you are being indirectly quoted is: > > http://q12.org/pipermail/ode/2002-April/001107.html Thanks Norman, I see where he says it's only positions and velocities. For those who are curious, I found the source of the problem: when I was printing out my doubles, I was only printing DBL_DIG many digits (= 15). It turns out, I need to print out 17 digits to be sure the values when read in are exactly the same as before. Thanks, Martin From jeffrey.palmer at acm.org Fri Nov 22 11:07:02 2002 From: jeffrey.palmer at acm.org (Jeffrey Palmer) Date: Fri Nov 22 11:07:02 2002 Subject: [ODE] Faster ODE In-Reply-To: <006b01c2922b$ec499710$45d4e892@temple> References: <000f01c291e6$2f741ec0$3abdf3d5@wli> <006b01c2922b$ec499710$45d4e892@temple> Message-ID: <200211221206.28464.jeffrey.palmer@acm.org> Hello all, I just thought I'd throw out a couple of references I've found useful while developing highly-efficient C++ code (I apologize if these have been brought up before): 1) Blitz++ (http://www.oonumerics.org/blitz) - A template-based C++ library for highly-efficient numerical development. Uses template-metaprogramming to produce code as fast or faster than FORTRAN, while maintaining an intuitive user model. 2) FFTW - The Fastest Fourier Transform in the West (http://www.fftw.org) - Although perhaps not directly applicable to ODE, their approach is a very interesting one if you're *really* concerned about cranking out performance on whatever platform you're running on. I only point these out because we're at a point where it's becoming increasingly difficult to implement a "correct" solution that is highly performant on all possible platforms. So, rather than search for the Holy Grail, these approaches can help to determine an approach that provides the best performance/platform tradeoff. Hope this helps/is interesting, - j -- The river is moving. The blackbird must be flying. From sergey_eu at cea.ru Fri Nov 22 12:30:02 2002 From: sergey_eu at cea.ru (Sergei Eliseev) Date: Fri Nov 22 12:30:02 2002 Subject: [ODE] Can't compile ODE :( Message-ID: <2620020157.20021122223434@cea.ru> Hello, Just downloaded latest ODE source via WinCVS and make.exe from this site, created file config/user-settings for msvc, but can't compile it. I always get the same error: make (e=2): The system cannot find the file specified. make.exe: *** [configurator.exe] Error 2 Moreover when I downloaded ready .lib, under VC++ 6.0 I always get another error during linking: ode.lib(misc.obj) : error LNK2001: unresolved external symbol __ftol2 How can avoid these nasty errors? Any help really appreciated. Best regards, Sergei mailto:sergey_eu at cea.ru From russ at q12.org Fri Nov 22 13:48:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 13:48:02 2002 Subject: [ODE] eliminating all state In-Reply-To: <3DDD81EB.9D7E5C55@metahuman.org> Message-ID: > Sorry, I must be confused. But wasn't there some issue with radically > changing the size of the time step? e.g. going from 0.01 sec to 1.0 sec > or vice versa? yes ... the issue is that the error correcting velocity would be artificially magnified when switching from a small to large time step (e.g. *10). this issue is on the fix-list. russ. -- Russ Smith http://www.q12.org/ From anselm at hook.org Fri Nov 22 14:41:01 2002 From: anselm at hook.org (Anselm Hook) Date: Fri Nov 22 14:41:01 2002 Subject: [ODE] stress testing and box stacking instability In-Reply-To: Message-ID: Hi Dave, I thought everybody knew about this defect by now? It's something that Russ has said he's going to fix for the next big release. If the bug hasn't changed then basically it is just that not enough contacts are being generated between two box surfaces - there needs to be at least 3 but there is only 1 right now. - a On Fri, 22 Nov 2002, David McClurg wrote: > I'm trying to use stacked boxes in my game and I ran into the box > stacking instability mentioned previously on this list. That got me > to reading the Gamasutra article "Product Review of Physics Engines, > Part One: The Stress Tests" and I thought it might be useful to put > together the stress test suite for ODE. > > It was easy to get tests 1-6 coded and the only one that did badly was > Test 2: "A slightly larger cube is dropped on a smaller cube. This > was a variation on the first test in that the difference between the > cubes' sizes was much smaller. This test was meant to be a "gimme" > and should just work." Expected result: cubes should drop straight on > top of each other and come to immediate rest. > > I attached a modified test_boxstack.cpp which shows what happens. The top box dances around for a long time and eventually falls off the top box. In Havok, i think they might be freezing/sleeping boxes in this situation. Does the solution lie in proper detection of this situation or in better contact generation? > <> > From russ at q12.org Fri Nov 22 15:05:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 15:05:02 2002 Subject: [ODE] Faster ODE In-Reply-To: <200211221206.28464.jeffrey.palmer@acm.org> Message-ID: > 1) Blitz++ (http://www.oonumerics.org/blitz) > 2) FFTW - The Fastest Fourier Transform in the West i have used blitz and have found their approach to be more clever than it is productive. the template meta-program idea results in exceptionally long compile times, and not all compilers have the right optimization strategies to take advantage of the generated code. gcc, for example, does not seem to do terribly well at optimizing away the numerous stack-based parameter-passing temporaries that such code generates. i considered blitz for ODE but gave up on it in favour of explicitly written for-loops and hand unrolling because (a) blitz is slower, (b) blitz increases the compile time hugely, (c) blitz syntax sometimes obscures the actual numerical operations that are being performed - and i like things to be obvious and out in the open. FFTW is new to me, thanks for the pointer. there's also ATLAS, http://math-atlas.sourceforge.net/ ODE's factorizer is generated using an ATLAS-like parameter-finding approach (look in the fbuild directory). that's why the fast-ldlt code looks really complicated when the same thing could be implemented using 3 for-loops in about 20 lines of code. ideally the build process for ODE should involve running the fbuild code to get the fastest factorizer on your platform. the 'default' fastldlt etc code is just what happens to work best on whatever platform i ran fbuild on. note that this default code should still be significantly faster than the 3 for-loops approach on all platforms (for matrices of greater than say 5x5 ?). russ. -- Russ Smith http://www.q12.org/ From kale at sagan.usc.edu Fri Nov 22 15:13:02 2002 From: kale at sagan.usc.edu (Kale Harbick) Date: Fri Nov 22 15:13:02 2002 Subject: [ODE] Vortex vs. ODE Message-ID: I started using MathEngine's dynamics toolkit in 2000, and continued with Vortex when they split up. It's time to renew our academic license but the price was increased a lot, so we're reluctant. I'm investigating alternatives and heard about ODE. I was hoping someone here could compare Vortex and ODE. My application is a simulation of a dynamically-stable hopping robot. Other people in my group are working on humanoid robot simulations. Accuracy is more important to me than speed, as it eases the migration of controllers from simulation to the physical robot. thanks very much Kale Harbick USC Robotics Lab From russ at q12.org Fri Nov 22 15:39:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 15:39:02 2002 Subject: [ODE] Vortex vs. ODE In-Reply-To: Message-ID: > Accuracy is more important to me than speed, as it eases the > migration of controllers from simulation to the physical robot. vortex and ODE both use 1st-order accurate implicit integrators. vortex may have a more accurate model of single-rigid-body tumbling, but this is probably not too relevant for robotics work. in my own experience, robot simulator accuracy is rather difficult to achieve because every piece must be accurate before the whole thing is ... not only the integrator but the friction models, the actuator models (hydraulics anyone? pneumatics?), the sensor models, etc. even getting accurate inertia tensors is tricky for lab robots that sometimes are sticky-taped together instead of being bolted. personally, i wouldn't worry about the numerical accuracy of my simulator unless i had all these other things sorted out. russ. -- Russ Smith http://www.q12.org/ From vbz at cs.ucr.edu Fri Nov 22 21:18:01 2002 From: vbz at cs.ucr.edu (Victor Zordan) Date: Fri Nov 22 21:18:01 2002 Subject: [ODE] joint torques Message-ID: <20021123031114.99CAF25A83@snap.cs.ucr.edu> Hello. Comment and a question... In regards to 11/21 USC comments, I too found vortex to be too expensive. Plus, I prefer having the code open and available for reading... (thanks Russ for that.) Also, I've played with Vortex and their contact models were not to my liking... I asked them if they would let me set up my own ground constraints and got a negative response, saying that was in a part of the program that was closed to the users. In a development environment, like mine or USC's, you want to be able to change as much as possible... Now, I have looked thru the archives and saw my question asked by Jon Klein back in June but I didn't find a reply to his question, so I figure I'll repeat the question. I too am trying to apply torques about joints and I built a controller that applied both torque at the body center and a computed force as an equivalent to applying a joint torque. The joint controller appears to move the body in the correct way, but I somehow don't think I am computing things properly b/c some unnatural forces appear at times and cause the body to spin out of control. The bottom-line question: is there a way in ODE to apply torques relative to a point on a body (the joint center), just as you would apply a force at a particular point? Or am I making this too difficult... Thanks much, Victor From russ at q12.org Fri Nov 22 21:25:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 22 21:25:02 2002 Subject: [ODE] joint torques In-Reply-To: <20021123031114.99CAF25A83@snap.cs.ucr.edu> References: <20021123031114.99CAF25A83@snap.cs.ucr.edu> Message-ID: <20021122202930.3a0a3adc.russ@q12.org> > is there a way in ODE to apply torques relative to a point on a body > (the joint center), just as you would apply a force at a particular > point? physics fact: any torque applied to a body will have the same effect on that body's motion regardless of the point at which it is applied, so there's no reason to specify a position in the dBodyAdd[Rel]Torque() functions. russ. -- Russell Smith http://www.q12.org From mama7121 at student.uu.se Sat Nov 23 05:43:02 2002 From: mama7121 at student.uu.se (Martin Magnusson) Date: Sat Nov 23 05:43:02 2002 Subject: [ODE] Robotics simulation Message-ID: <3DDF77B8.6080804@student.uu.se> Hello everybody. I'm new to this list and thought I'd say hi... Max Lungarella wrote: > my plan is to simulate a humanoid robot with a reduced number of degrees of > freedom, let's say 10. the simulation would have to be fairly accurate, since > i'd like to develop the control architecture in software and use this very > architecture for the control of a real robot in a second time step. That sounds very much like my project. I'm doing my master's thesis on reinforcement learning for balancing a humaoid robot, and I'm looking for a simulation environment to test my algorithms with. How has it turned out for you? Are you happy with ODE? Is Dymamechs any better? / Martin Magnusson From marinescuiulian at yahoo.com Sat Nov 23 06:56:02 2002 From: marinescuiulian at yahoo.com (Marinescu Iulian) Date: Sat Nov 23 06:56:02 2002 Subject: [ODE] Could I simulate a car with ODE ? Message-ID: <20021123135558.68015.qmail@web13007.mail.yahoo.com> Hi to everyone! I am a complete beginner regarding ODE. But I would like to learn. I have to do this project of simulation of a car on different types of road, and different types of weather. I would have to input this: The dinamics of the car ( for wind simulation) Type of road ( with holes and stuff) The type tires Type of suspension The vibration of the engine And many other inputs that I didn't think of, yet. The question is if I could do a program, with ODE, to simulate this. Thank You !!! --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021123/ff75cbf5/attachment.htm From erwin at vo.com Sat Nov 23 06:59:01 2002 From: erwin at vo.com (Erwin de Vries) Date: Sat Nov 23 06:59:01 2002 Subject: [ODE] new ODE collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> Message-ID: <064201c292f8$55791ae0$73fefea9@athlon> > > - Should we add support for a user defined, or infinite AABB on demand > > for spaces? This is really useful for the quadtree space containing > > huge (10.000 for example) amounts of geoms. If i would remove a single > > geom it would need to do a lot of work. > > i don't understand this .. ? I'll explain my situation. In my app i have a lot of initially static scenery objects. I place these inside a quadtree space. Once upon a while the main player hits one (or more) of these objects. At this point i remove them from the quadtree, give them a body, and add them to my 'main space'. Now, as this quadtree essentially covers the whole game world i dont _need_ it to have a tight AABB since it is very large anyways. The point where i _require_ it NOT to have a tight AABB is when i change the structure of the quadtree (remove a geom). Imagine a 10.000 geom quadtree having to recompute its bounds. Even if it only involves recomputing the final aabb of 9999 cached and 1 new aabb, it still is a costly process that is essentially useless. Thats why i would like to add an option to spaces to simply return an infinite AABB instead of computing it. Hope this explains. I'm migrating to the new ODE collision detection today. Perhaps some other suggestions will come to my mind. Erwin From p.terdiman at wanadoo.fr Sat Nov 23 08:12:01 2002 From: p.terdiman at wanadoo.fr (Pierre Terdiman) Date: Sat Nov 23 08:12:01 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> Message-ID: <037501c29302$5bde2ce0$0e00000a@pierre> Hi, I was (finally) looking at Erwin's box-mesh collision today, when I noticed something weird : float DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - *ColTri.Vertices[0]); ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); Unless I'm missing something, the local variable DistSq is never used. On the other hand, ColTri.DistSq is used while probably not initialized. I guess the two lines should be : ColTri.DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - *ColTri.Vertices[0]); ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); ...unless, once again, I'm missing something. (I didn't trace it, I'm just browsing the CVS repository) There's also another version from Nolan Walker, based on Magic. Is this better / more recent ? (the question might already have been asked, but I can't remember the answer...) Pierre From facontidavide at hotmail.com Sat Nov 23 12:54:02 2002 From: facontidavide at hotmail.com (Edgard Oscuro) Date: Sat Nov 23 12:54:02 2002 Subject: [ODE] Robotics simulation Message-ID: An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021123/a879484c/attachment.htm From grubertm at hotmail.com Sat Nov 23 14:37:02 2002 From: grubertm at hotmail.com (Marco Grubert) Date: Sat Nov 23 14:37:02 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> <037501c29302$5bde2ce0$0e00000a@pierre> Message-ID: One thing about the Box-Tri collider I noticed is that it assumes the normal to be that of the triangle. This works fine for a box falling onto a triangle, but yields wrong results for a triangle falling onto a box. I am currently working on the tri-tri detection and pick the normal based on which object is moving and which one is static. This avoids some explosions but introduces other instabilities.. - Marco Grubert From coding at natew.com Sat Nov 23 21:26:02 2002 From: coding at natew.com (Nate W) Date: Sat Nov 23 21:26:02 2002 Subject: [ODE] is ball and socket joint anchor relative to body1? In-Reply-To: Message-ID: On Fri, 22 Nov 2002, David McClurg wrote: > void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z); > it's not clear to me what coordinate frame the anchor point is in... World coordinates. Or at least, I assumed world coordinates, and it works like I'd assumed it would, so I feel pretty good about that assumption. :-) -- Nate Waddoups Redmond WA USA http://www.natew.com From russ at q12.org Sun Nov 24 16:36:01 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 24 16:36:01 2002 Subject: [ODE] multiple box-box contacts Message-ID: <20021124154047.1ca8d686.russ@q12.org> i have just finished an update to the box-box contact generation code. now up to 8 contacts can be generated per box-box collision, although in practice a limit of 3 or 4 is more useful. the test_boxstack demo has been updated to show box stacking in action: press 'r' to drop boxes in a stack, then press b multiple times. press 't' to show the contact points that are generated. you can play with different numbers of contacts by changing the 3rd argument to dCollide() - the default is 4. note that you have to compile ODE *without* ODE_OLD_COLLISION in user-settings to get the new code. be careful in your own code to generate as few box-box contacts as you actually need, as each extra contact point will slow down the simulation some more. this new code contains a number of heuristics that should result in good contact choices - but these algorithms need some more real-world testing. please report any problems you come across. russ. -- Russell Smith http://www.q12.org From martin at metahuman.org Sun Nov 24 16:52:01 2002 From: martin at metahuman.org (Martin C. Martin) Date: Sun Nov 24 16:52:01 2002 Subject: [ODE] multiple box-box contacts References: <20021124154047.1ca8d686.russ@q12.org> Message-ID: <3DE165EB.9FC8D9A6@metahuman.org> Hey Russ, > i have just finished an update to the box-box contact generation code. Thanks, that rocks! Better box-box contacts is one of the major capabilities in the list for 0.035. It's been almost a year since 0.03 was released. Any idea when 0.035 will be out? Thanks again, Martin From dmcclurg at pandemicstudios.com.au Sun Nov 24 19:15:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Sun Nov 24 19:15:02 2002 Subject: [ODE] multiple box-box contacts Message-ID: very nice Russ! just a minor thing that my VC7 compiler doesn't like... collision_std.cpp collision_std.cpp(460) : error C2057: expected constant expression collision_std.cpp(460) : error C2466: cannot allocate an array of constant size 0 collision_std.cpp(460) : error C2133: 'avail' : unknown size if you could change int avail[n]; to int* avail = (int*)alloca(n*sizeof(int)); that would fix it. -----Original Message----- From: Russ Smith [mailto:russ at q12.org] Sent: Monday, 25 November 2002 6:41 AM To: ode at q12.org Subject: [ODE] multiple box-box contacts i have just finished an update to the box-box contact generation code. now up to 8 contacts can be generated per box-box collision, although in practice a limit of 3 or 4 is more useful. the test_boxstack demo has been updated to show box stacking in action: press 'r' to drop boxes in a stack, then press b multiple times. press 't' to show the contact points that are generated. you can play with different numbers of contacts by changing the 3rd argument to dCollide() - the default is 4. note that you have to compile ODE *without* ODE_OLD_COLLISION in user-settings to get the new code. be careful in your own code to generate as few box-box contacts as you actually need, as each extra contact point will slow down the simulation some more. this new code contains a number of heuristics that should result in good contact choices - but these algorithms need some more real-world testing. please report any problems you come across. russ. -- Russell Smith http://www.q12.org _______________________________________________ ODE mailing list ODE at q12.org http://q12.org/mailman/listinfo/ode From russ at q12.org Sun Nov 24 19:58:02 2002 From: russ at q12.org (Russ Smith) Date: Sun Nov 24 19:58:02 2002 Subject: [ODE] multiple box-box contacts In-Reply-To: References: Message-ID: <20021124190259.4ef95df8.russ@q12.org> > if you could change > int avail[n]; ah yes ... this is now fixed. russ. -- Russell Smith http://www.q12.org From mal at candomultimedia.com Sun Nov 24 20:11:02 2002 From: mal at candomultimedia.com (Mal) Date: Sun Nov 24 20:11:02 2002 Subject: [ODE] OT: Physics based game beta... In-Reply-To: <20021124190259.4ef95df8.russ@q12.org> Message-ID: <000001c29430$209ac470$7600a8c0@MalLaptop> If any of you need a break from coding physics, check this out... http://www.candomultimedia.com/3dStressBall It's the beta of a new game we're developing in our spare time here at canDo, but it's quite fun already. It uses Shockwave 3D and Havok, but the basics could be implemented using any physics engine. You can post your levels to the new forum. The game will be modified a lot over the next 10 weeks or so. Enjoy, and if you like it, check this out too, it's an updated version of the Balls Up game that also uses Havok ( now 3D Balls Up, has a new novel mouse control, as well as joystick control, music, easier learning levels, feature removals ( bug fixes ) etc. http://www.candomultimedia.com/3dBallsUp As physics gurus it might be fun to get away from the compiler and get your hand to eye co-ordination back up to scratch! :) Mal From ngbinh at glassegg.com Sun Nov 24 23:08:02 2002 From: ngbinh at glassegg.com (Nguyen Binh) Date: Sun Nov 24 23:08:02 2002 Subject: [ODE] Faster ODE In-Reply-To: References: Message-ID: <130756758.20021125101120@glassegg.com> I think the best way to improve ODE speed is using CPU- specialized instructions like MMX,SIMD,SSE(2). The refs can be : http://LibSimd.sourceforge.net SML library of Intel. (Very nice!) -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media Me Linh Point Tower, 10th Floor 2 Ngo Duc Ke District 1, Ho Chi Minh City Vietnam Fax: (84.8)823-8392 www.glassegg.com --------------------------------------------------------------------- From Dominique at SavageSoftware.com.au Mon Nov 25 02:43:02 2002 From: Dominique at SavageSoftware.com.au (Dominique Louis) Date: Mon Nov 25 02:43:02 2002 Subject: [ODE] Silkworm... Message-ID: <3DE1F12E.6090306@SavageSoftware.com.au> Just thought others might be interested to know that todays ( 24th of November ) image of the day on FlipCode ( http://www.flipcode.com/iotd/ ) is an ODE demo called SilkWorm ( http://slickworm.sourceforge.net ). From tetron at interreality.org Mon Nov 25 11:25:02 2002 From: tetron at interreality.org (Peter Amstutz) Date: Mon Nov 25 11:25:02 2002 Subject: [ODE] multiple box-box contacts In-Reply-To: <20021124154047.1ca8d686.russ@q12.org> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Awesome! This is what I've been waiting for -- now I can use ODE for my VR simulation. Oh, and it's really fun to just play with the box stacking demo, to make a huge tower and then knock it down... Great work! Russ, you rule :-) It's amazing to have such excelent code freely available. On Sun, 24 Nov 2002, Russ Smith wrote: > > i have just finished an update to the box-box contact generation code. > now up to 8 contacts can be generated per box-box collision, although in > practice a limit of 3 or 4 is more useful. the test_boxstack demo has > been updated to show box stacking in action: press 'r' to drop boxes in > a stack, then press b multiple times. press 't' to show the contact > points that are generated. you can play with different numbers of > contacts by changing the 3rd argument to dCollide() - the default is 4. > > note that you have to compile ODE *without* ODE_OLD_COLLISION in > user-settings to get the new code. > > be careful in your own code to generate as few box-box contacts as you > actually need, as each extra contact point will slow down the simulation > some more. > > this new code contains a number of heuristics that should result in good > contact choices - but these algorithms need some more real-world > testing. please report any problems you come across. [ Peter Amstutz ][ amstutz at cs.umass.edu ][ tetron at interreality.org ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE94mrHaeHUyhjCHfcRApGmAJ0Rd0ssY0jsemvGVVaSDbqEW9YQbQCfTiWm 9pWajiZt1CU/KJjnff+AHk0= =Blf/ -----END PGP SIGNATURE----- From henri at cs.sun.ac.za Mon Nov 25 13:46:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Mon Nov 25 13:46:01 2002 Subject: [ODE] Faster ODE Message-ID: <032001c294c3$afa33ec0$45d4e892@temple> I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions for ODE - and it is quite possible that it can bring about harmony and speed. But one thing that is likely going to cause problems is the SSE(2) code. For optimal performance a number of details need to be implemented. Vectors and matrices need to be of a horizontal size that is a factor of 4 (this is implemented and the reason why, for example, a 3x3 matrix is defined as a 12 TReal (3x4) structure. However, the structures also have to be aligned onto 16-byte boundaries. To allow for optimal SSE(2) access (using movaps) each 128-bit memory vector that is accessed has to be alligned on a 16-byte memory boundary. This is a problem in ODE, as every math structure now is required to be 16-byte aligned; this is difficult to achieve because ODE calls/uses sub-matrices of matrices, and it may be difficult to guarantee that every sub-matrix is >also< correctly 16-byte aligned. Additionally SSE2 primarily adds double-float functionality to the SIMD instructions. This can help somewhat for speed in the TReal = double case, but isn't likely (just my guess) to have as tremendous a speed bonus as 4 single floats that can be handled simultaneously for TReal = single. Anyway... ;) Henri ----- Original Message ----- From: "Nguyen Binh" To: ; "Russ Smith" Cc: "Jeffrey Palmer" ; Sent: Monday, November 25, 2002 5:11 AM Subject: Re[2]: [ODE] Faster ODE > > I think the best way to improve ODE speed is using CPU- > specialized instructions like MMX,SIMD,SSE(2). > > The refs can be : > http://LibSimd.sourceforge.net > SML library of Intel. (Very nice!) > > -- > Best regards, > > --------------------------------------------------------------------- > Nguyen Binh > Software Engineer > Glass Egg Digital Media > Me Linh Point Tower, 10th Floor > 2 Ngo Duc Ke > District 1, Ho Chi Minh City > Vietnam > Fax: (84.8)823-8392 > www.glassegg.com > --------------------------------------------------------------------- > > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021125/dbf18b71/attachment.htm From swmatthe at nps.navy.mil Mon Nov 25 14:37:02 2002 From: swmatthe at nps.navy.mil (Matthews, Steve) Date: Mon Nov 25 14:37:02 2002 Subject: [ODE] Help with setting and getting rotation Message-ID: <47D23CE95FD22E47B0C927B7F99DAD0C167A95@grasp.ad.nps.navy.mil> Could somebody please look at the following code? I am trying to set the position and rotation of a body from a 4*4 matrix of floats, and I also want to then be able to query that position and rotation. I seem to be able to set the position and retrieve it correctly, but the rotation comes back as garbage when I try to retrieve it and I don't know why. The code will compile as a standalone main with ode as the only dependency. The input matrix (inputMat) is just dummy numbers; if I'm imposing something or assuming something I shouldn't, please tell me. Thanks much, Steve ********************************************** #include "ode/ode.h" void setPhysicsPosition(dBodyID bodyID, float setMat[4][4]) { dBodySetPosition(bodyID, (dReal)setMat[3][0], (dReal)setMat[3][1], (dReal)setMat[3][2]); dMatrix3 R; R[0] = (dReal)setMat[0][0]; R[1] = (dReal)setMat[0][1]; R[2] = (dReal)setMat[0][2]; R[3] = 0.0; R[4] = (dReal)setMat[1][0]; R[5] = (dReal)setMat[1][1]; R[6] = (dReal)setMat[1][2]; R[7] = 0.0; R[8] = (dReal)setMat[2][0]; R[9] = (dReal)setMat[2][1]; R[10] = (dReal)setMat[2][2]; R[11] = 0.0; dBodySetRotation(bodyID, R); } void getPhysicsPosition(dBodyID bodyID, float getMat[4][4]) { const dReal *getPos; getPos = dBodyGetPosition(bodyID); const dReal *getRot; getRot = dBodyGetRotation(bodyID); getMat[0][0] = (float)getRot[0]; getMat[0][1] = (float)getRot[1]; getMat[0][2] = (float)getRot[2]; getMat[0][3] = (float)getRot[3]; getMat[1][0] = (float)getRot[4]; getMat[1][1] = (float)getRot[5]; getMat[1][2] = (float)getRot[6]; getMat[1][3] = (float)getRot[7]; getMat[2][0] = (float)getRot[8]; getMat[2][1] = (float)getRot[9]; getMat[2][2] = (float)getRot[10]; getMat[2][3] = (float)getRot[11]; getMat[3][0] = (float)getPos[0]; getMat[3][1] = (float)getPos[1]; getMat[3][2] = (float)getPos[2]; getMat[3][3] = 1.0f; } int main() { dWorldID worldID = dWorldCreate(); dBodyID bodyID = dBodyCreate(worldID); //create the input matrix float inputMat[4][4] = {{1.0f, 0.1f, 0.2f, 0.0f}, {0.3f, 1.0f, 0.4f, 0.0f}, {0.5f, 0.6f, 1.0f, 0.0f}, {1.0f, 2.0f, 3.0f, 1.0f}}; //set the position of the physics body setPhysicsPosition(bodyID, inputMat); //print the input to console printf("input matrix:\n\n"); printf("%f %f %f %f\n", inputMat[0][0], inputMat[0][1], inputMat[0][2], inputMat[0][3]); printf("%f %f %f %f\n", inputMat[1][0], inputMat[1][1], inputMat[1][2], inputMat[1][3]); printf("%f %f %f %f\n", inputMat[2][0], inputMat[2][1], inputMat[2][2], inputMat[2][3]); printf("%f %f %f %f\n\n", inputMat[3][0], inputMat[3][1], inputMat[3][2], inputMat[3][3]); //initialize the output matrix float outMat[4][4] = {0.f}; //return the position back to 4*4 matrix format in newPos getPhysicsPosition(bodyID, outMat); //print the output to console printf("output matrix:\n\n"); printf("%f %f %f %f\n", outMat[0][0], outMat[0][1], outMat[0][2], outMat[0][3]); printf("%f %f %f %f\n", outMat[1][0], outMat[1][1], outMat[1][2], outMat[1][3]); printf("%f %f %f %f\n", outMat[2][0], outMat[2][1], outMat[2][2], outMat[2][3]); printf("%f %f %f %f\n\n", outMat[3][0], outMat[3][1], outMat[3][2], outMat[3][3]); return 0; } From erwin at vo.com Mon Nov 25 14:52:01 2002 From: erwin at vo.com (Erwin de Vries) Date: Mon Nov 25 14:52:01 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> <037501c29302$5bde2ce0$0e00000a@pierre> Message-ID: <000201c294cc$c0908090$73fefea9@athlon> > Hi, > > I was (finally) looking at Erwin's box-mesh collision today, when I noticed > something weird : > > float DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - > *ColTri.Vertices[0]); > ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); > > Unless I'm missing something, the local variable DistSq is never used. On > the other hand, ColTri.DistSq is used while probably not initialized. I > guess the two lines should be : > > ColTri.DistSq = ColTri.Plane.Normal.DotProduct(BoxCenter - > *ColTri.Vertices[0]); > ColTri.ClosestPoint = BoxCenter - (ColTri.Plane.Normal * ColTri.DistSq); > > ...unless, once again, I'm missing something. (I didn't trace it, I'm just > browsing the CVS repository) .... You're probably right. I cant quite see how this code is supposed to do anything useful. But its been so long since i've written this code, that i have doubts about the reason of existence of other stuff as well. :-) > There's also another version from Nolan Walker, based on Magic. Is this > better / more recent ? (the question might already have been asked, but I > can't remember the answer...) Yes it is better in some ways, but because of some bugs the end result is something not too great. I STILL need to fix this. I'm using the code in my projects and we're nearing the completion of it, so i would need to do it sometime soon. In case you want it. It is in the mail archives somewhere. Erwin From swmatthe at nps.navy.mil Mon Nov 25 15:09:01 2002 From: swmatthe at nps.navy.mil (Matthews, Steve) Date: Mon Nov 25 15:09:01 2002 Subject: [ODE] Help with setting and getting rotation Message-ID: <47D23CE95FD22E47B0C927B7F99DAD0C0DD9C0@grasp.ad.nps.navy.mil> Okay, next time I'll throw real data in. Apparently this does work; my dummy data was too dummy. sorry all. -----Original Message----- From: Matthews, Steve Sent: Monday, November 25, 2002 1:37 PM To: ode at q12.org Subject: [ODE] Help with setting and getting rotation Could somebody please look at the following code? I am trying to set the position and rotation of a body from a 4*4 matrix of floats, and I also want to then be able to query that position and rotation. I seem to be able to set the position and retrieve it correctly, but the rotation comes back as garbage when I try to retrieve it and I don't know why. The code will compile as a standalone main with ode as the only dependency. The input matrix (inputMat) is just dummy numbers; if I'm imposing something or assuming something I shouldn't, please tell me. Thanks much, Steve ********************************************** #include "ode/ode.h" void setPhysicsPosition(dBodyID bodyID, float setMat[4][4]) { dBodySetPosition(bodyID, (dReal)setMat[3][0], (dReal)setMat[3][1], (dReal)setMat[3][2]); dMatrix3 R; R[0] = (dReal)setMat[0][0]; R[1] = (dReal)setMat[0][1]; R[2] = (dReal)setMat[0][2]; R[3] = 0.0; R[4] = (dReal)setMat[1][0]; R[5] = (dReal)setMat[1][1]; R[6] = (dReal)setMat[1][2]; R[7] = 0.0; R[8] = (dReal)setMat[2][0]; R[9] = (dReal)setMat[2][1]; R[10] = (dReal)setMat[2][2]; R[11] = 0.0; dBodySetRotation(bodyID, R); } void getPhysicsPosition(dBodyID bodyID, float getMat[4][4]) { const dReal *getPos; getPos = dBodyGetPosition(bodyID); const dReal *getRot; getRot = dBodyGetRotation(bodyID); getMat[0][0] = (float)getRot[0]; getMat[0][1] = (float)getRot[1]; getMat[0][2] = (float)getRot[2]; getMat[0][3] = (float)getRot[3]; getMat[1][0] = (float)getRot[4]; getMat[1][1] = (float)getRot[5]; getMat[1][2] = (float)getRot[6]; getMat[1][3] = (float)getRot[7]; getMat[2][0] = (float)getRot[8]; getMat[2][1] = (float)getRot[9]; getMat[2][2] = (float)getRot[10]; getMat[2][3] = (float)getRot[11]; getMat[3][0] = (float)getPos[0]; getMat[3][1] = (float)getPos[1]; getMat[3][2] = (float)getPos[2]; getMat[3][3] = 1.0f; } int main() { dWorldID worldID = dWorldCreate(); dBodyID bodyID = dBodyCreate(worldID); //create the input matrix float inputMat[4][4] = {{1.0f, 0.1f, 0.2f, 0.0f}, {0.3f, 1.0f, 0.4f, 0.0f}, {0.5f, 0.6f, 1.0f, 0.0f}, {1.0f, 2.0f, 3.0f, 1.0f}}; //set the position of the physics body setPhysicsPosition(bodyID, inputMat); //print the input to console printf("input matrix:\n\n"); printf("%f %f %f %f\n", inputMat[0][0], inputMat[0][1], inputMat[0][2], inputMat[0][3]); printf("%f %f %f %f\n", inputMat[1][0], inputMat[1][1], inputMat[1][2], inputMat[1][3]); printf("%f %f %f %f\n", inputMat[2][0], inputMat[2][1], inputMat[2][2], inputMat[2][3]); printf("%f %f %f %f\n\n", inputMat[3][0], inputMat[3][1], inputMat[3][2], inputMat[3][3]); //initialize the output matrix float outMat[4][4] = {0.f}; //return the position back to 4*4 matrix format in newPos getPhysicsPosition(bodyID, outMat); //print the output to console printf("output matrix:\n\n"); printf("%f %f %f %f\n", outMat[0][0], outMat[0][1], outMat[0][2], outMat[0][3]); printf("%f %f %f %f\n", outMat[1][0], outMat[1][1], outMat[1][2], outMat[1][3]); printf("%f %f %f %f\n", outMat[2][0], outMat[2][1], outMat[2][2], outMat[2][3]); printf("%f %f %f %f\n\n", outMat[3][0], outMat[3][1], outMat[3][2], outMat[3][3]); return 0; } _______________________________________________ ODE mailing list ODE at q12.org http://q12.org/mailman/listinfo/ode From franjesus at medtelecom.net Mon Nov 25 15:40:02 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-1?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Mon Nov 25 15:40:02 2002 Subject: [ODE] multiple box-box contacts In-Reply-To: References: Message-ID: <200211252337.39769.franjesus@medtelecom.net> El Lun 25 Nov 2002 19:24, Peter Amstutz escribi?: > Oh, and it's really fun to just play with the box stacking > demo, to make a huge tower and then knock it down... Try it with spheres ;-) -- Linux: Esa panda de colgaos y piratas que te reprograman la lavadora desde rusia si usas un Windows pirata. .: Bulmailing :. From ngbinh at glassegg.com Mon Nov 25 18:49:03 2002 From: ngbinh at glassegg.com (Nguyen Binh) Date: Mon Nov 25 18:49:03 2002 Subject: [ODE] Faster ODE In-Reply-To: <032001c294c3$afa33ec0$45d4e892@temple> References: <032001c294c3$afa33ec0$45d4e892@temple> Message-ID: <751181058.20021126085017@glassegg.com> Hi , HH> I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions for ODE - HH> and it is quite possible that it can bring about harmony and speed. But one HH> thing that is likely going to cause problems is the SSE(2) code. HH> For optimal performance a number of details need to be implemented. Vectors HH> and matrices need to be of a horizontal size that is a factor of 4 (this is HH> implemented and the reason why, for example, a 3x3 matrix is defined as a 12 HH> TReal (3x4) structure. Take a look at Small Matrix Lib (SML) of Intel, you'll see that we have at least a way to solve this. HH> However, the structures also have to be aligned onto 16-byte boundaries. To HH> allow for optimal SSE(2) access (using movaps) each 128-bit memory vector HH> that is accessed has to be alligned on a 16-byte memory boundary. This is a HH> problem in ODE, as every math structure now is required to be 16-byte HH> aligned; this is difficult to achieve because ODE calls/uses sub-matrices of HH> matrices, and it may be difficult to guarantee that every sub-matrix is >>also< correctly 16-byte aligned. Also, SML solved these. But we may consider move all matrix, vector,... of ODE to the matrix, vector ,... of SML. I assure it'll not be hard cause right now vectors,matrixs of ODE are barely a typdef TReal* . Moreover, in SML we have a type of dimension-variable matrix that has built-in LU decomposition function. HH> Additionally SSE2 primarily adds double-float functionality to the SIMD HH> instructions. This can help somewhat for speed in the TReal = double case, HH> but isn't likely (just my guess) to have as tremendous a speed bonus as 4 HH> single floats that can be handled simultaneously for TReal = single. OK, just your guess. I'm SIMDing ODE, I'll put my benchmark when it finishes. -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media Me Linh Point Tower, 10th Floor 2 Ngo Duc Ke District 1, Ho Chi Minh City Vietnam Fax: (84.8)823-8392 www.glassegg.com --------------------------------------------------------------------- From nnevatie at welho.com Tue Nov 26 00:58:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Tue Nov 26 00:58:02 2002 Subject: [ODE] Box-mesh collision References: <20021108000235.5bc25ca1.russ@q12.org><000401c287ec$8c862b70$73fefea9@athlon> <20021110181315.7c8dcc2e.russ@q12.org> <064201c292f8$55791ae0$73fefea9@athlon> <037501c29302$5bde2ce0$0e00000a@pierre> <000201c294cc$c0908090$73fefea9@athlon> Message-ID: <001801c29521$72670a10$3abdf3d5@wli> Erwin, can you help me figure out what is wrong here. I tried the newstuff.gz (Base64 encoded new tricollider code) which you had posted to the list a while ago. I got it compiled OK. The problem is: when I tried the box stacking test, the program would always crash after the first collision. It seemed that the dRay.cpp was the cause of the crash. The function dGeomRaySet uses dMatrix3 to represent a rotatation. The function fills up the structure and tries to access element at [3 * 4 + 2], which causes an access violation (because dMatrix3 only has 12 elements?). Otherwise I'm using the code in ODE 0.03 release (I've tried CVS head too) + Opcode 1.2. I would greatly appreciate if you could enlighten me on this. ----- Original Message ----- From: "Erwin de Vries" To: Sent: Monday, November 25, 2002 1:29 AM Subject: Re: [ODE] Box-mesh collision > Yes it is better in some ways, but because of some bugs the end result is > something not too great. I STILL need to fix this. I'm using the code in my > projects and we're nearing the completion of it, so i would need to do it > sometime soon. > > In case you want it. It is in the mail archives somewhere. > > Erwin From tetron at interreality.org Tue Nov 26 01:34:10 2002 From: tetron at interreality.org (Peter Amstutz) Date: Tue Nov 26 01:34:10 2002 Subject: [ODE] box-box performance Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've tried out the new box-box collision code with the "phystut" program in Crystal Space. I first had to fix a problem with the crystal space use of ODE (it didn't use the dContactSoftCFM flag when generating contact joints, which caused terrible instability problems) but now that it works and is stable, I can't have more than ten or so boxes before the simulation bogs down to unusability. The environment consists of six static collision boxes which are walls of a room. The user can move a viewpoint around and toss a box or sphere, which hits the ground, tumbles (or rolls) a bit and comes to rest. As I said, once there are about 10 boxes in the room, the framerate drops precipitously and the simultion totally bogs down, even if all of the boxes have come to rest and arn't moving at all. My suspicion is that there are a lot of contact points being generated and evaluated every step despite the fact that nothing is moving (and in this case, the boxes are colliding with static geometry, which is never going to move). My question is whether this is something that can be fixed in ODE, or whether this is something that should be handled at a higher level? The specific case here is geometry which is occasionally dynamic. This means that most of the time it is sitting around with no forces acting upon it except gravity. The user should be able to interact with it, but most of the time it shouldn't be moving. If two bodies have collided recently (in the previous time step) then it should be possible to avoid re-calculating the collision and collision joints if neither body has moved more than an infintesimal amount since the previous step. How well would this work? [ Peter Amstutz ][ amstutz at cs.umass.edu ][ tetron at interreality.org ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE94zHNaeHUyhjCHfcRAsBzAJ9eESdKUJPIMcQsmGRoilesznHIrwCeIduH O3kRglgKyqjJByCajI8yOvc= =i2G+ -----END PGP SIGNATURE----- From Daniel.Groll at t-online.de Tue Nov 26 03:30:02 2002 From: Daniel.Groll at t-online.de (Daniel.Groll@t-online.de) Date: Tue Nov 26 03:30:02 2002 Subject: [ODE] box-box performance In-Reply-To: References: Message-ID: <1038306297.3de34bf91ea73@webmail.t-online.de> I have implemented this sort of thing on top of ODE. My bodies come to rest if their velocities went under a certain length. But be careful, there are situation where for example a box can stay on an edge. To avoid this you have to take time in concideration. I also have implemented this and it work great. My simulation has got a significant speed up. Nearly all my objects are "quiet" objects in most situations. This boosts the performance enormously! Daniel Groll From henri at cs.sun.ac.za Tue Nov 26 06:43:01 2002 From: henri at cs.sun.ac.za (Henri Hakl) Date: Tue Nov 26 06:43:01 2002 Subject: [ODE] Faster ODE References: <032001c294c3$afa33ec0$45d4e892@temple> <751181058.20021126085017@glassegg.com> Message-ID: <03ad01c29552$032098c0$45d4e892@temple> Sounds good. I know Intel's SML - I used it (among other things) to write a small specialized matrix library of my own (only works on 3x1, 4x1 vectors and 3x3, 4x4 matrices. No LU decomposition or other "higher" functionality; but it has damn fast "basic" functionality (normalize, transpose, multiply, arithmetic, etc). If anybody is interested go look at: http://www.cs.sun.ac.za/~henri/aistuff.html You should know that the SML still has some room for improvement; for example their 4x4 matrix multiply can still gain another 10% speed with some clever use of SSE2 instructions. Nonetheless it is in some cases futile to implement SIMD algorithms, as FPU versions are as fast or faster - and less hassle to create. Unforetunately you have to do both before you can figure out which one is more suited... I've written a seperate LDLT decomposition using the "classic" approach (not the one used in ODE) and FPU optimization which is quite fast. And I wrote a seperate assembler FPU version of the replacement unit I provided, but it is only about 1% faster. (So I think the readability is more important in this case.) Oh yea... and don't forget that you should have seperate FPU, MMX, 3DNow, 3DNow!, SSE and SSE2 versions to keep everybody happy and working at the most efficient. (Oh... and don't use an SSE version for the Athlon processors - although they support SSE it is nowhere near as fast as the Intel equivalents.) Still :)) - I'll be happy to look at the code you develop for ODE and see if I can fit some additional speed in there. ;) Henri ----- Original Message ----- From: "Nguyen Binh" To: ; "Henri Hakl" Cc: Sent: Tuesday, November 26, 2002 3:50 AM Subject: Re[4]: [ODE] Faster ODE > Hi , > > HH> I've been thinking about SIMD (MMX, 3DNow(!), SSE(2)) instructions for ODE - > HH> and it is quite possible that it can bring about harmony and speed. But one > HH> thing that is likely going to cause problems is the SSE(2) code. > > > HH> For optimal performance a number of details need to be implemented. Vectors > HH> and matrices need to be of a horizontal size that is a factor of 4 (this is > HH> implemented and the reason why, for example, a 3x3 matrix is defined as a 12 > HH> TReal (3x4) structure. > > Take a look at Small Matrix Lib (SML) of Intel, you'll see that we have > at least a way to solve this. > > HH> However, the structures also have to be aligned onto 16-byte boundaries. To > HH> allow for optimal SSE(2) access (using movaps) each 128-bit memory vector > HH> that is accessed has to be alligned on a 16-byte memory boundary. This is a > HH> problem in ODE, as every math structure now is required to be 16-byte > HH> aligned; this is difficult to achieve because ODE calls/uses sub-matrices of > HH> matrices, and it may be difficult to guarantee that every sub-matrix is > >>also< correctly 16-byte aligned. > > Also, SML solved these. > But we may consider move all matrix, vector,... of ODE to the > matrix, vector ,... of SML. I assure it'll not be hard cause right > now vectors,matrixs of ODE are barely a typdef TReal* . > Moreover, in SML we have a type of dimension-variable matrix that > has built-in LU decomposition function. > > HH> Additionally SSE2 primarily adds double-float functionality to the SIMD > HH> instructions. This can help somewhat for speed in the TReal = double case, > HH> but isn't likely (just my guess) to have as tremendous a speed bonus as 4 > HH> single floats that can be handled simultaneously for TReal = single. > > OK, just your guess. I'm SIMDing ODE, I'll put my benchmark when > it finishes. > > -- > Best regards, > > --------------------------------------------------------------------- > Nguyen Binh > Software Engineer > Glass Egg Digital Media > Me Linh Point Tower, 10th Floor > 2 Ngo Duc Ke > District 1, Ho Chi Minh City > Vietnam > Fax: (84.8)823-8392 > www.glassegg.com > --------------------------------------------------------------------- > > From pml_mrawls at yahoo.com Tue Nov 26 09:32:02 2002 From: pml_mrawls at yahoo.com (Mark Rawls) Date: Tue Nov 26 09:32:02 2002 Subject: [ODE] Latest CVS compiling with MSVC7 Message-ID: <20021126163136.28195.qmail@web40504.mail.yahoo.com> Hi. I am attempting to install the latest CVS version of CS. I have windows XP, and am using MSVC7 (the contrib/msvc7 solution however doesn't appear to be up to date; in any case, it isn't working for me). I downloaded the GNU make binary offered at q12.org, but I get problems when I do make ode-lib. In appears it may be a problem with the source code (or how my compiler treats the code more likely?). Here's what happens: make ode-lib cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= /c /GR- /GX- /W3 /GF /Oy /Iinclude /DdNODEBUG /O2 /Foode/src/step.obj ode/src/step.cpp cl : Command line warning D4029 : optimization is not available in the standard edition compiler step.cpp ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(731) : error C2664: 'dSetValue' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called make: *** [ode/src/step.obj] Error 2 Any help would be appreciated. Thanks, Mark Rawls --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021126/3ef261bd/attachment.htm From slipch at gsc-game.kiev.ua Tue Nov 26 09:48:02 2002 From: slipch at gsc-game.kiev.ua (slipch) Date: Tue Nov 26 09:48:02 2002 Subject: [ODE] using dCreateGeomClass in the last ode version Message-ID: <15831806395.20021126185038@gsc-game.kiev.ua> Hello ODE, Is it a bug? The problem accrues with setting pointer to a function for self collision because when calling dCreateGeomClass the integer class number is not set yet. So, collider function calling by dCreateGeomClass can not return right function pointer. -- Best regards, slipch mailto:slipch at gsc-game.kiev.ua From russ at q12.org Tue Nov 26 11:57:02 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 26 11:57:02 2002 Subject: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <15831806395.20021126185038@gsc-game.kiev.ua> Message-ID: > The problem accrues with setting pointer to a function for self > collision because when calling dCreateGeomClass the integer class > number is not set yet. So, collider function calling by dCreateGeomClass > can not return right function pointer. i don't know what problem you are talking about - can you describe it more precisely? but the new collision system uses constant class numbers, not variable class numbers, so this should not be a problem (except perhaps for user defined classes set up through the C API??). russ. -- Russ Smith http://www.q12.org/ From thomasharte at lycos.co.uk Tue Nov 26 12:40:02 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Tue Nov 26 12:40:02 2002 Subject: [ODE] My Latest Approach to Polyhedron Collision Management Message-ID: <1038339519025448@lycos-europe.com> I'm continuing to make progress in my pursuit of the perfect arbitrary polyhedron on arbitrary polyhedron collision management. I am looking for comments or suggestions regarding my current approach, from those on this list who must have worked on, or be working on, the same thing. In particular, I am worried about the efficiently of my constraint generation calculations. My driving physics engine is fairly typical. It is assumed that at the start of a time step, no objects are inter-penetrating. If, at the end of the time step, there continue to be no objects inter-penetrating, then the time step is complete. If objects do inter-penetrate, then a binary search reveals something very close to the last time before inter-penetration occurred, at which point the relevant constraints are added to prevent that from happening, and the whole process repeats, this time considering only the remaining portion of the time step after the penetration. Therefore, two discrete binary operations are supported on polyhedron types - an overlap test and a constraint calculation. All polyhedron's have BSP trees and hierarchical bounding sphere sets for : - their vertices - their edges In my hierarchy, every sphere has (at most) 8 children. Obviously the number of children represents a balance between hierarchy depth and bredth, and all the related factors when it comes to eliminating possible edge on polygon tests. I picked 8 to match up with the natural geographical division that occurs under an octree. I understand that a sphere probably models the shape of sets of edges and vertices terribly, but on the other hand it is really cheap to test one against a plane. The overlap test can be achieved using the edge and related bounding sphere information from one object with the BSP tree of another. For any given BSP node, if a particular sphere is entirely on one particular side of the plane, then its tests head that way down the tree. If it sits on the plane, then its children are considered. If a leaf node is found to be intersecting a plane, then complete edge on polygon tests are done. If any edge intersects a polygon, then the two objects are said to overlap, and no further tests are carried out. Obviously a first 'quick throwaway' test on distance between the highest level bounding spheres of both objects is performed, but in my simulation there is already a higher order octree related means to calculating which objects are 'near' which other objects, so that test isn't as useful as it might otherwise be. This BSP approach is a smarter version of testing every polygon of one object against every polygon of the other. It therefore is fooled by the same problems, such as one object being totally enclosed by another object - but these are a result of using a discrete model of time, and things my simulation will simply be built to deal with. Most tests performed by my engine when two objects begin contact will be overlap tests due to the binary search for collision time, and the constraint calculation will only occur once. When two objects start a time step rubbing up against each other, the focus will be the constraint calculation, but still this should only be required once per time step. Therefore, in my engine where objects will frequently change what they are rubbing against, it is the overlap test that needs be most optimal. The constraint calculation needs to detect when vertices on one object are very close to polygons on the other, and when edges on one object are very close to edges on the other. My engine attempts to keep all objects seperated by an invisibly small border, negating the need for the binary search for collision time to be desperately accurate, and generally helping smooth numerical accuracy problems. The edges problem isn't hard. Its more or less like the overlap test, but this time edges which are close to a plane in the BSP are tested in addition to those that cross the plane, and all are tested only against original edges that lie on that plane, not against the edges of the polygons used to construct the BSP tree - the distinction being that I am not interested in the artificial edges generated when splitting polygons for BSP purposes. Vertices on planes is slightly more difficult. My current solution is to push each object's vertices down the BSP tree of the other object. But this means that I have to do two BSP traversals per constraint calculation - which I am sure could probably be only 1 if it weren't for some gross thickness on my part. Is there any way to do this more efficiently? -Thomas BA flight sale now at http://www.lycos.co.uk Caracas, ?129 rtn. including tax, Tues, 11am From jeffrey.palmer at acm.org Tue Nov 26 15:30:02 2002 From: jeffrey.palmer at acm.org (Jeffrey Palmer) Date: Tue Nov 26 15:30:02 2002 Subject: [ODE] ODE/Tricollider on linux? Message-ID: <200211261629.14222.jeffrey.palmer@acm.org> Hello all, I was wondering if anyone has gotten ODE and the tricollider code (I tried the stuff in the NewStuff email to no avail) working under Linux? Alternatively, I understand that the tri code is currently being integrated with ODE - is that in the CVS version yet? If not, is it bothersome to ask for an ETA? I guess I'm just lazy - I'm sort of unwilling to port everything to linux if it's *about* to be released. ;) Thanks, - j -- The river is moving. The blackbird must be flying. From anselm at hook.org Tue Nov 26 15:45:02 2002 From: anselm at hook.org (Anselm Hook) Date: Tue Nov 26 15:45:02 2002 Subject: [ODE] operator new undefined link cygwin gcc In-Reply-To: <200211261629.14222.jeffrey.palmer@acm.org> Message-ID: For some bizarre reason I had to use g++ instead of gcc with my (very recent) version of cygwin and todays verson of ode. I was getting an "operator new undefined" error at the link phase. Anybody else notice the same thing? I had to modify the configurator code a bit to build under g++ also. - a From mama7121 at student.uu.se Tue Nov 26 16:28:02 2002 From: mama7121 at student.uu.se (Martin Magnusson) Date: Tue Nov 26 16:28:02 2002 Subject: [ODE] operator new undefined link cygwin gcc References: Message-ID: <3DE40356.8010604@student.uu.se> I'm having trouble compiling under Cygwin as well. Then again, it could be a Cygwin problem too, since I'm new to Cygwin as well. Anyway, as far as I can understand I've set the user-settings file correctly, and after that a simple 'make' should be enough, right? Using g++ didn't seem to help. My results are posted below. The problem seems to be with lib/libode.a. I don't have a directory called 'lib', and there's no 'libode.a' anywhere on my HDD. Help, comments or flames are appreciated :) / Martin Magnusson ====================================================================== == Contents of ./config/user-settings: =============================== # ODE user settings: the following variables must be set by the user # (1) the platform to use. this name should have a corresponding # makefile.PLATFORM file. currently supported platforms are: # msvc microsoft visual C/C++ # mingw minimalist GNU for windows # cygwin cygnus GNU for windows # unix-gcc GNU gcc on windows # unix-generic generic unix compiler. you may need to edit the CC # variable in makefile.unix-generic # osx Mac OS-X, with the gnu compiler. PLATFORM=cygwin # (2) the floating point precision to use (either "SINGLE" or "DOUBLE") #PRECISION=SINGLE PRECISION=DOUBLE # (3) the library type to build (either "debug" if you are doing development, # or "release" for the optimized library) #BUILD=debug BUILD=release ===================================================================== == Result of make with gcc: ========================================= /home/martin!/ode-0.03> make gcc -DdDOUBLE -DdNODEBUG -o configurator.exe configurator.c ./configurator.exe include/ode/config.h "gcc -DdNODEBUG -o " "rm -f" ./ rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.c rm -f ctest.exe is this a pentium on a gcc-based platform? ... rm -f ctest.exe gcc -DdNODEBUG -o ctest.exe ctest.c rm -f ctest.c rm -f ctest.exe integer types (we assume int >= 32 bits) ... select the base floating point type ... the floating point infinity ... rm -f data gcc -DdNODEBUG -o ctest.exe ctest.c ctest.c:5: initializer element is not constant ./ctest.exe ./ctest.exe: not found rm -f data gcc -DdNODEBUG -o ctest.exe ctest.c ./ctest.exe rm -f data gcc -DdNODEBUG -o ctest.exe ctest.c ./ctest.exe rm -f ctest.c rm -f ctest.exe rm -f data *** configurator succeeded *** gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/array.o ode/src/array.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/error.o ode/src/error.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/memory.o ode/src/memory.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/obstack.o ode/src/obstack.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/odemath.o ode/src/odemath.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/matrix.o ode/src/matrix.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/misc.o ode/src/misc.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/rotation.o ode/src/rotation.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/mass.o ode/src/mass.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/ode.o ode/src/ode.cpp ode/src/ode.cpp: In function `void dJointAttach(dxJoint*, dxBody*, dxBody*)': ode/src/ode.cpp:922: warning: unused variable `dxWorld*world' gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/step.o ode/src/step.cpp ode/src/step.cpp:701:5: warning: multi-line comment ode/src/step.cpp:704:5: warning: multi-line comment gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/lcp.o ode/src/lcp.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/joint.o ode/src/joint.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/space.o ode/src/space.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/geom.o ode/src/geom.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/timer.o ode/src/timer.cpp ode/src/timer.cpp:109:17: warning: multi-line string literals are deprecated ode/src/timer.cpp:119:17: warning: multi-line string literals are deprecated gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/mat.o ode/src/mat.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O2 -o ode/src/testing.o ode/src/testing.cpp gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastldlt.o ode/src/fastldlt.c gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastlsolve.o ode/src/fastlsolve.c gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastltsolve.o ode/src/fastltsolve. c gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -fomit-frame-pointer -ff ast-math -Iinclude -DdNODEBUG -O1 -o ode/src/fastdot.o ode/src/fastdot.c ar rc lib/libode.a ode/src/array.o ode/src/error.o ode/src/memory.o ode/src/obst ack.o ode/src/odemath.o ode/src/matrix.o ode/src/misc.o ode/src/rotation.o ode/s rc/mass.o ode/src/ode.o ode/src/step.o ode/src/lcp.o ode/src/joint.o ode/src/spa ce.o ode/src/geom.o ode/src/timer.o ode/src/mat.o ode/src/testing.o ode/src/fast ldlt.o ode/src/fastlsolve.o ode/src/fastltsolve.o ode/src/fastdot.o ar: lib/libode.a: No such file or directory make: *** [lib/libode.a] Error 1 ===================================================================== == Result of make with g++: ========================================= /home/martin!/ode-0.03> make g++ -DdDOUBLE -DdNODEBUG -o configurator.exe configurator.c configurator.c: In function `void fatal_error(char*)': configurator.c:112: `exit' undeclared (first use this function) configurator.c:112: (Each undeclared identifier is reported only once for each function it appears in.) configurator.c: In function `void delete_file(char*)': configurator.c:167: `system' undeclared (first use this function) make: *** [configurator.exe] Error 1 From harleybl at hotmail.com Tue Nov 26 16:53:01 2002 From: harleybl at hotmail.com (Harley Blumenfeld) Date: Tue Nov 26 16:53:01 2002 Subject: [ODE] Unhandled exception - access violation Message-ID: An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021126/4954ace9/attachment.htm From russ at q12.org Tue Nov 26 19:56:02 2002 From: russ at q12.org (Russ Smith) Date: Tue Nov 26 19:56:02 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: References: Message-ID: <20021126190026.00c5f3ed.russ@q12.org> > It seems to be happening when the box is destroyed in the line > dGeomDestroy( box[0] ); is the error happening within dGeomDestroy() or within main(). are you using an unaltered copy of test_buggy? russ. -- Russell Smith http://www.q12.org From ngbinh at glassegg.com Tue Nov 26 20:32:02 2002 From: ngbinh at glassegg.com (Nguyen Binh) Date: Tue Nov 26 20:32:02 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: <20021126190026.00c5f3ed.russ@q12.org> References: <20021126190026.00c5f3ed.russ@q12.org> Message-ID: <931545011.20021127103524@glassegg.com> >> It seems to be happening when the box is destroyed in the line >> dGeomDestroy( box[0] ); It's the same for me. I'm using the latest test_buggt.cpp in CVS. RS> is the error happening within dGeomDestroy() or within main(). are you RS> using an unaltered copy of test_buggy? I solved it by bring the dGeomDestroy()... to front like this: dGeomDestroy (box[0]); dGeomDestroy (sphere[0]); dGeomDestroy (sphere[1]); dGeomDestroy (sphere[2]); dJointGroupDestroy (contactgroup); dSpaceDestroy (space); dWorldDestroy (world); -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media E.Town Building 7th Floor, 364 CongHoa Street Tan Binh District, HoChiMinh City, VietNam, Phone : +84 8 8109018 Fax : +84 8 8109013 www.glassegg.com --------------------------------------------------------------------- From anselm at hook.org Tue Nov 26 20:43:01 2002 From: anselm at hook.org (Anselm Hook) Date: Tue Nov 26 20:43:01 2002 Subject: [ODE] operator new undefined link cygwin gcc In-Reply-To: <3DE40356.8010604@student.uu.se> Message-ID: For the default compiler in makefile.cygwin to be g++ you have to wrap extern "C" { } around your includes in the configurator source. Also just remove exit() - it isn't important. The configurator could be generalized to support this overall but I guess it's pretty obvious. As for your bug with not being able to link - I did see some comment about that earlier on the list. Try cvs to head revision and see if it is fixed. Otherwise try see if your cygwin is older... - a > ===================================================================== > == Result of make with g++: ========================================= > > /home/martin!/ode-0.03> make > g++ -DdDOUBLE -DdNODEBUG -o configurator.exe configurator.c > configurator.c: In function `void fatal_error(char*)': > configurator.c:112: `exit' undeclared (first use this function) > configurator.c:112: (Each undeclared identifier is reported only once > for each > function it appears in.) > configurator.c: In function `void delete_file(char*)': > configurator.c:167: `system' undeclared (first use this function) > make: *** [configurator.exe] Error 1 > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode > From g.r.vansickle at worldnet.att.net Tue Nov 26 23:53:02 2002 From: g.r.vansickle at worldnet.att.net (Gary R. Van Sickle) Date: Tue Nov 26 23:53:02 2002 Subject: [ODE] box-box performance In-Reply-To: <1038306297.3de34bf91ea73@webmail.t-online.de> Message-ID: > I have implemented this sort of thing on top of ODE. My bodies come to > rest if their velocities went under a certain length. But be careful, > there are situation where for example a box can stay on an edge. To > avoid this you have to take time in concideration. Instead of time, could this take "stability" into account instead? e.g. something like this: if( (body.KineticEnergy() < epsilon) // i.e. velocity ~= 0 && (body.PotentialEnergyRelativeTo(body_it_is_contacting) < epsilon) // i.e. it isn't going to change on us on its own. ) { // "Freeze" body until something hits it etc. // ... } Seems to me that this would be pretty much foolproof, and better yet instantaneously-acting; there'd be no need to wait until you were reasonably sure the body had "really" stopped moving, you could lock the body down as soon as these conditions became true and know you were doing the right thing. Or is there a conceptual or implementational issue here I'm missing? -- Gary R. Van Sickle Brewer. Patriot. From muellerptr at kimweb.de Wed Nov 27 00:19:02 2002 From: muellerptr at kimweb.de (=?iso-8859-1?Q?Patrik_M=FCller?=) Date: Wed Nov 27 00:19:02 2002 Subject: [ODE] Collision detection Message-ID: Hi all, I'm observing the list some times now and it seems ODE is the tool I need. Now my question: I want to include the collision test to a modeller I write at the moment. But the problem are my input files: CAD data. That means I get huge triangle objects. Do you think I can use it with the tri-collider? Or has anyone a better idea (physics is not my world!)? Do i still need Opcode for the actual tri-collider code? Best regards, Patrik M?ller From chris.campbell at l8tech.com Wed Nov 27 00:23:02 2002 From: chris.campbell at l8tech.com (Chris Campbell) Date: Wed Nov 27 00:23:02 2002 Subject: [ODE] box-box performance Message-ID: Like Daniel says you might find that for example as a rolling box (dice maybe?) comes to a stop, it might teeter on one edge for a second before deciding which face it will eventually fall onto. At that point the kinetic energy would be near to zero. Also consider if you threw a body straight up. At some point it will have near zero kinetic energy, then start coming down. With an extremely small epsilon it might work out most of the time but I think it's safer to judge by distance travelled/over a few consecutive time steps. ChrisC > > there are situation where for example a box can stay on an edge. To > > avoid this you have to take time in concideration. > > Instead of time, could this take "stability" into account instead? > > e.g. something like this: > > if( > (body.KineticEnergy() < epsilon) // i.e. velocity ~= 0 > && > (body.PotentialEnergyRelativeTo(body_it_is_contacting) < epsilon) > // i.e. it isn't going to change on us on its own. > ) > { > // "Freeze" body until something hits it etc. > // ... > } > > Seems to me that this would be pretty much foolproof, and better yet > instantaneously-acting; there'd be no need to wait until you > were reasonably > sure the body had "really" stopped moving, you could lock the > body down as soon > as these conditions became true and know you were doing the > right thing. Or is > there a conceptual or implementational issue here I'm missing? From russ at q12.org Wed Nov 27 01:23:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 01:23:02 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: <931545011.20021127103524@glassegg.com> References: <20021126190026.00c5f3ed.russ@q12.org> <931545011.20021127103524@glassegg.com> Message-ID: <20021127002815.74167e9e.russ@q12.org> > It's the same for me. I'm using the latest test_buggt.cpp in CVS. i've tried a fresh checked out CVS head under both linux and windows (cygwin) and i don't see any problem. could one of you track this problem down further so that it can be fixed?? russ. -- Russell Smith http://www.q12.org From g.r.vansickle at worldnet.att.net Wed Nov 27 01:54:02 2002 From: g.r.vansickle at worldnet.att.net (Gary R. Van Sickle) Date: Wed Nov 27 01:54:02 2002 Subject: [ODE] box-box performance In-Reply-To: Message-ID: > Like Daniel says you might find that for example as a rolling box > (dice maybe?) comes to a stop, it might teeter on one edge for > a second before deciding which face it will eventually fall onto. > At that point the kinetic energy would be near to zero. Right, but the *potential* energy will not be zero. It can still move to a lower total energy state. > Also > consider if you threw a body straight up. At some point it will > have near zero kinetic energy, then start coming down. Again though, potential energy != 0. > With an extremely small epsilon it might work out most of the > time but I think it's safer to judge by distance travelled/over a > few consecutive time steps. But that's where the "lockups" tend to come from; whether it's every step or a number of steps (and how do you chose that number?), you can get into a wildly wrong physical situation. E.g., the "body straight up" problem. How long is your rocket going to sit at its apogee, say over a low-gravity planet, with velocity ~= 0, before starting to fall back? Pick a just-too-long max time before you lock it down, and the rocket stays up there forever. If it's possible to base the lockdown decision on potential energy, you will at least never get into wildly wrong situations like that; they'd at worst be "epsilon-total-energy-is-still-left wrong", which should always be less than any velocity-only-based solution. All that said, I can't offhand come up with an algorithm to do the potential-energy measurement, which would be the key to have this work at all. I would think it would involve some relation between the center of mass, any contacts, and the total forces & torques applied at each timestep. But as is all too often the case, more thinking required.... -- Gary R. Van Sickle Brewer. Patriot. > > > there are situation where for example a box can stay on an edge. To > > > avoid this you have to take time in concideration. > > > > Instead of time, could this take "stability" into account instead? > > > > e.g. something like this: > > > > if( > > (body.KineticEnergy() < epsilon) // i.e. velocity ~= 0 > > && > > (body.PotentialEnergyRelativeTo(body_it_is_contacting) < epsilon) > > // i.e. it isn't going to change on us on its own. > > ) > > { > > // "Freeze" body until something hits it etc. > > // ... > > } > > > > Seems to me that this would be pretty much foolproof, and better yet > > instantaneously-acting; there'd be no need to wait until you > > were reasonably > > sure the body had "really" stopped moving, you could lock the > > body down as soon > > as these conditions became true and know you were doing the > > right thing. Or is > > there a conceptual or implementational issue here I'm missing? > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode From slipch at gsc-game.kiev.ua Wed Nov 27 01:55:01 2002 From: slipch at gsc-game.kiev.ua (slipch) Date: Wed Nov 27 01:55:01 2002 Subject: [ODE] using dCreateGeomClass in the last ode version Message-ID: <1044162224.20021127105729@gsc-game.kiev.ua> Hello Russ, Tuesday, November 26, 2002, 8:55:31 PM, you wrote: RS> i don't know what problem you are talking about - can you describe it more RS> precisely? but the new collision system uses constant class numbers, not RS> variable class numbers, so this should not be a problem (except perhaps RS> for user defined classes set up through the C API??). Yes, I mean user definite classes. When I create geometry class ////////////////////////////////////////////// dGeomClass c; c.bytes = sizeof (dxCylinder); c.collider = &dMyClassColliderFn; c.aabb = &dMyClassAABB; c.aabb_test = 0; c.dtor = 0; dMyClass=dCreateGeomClass (&c); ////////////////////////////////////////// static dColliderFn * dMyClassColliderFn (int num) { if (num == dBoxClass) return (dColliderFn *) &dCollideMyClassBox; if (num == dSphereClass) return (dColliderFn *) &dCollideMyClasSphere; if (num == dMyClass) return (dColliderFn *)&dCollideMyClassMyClass; if (num == dPlaneClass) return (dColliderFn *) &dCollideMyClassPlane; return 0; } dMyClassColliderFn do not return dCollideMyClassMyClass in dCreateGeomClass because dMyClass is not set until it return and dCollideMyClassMyClass do not set in colliders array. It is not a bug but I do not know how to set collider for MyClass - MyClass collision. -- Best regards, Konstantin Slipchenko mailto:slipch at gsc-game.kiev.ua Sorry for sometimes I use reply button by mistake :). From slipch at gsc-game.kiev.ua Wed Nov 27 02:18:02 2002 From: slipch at gsc-game.kiev.ua (slipch) Date: Wed Nov 27 02:18:02 2002 Subject: [ODE] unresolved external symbol __ftol2 Message-ID: <95565933.20021127112053@gsc-game.kiev.ua> Hello ODE, I can not build last ode version with MS VC 6.0. C:\SDK\odeLast\!new-ode_lib!>make link /dll /nologo /SUBSYSTEM:WINDOWS /LIBPATH:"C:\Programme\Micros~2\VC98\Lib" / def:config/msvcdefs.def Comctl32.lib kernel32.lib user32.lib gdi32.lib OpenGL32. lib Glu32.lib /OUT:lib/ode.dll ode/src/array.obj ode/src/error.obj ode/src/memor y.obj ode/src/obstack.obj ode/src/odemath.obj ode/src/matrix.obj ode/src/misc.ob j ode/src/rotation.obj ode/src/mass.obj ode/src/ode.obj ode/src/step.obj ode/src /lcp.obj ode/src/joint.obj ode/src/timer.obj ode/src/mat.obj ode/src/testing.obj ode/src/collision_kernel.obj ode/src/collision_util.obj ode/src/collision_std.o bj ode/src/collision_space.obj ode/src/collision_transform.obj ode/src/fastldlt. obj ode/src/fastlsolve.obj ode/src/fastltsolve.obj ode/src/fastdot.obj Creating library lib/ode.lib and object lib/ode.exp LINK : warning LNK4049: locally defined symbol "_dInfinityValue" imported misc.obj : error LNK2001: unresolved external symbol __ftol2 collision_space.obj : error LNK2001: unresolved external symbol __ftol2 lib/ode.dll : fatal error LNK1120: 1 unresolved externals make: *** [lib/ode.lib] Error 1120 I also can not find any reference on even occurrence of "__ftol2". I will very appreciate any suggestion. -- Best regards, slipch mailto:slipch at gsc-game.kiev.ua From slipch at gsc-game.kiev.ua Wed Nov 27 02:21:02 2002 From: slipch at gsc-game.kiev.ua (slipch) Date: Wed Nov 27 02:21:02 2002 Subject: [ODE] unresolved external symbol __ftol2 In-Reply-To: <95565933.20021127112053@gsc-game.kiev.ua> References: <95565933.20021127112053@gsc-game.kiev.ua> Message-ID: <835760062.20021127112407@gsc-game.kiev.ua> Hello ODE, I can not build last ode version with MS VC 6.0. C:\SDK\odeLast\!new-ode_lib!>make link /dll /nologo /SUBSYSTEM:WINDOWS /LIBPATH:"C:\Programme\Micros~2\VC98\Lib" / def:config/msvcdefs.def Comctl32.lib kernel32.lib user32.lib gdi32.lib OpenGL32. lib Glu32.lib /OUT:lib/ode.dll ode/src/array.obj ode/src/error.obj ode/src/memor y.obj ode/src/obstack.obj ode/src/odemath.obj ode/src/matrix.obj ode/src/misc.ob j ode/src/rotation.obj ode/src/mass.obj ode/src/ode.obj ode/src/step.obj ode/src /lcp.obj ode/src/joint.obj ode/src/timer.obj ode/src/mat.obj ode/src/testing.obj ode/src/collision_kernel.obj ode/src/collision_util.obj ode/src/collision_std.o bj ode/src/collision_space.obj ode/src/collision_transform.obj ode/src/fastldlt. obj ode/src/fastlsolve.obj ode/src/fastltsolve.obj ode/src/fastdot.obj Creating library lib/ode.lib and object lib/ode.exp LINK : warning LNK4049: locally defined symbol "_dInfinityValue" imported misc.obj : error LNK2001: unresolved external symbol __ftol2 collision_space.obj : error LNK2001: unresolved external symbol __ftol2 lib/ode.dll : fatal error LNK1120: 1 unresolved externals make: *** [lib/ode.lib] Error 1120 I also can not find any reference or even occurrence of "__ftol2". I will very appreciate any suggestion. -- Best regards, slipch mailto:slipch at gsc-game.kiev.ua From anselm at hook.org Wed Nov 27 04:21:02 2002 From: anselm at hook.org (Anselm Hook) Date: Wed Nov 27 04:21:02 2002 Subject: [ODE] networking demo In-Reply-To: <20021127002815.74167e9e.russ@q12.org> Message-ID: Hi all, I'm playing around with a little networking demo that is gradually getting better. Now it networks all the state of the little cars including the user events - this makes it fairly smooth. Also it uses udp - although I still have a defect in that area which will prevent more than 2 connections at a time (you can turn off udp though and have an arbitrary number of clients). http://hook.org/anselm/test_buggy.cpp Next I have to do compression, blending, distance attenuation and a few things like that... In any case some of you may find it interesting. - a From mama7121 at student.uu.se Wed Nov 27 04:28:01 2002 From: mama7121 at student.uu.se (Martin Magnusson) Date: Wed Nov 27 04:28:01 2002 Subject: [ODE] operator new undefined link cygwin gcc References: Message-ID: <3DE4AC0E.3070304@student.uu.se> OK, thanks for your help everybody. After creating lib/ manually both configurator and ode-lib compile properly (although with a couple of warnings about multi line strings and one or two unused variables), but when it comes to ode-test and drawstuff-test I get undefined references to new[] (when I compile with gcc in Cygwin/Windows). lib/libdrawstuff.a(drawstuff.o)(.text+0x393):drawstuff.cpp: undefined reference to `operator new[](unsigned)' Anselm Hook wrote: > For the default compiler in makefile.cygwin to be g++ you have to wrap > extern "C" { } around your includes in the configurator source. Also just > remove exit() - it isn't important. The configurator could be generalized > to support this overall but I guess it's pretty obvious. I wrapped the entire configurator.c in #ifdef __cplusplus extern "C" { #endif ... #ifdef __cplusplus } #endif #endif and commented out the exit() line, but that didn't help (g++ complained about the system() calls in configurator.c and lots of other stuff as well). I installed Cygwin a couple of days ago, so it should be recent enough. My ./include/ode/config.h looks like this - if that matters: == config.h: ========================================================= /* per-machine configuration. this file is automatically generated. */ #ifndef _ODE_CONFIG_H_ #define _ODE_CONFIG_H_ /* shared lib definitions */ #ifndef SHAREDLIBIMPORT #define SHAREDLIBIMPORT #endif #ifndef SHAREDLIBEXPORT #define SHAREDLIBEXPORT #endif /* standard system headers */ #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* is this a pentium on a gcc-based platform? */ #define PENTIUM 1 /* integer types (we assume int >= 32 bits) */ typedef char int8; typedef unsigned char uint8; typedef int int32; typedef unsigned int uint32; /* an integer type that we can safely cast a pointer to and * from without loss of bits. */ typedef unsigned int intP; /* select the base floating point type */ #define dDOUBLE 1 /* the floating point infinity */ #define DINFINITY_DECL SHAREDLIBEXPORT union dInfBytes dInfinityValue = {{0,0,0,0,0,0,0xf0,0x7f}}; #if defined SHARED_CONFIG_H_INCLUDED_FROM_DEFINING_FILE #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBEXPORT #else #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBIMPORT #endif union dInfBytes { unsigned char c[8]; double d; }; extern GLOBAL_SHAREDLIB_SPEC union dInfBytes dInfinityValue; #define dInfinity (dInfinityValue.d) #undef GLOBAL_SHAREDLIB_SPEC /* ODE feature configuration */ #ifdef __cplusplus } #endif #endif ====================================================================== / Martin Magnusson From harleybl at hotmail.com Wed Nov 27 08:51:02 2002 From: harleybl at hotmail.com (Harley Blumenfeld) Date: Wed Nov 27 08:51:02 2002 Subject: [ODE] Unhandled exception - access violation Message-ID: An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021127/99c3bbd1/attachment.htm From thomas_buehrmann at web.de Wed Nov 27 09:31:02 2002 From: thomas_buehrmann at web.de (Thomas Buehmann) Date: Wed Nov 27 09:31:02 2002 Subject: [ODE] drawstuff problems: "pulsating" spheres Message-ID: <200211271630.gARGULX20996@mailgate5.cinetic.de> hi, i get some weird looking spheres if i encapsulate my models as well as the world and space in c++ classes. The first object(consisting of several bodies and spheres) looks fine, but if i add another object to the world its spheres look as if there are shadows rotating around them. the speed of that rotatiion is somehow depend on the first object in the world. is that anything i got wrong about drawstuff? thanks for help, thomas. ______________________________________________________________________________ Schon wieder Viren-Alarm? Bei WEB.DE FreeMail ist das kein Problem, hier ist der Virencheck inklusive! http://freemail.web.de/features/?mc=021158 From tirobu at gmx.de Wed Nov 27 10:22:01 2002 From: tirobu at gmx.de (Tim) Date: Wed Nov 27 10:22:01 2002 Subject: [ODE] compiling CVS Message-ID: <003b01c29639$5a4886c0$0200a8c0@P4> Hello. I want to use ODE - but I don?t get it compiled... I am using Windows (msvc) and modified the user-settings.example file as it is explained in the howto. For sure I made a copy of this file and renamed it to user-settings. Now I wanted to use the just downloaded GNU make for windows file to compile as it is explained in the manual. But when I try "make configure" I get the following error message: cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= /DdDOUBLE /DdDE BUG_ALLOC /DODE_OLD_COLLISION /Feconfigurator.exe configurator.c process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT = /DSHAREDLIBIMPORT= /DdDOUBLE /DdDEBUG_ALLOC /DODE_OLD_COLLISION /Feconfigurato r.exe configurator.c, ...) failed. make (e=2): The system can not find the specifed file make: *** [configurator.exe] Error 2 I tried several things but nothing helped! Hope someone can help me! Thanks a lot, Tim. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021127/da4cdf77/attachment.htm From leaf at tataput.com Wed Nov 27 10:39:02 2002 From: leaf at tataput.com (Leaf Garland) Date: Wed Nov 27 10:39:02 2002 Subject: [ODE] compiling CVS In-Reply-To: <003b01c29639$5a4886c0$0200a8c0@P4> Message-ID: <001c01c2963b$da7b0f50$8e130750@mumu> I noticed this same problem when compiling on one pc, but not on another. Strange. Anyway I fixed it by adding the ode dir to the path. Eg. PATH=%PATH%;c:\dev\ode I also had to create the ode/lib dir, as mentioned in a previous post, and change a line in test_boxstack.cpp where there were two "for(int i..." in the same function, which msvc6 can't handle. Cheers, Leaf. -----Original Message----- From: ode-admin at q12.org [mailto:ode-admin at q12.org] On Behalf Of Tim Sent: 27 November 2002 17:21 To: ode at q12.org Subject: [ODE] compiling CVS Hello. I want to use ODE - but I don?t get it compiled... I am using Windows (msvc) and modified the user-settings.example file as it is explained in the howto. For sure I made a copy of this file and renamed it to user-settings. Now I wanted to use the just downloaded GNU make for windows file to compile as it is explained in the manual. But when I try "make configure" I get the following error message: cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= /DdDOUBLE /DdDE BUG_ALLOC /DODE_OLD_COLLISION /Feconfigurator.exe configurator.c process_begin: CreateProcess((null), cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT = /DSHAREDLIBIMPORT= /DdDOUBLE /DdDEBUG_ALLOC /DODE_OLD_COLLISION /Feconfigurato r.exe configurator.c, ...) failed. make (e=2): The system can not find the specifed file make: *** [configurator.exe] Error 2 I tried several things but nothing helped! Hope someone can help me! Thanks a lot, Tim. From baas at ira.uka.de Wed Nov 27 10:57:01 2002 From: baas at ira.uka.de (Matthias Baas) Date: Wed Nov 27 10:57:01 2002 Subject: [ODE] compiling CVS In-Reply-To: <003b01c29639$5a4886c0$0200a8c0@P4> Message-ID: <5.1.0.14.0.20021127184821.00cdaa68@i31i33mail.informatik.uni-karlsruhe.de> At 18:20 27.11.2002 +0100, you wrote: >r.exe configurator.c, ...) failed. >make (e=2): The system can not find the specifed file >make: *** [configurator.exe] Error 2 Looks like the same problem I had, too. It can be fixed with a little modification in the Makefile. Change the line CONFIGURATOR_SRC=configurator.c into the following: CONFIGURATOR_SRC=./configurator.c BTW, would it be possible to do this small modification in the cvs tree? (I hope it won't break any other build processes...) - Matthias - From tirobu at gmx.de Wed Nov 27 11:17:02 2002 From: tirobu at gmx.de (Tim) Date: Wed Nov 27 11:17:02 2002 Subject: [ODE] compiling CVS Message-ID: <007b01c29641$03084730$0200a8c0@P4> Hi. Thanks for your answers! Using MSVC7 I get the following error: d:\ode\ode\src\dcTriListCollider.h(4): fatal error C1083: Cannot open include file: 'Opcode.h': No such file or directory The problem is, that there is no file named Opcode.h at all! So what about that? Thanks Tim. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021127/a95b1afe/attachment.htm From thomasharte at lycos.co.uk Wed Nov 27 11:25:02 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Wed Nov 27 11:25:02 2002 Subject: [ODE] My Latest Approach to Polyhedron Collision Management Message-ID: <1038421390011900@lycos-europe.com> An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021127/bad5da66/attachment.htm From nnevatie at welho.com Wed Nov 27 11:39:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Wed Nov 27 11:39:02 2002 Subject: [ODE] compiling CVS References: <007b01c29641$03084730$0200a8c0@P4> Message-ID: <001201c29642$bc6b9410$3abdf3d5@wli> Go to: http://www.codercorner.com/Opcode.htm Opcode is an external package specializing in collision detection. I have succesfully used the version 1.2. Compile Opcode to another lib and link with ODE. Cheers ----- Original Message ----- From: "Tim" To: Sent: Wednesday, November 27, 2002 8:15 PM Subject: [ODE] compiling CVS Hi. Thanks for your answers! Using MSVC7 I get the following error: d:\ode\ode\src\dcTriListCollider.h(4): fatal error C1083: Cannot open include file: 'Opcode.h': No such file or directory The problem is, that there is no file named Opcode.h at all! So what about that? Thanks Tim. From thomasharte at lycos.co.uk Wed Nov 27 11:39:44 2002 From: thomasharte at lycos.co.uk (Thomas Harte) Date: Wed Nov 27 11:39:44 2002 Subject: [ODE] Contact Constraints: First Order Slip? Message-ID: <1038421837001983@lycos-europe.com> Can anyone explain to me the purpose of the first order slip variables within the dSurfaceParameters structure contained within the dContact structre, used when establishing a contact constraint? My understanding of slip is that it is the difference between the linear velocity a particle wants to travel at by virtue of the body it is attached to, and the speed at which it is travelling over a surface. In the general case, the coefficient of friction is a function of slip - although often it isn't related to slip at all. E.g. if we have a box scraping along a surface, the slip is simply the linear velocity of the body. However, if we are talking about a car wheel, then the slip is the difference between the linear velocity of the outside of the tyre and the speed at which the wheel is moving along the ground. This is important for rubber tyres because the coefficient of friction for rubber is most certainly a function of slip, and a fairly interesting one at that. Anyway, I therefore don't see why I must express 'first order slip', surely ODE already has enough information to calculate it internally? I notice the paramter is described next to the relevant contact flag simply as 'slip', and only later by the corresponding dReal as 'first order slip'. It therefore strikes me that it is probably not asking me for the first order differential of slip (e.g. if the motor attached to my car wheel is changing speed) in order to help with numerical accuracy regarding the discrete model of time. But perhaps that is exactly what it is asking me for? One thing I can understand from the documentation : "this needs more description". -Thomas ------------------------------------------------------ BA flight sale now at http://www.lycos.co.uk. Boston, ?129 rtn. including tax, Wednesday, 1pm From maddocks at metservice.com Wed Nov 27 12:45:02 2002 From: maddocks at metservice.com (Henry Maddocks) Date: Wed Nov 27 12:45:02 2002 Subject: [ODE] ODE/Tricollider on linux? Message-ID: <8C058A1A-0240-11D7-92B8-00039394FB86@metservice.com> I did some initial work on a port to gcc (MAC OS X) based on Opcode from the F4 engine. It should work for linux without much hassle. I asked for feedback but no one seemed interested. You can download what I did from... http://homepages.paradise.net.nz/henryj/code/index.html Tricollider has been updated since then, but I'm not going to do anymore until tricollider is integrated because the VCC code is a nightmare. Henry On Wednesday, November 27, 2002, at 11:29 AM, Jeffrey Palmer wrote: > Hello all, > > I was wondering if anyone has gotten ODE and the tricollider code (I > tried the stuff in the NewStuff email to no avail) working under Linux? > > Alternatively, I understand that the tri code is currently being > integrated with ODE - is that in the CVS version yet? If not, is it > bothersome to ask for an ETA? > > I guess I'm just lazy - I'm sort of unwilling to port everything to > linux if it's *about* to be released. ;) > > Thanks, > > - j > > -- > The river is moving. > The blackbird must be flying. > > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode > From russ at q12.org Wed Nov 27 20:55:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 20:55:02 2002 Subject: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <1044162224.20021127105729@gsc-game.kiev.ua> References: <1044162224.20021127105729@gsc-game.kiev.ua> Message-ID: <20021127195951.0c303209.russ@q12.org> > dMyClassColliderFn do not return dCollideMyClassMyClass in > dCreateGeomClass because dMyClass is not set until it return and > dCollideMyClassMyClass do not set in colliders array. ah yes ... i see the problem. i have fixed the code in collision_kernel.cpp. but i don't have a good test case for this right now - i would appreciate if you can try it out and report any problems. russ. -- Russell Smith http://www.q12.org From russ at q12.org Wed Nov 27 21:15:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 21:15:02 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: References: Message-ID: <20021127202012.0ef3615c.russ@q12.org> > Yes the error is happening within dGeomDestroy( box[ 0 ] ); > Here is what the stack looks like when it happens ( from MSVC Context: > bar ) okay, i've found the issue i think. when dBodyDestroy() is being called it was not notifying any attached geoms that it is going to disappear, so when those geoms are destroyed they try to remove themselves from nonexistant linked lists. it's a classic 'accessing freed memory' bug. update from CVS and try it again. let me know what happens. russ. -- Russell Smith http://www.q12.org From nnevatie at welho.com Wed Nov 27 23:13:02 2002 From: nnevatie at welho.com (Niko Nevatie) Date: Wed Nov 27 23:13:02 2002 Subject: [ODE] Tricollider status clarification Message-ID: <000901c296a5$2bd0f540$3abdf3d5@wli> I'm trying to figure out which one of the many triangle collider combinations associated with ODE is the newest, the fastest or otherwise the best one currently: - ODE 0.03 release package (ODE 0.03 + tricollider in contrib/tri-collider directory) - Current CVS head version (ODE in CVS or ODE 0.0.3 + tricollider in contrib/tri-collider CVS directory) - Erwin's newstuff.gz + patch sent later (both sent to mailing list August-September) (ODE in CVS or ODE 0.0.3) Future development of the triangle collider? How about Opcode? Does the newest version 1.2 work OK with the triangle colliders? If you have tested some or all of these combinations, please share your experiences. Keep up the good work! Cheers From russ at q12.org Wed Nov 27 23:29:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 23:29:02 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: <1038421837001983@lycos-europe.com> References: <1038421837001983@lycos-europe.com> Message-ID: <20021127223342.4a68a6cc.russ@q12.org> > One thing I can understand from the documentation : "this needs more > description". i started to write a long email reply about this then realized that was dumb - i updated the documentation instead. look at the latest userguide, section "7.3.7. Contact" - there a bigger description of the slip parameters. in hindsight calling these numbers 'slip' was a mistake because 'slip' is such an overloaded word in ODE - i should have called them 'FDS' or something else. there's no pictures to accompany the description although there should be ... unfortunately drawing pictures takes a lot of time that i don't have :( russ. -- Russell Smith http://www.q12.org From ngbinh at glassegg.com Wed Nov 27 23:35:03 2002 From: ngbinh at glassegg.com (Nguyen Binh) Date: Wed Nov 27 23:35:03 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: <20021127202012.0ef3615c.russ@q12.org> References: <20021127202012.0ef3615c.russ@q12.org> Message-ID: <6311874734.20021128133956@glassegg.com> Hi , RS> okay, i've found the issue i think. when dBodyDestroy() is being called RS> it was not notifying any attached geoms that it is going to disappear, so RS> when those geoms are destroyed they try to remove themselves from RS> nonexistant linked lists. it's a classic 'accessing freed memory' bug. I think we should follow the FIFO-style in new / delete . We create World first so destroy it last. Then if we move the DestroyGeom to front, everything's OK. RS> update from CVS and try it again. let me know what happens. RS> russ. -- Best regards, --------------------------------------------------------------------- Nguyen Binh Software Engineer Glass Egg Digital Media E.Town Building 7th Floor, 364 CongHoa Street Tan Binh District, HoChiMinh City, VietNam, Phone : +84 8 8109018 Fax : +84 8 8109013 www.glassegg.com --------------------------------------------------------------------- From russ at q12.org Wed Nov 27 23:39:01 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 23:39:01 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: <6311874734.20021128133956@glassegg.com> References: <20021127202012.0ef3615c.russ@q12.org> <6311874734.20021128133956@glassegg.com> Message-ID: <20021127224341.55bb6de6.russ@q12.org> > I think we should follow the FIFO-style in new / delete . > We create World first so destroy it last. Then if we move the > DestroyGeom to front, everything's OK. sure, but geoms and bodys can be created/destroyed independently of each other, so ODE should handle whatever order you chose to destroy geoms in. russ. -- Russell Smith http://www.q12.org From russ at q12.org Wed Nov 27 23:44:02 2002 From: russ at q12.org (Russ Smith) Date: Wed Nov 27 23:44:02 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: <20021127223342.4a68a6cc.russ@q12.org> References: <1038421837001983@lycos-europe.com> <20021127223342.4a68a6cc.russ@q12.org> Message-ID: <20021127224824.3a373168.russ@q12.org> it has just occured to me ... i can't think of any ODE base vehicle sim that actually takes full advantage of ODE's contact modeling capabilities to model different road surfaces. asphalt, concrete, gravel, ice and mud will all have different mu, slip(FDS), soft_cfm and soft_erp parameters. there's potential here for somebody to do a really good job... russ. -- Russell Smith http://www.q12.org From anselm at hook.org Thu Nov 28 00:46:02 2002 From: anselm at hook.org (Anselm Hook) Date: Thu Nov 28 00:46:02 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: <20021127224824.3a373168.russ@q12.org> Message-ID: Hi Russ, What about finding a way to generalize material properties such that contacts could be generated automatically? I'd sure enjoy finding a way to remove the collision callback. In your opinion is this really such a difficult problem or is there some way that the intersection of material properties could be computed reasonably - say as a third party contrib item? One would have to be able to say that a surface is ice, or velcro, or rubber, or gravel and then calculate reasonable mu, slip, soft_cfm, soft_erp out of the intersection of each pair. Even if this can't be automated maybe common intersections could be manually defined by the community and added or maintained as a contribs lib...? - a On Wed, 27 Nov 2002, Russ Smith wrote: > > it has just occured to me ... i can't think of any ODE base vehicle sim > that actually takes full advantage of ODE's contact modeling > capabilities to model different road surfaces. asphalt, concrete, > gravel, ice and mud will all have different mu, slip(FDS), soft_cfm and > soft_erp parameters. there's potential here for somebody to do a really > good job... > > russ. > > -- > Russell Smith > http://www.q12.org > _______________________________________________ > ODE mailing list > ODE at q12.org > http://q12.org/mailman/listinfo/ode > From slipch at gsc-game.kiev.ua Thu Nov 28 02:56:02 2002 From: slipch at gsc-game.kiev.ua (slipch) Date: Thu Nov 28 02:56:02 2002 Subject: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <20021127195951.0c303209.russ@q12.org> References: <1044162224.20021127105729@gsc-game.kiev.ua> <20021127195951.0c303209.russ@q12.org> Message-ID: <1086558160.20021128115858@gsc-game.kiev.ua> Hello Russ, Thursday, November 28, 2002, 2:59:51 AM, you wrote: RS> ah yes ... i see the problem. i have fixed the code in RS> collision_kernel.cpp. but i don't have a good test case RS> for this right now - i would appreciate if you can try RS> it out and report any problems. RS> russ. Seems it works all right. But one problem still remains for user definite geometry classes. If I have some user definite classes it always necessary to support right sequence of their creating or colliders would not be set in colliders array again. Of course I can register all user classes in right order before start my simulation. But if I want to support ode stile of creating geometry classes when creating geometries, it is very inconvenient. Why not open setCollider function? It may be useful to have a possibility even reset colliders for all classes. -- Best regards, Konstantin Slipchenko mailto:slipch at gsc-game.kiev.ua From jon_lgridge at hotmail.com Thu Nov 28 06:35:02 2002 From: jon_lgridge at hotmail.com (Jonathan Langridge) Date: Thu Nov 28 06:35:02 2002 Subject: [ODE] Re: Contact Constraints: First Order Slip? Message-ID: As far as I can tell from experimentation, "slip" as defined in the ODE interface is sort of fudge factor. Instead of trying to pull the relative velocities of touching surfaces towards zero by friction, the system will only pull them towards a relative velocity of "slip". In other words, a sliding box will be slowed down until it reaches slip velocity, then it will continue to slide at that velocity forever. I guess this helps simplify constraint calculations. (note: somebody scream if this explanation is rubbish!) On the topic of contacts, I've thought of a couple of things that would help a fair bit in the usual car game that everyone makes with ODE. Since I find the source code fairly impenetrable (Jacobian matrix??) I can't yet implement this stuff myself, but perhaps others will agree that: + it would be nice to have an accurate (conical) friction model available, even if this caused a big performance hit. When objects are near the friction force limit, dependance on friction axes can be quite noticeable. + some feedback from contact joints would be good. For example, the normal force that has been used to correct object velocities (or would normal impulse be more appropriate?) in order to choose appropriate impact sound effect volume. Also, an indication of how much friction force was used (two applications: switching to dynamic friction, and again sound effects depending on the amount of "scraping") Maybe I'll eventually understand how ODE works and be able to code this for my lazy self ;) In the mean time however, ODE is a godsend, and great fun too! Many thanks to Russ & contributors for this masterpiece. Colas, Jon _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From ruud at marketgraph.nl Thu Nov 28 12:23:01 2002 From: ruud at marketgraph.nl (Ruud van Gaal) Date: Thu Nov 28 12:23:01 2002 Subject: [ODE] Contact Constraints: First Order Slip? Message-ID: <20C09F811939D311BA694854E86C778233E4B5@raptor> ... > it has just occured to me ... i can't think of any ODE base > vehicle sim > that actually takes full advantage of ODE's contact modeling > capabilities to model different road surfaces. asphalt, concrete, > gravel, ice and mud will all have different mu, slip(FDS), > soft_cfm and > soft_erp parameters. there's potential here for somebody to > do a really > good job... Actually, mu changes quite considerably with load, slip ratio, temperature etc. :) You would get somewhere with the above, but nothing like a Pacejka model. Ruud (www.racer.nl) From russ at q12.org Thu Nov 28 13:43:01 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 13:43:01 2002 Subject: [ODE] Contact Constraints: First Order Slip? In-Reply-To: References: <20021127224824.3a373168.russ@q12.org> Message-ID: <20021128124744.1d9badff.russ@q12.org> > What about finding a way to generalize material properties such that > contacts could be generated automatically? the trouble is, there are many schemes for generating contact parameters from material properties, and most of the useful schemes are rather ad-hoc. it's impossible to come up with a single scheme that will please everybody. the near-callback provides a convenient place to compute contact parameters, and this is also where contact culling decisions can be made. the alternative to a near-callback is a "get list of all potentially colliding objects" function - but then you have the problem of the caller having to allocate a maximum size return array. consider the case where only 10% of near object-object cases will lead to contacts - the user is required to allocate an array of 10 times the potential maximum number of object-object intersections - not always an easy thing to do. russ. -- Russell Smith http://www.q12.org From c.haarmeijer at keepitsimple.nl Thu Nov 28 13:48:02 2002 From: c.haarmeijer at keepitsimple.nl (Chris Haarmeijer) Date: Thu Nov 28 13:48:02 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: <20021127224341.55bb6de6.russ@q12.org> Message-ID: Why not use reference counting on objects? This way, objects are freed whenever they're not in use anymore.... Chris -----Original Message----- From: ode-admin at q12.org [mailto:ode-admin at q12.org]On Behalf Of Russ Smith Sent: donderdag 28 november 2002 4:44 To: Nguyen Binh Cc: ode at q12.org Subject: Re: Re[2]: [ODE] Unhandled exception - access violation > I think we should follow the FIFO-style in new / delete . > We create World first so destroy it last. Then if we move the > DestroyGeom to front, everything's OK. sure, but geoms and bodys can be created/destroyed independently of each other, so ODE should handle whatever order you chose to destroy geoms in. russ. -- Russell Smith http://www.q12.org _______________________________________________ ODE mailing list ODE at q12.org http://q12.org/mailman/listinfo/ode From russ at q12.org Thu Nov 28 13:56:01 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 13:56:01 2002 Subject: [ODE] Re: Contact Constraints: First Order Slip? In-Reply-To: References: Message-ID: <20021128130045.24a94b37.russ@q12.org> > In other words, a sliding box will be slowed down until it reaches > slip velocity, then it will continue to slide at that velocity > forever. I guess this helps simplify constraint calculations. ermmm ... it might look that way, but this is the wrong way to interpret things. see the recently updated documentation. > + it would be nice to have an accurate (conical) friction model yes it would be nice - but it's rather hard to implement the way that ODE is designed right now. but for most applications the friction pyramid approximation model is visually indistinguishable from the real thing. > + some feedback from contact joints would be good. this is not so hard to implement, there is already a dJointSetFeedback() function that provides some information, but this is not exactly what you want. it's on my to-do list to extend dJointSetFeedback() to provide the computed force values *before* they are applied to bodies, so that you can get contact normal force, motor force, etc. russ. -- Russell Smith http://www.q12.org From russ at q12.org Thu Nov 28 13:58:02 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 13:58:02 2002 Subject: [ODE] Unhandled exception - access violation In-Reply-To: References: <20021127224341.55bb6de6.russ@q12.org> Message-ID: <20021128130304.7cef8101.russ@q12.org> > Why not use reference counting on objects? This way, objects are freed > whenever they're not in use anymore.... this is not the point. we *want* be able to forcibly remove a body when it's still referenced by a geom. russ. -- Russell Smith http://www.q12.org From russ at q12.org Thu Nov 28 14:05:02 2002 From: russ at q12.org (Russ Smith) Date: Thu Nov 28 14:05:02 2002 Subject: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <1086558160.20021128115858@gsc-game.kiev.ua> References: <1044162224.20021127105729@gsc-game.kiev.ua> <20021127195951.0c303209.russ@q12.org> <1086558160.20021128115858@gsc-game.kiev.ua> Message-ID: <20021128130914.3a2ad978.russ@q12.org> > Seems it works all right. good. > But one problem still remains for user definite geometry classes. > If I have some user definite classes it always necessary to support > right sequence of their creating or colliders would not be set in > colliders array again. Of course I can register all user classes in > right order before start my simulation. But if I want to support > ode stile of creating geometry classes when creating geometries, it is > very inconvenient. can you show me a situation that fails? - because i thought i had allowed for arbitrary creation order. dCreateGeomClass() sets a default collider (dCollideUserGeomWithGeom) and does not call the supplied colliders function. it returns the geom class number. the collider function is only referenced by dCollideUserGeomWithGeom() ... so i don't see how creation order makes any difference. > Why not open setCollider function? this is not a good option, because this function exposes some of the internals of the way dCollide() works. exposing this will prevent any further major overhaul of the collision system (not that i have one planned). russ. -- Russell Smith http://www.q12.org From dmcclurg at pandemicstudios.com.au Thu Nov 28 17:35:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 28 17:35:02 2002 Subject: [ODE] new ODE collision Message-ID: should it be allowable to have an empty space in another space? it is convenient for my application because i add/remove geoms to/from groups on the fly to optimize collisions. if it's ok and i'm pretty sure it used to work with an empty group inside a hash space, then i think there is a problem. currently, i get a floating point invalid operation in findLevel() because q=dInfinity frexp (q,&level); this is because the AABB for an empty group (ie, simple space) is set to infinities in dxSpace::computeAABB() in collision_space.cpp From dmcclurg at pandemicstudios.com.au Thu Nov 28 17:44:02 2002 From: dmcclurg at pandemicstudios.com.au (David McClurg) Date: Thu Nov 28 17:44:02 2002 Subject: [ODE] new ODE collision Message-ID: In findLevel(), just check for -dInfinity too because... bounds[0] == dInfinity; bounds[1] == -dInfinity; (bounds[1] - bounds[0]) => -dInfinity Here's the patch to findLevel(): static int findLevel (dReal bounds[6]) { // compute q dReal q,q2; q = bounds[1] - bounds[0]; // x bounds q2 = bounds[3] - bounds[2]; // y bounds if (q2 > q) q = q2; q2 = bounds[5] - bounds[4]; // z bounds if (q2 > q) q = q2; if (q == dInfinity || q == -dInfinity) return MAXINT; // find level such that 0.5 * 2^level < q <= 2^level int level; frexp (q,&level); // q = (0.5 .. 1.0) * 2^level (definition of frexp) return level; } -----Original Message----- From: David McClurg Sent: Friday, 29 November 2002 10:34 AM To: ode at q12.org Subject: RE: [ODE] new ODE collision should it be allowable to have an empty space in another space? it is convenient for my application because i add/remove geoms to/from groups on the fly to optimize collisions. if it's ok and i'm pretty sure it used to work with an empty group inside a hash space, then i think there is a problem. currently, i get a floating point invalid operation in findLevel() because q=dInfinity frexp (q,&level); this is because the AABB for an empty group (ie, simple space) is set to infinities in dxSpace::computeAABB() in collision_space.cpp _______________________________________________ ODE mailing list ODE at q12.org http://q12.org/mailman/listinfo/ode From coding at natew.com Fri Nov 29 00:33:01 2002 From: coding at natew.com (Nate W) Date: Fri Nov 29 00:33:01 2002 Subject: [ODE] Contacts and materials In-Reply-To: Message-ID: On Thu, 28 Nov 2002, Anselm Hook wrote: > What about finding a way to generalize material properties such that > contacts could be generated automatically? I'd sure enjoy finding a way > to remove the collision callback. As would I - probably because I've been having fun with C# and I'm eager to put your wrappers to work. :-) Here's how I was thinking the problem might be approached: The wrapper (your C# wrapper, or probably any wrapper) would define a material data structure, something like: typedef struct { void *pUserData; dReal Mu; dReal Bounce; dReal SoftERP; dReal SoftCFM; // etc } Material; All geom objects would have Material pointers in their dGeomGetData / dGeomSetData members, and the wrapper would implement those methods as follows: // GetData implementation return ((Material*) dGeomGetData())->m_Data; // SetData implementation ((Material*) dGeomGetData())->m_Data = p; Then, a wrapper-defined collision callback would work something like this: void Callback (void *, dGeomID o1, dGeomID o2) { int iCount = dCollide (o1, o2, iContacts, &contact[0].geom, sizeof (dContact)); if (iCount) { int iMax = min (iCount, iContacts); for (int iContact = 0; iContact < iMax; iContact++) { Material *pMaterial1 = null; Material *pMaterial2 = null; if (o1) pMaterial1 = dGeomGetData (o1); if (o2) pMaterial2 = dGeomGetData (o2); SetContactParameters (&contact[iContact], pMaterial1, pMaterial2); dJointID ContactJoint = dJointCreateContact (WorldID, CollisionJointGroupID, &contact[iContact]); dJointAttach (ContactJoint, Body1, Body2); } } } The implementation of SetContactParameters is left as an exercise for the reader. :-) But, as Anselm suggested, I think it would make a nice contrib. It would make the C# wrapper considerably more useful, and would probably be helpful for most non-C/C++ applications that want to use ODE, since there would no longer be a need for a callback into the application language. Instead, applications would just set material properties for all of the Geoms, and the SetContactParameters method would take care of material interactions. Comments? -- Nate Waddoups Redmond WA USA http://www.natew.com From russ at q12.org Fri Nov 29 00:37:02 2002 From: russ at q12.org (Russ Smith) Date: Fri Nov 29 00:37:02 2002 Subject: [ODE] new ODE collision In-Reply-To: References: Message-ID: <20021128234118.0f966fb5.russ@q12.org> > In findLevel(), just check for -dInfinity too because... fixed. i also fixed the root of the problem, which is that an empty space was giving a 'backwards infinite' AABB. now it gives a zero AABB. russ. -- Russell Smith http://www.q12.org From slipch at gsc-game.kiev.ua Fri Nov 29 01:20:02 2002 From: slipch at gsc-game.kiev.ua (slipch) Date: Fri Nov 29 01:20:02 2002 Subject: [ODE] using dCreateGeomClass in the last ode version In-Reply-To: <20021128130914.3a2ad978.russ@q12.org> References: <1044162224.20021127105729@gsc-game.kiev.ua> <20021127195951.0c303209.russ@q12.org> <1086558160.20021128115858@gsc-game.kiev.ua> <20021128130914.3a2ad978.russ@q12.org> Message-ID: <992103885.20021129102325@gsc-game.kiev.ua> Hello Russ, Thursday, November 28, 2002, 8:09:14 PM, you wrote: >> Seems it works all right. RS> good. >> But one problem still remains for user definite geometry classes. >> If I have some user definite classes it always necessary to support >> right sequence of their creating or colliders would not be set in >> colliders array again. Of course I can register all user classes in >> right order before start my simulation. But if I want to support >> ode stile of creating geometry classes when creating geometries, it is >> very inconvenient. RS> can you show me a situation that fails? - because i thought i had RS> allowed for arbitrary creation order. dCreateGeomClass() sets a default RS> collider (dCollideUserGeomWithGeom) and does not call the supplied RS> colliders function. it returns the geom class number. the collider RS> function is only referenced by dCollideUserGeomWithGeom() ... so i don't RS> see how creation order makes any difference. I am sorry. It seems to be my fault. I have currently two user classes - tri-mesh and cylinders. When I move creating of tri-mesh before creating cylinders they fall through while all other things remain on tri-mesh. Before this I try cylinder - cylinder collision and it works. Now I try to create tri-mesh before cylinders again and everything works. I is a puzzle for me how it may happen before, maybe I mixed lib ang dll somehow. Now it works grate. -- Best regards, Konstantin Slipchenko mailto:slipch at gsc-game.kiev.ua From franjesus at medtelecom.net Fri Nov 29 12:35:02 2002 From: franjesus at medtelecom.net (Francisco =?iso-8859-15?q?Jes=FAs=20Mart=EDnez=20Serrano?=) Date: Fri Nov 29 12:35:02 2002 Subject: [ODE] CVS not working Message-ID: <200211292033.10697.franjesus@medtelecom.net> Having some problems with the access violation/dGeomDestroy issue, i tried to update, but: fran at avalon fran $ cd develop/ode/ fran at avalon ode $ cvs up cvs [update aborted]: connect to q12.org(209.115.250.14):2401 failed: Connection refused -- En fin... que me estoy quitando, ya s?lo me pongo de vez en cuando. .: Bulmailing :. From mborigin at hotmail.com Fri Nov 29 16:33:02 2002 From: mborigin at hotmail.com (Malcolm Burton) Date: Fri Nov 29 16:33:02 2002 Subject: [ODE] Opcode and Win32.cpp Message-ID: Hi this is Malcolm... I have WinCVS working fine and have downloaded the latest CVS, I also downloaded the 0.03 tgz. I cannot find Opcode.h, or the Win32.cpp files. VC++7, and Visual Studio .NET compile is working as per the notes for vs7 but complains about opcode.h not found, Win32.cpp not found - and halts. I do not seem to have all the files! Malcolm _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From coding at natew.com Fri Nov 29 23:09:02 2002 From: coding at natew.com (Nate W) Date: Fri Nov 29 23:09:02 2002 Subject: [ODE] Opcode and Win32.cpp In-Reply-To: Message-ID: On Fri, 29 Nov 2002, Malcolm Burton wrote: > downloaded the 0.03 tgz. I cannot find Opcode.h, or the Win32.cpp files. Opcode comes separately: http://www.codercorner.com/Opcode.htm Win32.cpp is not needed. Just delete it from the project and all will be well. I removed it from mine, but apparently not until after I uploaded the contrib. Sorry about that. -- Nate Waddoups Redmond WA USA http://www.natew.com From pml_mrawls at yahoo.com Sat Nov 30 14:28:02 2002 From: pml_mrawls at yahoo.com (Mark Rawls) Date: Sat Nov 30 14:28:02 2002 Subject: [ODE] cvs compiling issues Message-ID: <20021130212752.13403.qmail@web40504.mail.yahoo.com> Hi. I've attempted to compile the cvs version of ODE using msvc7 and also GNU make. MSVC7 complained about external ref to dInfinityValue (maybe this was meant to be dInfinity which I see is used in the code several times, but not dInifnityValue?), and some other things; I got the impression it wasn't up to date with the latest cvs version: is this true? Because of this, I tried to use GNU make. Using GNU make, I get these errors which I believe might be problems with the source code... step.cpp ode\src\step.cpp(442) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(443) : error C2664: 'dSetValue' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called ode\src\step.cpp(730) : error C2675: unary '-' : 'dInfBytes' does not define thi s operator or a conversion to a type acceptable to the predefined operator ode\src\step.cpp(731) : error C2664: 'dSet! Value' : cannot convert parameter 3 fr om 'dInfBytes' to 'dReal' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called make: *** [ode/src/step.obj] Error 2 Also, I tried to get a more recent version of cvs to see if this has been fixed, but WinCVS gives me this message: connect to q12.org(q12.org):2401 failed: No connection could be made because the target machine actively refused it. Is there something going on with the server that connections are being refused for a certain amount of time, or is this something wrong with my configuration (which worked before)? --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now -------------- next part -------------- An HTML attachment was scrubbed... URL: http://q12.org/pipermail/ode/attachments/20021130/3f0252ff/attachment.htm From coding at natew.com Sat Nov 30 14:56:01 2002 From: coding at natew.com (Nate W) Date: Sat Nov 30 14:56:01 2002 Subject: [ODE] cvs compiling issues In-Reply-To: <20021130212752.13403.qmail@web40504.mail.yahoo.com> Message-ID: On Sat, 30 Nov 2002, Mark Rawls wrote: > I've attempted to compile the cvs version of ODE using msvc7 [...] I > got the impression it wasn't up to date with the latest cvs version: > is this true? Because of this, I tried to use GNU make. That's true. I submitted the msvc7 project quite a while ago, and I know there have been a number of changes to ODE since then. I'll update the msvc7 contrib as soon as I get around up updating my local ODE code... unless someone else gets to it first (hint, hint). -- Nate Waddoups Redmond WA USA http://www.natew.com From russ at q12.org Sat Nov 30 16:21:01 2002 From: russ at q12.org (Russ Smith) Date: Sat Nov 30 16:21:01 2002 Subject: [ODE] cvs compiling issues In-Reply-To: <20021130212752.13403.qmail@web40504.mail.yahoo.com> References: <20021130212752.13403.qmail@web40504.mail.yahoo.com> Message-ID: <20021130152618.6e6dc902.russ@q12.org> > Also, I tried to get a more recent version of cvs to see if this has > been fixed, but WinCVS gives me this message: > > connect to q12.org(q12.org):2401 failed: No connection could be made > because the target machine actively refused it. the CVS server is down, i'm hoping to get it fixed shortly. russ. -- Russell Smith http://www.q12.org From russ at q12.org Sat Nov 30 17:00:02 2002 From: russ at q12.org (Russ Smith) Date: Sat Nov 30 17:00:02 2002 Subject: [ODE] cvs compiling issues In-Reply-To: <20021130152618.6e6dc902.russ@q12.org> References: <20021130212752.13403.qmail@web40504.mail.yahoo.com> <20021130152618.6e6dc902.russ@q12.org> Message-ID: <20021130160426.4dcd1863.russ@q12.org> > the CVS server is down, i'm hoping to get it fixed shortly. the CVS server is up again. russ. -- Russell Smith http://www.q12.org