Revision: 8787
http://playerstage.svn.sourceforge.net/playerstage/?rev=8787&view=rev
Author: natepak
Date: 2010-06-23 16:39:45 +0000 (Wed, 23 Jun 2010)
Log Message:
-----------
Added in a gazebo config patch from ROS
Modified Paths:
--------------
code/gazebo/trunk/server/GazeboConfig.cc
code/gazebo/trunk/server/GazeboConfig.hh
Modified: code/gazebo/trunk/server/GazeboConfig.cc
===================================================================
--- code/gazebo/trunk/server/GazeboConfig.cc 2010-06-23 16:25:47 UTC (rev
8786)
+++ code/gazebo/trunk/server/GazeboConfig.cc 2010-06-23 16:39:45 UTC (rev
8787)
@@ -59,15 +59,15 @@
std::string delim(":");
char *ogre_resource_path = getenv("OGRE_RESOURCE_PATH");
- if(ogre_resource_path)
+ if(this->ogrePaths.empty() && ogre_resource_path)
this->AddOgrePaths(std::string(ogre_resource_path));
char *gazebo_resource_path = getenv("GAZEBO_RESOURCE_PATH");
- if(gazebo_resource_path)
+ if(this->gazeboPaths.empty() && gazebo_resource_path)
this->AddGazeboPaths(std::string(gazebo_resource_path));
char *gazebo_plugin_path = getenv("GAZEBO_PLUGIN_PATH");
- if(gazebo_plugin_path)
+ if(this->pluginPaths.empty() && gazebo_plugin_path)
this->AddPluginPaths(std::string(gazebo_plugin_path));
if (cfgFile.is_open())
@@ -77,7 +77,7 @@
rc.Load(rcFilename);
// if gazebo path is set, skip reading from .gazeborc
- if(!gazebo_resource_path)
+ if(this->ogrePaths.empty() && !ogre_resource_path)
{
node = rc.GetRootNode()->GetChild("gazeboPath");
while (node)
@@ -90,7 +90,7 @@
}
// if ogre path is set, skip reading from .gazeborc
- if(!ogre_resource_path)
+ if(this->ogrePaths.empty() && !ogre_resource_path)
{
node = rc.GetRootNode()->GetChild("ogrePath");
while (node)
@@ -106,13 +106,13 @@
{
gzmsg(0) << "Unable to find the file ~/.gazeborc. Using default paths.
This may cause OGRE to fail.\n";
- if ( !gazebo_resource_path )
+ if (this->gazeboPaths.empty() && !gazebo_resource_path )
{
this->gazeboPaths.push_back("/usr/local/share/gazebo");
this->AddPluginPaths("/usr/local/share/gazebo/plugins");
}
- if ( !ogre_resource_path )
+ if (this->ogrePaths.empty() && !ogre_resource_path )
{
this->ogrePaths.push_back("/usr/local/lib/OGRE");
this->ogrePaths.push_back("/usr/lib/OGRE");
@@ -121,6 +121,19 @@
}
}
+void GazeboConfig::ClearGazeboPaths()
+{
+ this->gazeboPaths.clear();
+}
+void GazeboConfig::ClearOgrePaths()
+{
+ this->ogrePaths.clear();
+}
+void GazeboConfig::ClearPluginPaths()
+{
+ this->pluginPaths.clear();
+}
+
std::list<std::string> &GazeboConfig::GetGazeboPaths()
{
return this->gazeboPaths;
Modified: code/gazebo/trunk/server/GazeboConfig.hh
===================================================================
--- code/gazebo/trunk/server/GazeboConfig.hh 2010-06-23 16:25:47 UTC (rev
8786)
+++ code/gazebo/trunk/server/GazeboConfig.hh 2010-06-23 16:39:45 UTC (rev
8787)
@@ -64,7 +64,11 @@
/// \brief Add colon delimited paths to plugins
public: void AddPluginPaths(std::string path);
-
+
+ public: void ClearGazeboPaths();
+ public: void ClearOgrePaths();
+ public: void ClearPluginPaths();
+
/// Paths gazebo install
private: std::list<std::string> gazeboPaths;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit