22 #include <gazebo/common/SystemPaths.hh> 23 #include <gazebo/common/Plugin.hh> 31 int setenv(
const char *name,
const char *value,
int overwrite)
36 errcode = ::getenv_s(&envsize, NULL, 0, name);
37 if(errcode || envsize)
return errcode;
39 return ::_putenv_s(name, value);
47 typedef std::map<std::string, std::string>
M_string;
65 void Load(
int argc,
char** argv)
76 gazebo::common::SystemPaths::Instance()->gazeboPathsFromEnv =
false;
77 std::vector<std::string> gazebo_media_paths;
79 for (std::vector<std::string>::iterator iter=gazebo_media_paths.begin(); iter != gazebo_media_paths.end(); iter++)
82 gazebo::common::SystemPaths::Instance()->AddGazeboPaths(iter->c_str());
86 gazebo::common::SystemPaths::Instance()->pluginPathsFromEnv =
false;
87 std::vector<std::string> plugin_paths;
89 for (std::vector<std::string>::iterator iter=plugin_paths.begin(); iter != plugin_paths.end(); iter++)
92 gazebo::common::SystemPaths::Instance()->AddPluginPaths(iter->c_str());
96 gazebo::common::SystemPaths::Instance()->modelPathsFromEnv =
false;
97 std::vector<std::string> model_paths;
99 for (std::vector<std::string>::iterator iter=model_paths.begin(); iter != model_paths.end(); iter++)
102 gazebo::common::SystemPaths::Instance()->AddModelPaths(iter->c_str());
107 setenv(
"GAZEBORC",gazeborc.c_str(),1);
std::vector< std::string > V_string
#define ROS_DEBUG_NAMED(name,...)
ROSLIB_DECL std::string getPath(const std::string &package_name)
ROSLIB_DECL void getPlugins(const std::string &package, const std::string &attribute, V_string &plugins, bool force_recrawl=false)
void LoadPaths()
Set Gazebo Path/Resources Configurations GAZEBO_MODEL_PATH, PLUGIN_PATH and GAZEBO_MEDIA_PATH by addi...
std::map< std::string, std::string > M_string
void Load(int argc, char **argv)