Revision: 8632
http://playerstage.svn.sourceforge.net/playerstage/?rev=8632&view=rev
Author: natepak
Date: 2010-04-29 00:48:06 +0000 (Thu, 29 Apr 2010)
Log Message:
-----------
Updates to the gazebomodel tool
Modified Paths:
--------------
code/gazebo/trunk/tools/gazebomodel.cc
Modified: code/gazebo/trunk/tools/gazebomodel.cc
===================================================================
--- code/gazebo/trunk/tools/gazebomodel.cc 2010-04-27 16:23:21 UTC (rev
8631)
+++ code/gazebo/trunk/tools/gazebomodel.cc 2010-04-29 00:48:06 UTC (rev
8632)
@@ -128,8 +128,7 @@
// Spawn a new model into the world
void spawn()
{
- //TODO
- //PROCESS YAML PARAMETER!!!
+
if (params.size() < 2)
std::cerr << "Missing model filename\n";
else
@@ -148,7 +147,14 @@
break;
stream << buffer;
}
- strcpy((char*)factoryIface->data->newModel, stream.str().c_str());
+ std::string model = stream.str();
+ strcpy((char*)factoryIface->data->newModel, model.c_str());
+
+ /*for (iter = yamlValues.begin(); iter != yamlValues.end(); iter++)
+ {
+ std::string reg = iter->first + "
+ boost::regex::regex_replace(model,
+ }*/
}
else
std::cerr << "Unable to open file[" << params[1] << "]\n";
@@ -211,10 +217,10 @@
yaml_parser_delete(&parser);
- /*for (iter = yamlValues.begin(); iter != yamlValues.end(); iter++)
+ for (iter = yamlValues.begin(); iter != yamlValues.end(); iter++)
{
std::cout << "Key[" << iter->first << "] Value[" << iter->second << "]\n";
- }*/
+ }
}
////////////////////////////////////////////////////////////////////////////////
@@ -254,7 +260,6 @@
parseYAML();
- /*
client = new gazebo::Client();
simIface = new gazebo::SimulationIface();
factoryIface = new gazebo::FactoryIface();
@@ -302,5 +307,4 @@
spawn();
else
std::cerr << "Unknown command[" << params[0] << "]\n";
- */
}
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