Revision: 8834
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8834&view=rev
Author:   natepak
Date:     2010-07-26 19:48:56 +0000 (Mon, 26 Jul 2010)

Log Message:
-----------
Added in propgrid

Modified Paths:
--------------
    code/gazebo/branches/wx/cmake/SearchForStuff.cmake
    code/gazebo/branches/wx/server/Entity.cc
    code/gazebo/branches/wx/server/Param.cc
    code/gazebo/branches/wx/server/Param.hh
    code/gazebo/branches/wx/server/Simulator.cc
    code/gazebo/branches/wx/server/World.cc
    code/gazebo/branches/wx/server/World.hh
    code/gazebo/branches/wx/server/main.cc
    code/gazebo/branches/wx/server/rendering/UserCamera.cc

Modified: code/gazebo/branches/wx/cmake/SearchForStuff.cmake
===================================================================
--- code/gazebo/branches/wx/cmake/SearchForStuff.cmake  2010-07-26 19:48:31 UTC 
(rev 8833)
+++ code/gazebo/branches/wx/cmake/SearchForStuff.cmake  2010-07-26 19:48:56 UTC 
(rev 8834)
@@ -435,20 +435,6 @@
   MESSAGE (STATUS "Looking for event.h - found")
 ENDIF (NOT LIBEVENT_PATH)
 
-find_path(propgrid_include "wx/propgrid/propgrid.h" ${propgrid_include} ENV 
CPATH)
-if (propgrid_include)
-  message (STATUS "Looking for wx/propgrid/propgrid.h - found")
-else ()
-  message (STATUS "Looking for wx/propgrid/propgrid.h - not found")
-endif ()
-
-find_library(propgrid_lib "wxcode_gtk2u_propgrid-2.8" ENV LD_LIBRARY_PATH)
-if (propgrid_lib)
-  message (STATUS "Looking for libwxcode_gtk2u_propgrid-2.8 - found")
-else ()
-  message (STATUS "Looking for libwxcode_gtk2u_propgrid-2.8 - not found")
-endif ()
-
 ########################################
 # Find profiler library, optional
 FIND_LIBRARY(PROFILER "profiler")

Modified: code/gazebo/branches/wx/server/Entity.cc
===================================================================
--- code/gazebo/branches/wx/server/Entity.cc    2010-07-26 19:48:31 UTC (rev 
8833)
+++ code/gazebo/branches/wx/server/Entity.cc    2010-07-26 19:48:56 UTC (rev 
8834)
@@ -49,6 +49,7 @@
 
   Param::Begin(&this->parameters);
   this->staticP = new ParamT<bool>("static",false,0);
+  this->staticP->Callback( &Entity::SetStatic, this );
   Param::End();
  
   this->selected = false;

Modified: code/gazebo/branches/wx/server/Param.cc
===================================================================
--- code/gazebo/branches/wx/server/Param.cc     2010-07-26 19:48:31 UTC (rev 
8833)
+++ code/gazebo/branches/wx/server/Param.cc     2010-07-26 19:48:56 UTC (rev 
8834)
@@ -26,6 +26,10 @@
 
 #include "GazeboError.hh"
 #include "Param.hh"
+#include "Quatern.hh"
+#include "Pose3d.hh"
+#include "Vector3.hh"
+#include "Vector4.hh"
 
 using namespace gazebo;
 
@@ -78,3 +82,55 @@
 {
   return this->typeName;
 }
+
+bool Param::IsBool() const
+{
+  return this->GetTypename() == typeid(bool).name();
+}
+
+bool Param::IsInt() const
+{
+  return this->GetTypename() == typeid(int).name();
+}
+
+bool Param::IsUInt() const
+{
+  return this->GetTypename() == typeid(unsigned int).name();
+}
+
+bool Param::IsFloat() const
+{
+  return this->GetTypename() == typeid(float).name();
+}
+
+bool Param::IsDouble() const
+{
+  return this->GetTypename() == typeid(double).name();
+}
+
+bool Param::IsChar() const
+{
+  return this->GetTypename() == typeid(char).name();
+}
+
+bool Param::IsStr() const
+{
+  return this->GetTypename() == typeid(std::string).name();
+}
+
+bool Param::IsVector3() const
+{
+  return this->GetTypename() == typeid(Vector3).name();
+}
+bool Param::IsVector4() const
+{
+  return this->GetTypename() == typeid(Vector4).name();
+}
+bool Param::IsQuatern() const
+{
+  return this->GetTypename() == typeid(Quatern).name();
+}
+bool Param::IsPose3d() const
+{
+  return this->GetTypename() == typeid(Pose3d).name();
+}

Modified: code/gazebo/branches/wx/server/Param.hh
===================================================================
--- code/gazebo/branches/wx/server/Param.hh     2010-07-26 19:48:31 UTC (rev 
8833)
+++ code/gazebo/branches/wx/server/Param.hh     2010-07-26 19:48:56 UTC (rev 
8834)
@@ -33,6 +33,7 @@
 #include <boost/any.hpp>
 #include <boost/bind.hpp>
 #include <boost/signal.hpp>
+#include <boost/algorithm/string.hpp>
 #include <typeinfo>
 #include <string>
 
@@ -40,6 +41,8 @@
 
 namespace gazebo
 {
+
+
   class Param
   {
     /// \brief Constructor
@@ -72,6 +75,18 @@
     /// \brief Get the help string
     public: std::string GetHelp() const {return this->help;}
 
+    public: bool IsBool() const;
+    public: bool IsInt() const;
+    public: bool IsUInt() const;
+    public: bool IsFloat() const;
+    public: bool IsDouble() const;
+    public: bool IsChar() const;
+    public: bool IsStr() const;
+    public: bool IsVector3() const;
+    public: bool IsVector4() const;
+    public: bool IsQuatern() const;
+    public: bool IsPose3d() const;
+
     /// List of created parameters
     private: static std::vector<Param*> *params;
 
@@ -182,11 +197,13 @@
   void ParamT<T>::SetFromString(const std::string &str, bool callback)
   {
     std::string tmp = str;
+    std::string lower_tmp = str;
+    boost::to_lower(lower_tmp);
 
     // "true" and "false" doesn't work properly
-    if (tmp == "true")
+    if (lower_tmp == "true")
       tmp = "1";
-    else if (str == "false")
+    else if (lower_tmp == "false")
       tmp = "0";
 
     try

Modified: code/gazebo/branches/wx/server/Simulator.cc
===================================================================
--- code/gazebo/branches/wx/server/Simulator.cc 2010-07-26 19:48:31 UTC (rev 
8833)
+++ code/gazebo/branches/wx/server/Simulator.cc 2010-07-26 19:48:56 UTC (rev 
8834)
@@ -121,7 +121,6 @@
   this->startTime = this->GetWallTime();
   this->gazeboConfig=new gazebo::GazeboConfig();
   this->pause = false;
-
 }
 
 
////////////////////////////////////////////////////////////////////////////////

Modified: code/gazebo/branches/wx/server/World.cc
===================================================================
--- code/gazebo/branches/wx/server/World.cc     2010-07-26 19:48:31 UTC (rev 
8833)
+++ code/gazebo/branches/wx/server/World.cc     2010-07-26 19:48:56 UTC (rev 
8834)
@@ -438,6 +438,25 @@
 }
 
 
////////////////////////////////////////////////////////////////////////////////
+/// Get the number of parameters
+unsigned int World::GetParamCount() const
+{
+  return this->parameters.size();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Get a param
+Param *World::GetParam(unsigned int index) const
+{
+  if (index < this->parameters.size())
+    return this->parameters[index];
+  else
+    gzerr(2) << "World::GetParam - Invalid param index\n";
+
+  return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
 // Retun the libgazebo server
 libgazebo::Server *World::GetGzServer() const
 {

Modified: code/gazebo/branches/wx/server/World.hh
===================================================================
--- code/gazebo/branches/wx/server/World.hh     2010-07-26 19:48:31 UTC (rev 
8833)
+++ code/gazebo/branches/wx/server/World.hh     2010-07-26 19:48:56 UTC (rev 
8834)
@@ -110,6 +110,12 @@
   /// Finilize the world
   public: void Fini();
 
+  /// \brief Get the number of parameters
+  public: unsigned int GetParamCount() const;
+
+  /// \brief Get a param
+  public: Param *GetParam(unsigned int index) const;
+
   /// Retun the libgazebo server
   /// \return Pointer the the libgazebo server
   public: libgazebo::Server *GetGzServer() const;

Modified: code/gazebo/branches/wx/server/main.cc
===================================================================
--- code/gazebo/branches/wx/server/main.cc      2010-07-26 19:48:31 UTC (rev 
8833)
+++ code/gazebo/branches/wx/server/main.cc      2010-07-26 19:48:56 UTC (rev 
8834)
@@ -111,6 +111,7 @@
 #include "GazeboError.hh"
 #include "Global.hh"
 
+
 // Command line options
 std::string worldFileName = "";
 const char *optLogFileName = NULL;
@@ -250,13 +251,6 @@
 // Main function
 int main(int argc, char **argv)
 {
-  /*global_argc = argc;
-  global_argv = new char*[global_argc];
-
-  for (unsigned int i=0; i < argc; i++)
-    strcpy(global_argv[i], argv[i] );
-    */
-
   // force a cpu affinity for CPU 0, this slow down sim by about 4X
   // cpu_set_t cpuSet;
   // CPU_ZERO(&cpuSet);

Modified: code/gazebo/branches/wx/server/rendering/UserCamera.cc
===================================================================
--- code/gazebo/branches/wx/server/rendering/UserCamera.cc      2010-07-26 
19:48:31 UTC (rev 8833)
+++ code/gazebo/branches/wx/server/rendering/UserCamera.cc      2010-07-26 
19:48:56 UTC (rev 8834)
@@ -53,7 +53,6 @@
   int w, h;
   parentWindow->GetSize(&w, &h);
 
-  std::cout << "UserCamera::Constructor. WH[" << w << " " << h << "]\n";
   this->window = OgreCreator::Instance()->CreateWindow(parentWindow, w, h);
 
   stream << "UserCamera_" << this->count++;


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

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to