Revision: 6482
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6482&view=rev
Author:   natepak
Date:     2008-06-06 13:04:53 -0700 (Fri, 06 Jun 2008)

Log Message:
-----------
Fixed the update rates, remove RenderEngine, added Gripper to the player 
interfaces

Modified Paths:
--------------
    code/gazebo/trunk/libgazebo/gazebo.h
    code/gazebo/trunk/player/GazeboDriver.cc
    code/gazebo/trunk/player/GripperInterface.cc
    code/gazebo/trunk/player/GripperInterface.hh
    code/gazebo/trunk/player/Position2dInterface.hh
    code/gazebo/trunk/player/SConscript
    code/gazebo/trunk/server/Simulator.cc
    code/gazebo/trunk/server/Simulator.hh
    code/gazebo/trunk/server/controllers/actarray/bandit/Bandit_Actarray.cc
    code/gazebo/trunk/server/controllers/camera/stereo/Stereo_Camera.cc
    
code/gazebo/trunk/server/controllers/position2d/differential/Differential_Position2d.cc
    code/gazebo/trunk/server/gui/StatusBar.cc
    code/gazebo/trunk/server/physics/HeightmapGeom.cc
    code/gazebo/trunk/server/physics/TrimeshGeom.cc
    code/gazebo/trunk/server/physics/ode/ODEPhysics.cc
    code/gazebo/trunk/server/rendering/OgreAdaptor.cc
    code/gazebo/trunk/server/rendering/OgreAdaptor.hh
    code/gazebo/trunk/server/rendering/OgreVisual.cc
    code/gazebo/trunk/server/rendering/SConscript
    code/gazebo/trunk/server/sensors/camera/StereoCameraSensor.cc
    code/gazebo/trunk/worlds/models/sonyvid30.model
    code/gazebo/trunk/worlds/pioneer2dx.world
    code/gazebo/trunk/worlds/pioneer2dx_camera.world

Removed Paths:
-------------
    code/gazebo/trunk/server/rendering/RenderEngine.cc
    code/gazebo/trunk/server/rendering/RenderEngine.hh

Modified: code/gazebo/trunk/libgazebo/gazebo.h
===================================================================
--- code/gazebo/trunk/libgazebo/gazebo.h        2008-06-06 19:16:27 UTC (rev 
6481)
+++ code/gazebo/trunk/libgazebo/gazebo.h        2008-06-06 20:04:53 UTC (rev 
6482)
@@ -1348,6 +1348,9 @@
   /// Near clip distance in meters
   public: float nearClip;
 
+  /// Horizontal field of view of the camera in radians
+  public: double hfov;
+
   /// Left image size
   public: unsigned int left_rgb_size;
 
@@ -1371,6 +1374,7 @@
 
   /// Right disparity (float)
   public: float right_disparity[GAZEBO_STEREO_CAMERA_MAX_DISPARITY_SIZE];
+
 }; 
 
 

Modified: code/gazebo/trunk/player/GazeboDriver.cc
===================================================================
--- code/gazebo/trunk/player/GazeboDriver.cc    2008-06-06 19:16:27 UTC (rev 
6481)
+++ code/gazebo/trunk/player/GazeboDriver.cc    2008-06-06 20:04:53 UTC (rev 
6482)
@@ -38,6 +38,7 @@
 #include "Position3dInterface.hh"
 #include "ActarrayInterface.hh"
 #include "PTZInterface.hh"
+#include "GripperInterface.hh"
 
 /*
 #include "PowerInterface.hh"
@@ -299,6 +300,11 @@
         ifsrc = new PTZInterface( playerAddr,  this, cf, section );
         break;
 
+      case PLAYER_GRIPPER_CODE:
+        if (!player_quiet_startup) printf(" a gripper interface.\n");
+        ifsrc = new GripperInterface( playerAddr,  this, cf, section );
+        break;
+
         /*      case PLAYER_POWER_CODE:
                 if (!player_quiet_startup) printf(" a power interface.\n");
                 ifsrc = new PowerInterface( playerAddr,  this, cf, section );
@@ -308,12 +314,6 @@
                 if (!player_quiet_startup) printf(" a sonar interface.\n");
                 ifsrc = new SonarInterface( playerAddr,  this, cf, section );
                 break;
-
-              case PLAYER_GRIPPER_CODE:
-                if (!player_quiet_startup) printf(" a gripper interface.\n");
-                ifsrc = new GripperInterface( playerAddr,  this, cf, section );
-                break;
-
               case PLAYER_TRUTH_CODE:
                 if (!player_quiet_startup) printf(" a truth interface.\n");
                 ifsrc = new TruthInterface( playerAddr,  this, cf, section );

Modified: code/gazebo/trunk/player/GripperInterface.cc
===================================================================
--- code/gazebo/trunk/player/GripperInterface.cc        2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/player/GripperInterface.cc        2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -34,12 +34,15 @@
 - PLAYER_GRIPPER_REQ_GET_GEOM
 */
 
+#include <iostream>
 #include <math.h>
 
 #include "gazebo.h"
 #include "GazeboDriver.hh"
 #include "GripperInterface.hh"
 
+using namespace gazebo;
+
 ///////////////////////////////////////////////////////////////////////////////
 // Constructor
 GripperInterface::GripperInterface(player_devaddr_t addr,
@@ -53,7 +56,7 @@
   strcat(this->gz_id, cf->ReadString(section, "gz_id", ""));
 
   // Allocate a Position Interface
-  this->iface = gz_gripper_alloc();
+  this->iface = new GripperIface();
 
   this->datatime = -1;
 }
@@ -63,7 +66,7 @@
 GripperInterface::~GripperInterface()
 {
   // Release this interface
-  gz_gripper_free(this->iface);
+  delete this->iface;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -72,87 +75,80 @@
                                      player_msghdr_t *hdr, void *data)
 {
 
-//   This code works with Player CVS
-#ifdef PLAYER_GRIPPER_CMD_OPEN
-  if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
-                            PLAYER_GRIPPER_CMD_OPEN, this->device_addr))
+  if (this->iface->Lock(1))
   {
-    gz_gripper_lock(this->iface, 1);
-    this->iface->data->cmd = GAZEBO_GRIPPER_CMD_OPEN;
-    gz_gripper_unlock(this->iface);
 
-    return 0;
-  }
-  else if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
-                                 PLAYER_GRIPPER_CMD_CLOSE, this->device_addr))
-  {
-    gz_gripper_lock(this->iface, 1);
-    this->iface->data->cmd = GAZEBO_GRIPPER_CMD_CLOSE;
-    gz_gripper_unlock(this->iface);
+    //   This code works with Player CVS
+#ifdef PLAYER_GRIPPER_CMD_OPEN
+    if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
+          PLAYER_GRIPPER_CMD_OPEN, this->device_addr))
+    {
+      this->iface->data->cmd = GAZEBO_GRIPPER_CMD_OPEN;
+      return 0;
+    }
+    else if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
+          PLAYER_GRIPPER_CMD_CLOSE, this->device_addr))
+    {
+      this->iface->data->cmd = GAZEBO_GRIPPER_CMD_CLOSE;
+      return 0;
+    }
+    else if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
+          PLAYER_GRIPPER_CMD_STOP, this->device_addr))
+    {
+      this->iface->data->cmd = GAZEBO_GRIPPER_CMD_STOP;
+      return 0;
+    }
+    else if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
+          PLAYER_GRIPPER_CMD_STORE, this->device_addr))
+    {
+      this->iface->data->cmd = GAZEBO_GRIPPER_CMD_STORE;
+      return 0;
+    }
+    else if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
+          PLAYER_GRIPPER_CMD_RETRIEVE, this->device_addr))
+    {
+      this->iface->data->cmd = GAZEBO_GRIPPER_CMD_RETRIEVE;
+      return 0;
+    }
+    // is it a geometry request?
+    else if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ,
+          PLAYER_GRIPPER_REQ_GET_GEOM,
+          this->device_addr))
+    {
+      // TODO: implement me
 
-    return 0;
-  }
-  else if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
-                                 PLAYER_GRIPPER_CMD_STOP, this->device_addr))
-  {
-    gz_gripper_lock(this->iface, 1);
-    this->iface->data->cmd = GAZEBO_GRIPPER_CMD_STOP;
-    gz_gripper_unlock(this->iface);
+      player_gripper_geom_t pgeom;
 
-    return 0;
-  }
-  else if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
-                                 PLAYER_GRIPPER_CMD_STORE, this->device_addr))
-  {
-    gz_gripper_lock(this->iface, 1);
-    this->iface->data->cmd = GAZEBO_GRIPPER_CMD_STORE;
-    gz_gripper_unlock(this->iface);
+      pgeom.pose.px = 0;
+      pgeom.pose.py = 0;
+      pgeom.pose.pz = 0;
+      pgeom.pose.proll = 0;
+      pgeom.pose.ppitch = 0;
+      pgeom.pose.pyaw = 0;
 
-    return 0;
-  }
-  else if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
-                                 PLAYER_GRIPPER_CMD_RETRIEVE, 
this->device_addr))
-  {
-    gz_gripper_lock(this->iface, 1);
-    this->iface->data->cmd = GAZEBO_GRIPPER_CMD_RETRIEVE;
-    gz_gripper_unlock(this->iface);
+      pgeom.outer_size.sw = 0;
+      pgeom.outer_size.sl = 0;
+      pgeom.outer_size.sh = 0;
 
-    return 0;
-  }
-  // is it a geometry request?
-  else if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ,
-                                 PLAYER_GRIPPER_REQ_GET_GEOM,
-                                 this->device_addr))
-  {
-    // TODO: implement me
+      pgeom.inner_size.sw = 0;
+      pgeom.inner_size.sl = 0;
+      pgeom.inner_size.sh = 0;
 
-    player_gripper_geom_t pgeom;
+      pgeom.num_beams = 2;
 
-    pgeom.pose.px = 0;
-    pgeom.pose.py = 0;
-    pgeom.pose.pz = 0;
-    pgeom.pose.proll = 0;
-    pgeom.pose.ppitch = 0;
-    pgeom.pose.pyaw = 0;
+      this->driver->Publish(this->device_addr, respQueue,
+          PLAYER_MSGTYPE_RESP_ACK,
+          PLAYER_GRIPPER_REQ_GET_GEOM,
+          (void*)&pgeom, sizeof(pgeom), NULL);
 
-    pgeom.outer_size.sw = 0;
-    pgeom.outer_size.sl = 0;
-    pgeom.outer_size.sh = 0;
+      return 0;
+    }
+#endif
 
-    pgeom.inner_size.sw = 0;
-    pgeom.inner_size.sl = 0;
-    pgeom.inner_size.sh = 0;
-
-    pgeom.num_beams = 2;
-
-    this->driver->Publish(this->device_addr, respQueue,
-                          PLAYER_MSGTYPE_RESP_ACK,
-                          PLAYER_GRIPPER_REQ_GET_GEOM,
-                          (void*)&pgeom, sizeof(pgeom), NULL);
-
-    return 0;
+    this->iface->Unlock();
   }
-#endif
+  else
+    this->Unsubscribe();
 
   return -1;
 }
@@ -165,15 +161,15 @@
   player_gripper_data_t data;
   struct timeval ts;
 
-  gz_gripper_lock(this->iface, 1);
+  this->iface->Lock(1);
 
   // Only Update when new data is present
-  if (this->iface->data->time > this->datatime)
+  if (this->iface->data->head.time > this->datatime)
   {
-    this->datatime = this->iface->data->time;
+    this->datatime = this->iface->data->head.time;
 
-    ts.tv_sec = (int) (this->iface->data->time);
-    ts.tv_usec = (int) (fmod(this->iface->data->time, 1) * 1e6);
+    ts.tv_sec = (int) (this->iface->data->head.time);
+    ts.tv_usec = (int) (fmod(this->iface->data->head.time, 1) * 1e6);
 
     memset(&data, 0, sizeof(data));
 
@@ -200,13 +196,13 @@
       data.state = PLAYER_GRIPPER_STATE_ERROR;
 #endif
 
-    this->driver->Publish( this->device_addr, NULL,
+    this->driver->Publish( this->device_addr,
                            PLAYER_MSGTYPE_DATA,
                            PLAYER_GRIPPER_DATA_STATE,
                            (void*)&data, sizeof(data), &this->datatime );
   }
 
-  gz_gripper_unlock(this->iface);
+  this->iface->Unlock();
 }
 
 
@@ -215,16 +211,21 @@
 // GazeboDriver::Subscribe
 void GripperInterface::Subscribe()
 {
-  // Open the interface
-  if (gz_gripper_open(this->iface, GazeboClient::client, this->gz_id) != 0)
+  try
   {
-    printf("Error Subscribing to Gazebo Position Interface\n");
+    this->iface->Open( GazeboClient::client, this->gz_id);
   }
+  catch (std::string e)
+  {
+    std::cerr << "Error subscribing to Gazebo Gripper Interface\n"
+      << e << "\n";
+    exit(0);
+  }
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 // Close a SHM interface. This is called from GazeboDriver::Unsubscribe
 void GripperInterface::Unsubscribe()
 {
-  gz_gripper_close(this->iface);
+  this->iface->Close();
 }

Modified: code/gazebo/trunk/player/GripperInterface.hh
===================================================================
--- code/gazebo/trunk/player/GripperInterface.hh        2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/player/GripperInterface.hh        2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -29,41 +29,54 @@
 
 #include "GazeboInterface.hh"
 
-// Forward declarations
-typedef struct gz_gripper gz_gripper_t;
-
-/// \brief Gripper interface
-class GripperInterface : public GazeboInterface
+namespace gazebo
 {
-  /// @brief Constructor
-  public: GripperInterface(player_devaddr_t addr, GazeboDriver *driver,
-                              ConfigFile *cf, int section);
+  /// \addtogroup player_iface 
+  /// \{
+  /// \defgroup gripper_player Gripper Interface
+  /// \brief Gripper Player interface
+  /// \{
+  
+  class GripperIface;
+  
+  /// \brief Gripper interface
+  class GripperInterface : public GazeboInterface
+  {
+    /// \brief Constructor
+    public: GripperInterface(player_devaddr_t addr, GazeboDriver *driver,
+                                ConfigFile *cf, int section);
+  
+    /// \brief Destructor
+    public: virtual ~GripperInterface();
+  
+    /// \brief Handle all messages. This is called from GazeboDriver
+    public: virtual int ProcessMessage(QueuePointer &respQueue,
+                                       player_msghdr_t *hdr, void *data);
+  
+    /// \brief Update this interface, publish new info.
+    public: virtual void Update();
+  
+    /// \brief Open a SHM interface when a subscription is received. \
+    ///        This is called fromGazeboDriver::Subscribe
+    public: virtual void Subscribe();
+  
+    /// \brief Close a SHM interface. This is called from \
+    ///        GazeboDriver::Unsubscribe
+    public: virtual void Unsubscribe();
+  
+    private: GripperIface *iface;
+  
+    /// \brief Gazebo id. This needs to match and ID in a Gazebo WorldFile
+    private: char *gz_id;
+  
+    /// \brief Timestamp on last data update
+    private: double datatime;
+  
+  };
+  
+  /// \} 
+  /// \} 
+  
+}
 
-  /// @brief Destructor
-  public: virtual ~GripperInterface();
-
-  /// @brief Handle all messages. This is called from GazeboDriver
-  public: virtual int ProcessMessage(QueuePointer &respQueue,
-                                     player_msghdr_t *hdr, void *data);
-
-  /// @brief Update this interface, publish new info.
-  public: virtual void Update();
-
-  /// @brief Open a SHM interface when a subscription is received. \
-  ///        This is called fromGazeboDriver::Subscribe
-  public: virtual void Subscribe();
-
-  /// @brief Close a SHM interface. This is called from \
-  ///        GazeboDriver::Unsubscribe
-  public: virtual void Unsubscribe();
-
-  private: gz_gripper_t *iface;
-
-  /// @brief Gazebo id. This needs to match and ID in a Gazebo WorldFile
-  private: char *gz_id;
-
-  /// @brief Timestamp on last data update
-  private: double datatime;
-
-};
 #endif

Modified: code/gazebo/trunk/player/Position2dInterface.hh
===================================================================
--- code/gazebo/trunk/player/Position2dInterface.hh     2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/player/Position2dInterface.hh     2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -31,54 +31,54 @@
 
 namespace gazebo
 {
-
-/// \addtogroup player_iface 
-/// \{
-/// \defgroup position2d_player Position2d Interface
-/// \brief Position2d Player interface
-/// \{
-
-// Forward declarations
-class PositionIface;
-
-/// \brief Position2d Player interface
-class Position2dInterface : public GazeboInterface
-{
-  /// \brief Constructor
-  public: Position2dInterface(player_devaddr_t addr, GazeboDriver *driver,
-                              ConfigFile *cf, int section);
-
-  /// \brief Destructor
-  public: virtual ~Position2dInterface();
-
-  /// \brief Handle all messages. This is called from GazeboDriver
-  public: virtual int ProcessMessage(QueuePointer &respQueue,
-                                     player_msghdr_t *hdr, void *data);
-
-  /// \brief Update this interface, publish new info.
-  public: virtual void Update();
-
-  /// \brief Open a SHM interface when a subscription is received.
-  ///        This is called fromGazeboDriver::Subscribe
-  public: virtual void Subscribe();
-
-  /// \brief Close a SHM interface. This is called from
-  ///        GazeboDriver::Unsubscribe
-  public: virtual void Unsubscribe();
-
-  private: PositionIface *iface;
-
-  /// \brief Gazebo id. This needs to match and ID in a Gazebo WorldFile
-  private: char *gz_id;
-
-  /// \brief Timestamp on last data update
-  private: double datatime;
-};
-
-/// \} 
-/// \} 
-
-
+  
+  /// \addtogroup player_iface 
+  /// \{
+  /// \defgroup position2d_player Position2d Interface
+  /// \brief Position2d Player interface
+  /// \{
+  
+  // Forward declarations
+  class PositionIface;
+  
+  /// \brief Position2d Player interface
+  class Position2dInterface : public GazeboInterface
+  {
+    /// \brief Constructor
+    public: Position2dInterface(player_devaddr_t addr, GazeboDriver *driver,
+                                ConfigFile *cf, int section);
+  
+    /// \brief Destructor
+    public: virtual ~Position2dInterface();
+  
+    /// \brief Handle all messages. This is called from GazeboDriver
+    public: virtual int ProcessMessage(QueuePointer &respQueue,
+                                       player_msghdr_t *hdr, void *data);
+  
+    /// \brief Update this interface, publish new info.
+    public: virtual void Update();
+  
+    /// \brief Open a SHM interface when a subscription is received.
+    ///        This is called fromGazeboDriver::Subscribe
+    public: virtual void Subscribe();
+  
+    /// \brief Close a SHM interface. This is called from
+    ///        GazeboDriver::Unsubscribe
+    public: virtual void Unsubscribe();
+  
+    private: PositionIface *iface;
+  
+    /// \brief Gazebo id. This needs to match and ID in a Gazebo WorldFile
+    private: char *gz_id;
+  
+    /// \brief Timestamp on last data update
+    private: double datatime;
+  };
+  
+  /// \} 
+  /// \} 
+  
+  
 }
 
 #endif

Modified: code/gazebo/trunk/player/SConscript
===================================================================
--- code/gazebo/trunk/player/SConscript 2008-06-06 19:16:27 UTC (rev 6481)
+++ code/gazebo/trunk/player/SConscript 2008-06-06 20:04:53 UTC (rev 6482)
@@ -14,12 +14,13 @@
            'CameraInterface.cc',
            'FiducialInterface.cc',
            'PTZInterface.cc',
-           'ActarrayInterface.cc'
+           'ActarrayInterface.cc',
+           'GripperInterface.cc' 
            ]
 
-# Position3dInterface.cc PowerInterface.cc SonarInterface.cc   
GripperInterface.cc GpsInterface.cc ')
+# Position3dInterface.cc PowerInterface.cc SonarInterface.ccGpsInterface.cc ')
 
-playerEnv = env.Copy()
+playerEnv = env.Clone()
 
 for cfg in parseConfigs:
   print "Checking for ["+cfg+"]"

Modified: code/gazebo/trunk/server/Simulator.cc
===================================================================
--- code/gazebo/trunk/server/Simulator.cc       2008-06-06 19:16:27 UTC (rev 
6481)
+++ code/gazebo/trunk/server/Simulator.cc       2008-06-06 20:04:53 UTC (rev 
6482)
@@ -39,12 +39,13 @@
 #include "gazebo.h"
 #include "PhysicsEngine.hh"
 #include "OgreAdaptor.hh"
-#include "RenderEngine.hh"
 #include "GazeboMessage.hh"
 #include "Global.hh"
 
 #include "Simulator.hh"
 
+#define MAX_FRAME_RATE 35
+
 using namespace gazebo;
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -146,7 +147,7 @@
   try
   {
     OgreAdaptor::Instance()->Init(rootNode);
-    this->renderEngine = (RenderEngine *) OgreAdaptor::Instance();
+    this->renderEngine = OgreAdaptor::Instance();
     //this->renderEngine->Init();
   }
   catch (gazebo::GazeboError e)
@@ -204,23 +205,29 @@
 {
   gazebo::World::Instance()->Fini();
 }
-/*
+
 
////////////////////////////////////////////////////////////////////////////////
 /// Main simulation loop, when this loop ends the simulation finish
 void Simulator::MainLoop()
 {
-  double step= World::Instance()->GetPhysicsEngine()->GetStepTime();
+  double step = World::Instance()->GetPhysicsEngine()->GetStepTime();
+  double physicsUpdateRate = 
World::Instance()->GetPhysicsEngine()->GetUpdateRate();
+  double renderUpdateRate = OgreAdaptor::Instance()->GetUpdateRate();
+
   double currTime;
   double elapsedTime;
 
   this->prevPhysicsTime = this->GetRealTime();
   this->prevRenderTime = this->GetRealTime();
+ 
+ printf("Period Physics[%f] Render[%f]\n",  physicsUpdateRate, 
renderUpdateRate);
 
   while (!this->userQuit)
   {
     currTime = this->GetRealTime();
 
-    if ((currTime - this->prevPhysicsTime) >= step) 
+    if (physicsUpdateRate == 0 || 
+        currTime - this->prevPhysicsTime >= 1.0/physicsUpdateRate) 
     {
       this->simTime += step;
 
@@ -238,13 +245,14 @@
         this->pause=true;
       }
 
-      World::Instance()->Update(); //physics
+      World::Instance()->Update();
 
       this->prevPhysicsTime = this->GetRealTime();
     }
 
     // Update the rendering
-    if (currTime - this->prevRenderTime > 0.02)
+    if (renderUpdateRate == 0 || 
+        currTime - this->prevRenderTime >= 1.0/renderUpdateRate)
     {
       this->GetRenderEngine()->Render(); 
       this->prevRenderTime = this->GetRealTime();
@@ -253,110 +261,17 @@
     // Update the gui
     this->gui->Update();
 
-    elapsedTime = (this->GetRealTime()-currTime)*2.0;
+    elapsedTime = (this->GetRealTime() - currTime);
 
     // Wait if we're going too fast
-    if ( elapsedTime < 0.02 )
+    if ( elapsedTime < 1.0/MAX_FRAME_RATE )
     {
-      usleep( (0.02 - elapsedTime) * 1e6  );
+      //printf("Too fast Elapsed Time[%f] [%f]\n",elapsedTime, 
(int)((1.0/MAX_FRAME_RATE - elapsedTime) * 1e6));
+      usleep( (int)((1.0/MAX_FRAME_RATE - elapsedTime) * 1e6)  );
     }
   }
 }
-*/
-////////////////////////////////////////////////////////////////////////////////
-/// Main simulation loop, when this loop ends the simulation finish
-void Simulator::MainLoop()
-{
-  double maxPhysicsUpdateTime = 
World::Instance()->GetPhysicsEngine()->GetUpdateRate();
-  double maxRenderUpdateTime = this->GetRenderEngine()->GetUpdateRate();
-  double step = World::Instance()->GetPhysicsEngine()->GetStepTime();
- 
-  if (maxPhysicsUpdateTime == 0)
-    gzmsg(2) << "updating the physics at full speed";
-  else if (maxPhysicsUpdateTime > 0)
-    gzmsg(2) << "updating the physics " << 1/maxPhysicsUpdateTime << " times 
per second";  
-  else
-   gzmsg(2) << "updating the physics after " << -1/maxPhysicsUpdateTime << " 
visualization updates";  
 
-  if (maxRenderUpdateTime == 0)
-    gzmsg(2) << "updating the visualization at full speed";
-  else if (maxRenderUpdateTime > 0)
-    gzmsg(2) << "updating the visualization " << 1/maxRenderUpdateTime << " 
times per second";  
-  else
-   gzmsg(2) << "updating the visualization after " << -1/maxRenderUpdateTime 
<< " physics updates" << std::endl;  
-  std::cout.flush();
-
-  while (!this->userQuit)
-  {    
-    bool updated=false;
-     
-    //During 3 seconds we want to keep balance between how time pass and 
update limits
-    //this is a time slot. We don't want to make this too big so we keep 
changing behaviour
-    // in new circunstances, nor too small so we have a good measure.
-    if ((this->checkpoint + 3 )< this->GetRealTime())
-    {
-      this->checkpoint = this->GetRealTime();
-      this->physicsUpdates = 0;
-      this->renderUpdates = 0; 
-    }
-
-    // Update the physics engine
-    // If  maxPhysicsUpdateTime is positive, we will update when our time has 
come
-      // maxPhysicsUpdateTime * physicsUpdates means how much we have 
_advanced_ in this time slot so far.
-      // getRealTime - ckeckpoint means our _current point_ in the slot, we 
only update if our current point has 
-      // surpassed what we have already advanced.
-   // If maxPhysicsUpdateTime is negative, we update if we are below the times 
rendering was updated * the multiplier of the userPause
-   // note that the multiplier defined in the file is inverted when read so 
for instance -2 will become -0.5
-    if (((maxPhysicsUpdateTime >= 0) && ((this->GetRealTime() - 
this->checkpoint) > (maxPhysicsUpdateTime * this->physicsUpdates))) || \
-        ((maxPhysicsUpdateTime < 0) && (this->physicsUpdates < 
(-maxPhysicsUpdateTime * this->renderUpdates)))) 
-    {
-
-      if ((!this->GetUserPause() && !this->GetUserStep()) ||
-          (this->GetUserStep() && this->GetUserStepInc()))
-      {
-        this->simTime += step;
-        ++this->iterations;
-        this->pause=false;
-        this->SetUserStepInc(!this->GetUserStepInc());
-      }
-      else
-      {
-        this->pauseTime += step;
-        this->pause=true;
-      }
-
-      World::Instance()->Update(); //physics
-
-      ++this->physicsUpdates;
-      updated=true;
-    }
-      
-    // Update the rendering and gui
-    if (((maxRenderUpdateTime >= 0) && ((this->GetRealTime() - 
this->checkpoint) > (maxRenderUpdateTime * this->renderUpdates))) || \
-        ((maxRenderUpdateTime < 0) && (this->renderUpdates < 
(-maxRenderUpdateTime * this->physicsUpdates))))
-    {
-      this->GetRenderEngine()->Render(); 
-      this->gui->Update();
-      ++this->renderUpdates;
-      updated=true;
-    }
-
-    if (!updated)
-    {
-      double nextUpdate;
-      nextUpdate=MIN(this->renderUpdates * maxRenderUpdateTime, 
this->renderUpdates * maxPhysicsUpdateTime);
-      double realStep = this->checkpoint + nextUpdate - this->GetRealTime();
-      if (realStep > 0)
-      {
-        struct timespec waiting;
-        waiting.tv_sec=0;
-        waiting.tv_nsec=static_cast<long int>(realStep *1000000000); 
//nanoseconds to seconds
-        nanosleep(&waiting,0);
-      }
-    }
-  }
-}
-
 
////////////////////////////////////////////////////////////////////////////////
 /// Gets our current GUI interface
 Gui *Simulator::GetUI() const
@@ -371,7 +286,7 @@
   return this->gazeboConfig;
 }
 
-RenderEngine *Simulator::GetRenderEngine() const
+OgreAdaptor *Simulator::GetRenderEngine() const
 {
   return this->renderEngine;
 }
@@ -391,22 +306,7 @@
   return this->iterations;
 }
 
-/*
-   These methods are needeD?
 
////////////////////////////////////////////////////////////////////////////////
-void Global::SetIterations(unsigned long count)
-{
-iterations = count;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-void Global::IncIterations()
-{
-iterations++;
-}
-*/
-
-////////////////////////////////////////////////////////////////////////////////
 // Get the simulation time
 double Simulator::GetSimTime() const
 {

Modified: code/gazebo/trunk/server/Simulator.hh
===================================================================
--- code/gazebo/trunk/server/Simulator.hh       2008-06-06 19:16:27 UTC (rev 
6481)
+++ code/gazebo/trunk/server/Simulator.hh       2008-06-06 20:04:53 UTC (rev 
6482)
@@ -43,7 +43,7 @@
   class XMLConfig;
   class XMLConfigNode;
   class GazeboConfig;
-  class RenderEngine;
+  class OgreAdaptor;
 
 /// \brief The World
 /*
@@ -83,7 +83,7 @@
     public: GazeboConfig *GetGazeboConfig() const;
 
     /// \brief Gets our current GUI interface
-    public: RenderEngine *GetRenderEngine() const;
+    public: OgreAdaptor *GetRenderEngine() const;
 
     /// \brief Returns the state of the simulation true if paused
     public: bool IsPaused() const;
@@ -150,7 +150,7 @@
     /// Pointer to the selected Gui 
     private: Gui *gui;
 
-    private: RenderEngine *renderEngine;
+    private: OgreAdaptor *renderEngine;
 /// Pointer to the selected Gui 
     private: GazeboConfig *gazeboConfig;
 

Modified: 
code/gazebo/trunk/server/controllers/actarray/bandit/Bandit_Actarray.cc
===================================================================
--- code/gazebo/trunk/server/controllers/actarray/bandit/Bandit_Actarray.cc     
2008-06-06 19:16:27 UTC (rev 6481)
+++ code/gazebo/trunk/server/controllers/actarray/bandit/Bandit_Actarray.cc     
2008-06-06 20:04:53 UTC (rev 6482)
@@ -107,25 +107,36 @@
   for (unsigned int i=0; i<16; i++)
   {
     double cmdAngle = this->myIface->data->cmd_pos[i];
+    double cmdSpeed = this->myIface->data->cmd_speed[i];
+
     joint = dynamic_cast<HingeJoint*>(this->joints[i]);
 
-    if (cmdAngle > joint->GetHighStop())
+    if (this->myIface->data->joint_mode[i] == 
GAZEBO_ACTARRAY_JOINT_POSITION_MODE)
     {
-      cmdAngle = joint->GetHighStop();
-    }
-    else if (cmdAngle < joint->GetLowStop())
-    {
-      cmdAngle = joint->GetLowStop();
-    }
+      if (cmdAngle > joint->GetHighStop())
+      {
+        cmdAngle = joint->GetHighStop();
+      }
+      else if (cmdAngle < joint->GetLowStop())
+      {
+        cmdAngle = joint->GetLowStop();
+      }
 
-    angle = cmdAngle - joint->GetAngle();
+      angle = cmdAngle - joint->GetAngle();
 
-    if (fabs(angle) > 0.01)
+      if (fabs(angle) > 0.01)
+      {
+        joint->SetParam( dParamVel, this->gains[i] * angle);
+        joint->SetParam( dParamFMax, this->forces[i] );
+      }
+    }
+    else if (this->myIface->data->joint_mode[i] == 
GAZEBO_ACTARRAY_JOINT_SPEED_MODE)
     {
-      joint->SetParam( dParamVel, this->gains[i] * angle);
+      joint->SetParam( dParamVel, cmdSpeed );
       joint->SetParam( dParamFMax, this->forces[i] );
     }
 
+
     this->myIface->data->actuators[i].position = joint->GetAngle();
     this->myIface->data->actuators[i].speed = joint->GetAngleRate();
   }

Modified: code/gazebo/trunk/server/controllers/camera/stereo/Stereo_Camera.cc
===================================================================
--- code/gazebo/trunk/server/controllers/camera/stereo/Stereo_Camera.cc 
2008-06-06 19:16:27 UTC (rev 6481)
+++ code/gazebo/trunk/server/controllers/camera/stereo/Stereo_Camera.cc 
2008-06-06 20:04:53 UTC (rev 6482)
@@ -136,6 +136,8 @@
   stereo_data->farClip = this->myParent->GetFarClip();
   stereo_data->nearClip = this->myParent->GetNearClip();
 
+  stereo_data->hfov = this->myParent->GetFOV();
+
   //stereo_data->right_rgb_size = stereo_data->width * stereo_data->height * 3;
   //stereo_data->left_rgb_size = stereo_data->width * stereo_data->height * 3;
 

Modified: 
code/gazebo/trunk/server/controllers/position2d/differential/Differential_Position2d.cc
===================================================================
--- 
code/gazebo/trunk/server/controllers/position2d/differential/Differential_Position2d.cc
     2008-06-06 19:16:27 UTC (rev 6481)
+++ 
code/gazebo/trunk/server/controllers/position2d/differential/Differential_Position2d.cc
     2008-06-06 20:04:53 UTC (rev 6482)
@@ -160,7 +160,7 @@
   this->odomVel[1] = 0.0;
   this->odomVel[2] = da / params.stepTime;
 
-  if (this->enableMotors)
+  //if (this->enableMotors)
   {
     this->joints[LEFT]->SetParam( dParamVel,
                                   this->wheelSpeed[LEFT] / this->wheelDiam * 
2.0 );
@@ -171,14 +171,14 @@
     this->joints[RIGHT]->SetParam( dParamFMax, torque );
 
   }
-  else
+  /*else
   {
     this->joints[LEFT]->SetParam( dParamVel, 0 );
     this->joints[RIGHT]->SetParam( dParamVel, 0 );
 
     this->joints[LEFT]->SetParam( dParamFMax, 0 );
     this->joints[RIGHT]->SetParam( dParamFMax, 0 );
-  }
+  }*/
 
   this->PutPositionData();
 }
@@ -204,8 +204,8 @@
 
     this->enableMotors = this->myIface->data->cmdEnableMotors > 0;
 
-    this->wheelSpeed[LEFT] = vr + va * this->wheelSep / 2;
-    this->wheelSpeed[RIGHT] = vr - va * this->wheelSep / 2;
+    this->wheelSpeed[LEFT] = vr - va * this->wheelSep / 2;
+    this->wheelSpeed[RIGHT] = vr + va * this->wheelSep / 2;
 
     this->myIface->Unlock();
   }

Modified: code/gazebo/trunk/server/gui/StatusBar.cc
===================================================================
--- code/gazebo/trunk/server/gui/StatusBar.cc   2008-06-06 19:16:27 UTC (rev 
6481)
+++ code/gazebo/trunk/server/gui/StatusBar.cc   2008-06-06 20:04:53 UTC (rev 
6482)
@@ -29,7 +29,7 @@
 #include <FL/Fl_Output.H>
 
 #include "Simulator.hh"
-#include "RenderEngine.hh"
+#include "OgreAdaptor.hh"
 #include "StatusBar.hh"
 
 using namespace gazebo;

Modified: code/gazebo/trunk/server/physics/HeightmapGeom.cc
===================================================================
--- code/gazebo/trunk/server/physics/HeightmapGeom.cc   2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/server/physics/HeightmapGeom.cc   2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -33,7 +33,7 @@
 #include "GazeboError.hh"
 #include "OgreAdaptor.hh"
 #include "Simulator.hh"
-#include "RenderEngine.hh"
+#include "OgreAdaptor.hh"
 #include "Global.hh"
 #include "Body.hh"
 #include "HeightmapGeom.hh"
@@ -52,7 +52,7 @@
 // Destructor
 HeightmapGeom::~HeightmapGeom()
 {
-  OgreAdaptor *ogreAdaptor = (OgreAdaptor *) 
Simulator::Instance()->GetRenderEngine();
+  OgreAdaptor *ogreAdaptor = Simulator::Instance()->GetRenderEngine();
   ogreAdaptor->sceneMgr->destroyQuery(this->rayQuery);
 }
 
@@ -133,12 +133,7 @@
   int tileSize;
   OgreAdaptor *ogreAdaptor;
 
-  if (Simulator::Instance()->GetRenderEngine()->GetType() != "ogre")
-  {
-    gzthrow("Heighmaps are only supported by the Ogre renderer");
-  }
-  else
-    ogreAdaptor = (OgreAdaptor  *)(Simulator::Instance()->GetRenderEngine());
+  ogreAdaptor = Simulator::Instance()->GetRenderEngine();
 
   std::string imageFilename = node->GetString("image","",1);
   std::string worldTexture = node->GetString("worldTexture","",0);

Modified: code/gazebo/trunk/server/physics/TrimeshGeom.cc
===================================================================
--- code/gazebo/trunk/server/physics/TrimeshGeom.cc     2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/server/physics/TrimeshGeom.cc     2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -32,7 +32,7 @@
 #include "TrimeshGeom.hh"
 #include "GazeboError.hh"
 #include "Simulator.hh"
-#include "RenderEngine.hh"
+#include "OgreAdaptor.hh"
 
 using namespace gazebo;
 
@@ -109,11 +109,6 @@
   int vindex = 0;
   int iindex = 0;
 
-  if (Simulator::Instance()->GetRenderEngine()->GetType() != "ogre")
-  {
-    gzthrow("Heighmaps are only supported by the Ogre renderer");
-  }
-
   this->meshName = node->GetString("mesh","",1);
 
   mesh = 
Ogre::MeshManager::getSingleton().load(this->meshName,Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);

Modified: code/gazebo/trunk/server/physics/ode/ODEPhysics.cc
===================================================================
--- code/gazebo/trunk/server/physics/ode/ODEPhysics.cc  2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/server/physics/ode/ODEPhysics.cc  2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -99,11 +99,7 @@
 
   this->gravity = cnode->GetVector3("gravity",this->gravity);
   this->stepTime = cnode->GetDouble("stepTime",this->stepTime);
-  int maxUpdatesSecond = cnode->GetInt("updateRate",0);
-  if (maxUpdatesSecond == 0)
-    this->updateRate = 0.0;
-  else 
-    this->updateRate = 1.0/maxUpdatesSecond;
+  this->updateRate = cnode->GetDouble("maxUpdateRate", 0, 0);
   this->globalCFM = cnode->GetDouble("cfm",1e-5,0);
   this->globalERP = cnode->GetDouble("erp",0.2,0);
 }

Modified: code/gazebo/trunk/server/rendering/OgreAdaptor.cc
===================================================================
--- code/gazebo/trunk/server/rendering/OgreAdaptor.cc   2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/server/rendering/OgreAdaptor.cc   2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -68,8 +68,8 @@
   this->camera=NULL;
   this->viewport=NULL;
   this->root=NULL;
-  this->type = "ogre";
 
+  this->updateRate = 0;
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -124,13 +124,9 @@
   {
     gzthrow( "missing OGRE Rendering information" );
   }
- 
-  int maxFPS = node->GetInt("updateRate", -3);
-  if (maxFPS == 0)
-    this->updateRate=0;
-  else
-    this->updateRate = 1.0/maxFPS;
 
+  this->updateRate = node->GetDouble("maxUpdateRate",0,0);
+
   ambient.r = node->GetTupleDouble("ambient",0,1.0);
   ambient.g = node->GetTupleDouble("ambient",1,1.0);
   ambient.b = node->GetTupleDouble("ambient",2,1.0);
@@ -500,6 +496,7 @@
   this->root->renderOneFrame();
 }
 
+////////////////////////////////////////////////////////////////////////////////
 float OgreAdaptor::GetAverageFPS() const
 {
   float lastFPS, avgFPS, bestFPS, worstFPS;
@@ -509,3 +506,9 @@
 
 }
 
+////////////////////////////////////////////////////////////////////////////////
+/// Get the desired update rate
+double OgreAdaptor::GetUpdateRate()
+{
+  return this->updateRate;
+}

Modified: code/gazebo/trunk/server/rendering/OgreAdaptor.hh
===================================================================
--- code/gazebo/trunk/server/rendering/OgreAdaptor.hh   2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/server/rendering/OgreAdaptor.hh   2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -31,7 +31,6 @@
 #include <X11/Xutil.h>
 
 #include "SingletonT.hh"
-#include "RenderEngine.hh"
 
 namespace Ogre
 {
@@ -64,7 +63,7 @@
 class Entity;
 
 /// \brief Adptor to Ogre3d
-class OgreAdaptor : RenderEngine, public SingletonT<OgreAdaptor>
+class OgreAdaptor : public SingletonT<OgreAdaptor>
 {
 
   /// \brief Constructor
@@ -91,8 +90,12 @@
   /// \brief Resize the rendering window
   public: void ResizeWindow(unsigned int w, unsigned int h);
 
+  /// \brief Get the average frame rate
   public: float GetAverageFPS() const;
 
+  /// \brief Get the desired update rate
+  public: double GetUpdateRate();
+
   private: void LoadPlugins();
   private: void SetupResources();
   private: void SetupRenderSystem(bool create);
@@ -137,7 +140,9 @@
   //private: Vector3 terrainSize;
   //private: unsigned int terrainVertSize;
   //private: std::string terrainImage;
-  
+
+  private: double updateRate;
+
   private: friend class DestroyerT<OgreAdaptor>;
   private: friend class SingletonT<OgreAdaptor>;
 

Modified: code/gazebo/trunk/server/rendering/OgreVisual.cc
===================================================================
--- code/gazebo/trunk/server/rendering/OgreVisual.cc    2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/server/rendering/OgreVisual.cc    2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -140,7 +140,7 @@
 
 
   // Set the material of the mesh
-  this->SetMaterial(node->GetString("material",std::string(),1));
+  this->SetMaterial(node->GetString("material",std::string(),0));
 
   // Allow the mesh to cast shadows
   this->SetCastShadows(node->GetBool("castShadows",true,0));

Deleted: code/gazebo/trunk/server/rendering/RenderEngine.cc
===================================================================
--- code/gazebo/trunk/server/rendering/RenderEngine.cc  2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/server/rendering/RenderEngine.cc  2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -1,51 +0,0 @@
-/*
- *  Gazebo - Outdoor Multi-Robot Simulator
- *  Copyright (C) 2003
- *     Nate Koenig & Andrew Howard
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- */
-/* Desc: Middleman between Rendering engine and Gazebo
- * Author: Nate Koenig, Jordi Polo
- * Date: 02 Jun 2008
- */
-
-#include "RenderEngine.hh"
-
-using namespace gazebo;
-
-////////////////////////////////////////////////////////////////////////////////
-/// Constructor
-RenderEngine::RenderEngine()
-{
-}
-
-////////////////////////////////////////////////////////////////////////////////
-/// Destructor
-RenderEngine::~RenderEngine()
-{
-}
-
-double RenderEngine::GetUpdateRate() const
-{
-  return this->updateRate;
-}
-
-std::string RenderEngine::GetType() const
-{
-  return this->type;
-}
-

Deleted: code/gazebo/trunk/server/rendering/RenderEngine.hh
===================================================================
--- code/gazebo/trunk/server/rendering/RenderEngine.hh  2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/server/rendering/RenderEngine.hh  2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -1,81 +0,0 @@
-/*
- *  Gazebo - Outdoor Multi-Robot Simulator
- *  Copyright (C) 2003  
- *     Nate Koenig & Andrew Howard
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- */
-/* Desc: Middleman between actual rendering engine and Gazebo
- * Author: Nate Koenig, Jordi Polo
- * Date: 02 Jun 2008
- */
-
-#ifndef RENDERENGINE 
-#define RENDERENGINE
-
-#include <string>
-
-namespace gazebo
-{
-/// \addtogroup gazebo_rendering
-/// \{
-
-
-class XMLConfigNode;
-
-/// \brief Rendering engine for the simulation
-class RenderEngine 
-{
-
-  /// \brief Constructor
-  public: RenderEngine();
-
-  /// \brief Destructor
-  public: virtual ~RenderEngine();
-
-  /// \brief Closes the present rendering engine, frees the resources 
-  public: virtual void Close() = 0;
-
-  /// \brief Default initialization. 
-  ///  Let the rendering engine  create the window and rendering context
-  public: virtual void Init(XMLConfigNode *rootNode) = 0;
-
-  /// \brief Save rendering engine settings 
-  public: virtual void Save(XMLConfigNode *node) = 0;
-
-  /// \brief Render a single frame
-  public: virtual void Render() = 0;
- 
-  /// \brief Resize the rendering window
-  public: virtual void ResizeWindow(unsigned int w, unsigned int h) = 0;
-
-  /// \brief Gets the average frame per second rate achieved
-  public: virtual float GetAverageFPS() const = 0;
-
-  /// \brief Gets the minimum time between renders, set by in the file to 
limit Framerate
-  public: double GetUpdateRate() const;
-
-  /// \brief Gets the type (name) of this Rendering Engine
-  public: std::string GetType() const;
-
-  protected: double updateRate;
-  protected: std::string type;
-  
-
-};
-
-}
-#endif

Modified: code/gazebo/trunk/server/rendering/SConscript
===================================================================
--- code/gazebo/trunk/server/rendering/SConscript       2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/server/rendering/SConscript       2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -1,11 +1,19 @@
 #Import variable
 Import('env staticObjs sharedObjs headers')
 
-sources = Split('RenderEngine.cc OgreCreator.cc OgreAdaptor.cc 
OgreFrameListener.cc OgreDynamicRenderable.cc OgreDynamicLines.cc 
OgreSimpleShape.cc OgreHUD.cc MovableText.cc OgreVisual.cc')
+sources = ['OgreCreator.cc',
+           'OgreAdaptor.cc',
+           'OgreFrameListener.cc',
+           'OgreDynamicRenderable.cc',
+           'OgreDynamicLines.cc',
+           'OgreSimpleShape.cc',
+           'OgreHUD.cc',
+           'MovableText.cc',
+           'OgreVisual.cc'
+         ] 
 
 headers.append( 
           ['#/server/rendering/MovableText.hh',
-           '#/server/rendering/RenderEngine.hh',
            '#/server/rendering/OgreAdaptor.hh',
            '#/server/rendering/OgreCreator.hh',
            '#/server/rendering/OgreDynamicLines.hh',

Modified: code/gazebo/trunk/server/sensors/camera/StereoCameraSensor.cc
===================================================================
--- code/gazebo/trunk/server/sensors/camera/StereoCameraSensor.cc       
2008-06-06 19:16:27 UTC (rev 6481)
+++ code/gazebo/trunk/server/sensors/camera/StereoCameraSensor.cc       
2008-06-06 20:04:53 UTC (rev 6482)
@@ -186,9 +186,17 @@
   Ogre::Viewport *vp = NULL;
   Ogre::SceneManager *sceneMgr = adapt->sceneMgr;
   Ogre::Pass *pass;
-  Ogre::SceneNode *gridNode = sceneMgr->getSceneNode("__OGRE_GRID_NODE__");
+  Ogre::SceneNode *gridNode = NULL;
   int i;
 
+  try
+  {
+    gridNode = sceneMgr->getSceneNode("__OGRE_GRID_NODE__");
+  }
+  catch (...)
+  {
+  }
+
   CameraSensor::UpdateChild(params);
 
   sceneMgr->_suppressRenderStateChanges(true);

Modified: code/gazebo/trunk/worlds/models/sonyvid30.model
===================================================================
--- code/gazebo/trunk/worlds/models/sonyvid30.model     2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/worlds/models/sonyvid30.model     2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -19,14 +19,15 @@
     <rpy>0.0 0.0 0.0</rpy>
 
     <geom:box name="camera_bottom_geom">
-      <xyz>0.0 0.0 0.00</xyz>
+      <xyz>0.0 0.0 0.02</xyz>
       <rpy>0 0 90</rpy>
       <size>0.15 0.14 0.04</size>
       <mass>0.01</mass>
 
       <visual>
+        <rpy>0 0 -90</rpy>
         <size>0.15 0.14 0.04</size>
-        <mesh>unit_box</mesh>
+        <mesh>sonyvid30_bottom.mesh</mesh>
         <material>Gazebo/Grey</material>
       </visual>
     </geom:box>
@@ -37,15 +38,16 @@
     <rpy>0.0 0.0 0.0</rpy>
 
     <geom:box name="camera_column_geom">
-      <xyz>0.0 0.0 0.00</xyz>
+      <xyz>0.02 0.00 0.0</xyz>
       <rpy>0 0 90</rpy>
-      <size>0.04 0.04</size>
+      <size>0.11 0.11</size>
       <mass>0.01</mass>
 
       <visual>
-        <size>0.04 0.04 0.04</size>
-        <mesh>unit_cylinder</mesh>
-        <material>Gazebo/White</material>
+        <rpy>0 0 -90</rpy>
+        <size>0.11 0.11 0.03</size>
+        <mesh>sonyvid30_mid.mesh</mesh>
+        <material>Gazebo/Black</material>
       </visual>
     </geom:box>
   </body:box>
@@ -56,26 +58,28 @@
     <rpy>0.0 0.0 0.0</rpy>
 
     <geom:box name="camera_top_geom">
-      <xyz>0.0 0.0 0.02</xyz>
       <rpy>0 0 90</rpy>
-      <size>0.12 0.12 0.05</size>
+      <size>0.12 0.119 0.03</size>
       <mass>0.01</mass>
 
       <visual>
-        <size>0.12 0.12 0.05</size>
-        <mesh>unit_box</mesh>
+        <xyz>0.0 0.06 -0.015</xyz>
+        <rpy>0 0 90</rpy>
+        <size>0.12 0.119 0.03</size>
+        <mesh>sonyvid30_top.mesh</mesh>
+        <!--<material>Gazebo/Grey</material>-->
         <material>Gazebo/Grey</material>
       </visual>
     </geom:box>
 
     <geom:cylinder name="camera_lens_geom">
-      <xyz>0.042 0.00 0.02</xyz>
+      <xyz>0.045 -0.002 -0.002</xyz>
       <rpy>0 90 0</rpy>
-      <size>0.04 0.04</size>
+      <size>0.01 0.04</size>
       <mass>0.01</mass>
 
       <visual>
-        <size>0.04 0.04 0.04</size>
+        <size>0.025 0.025 0.04</size>
         <mesh>unit_cylinder</mesh>
         <material>Gazebo/White</material>
       </visual>

Modified: code/gazebo/trunk/worlds/pioneer2dx.world
===================================================================
--- code/gazebo/trunk/worlds/pioneer2dx.world   2008-06-06 19:16:27 UTC (rev 
6481)
+++ code/gazebo/trunk/worlds/pioneer2dx.world   2008-06-06 20:04:53 UTC (rev 
6482)
@@ -23,6 +23,7 @@
     <gravity>0 0 -9.8</gravity>
     <cfm>10e-5</cfm>
     <erp>0.8</erp>
+    <maxUpdateRate>0</maxUpdateRate>
   </physics:ode>
 
   <rendering:gui>
@@ -36,6 +37,7 @@
     <sky>
       <material>Gazebo/CloudySky</material>
     </sky>
+    <maxUpdateRate>0</maxUpdateRate>
   </rendering:ogre>
 
    <!-- Ground Plane -->

Modified: code/gazebo/trunk/worlds/pioneer2dx_camera.world
===================================================================
--- code/gazebo/trunk/worlds/pioneer2dx_camera.world    2008-06-06 19:16:27 UTC 
(rev 6481)
+++ code/gazebo/trunk/worlds/pioneer2dx_camera.world    2008-06-06 20:04:53 UTC 
(rev 6482)
@@ -140,14 +140,17 @@
 
   <!-- White Directional light -->
   <model:renderable name="directional_white">
+    <xyz>2.0 0 2.0</xyz>
     <light>
-      <type>directional</type>
-      <direction>0 -0.6 -0.4</direction>
-      <diffuseColor>1.0 1.0 1.0</diffuseColor>
-      <specularColor>0.2 0.2 0.2</specularColor>
-      <attenuation>1000 1.0 0.0 0</attenuation>
+      <type>spot</type>
+      <range>1000 1000 100</range>
+      <direction>-0.1 0 -0.9</direction>
+      <diffuseColor>0.8 0.8 0.8</diffuseColor>
+      <specularColor>0.1 0.1 0.1</specularColor>
+      <attenuation>10 1.0 0.0 0</attenuation>
     </light>
   </model:renderable>
+ 
 
 
 </gazebo:world>


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

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to