Revision: 7431
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7431&view=rev
Author:   gerkey
Date:     2009-03-10 06:02:26 +0000 (Tue, 10 Mar 2009)

Log Message:
-----------
Got webgazebo working again

Modified Paths:
--------------
    code/branches/federation/gazebo/webgazebo/WebGazebo.cc

Modified: code/branches/federation/gazebo/webgazebo/WebGazebo.cc
===================================================================
--- code/branches/federation/gazebo/webgazebo/WebGazebo.cc      2009-03-10 
05:55:41 UTC (rev 7430)
+++ code/branches/federation/gazebo/webgazebo/WebGazebo.cc      2009-03-10 
06:02:26 UTC (rev 7431)
@@ -75,7 +75,7 @@
                        websim::Pose& p,
                        websim::Velocity& v,
                        websim::Acceleration& a,
-                       std::string& error)
+                       std::string& response)
 {
   // Discard any leftover responses
   this->simIface->data->responseCount = 0;
@@ -94,7 +94,7 @@
     if(((t1.tv_sec + t1.tv_usec/1e6) - (t0.tv_sec + t0.tv_usec/1e6)) 
        > timeout)
     {
-      error= "Timeout";
+      response= "Timeout";
       return false;
     }
     nanosleep(&sleeptime, NULL);
@@ -116,7 +116,7 @@
                        const websim::Pose& p,
                        const websim::Velocity& v,
                        const websim::Acceleration& a,
-                       std::string& error)
+                       std::string& response)
 {
   // TODO: get pose, check for too-large jump, and complain about it
 
@@ -226,10 +226,10 @@
 bool
 WebGazebo::CreateModel(const std::string& name, 
                        const std::string& type,
-                       std::string& error)
+                       std::string& response)
 {
   std::string xmldata;
-  if(!GetModel(name,type,xmldata,error))
+  if(!GetModel(name,type,xmldata,response))
     return false;
 
   struct timespec sleeptime = {0, 10000000};
@@ -240,6 +240,7 @@
     {
       strcpy((char*)this->factoryIface->data->newModel, xmldata.c_str());
       factoryIface->Unlock();
+      response = std::string("Created model ") + name + " of type " + type;
       return true;
     }
     else
@@ -252,8 +253,8 @@
 
 bool
 WebGazebo::DeleteModel(const std::string& name, 
-                       std::string& error)
+                       std::string& response)
 {
-  error = "DeleteModel not implemented";
+  response = "DeleteModel not implemented";
   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

Reply via email to