From personal experience, I know that dynamic_cast will often fail on OSX under
the same conditions where it succeeds on Windows. There is a possibility that a
dynamic_cast is failing somewhere, either in osgBullet or in Bullet itself.
osgBullet uses the OSG Notify system for warnings and other messages, so turning
up the Notify verbosity might be worth a try (but no guarantees).
You have both the GLDebugDrawer (so you can see if this is a physics rep/visual
rep sync problem), and also the source code (so you can set breakpoints in the
scene graph Transform or osgBullet MotionState, which is how Bullet would affect
the movement). These are good tools to start with for tracking down such an issue.
You say your code is based on the hinge example... Is the body associated with a
Bullet constraint, such as a hinge?
-Paul
> Arts et M�tiers ParisTech (fr)
>
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/
I'll also point out that all the examples and tests that ship with osgBullet appear to behave correctly on OSX for me. If they also behave correctly for you on OSX, then it should be pretty straightforward to compare your (broken) simple example with the (working) simple osgBullet examples, and determine the source of the problem.
-Paul
On 11/7/2011 2:53 PM, Paul Martz wrote:
I've definitely seen differences in behavior between OSX and Windows.
From personal experience, I know that dynamic_cast will often fail on OSX under the same conditions where it succeeds on Windows. There is a possibility that a dynamic_cast is failing somewhere, either in osgBullet or in Bullet itself.
osgBullet uses the OSG Notify system for warnings and other messages, so turning up the Notify verbosity might be worth a try (but no guarantees).
You have both the GLDebugDrawer (so you can see if this is a physics rep/visual rep sync problem), and also the source code (so you can set breakpoints in the scene graph Transform or osgBullet MotionState, which is how Bullet would affect the movement). These are good tools to start with for tracking down such an issue.
You say your code is based on the hinge example... Is the body associated with a Bullet constraint, such as a hinge?
-Paul
On 11/7/2011 7:25 AM, Juan Sebastián wrote:
Dear all,
I've created a very simple app based on (vrjuggler) OsgNav and
(osgBullet) Hinge samples, in which a RigidBody is created from a
model 10m above the ground (so it should fall). On Windows the objects
fall nicely, but on Mac, the objects stay in the air, as if the
DynamicsWorld didn't have any influence on them.
Am I missing something?
The source, with both Xcode and Visual Studio 2008 projects can be
found in https://github.com/jscasallas/VrjOsgBullet
Any help would be appreciated, thanks!
Juan Sebastian
-------------------------------------
HCI PhD Student
Iowa State University (us)
Arts et Métiers ParisTech (fr)
--You received this message because you are subscribed to the Google Groups "osgbullet-users" group.
To post to this group, send email to osgbullet-users@googlegroups.com.
To unsubscribe from this group, send email to osgbullet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/osgbullet-users?hl=en.
If your Juggler app works on Windows it should work on Mac. There should be no functional difference between your App class on Mac and Windows. I would double check your code between the two platforms to make sure things work. Paul and I both use osgBullet across both platforms without problems.
Doug
> To post to this group, send email to osgbull...@googlegroups.com.
> To unsubscribe from this group, send email to osgbullet-use...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/osgbullet-users?hl=en.
>
>
> Thanks again for answering! I'll try your tips and keep you posted.
> Juan Sebastian
> -------------------------------------
> HCI PhD Student
> Iowa State University (us)
> Arts et Métiers ParisTech (fr)
>
> --
> You received this message because you are subscribed to the Google Groups "osgbullet-users" group.
> To post to this group, send email to osgbull...@googlegroups.com.
> To unsubscribe from this group, send email to osgbullet-use...@googlegroups.com.
About the only thing osgViewer provides that is critical to Bullet's proper
functioning is the FrameStamp. The elapsed seconds are passed as a parameter to
Bullet's stepSimulation() routine. I'd hate to sound like I'm asking "is it
plugged in?", but you should verify that you're passing in a non-zero elapsed
time parameter.
For the proper rendering of any physics sim, you need a loop that calls
stepSimulation(), then renders. That loop must be executed repeatedly,
otherwise, objects will just hang in the air and never fall. All the
osgViewer-based examples have such a loop. Again in the "is it plugged in?"
vein, you might want to verify that VRJ is executing your loop repeatedly.
Perhaps there is a difference between VRJ on Windows and OSX such that VRJ
renders only the first frame on OSX, then sits idle.
I'll step out on a limb here and state that I doubt your issue is related to
osgBullet. I bet if you wrote a small VRJ-based Bullet app that used OpenGL for
rendering instead of OSG, you'd have the same issue.
> I hope I won't need to dig as deep as setting breakpoints in Bullet to find my
> error =/.
I see the smiley, nonetheless I'm not quite sure how to respond to that. In my
experience, the beauty of open source software is that, when something goes
wrong, I can step through it in the debugger to find out what assumptions the
code is making, and how my use case is breaking those assumptions.
I mean, we can sit hear and speculate about VRJ and make wild guesses all day
(or all week), or you can sit down with a debugger and find out what's going wrong.
-Paul
On 11/7/2011 4:19 PM, Juan Sebastián Casallas wrote:About the only thing osgViewer provides that is critical to Bullet's proper functioning is the FrameStamp. The elapsed seconds are passed as a parameter to Bullet's stepSimulation() routine. I'd hate to sound like I'm asking "is it plugged in?", but you should verify that you're passing in a non-zero elapsed time parameter.
I was about to point that out, all the examples shipped with osgBullet seem to behave correctly on my Mac, what's more, just replacing the code from my main with the code of, say, centerofmass.cpp works fine. The only tangible difference I can think of right now is the use of osgViewer (osgBullet examples) vs. vrj::Osg::App (vrjuggler).
For the proper rendering of any physics sim, you need a loop that calls stepSimulation(), then renders. That loop must be executed repeatedly, otherwise, objects will just hang in the air and never fall. All the osgViewer-based examples have such a loop. Again in the "is it plugged in?" vein, you might want to verify that VRJ is executing your loop repeatedly. Perhaps there is a difference between VRJ on Windows and OSX such that VRJ renders only the first frame on OSX, then sits idle.
I'll step out on a limb here and state that I doubt your issue is related to osgBullet. I bet if you wrote a small VRJ-based Bullet app that used OpenGL for rendering instead of OSG, you'd have the same issue.
I see the smiley, nonetheless I'm not quite sure how to respond to that. In my experience, the beauty of open source software is that, when something goes wrong, I can step through it in the debugger to find out what assumptions the code is making, and how my use case is breaking those assumptions.
I hope I won't need to dig as deep as setting breakpoints in Bullet to find my error =/.
I mean, we can sit hear and speculate about VRJ and make wild guesses all day (or all week), or you can sit down with a debugger and find out what's going wrong.
-Paul
--
You received this message because you are subscribed to the Google Groups "osgbullet-users" group.
To post to this group, send email to osgbullet-users@googlegroups.com.
To unsubscribe from this group, send email to osgbullet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/osgbullet-users?hl=en.
-Paul
To post to this group, send email to osgbull...@googlegroups.com.
To unsubscribe from this group, send email to osgbullet-use...@googlegroups.com.
Thank you very much for your help!
Juan Sebastian
--
You received this message because you are subscribed to the Google Groups "osgbullet-users" group.
To post to this group, send email to osgbull...@googlegroups.com.
To unsubscribe from this group, send email to osgbullet-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/osgbullet-users?hl=en.