Revision: 8154
http://playerstage.svn.sourceforge.net/playerstage/?rev=8154&view=rev
Author: hsujohnhsu
Date: 2009-07-29 22:47:43 +0000 (Wed, 29 Jul 2009)
Log Message:
-----------
stop physics update when resetting world.
Modified Paths:
--------------
code/gazebo/trunk/server/gui/MainMenu.cc
Modified: code/gazebo/trunk/server/gui/MainMenu.cc
===================================================================
--- code/gazebo/trunk/server/gui/MainMenu.cc 2009-07-29 22:39:45 UTC (rev
8153)
+++ code/gazebo/trunk/server/gui/MainMenu.cc 2009-07-29 22:47:43 UTC (rev
8154)
@@ -35,6 +35,8 @@
#include "OgreAdaptor.hh"
#include "MainMenu.hh"
+#include <boost/thread.hpp>
+
using namespace gazebo;
////////////////////////////////////////////////////////////////////////////////
@@ -135,6 +137,8 @@
// Reset the world
void MainMenu::ResetCB(Fl_Widget * /*w*/, void * /*data*/)
{
+ // stop simulation when this is happening
+ boost::recursive_mutex::scoped_lock
lock(*Simulator::Instance()->GetMRMutex());
World::Instance()->Reset();
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit