00648       {
    00649         [ROS_ERROR](../../../api/rosconsole/html/macros__generated_8h.html#a7fb635b03cc608284eadecd2f8becd9a)("SpawnModel: Failure - model format is not URDF (nor COLLADA).");
    00650         res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1SpawnModelResponse__.html#a5ec6d9587b9a10ddc10ec198d41ccd62) = false;
    00651         res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1SpawnModelResponse__.html#acb4913011a74e88bdac7e11d173d8a7b) = "SpawnModel: Failure - model format is not URDF (nor COLLADA).";
    00652         return false;
    00653       }
    00654 
    00658       std::string open_bracket("<?");
    00659       std::string close_bracket("?>");
    00660       size_t pos1 = model_xml.find(open_bracket,0);
    00661       size_t pos2 = model_xml.find(close_bracket,0);
    00662       if (pos1 != std::string::npos && pos2 != std::string::npos)
    00663         model_xml.replace(pos1,pos2-pos1+2,std::string(""));
    00664 
    00665       [ROS_DEBUG](../../../api/rosconsole/html/macros__generated_8h.html#a83228c0b42c80605abdd0f42af64b1f7)("Model XML\n\n%s\n\n ",model_xml.c_str());
    00666 
    00667       [urdf2gazebo::URDF2Gazebo](classurdf2gazebo_1_1URDF2Gazebo.html) u2g;
    00668       TiXmlDocument model_xml_doc;
    00669       model_xml_doc.Parse(model_xml.c_str());
    00670       TiXmlDocument gazebo_model_xml;
    00671       // initial xyz and rpy are empty, will be inserted in spawnGazeboModel
    00672       u2g.convert(model_xml_doc, gazebo_model_xml, enforce_limits, [urdf::Vector3](../../../api/urdf_interface/html/classurdf_1_1Vector3.html)(), [urdf::Vector3](../../../api/urdf_interface/html/classurdf_1_1Vector3.html)(), model_name, robot_namespace);
    00673 
    00674       // push to factory iface
    00675       std::ostringstream stream;
    00676       stream << gazebo_model_xml;
    00677       std::string gazebo_model_xml_string = stream.str();
    00678       [ROS_DEBUG](../../../api/rosconsole/html/macros__generated_8h.html#a83228c0b42c80605abdd0f42af64b1f7)("Gazebo Model XML\n\n%s\n\n ",gazebo_model_xml_string.c_str());
    00679       req.[model_xml](../../gazebo_msgs/html/structgazebo__msgs_1_1SpawnModelRequest__.html#a4ea852fe421bee28bcaa852e69e13004) = gazebo_model_xml_string;
    00680 
    00681       // publish gazebo model on parameter server as [robot_namespace]/gazebo/[model name]/robot_description
    00682       // this->rosnode_.setParam(robot_namespace+std::string("/gazebo/")+model_name+std::string("/robot_description"),gazebo_model_xml_string);
    00683 
    00684       return [spawnGazeboModel](classGazeboROSNode.html#a7eb487a51a9a6ecb286f63f537d541f6)(req,res);
    00685     }
    00686 
    [00687](classGazeboROSNode.html#a7eb487a51a9a6ecb286f63f537d541f6)     bool [spawnGazeboModel](classGazeboROSNode.html#a7eb487a51a9a6ecb286f63f537d541f6)([gazebo_msgs::SpawnModel::Request](../../gazebo_msgs/html/structgazebo__msgs_1_1SpawnModelRequest__.html) &req,[gazebo_msgs::SpawnModel::Response](../../gazebo_msgs/html/structgazebo__msgs_1_1SpawnModelResponse__.html) &res)
    00688     {
    00689       // check to see if model name already exist as a model
    00690       std::string model_name = req.[model_name](../../gazebo_msgs/html/structgazebo__msgs_1_1SpawnModelRequest__.html#a3f46d36811a6f381a676b7ac60691259);