Revision: 8811
http://playerstage.svn.sourceforge.net/playerstage/?rev=8811&view=rev
Author: hsujohnhsu
Date: 2010-07-02 22:36:46 +0000 (Fri, 02 Jul 2010)
Log Message:
-----------
controller load failure will not stop gazebo from running, but give a nice
error message
Modified Paths:
--------------
code/gazebo/trunk/server/controllers/ControllerFactory.cc
code/gazebo/trunk/server/sensors/Sensor.cc
Modified: code/gazebo/trunk/server/controllers/ControllerFactory.cc
===================================================================
--- code/gazebo/trunk/server/controllers/ControllerFactory.cc 2010-06-30
14:54:08 UTC (rev 8810)
+++ code/gazebo/trunk/server/controllers/ControllerFactory.cc 2010-07-02
22:36:46 UTC (rev 8811)
@@ -36,6 +36,7 @@
#include <sys/stat.h>
#include "Simulator.hh"
#include "GazeboConfig.hh"
+#include "GazeboMessage.hh"
#ifdef HAVE_DL
#include <dlfcn.h>
@@ -65,12 +66,9 @@
}
else
{
- std::ostringstream stream;
- stream << "Unable to make controller of type " << classname;
- gzthrow(stream.str());
+ gzmsg(0) << "Error Loading Controller of type [" << classname << "],
skipping\n" << std::endl;
+ return NULL;
}
-
- return NULL;
}
////////////////////////////////////////////////////////////////////////////////
Modified: code/gazebo/trunk/server/sensors/Sensor.cc
===================================================================
--- code/gazebo/trunk/server/sensors/Sensor.cc 2010-06-30 14:54:08 UTC (rev
8810)
+++ code/gazebo/trunk/server/sensors/Sensor.cc 2010-07-02 22:36:46 UTC (rev
8811)
@@ -199,8 +199,8 @@
// Create the controller based on it's type
this->controller = ControllerFactory::NewController(controllerType, this);
- // Load the controller
- this->controller->Load(node);
+ // Load the controller if it's available
+ if (this->controller) this->controller->Load(node);
}
////////////////////////////////////////////////////////////////////////////////
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit