Avoiding GeomTriMesh

I am currently working on a robot simulation for my (high school) senior project but have run into some difficulties.  I am trying to expand the simulation (and later the AI) to interact in a threee dimensional world.  Because I have inherited this code, I am stuck with ODEJava and Java3d.

I am currently trying to insert the hills (instead of just null spaces) but I am having trouble with the TriMesh.  Is there an effective way to avoid this little glitch, like another geomObject that could be used in place of TriMesh.  Or if I am stuck with the TriMesh would it be better to generate a plane and then just add hills where I need them (It is still a very controlled landscape with just a few intersparsed hills, not a fractal landscape or anything).



I am sorry that this is jME pertinent, you just seem like such knowledgeable helpful people.

I'm not quite sure what your problem is. Are you talking about terrain? If yes static trimeshes (trimesh geoms without a body) should be fine. We use them in jME Physics for terrain, too.

What's not working very well in ODE are the dynamic trimeshes (trimesh geoms connected to a body). Use boxes, spheres etc. instead.



People knowing more about ODE should be found on the ODE mailing list…

I am trying to generate the terrain, so I assume it would be static, but I am getting errors similar to what other people encounter.  If you happen to know how to force it to be static that would be a useful check.



As for posting here I am sorry.  I got confused on what boards I had read the most pertinent topics.  You guys are still very helpful and cool and all though.

Well, just don't attach a to a body - there is no actual other way. (You could remove it from a body again, of course)



If you have gravity in your space you should be able to see if your terrain is affected. If not it is not connected to a body.



Maybe you could post what your actual problems with the collisions are. Maybe it's not even trimesh/terrain related…

Well I don't get to a point where I can test the collisions.  It boots me out with an error message first.  I have seen similar error messages on other boards and they have attributed it to negative values in the height fields, though this seems like a careless mistake for such a widely used Physics Engine.  So I was looking for a way just to avoid the headaches associated with the TriMesh.  If anyone could confirm that this error in fact exists in OdeJava, please send word, especially if you have a work around more convenient then shifting the height feild to only positive.  Below is the error message.


#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x3a1cc1a7, pid=3828, tid=3576
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_05-b05 mixed mode, sharing)
# Problematic frame:
# C  [odejava.dll+0x3c1a7]
#
# An error report file with more information is saved as hs_err_pid3828.log
#
# If you would like to submit a bug report, please visit:
#  http://java.sun.com/webapps/bugreport/crash.jsp
#

You're not writing a multithreading game are you?  :-o



Any changes to ODE objects must be done in the same thread that updates ODE or you'll get pretty VM crashes just like that.



darkfrog

Ideally this won't be a game at all, as it whould work without human input once it is started, but yes it is multithreaded.  The performance gains are supposed to be substantial and more importantly I am experimenting with agent based artificial Intelligence, so threads are pretty much required.



Thank you for the tip on checking the thread, I had no idea that was required.  Is there any site that provides half way decent documentation of OdeJava, or am I stuck with their halfassed API?

What you actually need is the doc from http://ode.org - which is quite ok. Still missing many things though (e.g. does not elaborate on threads).

Thanks for the help everyone.