Revision: 7409
http://playerstage.svn.sourceforge.net/playerstage/?rev=7409&view=rev
Author: gerkey
Date: 2009-03-10 01:07:25 +0000 (Tue, 10 Mar 2009)
Log Message:
-----------
Now searching for .model files in install location
Modified Paths:
--------------
code/branches/federation/gazebo/webgazebo/SConscript
code/branches/federation/gazebo/webgazebo/WebGazebo.cc
Modified: code/branches/federation/gazebo/webgazebo/SConscript
===================================================================
--- code/branches/federation/gazebo/webgazebo/SConscript 2009-03-10
00:42:19 UTC (rev 7408)
+++ code/branches/federation/gazebo/webgazebo/SConscript 2009-03-10
01:07:25 UTC (rev 7409)
@@ -5,7 +5,7 @@
libEnv = Environment (
CC = 'g++',
- CCFLAGS = Split ('-pipe -W -Wall -g'),
+ CCFLAGS = Split ('-pipe -W -Wall -g -DINSTALL_PREFIX=\\"' + install_prefix +
'\\"'),
#CXXCOMSTR = 'Compiling $TARGET',
#CCCOMSTR = 'Compiling $TARGET',
Modified: code/branches/federation/gazebo/webgazebo/WebGazebo.cc
===================================================================
--- code/branches/federation/gazebo/webgazebo/WebGazebo.cc 2009-03-10
00:42:19 UTC (rev 7408)
+++ code/branches/federation/gazebo/webgazebo/WebGazebo.cc 2009-03-10
01:07:25 UTC (rev 7409)
@@ -209,16 +209,14 @@
std::string& xmldata,
std::string& response)
{
+ std::vector<std::string> gmpath_parts;
// Search GAZEBO_MODEL_PATH for a matching .model file
const char* gmpath = getenv("GAZEBO_MODEL_PATH");
- if(!gmpath)
+ if(gmpath)
{
- response = "ERROR: GAZEBO_MODEL_PATH is not set";
- return false;
+ StringSplit(gmpath, gmpath_parts, ":");
}
-
- std::vector<std::string> gmpath_parts;
- StringSplit(gmpath, gmpath_parts, ":");
+ gmpath_parts.push_back(std::string(INSTALL_PREFIX) +
"/share/gazebo/worlds/models");
for(unsigned int i=0; i<gmpath_parts.size(); i++)
{
std::string p = gmpath_parts[0] + "/" + type + ".model";
@@ -243,7 +241,9 @@
}
}
- response = "ERROR: Could not find file " + type + ".model";
+ response = "ERROR: Could not find file " + type + ".model. Searched in:\n";
+ for(unsigned int i=0; i<gmpath_parts.size(); i++)
+ response += " " + gmpath_parts[i] + "\n";
return false;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit