Hi there, I seem to have a little problem with OSG's threads... Here's my situation:
We're using OpenSG to visualize a teleoperated microassembly station (6 DOF, mems-gripper, 2-3 camera microscopes, glue dispenser, ..., see also www.microassembly.ch). The virtual model of our microassembly robot (www.microassembly.ch/wiki/pdf/MAS_screenshot.png) is synchronized with the real one such that all movements on the real robot are exactly reproduced by the virtual one. (The user of our microassembly application should only interact with the virtual model and thereby control the real robot...). The movement of our robot is controlled via teleoperation with a spacemouse (left hand) and a phantom omni(right hand). What I'd like to do now is filter all movement commands from the spacemouse and the phantom which will produce collisions (on the robot) before sending them to the real robot(, thus making it impossible for the user to crash into something). Therefore I'd like to have a simplified copy of my original virtual robot model with which I'd like to check whether a movement command will produce a collision (using the simplified copy of my original virtual model and Prof. G. Zachmanns collision detection library). Example: 1.) User creates motion command using spacemouse and/or phantom 2.) Move the joints of the simplified robot model to the commanded positions 3.) Check if a collision happened on the simplified virtual model (not visualized) 4.) If no collision was detected send the command to the real robot 5.) Read encoders form the real robot 6.) Move the full detail virtual robot (visualized) to the joint configuration returned form the encoders of the real robot The problem I have is, that the collision detection must be executed within the servo thread of my phantom omni (I'd like to give some force feedback to the phantom based on the virtual model later on...). Therefore I must use the thread provided by the phantom software (libOpenHaptics). Unfortunately, calling OSG functions which manipulate my simplified scenegraph from within the servo thread cause a crash in "osg::PThreadBase::getAspect() from /usr/local/lib/opt/libOSGSystem.so" although I'm using beginEditCP() and endEditCP() statements everywhere. At the moment I'm not sure how to deal with this. Executing 1.) to 4.) from within our GUI-thread (Qt) does not produce any problems and the OSG docs are not really helpful on this issue. Therefore, I'd really be grateful if anyone could point me into the right direction how to solve this problem or where it might come from... (Please ask if you need more info to understand my situation). Here some system specs: "uname -s -r -m": Linux 2.6.22.2-custom i686 (Debian) -> custom because we had to recompile the kernel with the 1394 modules included... "g++ -v": Target: i486-linux-gnu Configured with: ... Thread model: posix gcc version 4.2.3 20071014 (prerelease) (Debian 4.2.2-3) OpenSG is 1.8. Thanks very much for any help, Chris PS: Has anyone ever done contour rendering (not silhouettes) with OpenSG which gives similar results to Unigraphics NX's contour renderer? ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
