Revision: 7740
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7740&view=rev
Author:   asadat
Date:     2009-05-29 21:09:08 +0000 (Fri, 29 May 2009)

Log Message:
-----------
modified GetSayStrings() in Model class

Modified Paths:
--------------
    code/stage/trunk/examples/ctrl/CMakeLists.txt
    code/stage/trunk/libstage/stage.hh
    code/stage/trunk/webstage/webstage.cc

Modified: code/stage/trunk/examples/ctrl/CMakeLists.txt
===================================================================
--- code/stage/trunk/examples/ctrl/CMakeLists.txt       2009-05-29 13:08:16 UTC 
(rev 7739)
+++ code/stage/trunk/examples/ctrl/CMakeLists.txt       2009-05-29 21:09:08 UTC 
(rev 7740)
@@ -5,6 +5,7 @@
      sink
      source
      wander
+     
 )
 
 # need plaer's wavefront planning library for this one

Modified: code/stage/trunk/libstage/stage.hh
===================================================================
--- code/stage/trunk/libstage/stage.hh  2009-05-29 13:08:16 UTC (rev 7739)
+++ code/stage/trunk/libstage/stage.hh  2009-05-29 21:09:08 UTC (rev 7740)
@@ -1879,7 +1879,8 @@
   public:
        
          stg_model_type_t GetModelType(){return type;}
-        const char* GetSayString(){return say_string;}
+        
+        std::string GetSayString(){return std::string(say_string);}
 
         Visibility vis;
 

Modified: code/stage/trunk/webstage/webstage.cc
===================================================================
--- code/stage/trunk/webstage/webstage.cc       2009-05-29 13:08:16 UTC (rev 
7739)
+++ code/stage/trunk/webstage/webstage.cc       2009-05-29 21:09:08 UTC (rev 
7740)
@@ -216,45 +216,6 @@
   return true;
 
   }                                       
-  virtual bool GetLaserCfgData(const std::string& name,
-                                                                       
websim::Time& t,
-                                                                       
uint32_t& resolution,
-                                                                       double& 
fov,
-                                                                       
websim::Pose& p,
-                                                                       
std::string& error)
-{
-
-        t = GetTime();
-
-        Model* mod = world->GetModel( name.c_str() );
-        if( mod )
-               {
-                     ModelLaser* laser = 
(ModelLaser*)mod->GetModel("laser:0");                
-                     
-                    if(laser){
-                               stg_laser_cfg_t cfg = laser->GetConfig();
-                               resolution =  cfg.resolution;
-                               fov = cfg.fov;
-                               //There is no way to access the position of the 
laser
-                    }else{
-
-                               printf( "Warning: attempt to get laser config 
data for unrecognized laser model of model \"%s\"\n",
-                                 name.c_str() );
-                               return false;
-
-
-                         }
-                         
-               }
-        else{
-               printf( "Warning: attempt to get laser config data for 
unrecognized model \"%s\"\n",
-                                 name.c_str() );
-               return false;
-            }
-
-  return true;
-
-  }                                       
   virtual bool GetRangerData(const std::string& name,
                                                                        
websim::Time& t,
                                                                        
std::vector<websim::Pose>& p,
@@ -309,6 +270,7 @@
                                                                        double& 
x,
                                                                        double& 
y,
                                                                        double& 
z,
+                                                                       
websim::Pose& center,
                                                                        
std::string& response)
   {
        if(name == "sim"){
@@ -329,6 +291,9 @@
                        x = ext.size.x;
                        y = ext.size.y;
                        z = ext.size.z;
+                       center.x = ext.pose.x;
+                       center.y = ext.pose.y;
+                       center.a = ext.pose.a;
                }
                else
                {
@@ -374,13 +339,13 @@
                char temp[128];
                sprintf(temp,"position:%d",i);
                Model *mod = world->GetModel(temp);
-               if(mod->GetSayString())
+               if(mod->GetSayString() != "")
                {       
                        
                        std::string str = temp;
                        str += " says: \" ";
                        str += mod->GetSayString();
-                       str += " \"\n ";
+                       str += " \" ";
                        
                        sayings.push_back(str);
                        


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to