WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-25-2010, 10:16 AM
hotspur1 hotspur1 is offline
Member
 
Join Date: Mar 2003
Location: Cambridge, MA
Posts: 54
removing objects that have collided

I am running a robotics simulation and I want to quit a particular trial after having grabbed an object. I am using the physics engine to detect collisions but when I try to remove the grasped object, I get a physics engine exception. I have a 60 Hz timer that drives the simulation rendering and a keyboard event which signals the end of the trial ('q' key). Within the keyboard callback, I tried to disable the collision notification for the two objects but it doesn't seem to work properly. I have a callback routine that should run when a collision event ends, but it doesn't occur. I am guessing that because it is dealing with a keyboard event callback, it cannot be interrupted by the collision ending event (when the notification is disabled).

I presume the exception then arises because the physics engine thinks that two objects are still in a collided state but one of them is no longer part of the scene graph. Is there a way to clear/reset the state of the physics engine so I am basically starting with a clean slate for each new trial?

Can I simply disable the physics engine, remove and add objects as needed, then start the physics engine again without starting in the previous state?

Thanks
Reply With Quote
  #2  
Old 05-26-2010, 10:02 AM
hotspur1 hotspur1 is offline
Member
 
Join Date: Mar 2003
Location: Cambridge, MA
Posts: 54
Nevermind - I am using the <viztask>.waitEvent to wait for the COLLIDE_END_EVENT to occur before removing the target objects. I guess the problem was that the event did not occur before the call to remove the object, hence the exception in the physics engine.

You can close this thread
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
removing multiple objects durf Vizard 7 08-05-2009 09:15 AM
Semi-circle array containing target and distractor objects ptjt255 Vizard 3 08-04-2009 03:09 AM
multiple objects durf Vizard 1 04-10-2009 01:42 PM
Lightwave objects rotation problem hosier Vizard 6 02-13-2009 12:04 PM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 11:01 AM


All times are GMT -7. The time now is 06:55 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC