[ODE] XML and ODE

William Denniss will at tanksoftware.com
Fri Aug 12 20:47:50 MST 2005


Hi,

To clear up any confusion, it appears my email (the one John is  
replying to) didn't get to the list (at least I didn't get a copy,  
and it wasn't archived).  I'll put it at the bottom of this email.

To answer your questions John:


On 03/08/2005, at 9:42 PM, John Donovan wrote:
>
> It's part of a nodekit for the OpenSceneGraph  
> (www.openscenegraph.org),
> and I'm putting it under the OSGPL, which is a more relaxed version of
> the LGPL. I don't think this will clash with the LGPL of ODE  
> because I'm
> creating a work "using" ODE, rather than one "based on". As it's not
> been publically released yet, if there is a licensing issue, if  
> someone
> could let me know and I'll see what the implications are for using a
> different license.

I don't think it would clash either.  Regardless, ODE is also BSD  
licensed so the issue is moot anyway.  The XODE reference  
implementation is also BSD licensed.  The spec itself is an even more  
relaxed license (MIT).  So you're pretty safe.


>> please tell me about it and I shall link to you from the site.
>>
>
> Thanks. I've got a bunch more stuff to write first, so it'll be  
> probably
> a couple of months before I'm happy with it. Also, there are no  
> plans to
> make it a general C++ XODE reader, because my project involves OSG  
> quite
> heavily. But as my OSG ODE wrapper is very lightweight, it won't be  
> hard
> for someone to make it more general.

That's fine.  I personally don't need a C++ XODE reader.  Essentially  
if you write something XODE related that people may be interested in,  
I will link to you.  It sounds like others who use OSG might find it  
useful.

>> If you have any other questions, please ask away.
>>
>
> I do have one or two. They may be because I'm not an XML expert,  
> rather
> than any issues with the XODE istelf.

OK.  Let me preface any answers by saying that XODE is a beta spec.   
There are some things regarding ODE that I have not had to use, and  
thus may be incorrectly represented or absent in the spec.  I am very  
willing to make changes however, so suggest away.

> 1) Why does adjust element have _both_ density and total  
> attributes? Is
> there a way of making them mutually excusive? Maybe by making them
> elements of type xs:simpletype, and wrapping them in a xs:choice.
> 2) Why are the density and total attributes of the adjust element also
> attributes of the mass_shape and mass_struct? This looks like you can
> have:
> <mass>
>    <mass_struct density="12" > <!-- Do we use this density... -->
>       <centerGravity>
>          <!-- Stuff goes here -->
>       </centerGravity>
>       <imatrix>
>          <!-- More stuff goes here -->
>       </imatrix>
>    </mass_struct>
>    <adjust density="30" /> <!-- ...or this density? -->
> </mass>

And this is one area of the spec not rigourously tested :)

Essentially it is based of the API functions listed here: http:// 
ode.org/ode-latest-userguide.html#sec_9_2_0

As you can see, you can either use "shapes" like sphere,  
cappedcylinder, etc, or you can use the mass strut directly via say  
dMassAdd.

The adjusting XML elements exist to serve the dMassAdjust function,  
which is separate.

If you think the spec is unclear or incorrect (and it almost  
certainly is in this area), please indicate how you think it should  
be improved.

> 3) Does the reference implementation parse masses? The latest source
> (30/10/2004) only seems to handle adjust elements.

You are correct, the reference implementation does not parse masses  
currently.  It also does not yet parse TriMeshes.

> 4) Are the versions of the XODE spec backwards compatible? My code
> explicity checks for r23 at the moment.

No, XODE is not guaranteed to be backwards compatible, so checking  
the version number is advised.  Hopefully once the spec is more  
mature, we can declare a 1.0, and people can be confident it won't  
change much.  Bug-fix releases should be backwards compatible, as is  
the addition of new features.  When we rename/restructure existing  
aspects, it does brake backwards compatibility.

> 5) Is there any need to store all 9 elements of the inertia tensor?  
> The
> ODE functions only take the lower triangle.

Are you referring to "dMassSetParameters", can you please clarify?

> 6) There are a few typos in the spec, would you mind if I go  
> through and
> correct ones I find?

By all means :)


Cheers,

Will.


-------------------------

Sent:  2005-07-30

Hi,

I wrote the XODE spec and Java reference implementation.  I believe  
there is also a python importer available.

Hopefully it shouldn't be hard to port it to C/C++.  If you do and  
make it open source, please tell me about it and I shall link to you  
from the site.  If you have any other questions, please ask away.

Cheers,

Will.


More information about the ODE mailing list