[Opensim-dev] Using ODE for vehicles and ragdolls
Gerhard Dünnebeil
Gerhard.Duennebeil at chello.at
Wed Nov 19 08:03:35 UTC 2008
Hi Adam,
the vehicle support I found in ODE is closely related to the heritage of
ODE when it started as an engine to simulate robots. It's far from the
vehicle model that Linden Labs implemented and that I think should be
used here.
Regarding performance:
In a typical vehicle situation only a handful of vehicles would be in a
certain sim at a given time. Only these vehicles must be treated, the
other objects only need a short inspection whether they are vehicles at all.
The calculations that need to be done are not overly CPU intensive, so
the extra burden is bearable. BTW, the same calculations would have to
be done in the Phys engine anyway.
So, over all, an extra layer would give us a lot more modularity and
loose coupling that it would contribute to CPU load.
BTW, maybe layer is a wrong term here. My ideas are more like those for
the meshing support. If it's there, call it; if not, ok too. The main
entry point would still be the phys engine API.
++++++++++++ Scene (or however it's called now) ++++++++++++++++++++++
|
calls
|
+----------+
| | ----------------------------> + Vehicle engine +
| ODE |
|
| | <--- modifies forces/torques -----------+
+----------+
This is completely the same that it script would do by calculating
forces/torques and applying it via llSetForce. The only difference is
that it would take a lot of the complexity of calculation from the
script to a piece of code, that performs better that a script releasing
the script engine a bit and offering a convenient interface for vehicle
builders.
Nlin: Just while I'm writing this your mail dropped in regarding joints.
The current approach uses joints to model linked prims inside the ODE.
This a mis-use of joints in think.
Currently I work on an approach where each linked object (not each
prim!) is represented by one(!) ODE object.
Prims are represented by an (ODE) geometry.
ODE allows to assign more than one geometry to one object, so linked
prims can be modelled into one rigid ODE object by this approach while
conserving the collision behaviour as known from SL.
This will reduce the number of joints drastically as joints are only
used to model contact points and are only temporary after that. There is
no need anymore to permanent joints.
I also expect a clear drop in calculation effort by this approach as all
prims that related to one objects can't neither collide nor change their
position in any way /the joint approach allows that and this is only
inhibited by strong joint parameters). This should also introduce a bit
more stability I hope.
Best regards
Gerhard
Frisby, Adam wrote:
> Doesnt ODE have vehicle support internally? The concern I'd have about a vehicle layer over the top might be that performance is suboptimal since we need to run a second physics step which could introduce issues.
>
> Regards,
>
> Adam
>
>
>> -----Original Message-----
>> From: opensim-dev-bounces at lists.berlios.de [mailto:opensim-dev-
>> bounces at lists.berlios.de] On Behalf Of Gerhard Dünnebeil
>> Sent: Tuesday, 18 November 2008 10:40 PM
>> To: opensim-dev at lists.berlios.de
>> Subject: Re: [Opensim-dev] Using ODE for vehicles and ragdolls
>>
>> Hi
>>
>> having looked into the ODE engine I don't think it's usable for the
>> vehicle API.
>>
>> Instead i think we should put the vehicle engine on top of it.
>>
>> This is pretty easily done by adding another layer (could/should be in
>> a
>> plugin).
>> It can be called in each "Simulate" step and calculate the forces
>> needed
>> to achieve the vehicles behaviour.
>> These forces are then applied -- using the phys engine's API -- to the
>> objects.
>>
>> This way we are
>> a) ... independant (at least theoretically) from the characteristics of
>> the underlying Phys engine
>> b) ... able to implement different engines for different purposes
>>
>> I know someone (is it you, nlin?) already implemented a sailing boat in
>> OpenSim. A modular approach here would allow us to implement
>> alternative
>> friction models beyond what LSL gives us.
>>
>>
>> Just my two cents
>>
>> Gerhard
>>
>>
>> nlin (message) wrote:
>>
>>> Hello,
>>>
>>> There's been some discussion about SL-compatible vehicles in OpenSim
>>> recently, with its higher-level abstraction of how vehicles work.
>>>
>> This
>>
>>> would have the long-term goals of compatibility and ability to swap
>>> out physics engines while still using the same vehicle layer.
>>>
>>> SL-compatibility and abstracting vehicles from the physics engine are
>>> good goals for the long term; sort of a top-down approach (start with
>>> the vehicle abstraction, map it to many different physics engines).
>>>
>>> Complementary to this, I'd like to explore and start discussion of an
>>> alternative way of handling vehicles by using a bottom-up approach.
>>> Starting with the specific physics engine of ODE, can we use
>>> ODE-specific features to make simple vehicles?
>>>
>>> I did some experiments with OpenSim and ODE and the answer seems to
>>>
>> be
>>
>>> yes, we can make simple vehicles with ODE by using joints. We can
>>>
>> also
>>
>>> make ragdolls. I posted some videos to YouTube of the preliminary
>>>
>> results:
>>
>>> http://www.youtube.com/watch?v=iYIh-eIwmjs
>>> http://www.youtube.com/watch?v=z9bedzIuxdM
>>>
>>> This is only prototype work for now, put together sort of quickly as
>>>
>> a
>>
>>> proof-of-concept with just enough "plumbing" (data flow) to work.
>>> There are a number of issues that need to be solved for this to work
>>> cleanly. As far as I know (please correct me if I'm wrong) there
>>> hasn't been much work done to try to get ODE joints/vehicles/ragdolls
>>> working in OpenSim, but I think it's an avenue worth exploring.
>>>
>>> Is there interest in pursuing this approach for OpenSim vehicles? I
>>> would look forward to discussing some of the issues that would need
>>>
>> to
>>
>>> be solved.
>>>
>>> Thanks,
>>> N Lin (nlin)
>>>
>>> ---------------------------------------------------------------------
>>>
>> ---
>>
>>> _______________________________________________
>>> Opensim-dev mailing list
>>> Opensim-dev at lists.berlios.de
>>> https://lists.berlios.de/mailman/listinfo/opensim-dev
>>>
>>>
>> _______________________________________________
>> Opensim-dev mailing list
>> Opensim-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/opensim-dev
>>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>
More information about the Opensim-dev
mailing list