Revision: 8414
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8414&view=rev
Author:   natepak
Date:     2009-11-17 02:23:15 +0000 (Tue, 17 Nov 2009)

Log Message:
-----------
Fixed saving of world files, and added light visualization

Modified Paths:
--------------
    code/gazebo/trunk/Media/materials/scripts/Gazebo.material
    code/gazebo/trunk/server/CMakeLists.txt
    code/gazebo/trunk/server/Common.cc
    code/gazebo/trunk/server/Common.hh
    code/gazebo/trunk/server/Entity.hh
    code/gazebo/trunk/server/Model.cc
    code/gazebo/trunk/server/Model.hh
    code/gazebo/trunk/server/Simulator.cc
    code/gazebo/trunk/server/Simulator.hh
    code/gazebo/trunk/server/gui/GLFrame.cc
    code/gazebo/trunk/server/gui/GLFrameManager.cc
    code/gazebo/trunk/server/gui/GLFrameManager.hh
    code/gazebo/trunk/server/gui/Gui.cc
    code/gazebo/trunk/server/physics/Geom.cc
    code/gazebo/trunk/server/physics/MapShape.cc
    code/gazebo/trunk/server/physics/RayShape.cc
    code/gazebo/trunk/server/physics/TrimeshShape.cc
    code/gazebo/trunk/server/rendering/CMakeLists.txt
    code/gazebo/trunk/server/rendering/OgreAdaptor.cc
    code/gazebo/trunk/server/rendering/OgreAdaptor.hh
    code/gazebo/trunk/server/rendering/OgreCreator.cc
    code/gazebo/trunk/server/rendering/OgreCreator.hh
    code/gazebo/trunk/server/rendering/OgreVisual.cc
    code/gazebo/trunk/server/rendering/OgreVisual.hh
    code/gazebo/trunk/server/rendering/UserCamera.cc
    code/gazebo/trunk/worlds/willowgarage.world

Added Paths:
-----------
    code/gazebo/trunk/server/rendering/Light.cc
    code/gazebo/trunk/server/rendering/Light.hh

Modified: code/gazebo/trunk/Media/materials/scripts/Gazebo.material
===================================================================
--- code/gazebo/trunk/Media/materials/scripts/Gazebo.material   2009-11-15 
22:34:05 UTC (rev 8413)
+++ code/gazebo/trunk/Media/materials/scripts/Gazebo.material   2009-11-17 
02:23:15 UTC (rev 8414)
@@ -247,6 +247,23 @@
   }
 }
 
+material Gazebo/PurpleEmissive
+{
+       receive_shadows off
+
+       technique
+       {
+               pass
+               {
+      ambient 1.000000 0.000000 1.000000 1.000000
+                       diffuse 1.000000 0.000000 1.000000 1.000000
+                       specular 0.200000 0.000000 0.200000 1.000000
+                       emissive 1.000000 0.000000 1.000000 1.000000
+      lighting on
+               }
+       }
+}
+
 material Gazebo/BlueLaser
 {
   receive_shadows off

Modified: code/gazebo/trunk/server/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/CMakeLists.txt     2009-11-15 22:34:05 UTC (rev 
8413)
+++ code/gazebo/trunk/server/CMakeLists.txt     2009-11-17 02:23:15 UTC (rev 
8414)
@@ -68,7 +68,6 @@
              Angle.cc
              Param.cc
              GraphicsIfaceHandler.cc
-             GuiAPI.cc
              Simulator.cc
              Rand.cc
              Factory.cc
@@ -100,7 +99,6 @@
              Angle.hh
              Param.hh
              GraphicsIfaceHandler.hh
-             GuiAPI.hh
              Simulator.hh
              Rand.hh
              Factory.hh

Modified: code/gazebo/trunk/server/Common.cc
===================================================================
--- code/gazebo/trunk/server/Common.cc  2009-11-15 22:34:05 UTC (rev 8413)
+++ code/gazebo/trunk/server/Common.cc  2009-11-17 02:23:15 UTC (rev 8414)
@@ -41,6 +41,8 @@
   Param::Begin(&this->parameters);
   this->nameP = new ParamT<std::string>("name","noname",1);
   Param::End();
+
+  this->saveable = true;
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -99,3 +101,19 @@
 {
   return this->id;
 }
+
+////////////////////////////////////////////////////////////////////////////////
+/// Set whether the object should be "saved", when the user
+///        selects to save the world to xml
+void Common::SetSaveable(bool v)
+{
+  this->saveable = v;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Get whether the object should be "saved", when the user
+/// selects to save the world to xml
+bool Common::GetSaveable() const
+{
+  return this->saveable;
+}

Modified: code/gazebo/trunk/server/Common.hh
===================================================================
--- code/gazebo/trunk/server/Common.hh  2009-11-15 22:34:05 UTC (rev 8413)
+++ code/gazebo/trunk/server/Common.hh  2009-11-17 02:23:15 UTC (rev 8414)
@@ -60,6 +60,14 @@
     /// \brief Return the ID of this entity. This id is unique
     /// \return Integer ID
     public: int GetId() const;
+
+    /// \brief Set whether the object should be "saved", when the user
+    ///        selects to save the world to xml
+    public: void SetSaveable(bool v);
+
+    /// \brief Get whether the object should be "saved", when the user
+    ///        selects to save the world to xml
+    public: bool GetSaveable() const;
    
     /// \brief This entities ID
     private: unsigned int id;
@@ -72,6 +80,9 @@
 
     /// List of all the parameters
     protected: std::vector<Param*> parameters;
+
+    /// \brief Set to true if the object should be saved.
+    protected: bool saveable;
   };
 }
 

Modified: code/gazebo/trunk/server/Entity.hh
===================================================================
--- code/gazebo/trunk/server/Entity.hh  2009-11-15 22:34:05 UTC (rev 8413)
+++ code/gazebo/trunk/server/Entity.hh  2009-11-17 02:23:15 UTC (rev 8414)
@@ -97,7 +97,7 @@
   
     /// \brief Set whether this entity has been selected by the user through 
     //         the gui
-    public: bool SetSelected( bool s );
+    public: virtual bool SetSelected( bool s );
   
     /// \brief True if the entity is selected by the user
     public: bool IsSelected() const;

Modified: code/gazebo/trunk/server/Model.cc
===================================================================
--- code/gazebo/trunk/server/Model.cc   2009-11-15 22:34:05 UTC (rev 8413)
+++ code/gazebo/trunk/server/Model.cc   2009-11-17 02:23:15 UTC (rev 8414)
@@ -31,6 +31,7 @@
 #include <float.h>
 
 #include "OgreVisual.hh"
+#include "Light.hh"
 #include "GraphicsIfaceHandler.hh"
 #include "Global.hh"
 #include "GazeboError.hh"
@@ -94,6 +95,8 @@
   this->graphicsHandler = NULL;
   this->parentBodyNameP = NULL;
   this->myBodyNameP = NULL;
+
+  this->light = NULL;
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -336,11 +339,8 @@
   }
   else
   {
-    if (!this->lightName.empty())
-    {
-      if (Simulator::Instance()->GetRenderEngineEnabled())
-        OgreCreator::SaveLight(p, this->lightName, stream);
-    }
+    if (this->light)
+      this->light->Save(p, stream);
   }
 
   if (this->parentBodyNameP && this->myBodyNameP)
@@ -1115,8 +1115,8 @@
   if (Simulator::Instance()->GetRenderEngineEnabled() && 
       (childNode = node->GetChild("light")))
   {
-    this->lightName = OgreCreator::CreateLight(childNode, 
-        body->GetVisualNode());
+    this->light = new Light(body);
+    this->light->Load(childNode);
   }
 
 }

Modified: code/gazebo/trunk/server/Model.hh
===================================================================
--- code/gazebo/trunk/server/Model.hh   2009-11-15 22:34:05 UTC (rev 8413)
+++ code/gazebo/trunk/server/Model.hh   2009-11-17 02:23:15 UTC (rev 8414)
@@ -55,6 +55,7 @@
   class GraphicsIfaceHandler;
   class Sensor;
   class Geom;
+  class Light;
 
   /// \addtogroup gazebo_server
   /// \brief A model
@@ -258,7 +259,7 @@
 
 
     // Name of a light (if the model is renderable:light)
-    private: std::string lightName;
+    private: Light *light;
 
     private: GraphicsIfaceHandler *graphicsHandler;
 

Modified: code/gazebo/trunk/server/Simulator.cc
===================================================================
--- code/gazebo/trunk/server/Simulator.cc       2009-11-15 22:34:05 UTC (rev 
8413)
+++ code/gazebo/trunk/server/Simulator.cc       2009-11-17 02:23:15 UTC (rev 
8414)
@@ -348,14 +348,14 @@
     {
       lastTime = this->GetWallTime();
 
+      if (this->gui)
+        this->gui->Update();
+
       if (this->renderEngineEnabled)
         OgreAdaptor::Instance()->UpdateCameras();
 
       currTime = this->GetWallTime();
 
-      if (this->gui)
-        this->gui->Update();
-
       World::Instance()->ProcessEntitiesToLoad();
 
       if (this->renderEngineEnabled)

Modified: code/gazebo/trunk/server/Simulator.hh
===================================================================
--- code/gazebo/trunk/server/Simulator.hh       2009-11-15 22:34:05 UTC (rev 
8413)
+++ code/gazebo/trunk/server/Simulator.hh       2009-11-17 02:23:15 UTC (rev 
8414)
@@ -51,6 +51,7 @@
   class GazeboConfig;
   class OgreAdaptor;
   class Entity;
+  class Common;
   class Body;
   class Model;
 

Modified: code/gazebo/trunk/server/gui/GLFrame.cc
===================================================================
--- code/gazebo/trunk/server/gui/GLFrame.cc     2009-11-15 22:34:05 UTC (rev 
8413)
+++ code/gazebo/trunk/server/gui/GLFrame.cc     2009-11-17 02:23:15 UTC (rev 
8414)
@@ -236,7 +236,6 @@
 // Switch view callback
 void GLFrame::ViewCB(Fl_Widget *widget, void *data)
 {
-  printf("VIEW CB\n");
   GLFrame *frame = reinterpret_cast<GLFrame *>(data);
   Fl_Choice *choice = dynamic_cast<Fl_Choice *>(widget);
 

Modified: code/gazebo/trunk/server/gui/GLFrameManager.cc
===================================================================
--- code/gazebo/trunk/server/gui/GLFrameManager.cc      2009-11-15 22:34:05 UTC 
(rev 8413)
+++ code/gazebo/trunk/server/gui/GLFrameManager.cc      2009-11-17 02:23:15 UTC 
(rev 8414)
@@ -47,6 +47,8 @@
   this->end();
 
   this->resizable(this);
+
+  this->configNode = NULL;
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -66,69 +68,15 @@
 // Load from xml
 void GLFrameManager::Load( XMLConfigNode *node )
 {
+  this->configNode = node;
   GLFrame *frame = NULL;
   int windowCount = 0;
-  XMLConfigNode *rowNode = NULL;
-  XMLConfigNode *camNode = NULL;
 
-  if (node)
-  {
-    rowNode = node->GetChild("row");
-
-    float frameHeight, frameWidth;
-    int width = this->w();
-    int height = this->h();
-    int x = this->x();
-    int y = this->y();
-
-    // Process each row
-    while (rowNode)
-    {
-      camNode = rowNode->GetChild("camera");
-
-      std::string heightStr = rowNode->GetString("height","",1);
-
-      frameHeight = atof( heightStr.substr(0, heightStr.find( "%", 0 ) 
).c_str() );
-
-      frameHeight = frameHeight/100.0 * height;
-
-      // Process each camera
-      while (camNode)
-      {
-        std::string widthStr = camNode->GetString("width","",1);
-        frameWidth = atof( widthStr.substr(0, widthStr.find( "%", 0 ) 
).c_str() );
-
-        frameWidth = frameWidth/100.0 * width;
-
-        windowCount = this->children();
-
-        // Create the frame
-        frame = new GLFrame( x, y, (int)frameWidth, (int)frameHeight, "" );
-        frame->Load(camNode);
-
-        this->frames.push_back( frame );
-        this->insert(*frame, windowCount);
-
-        x += (int)frameWidth;
-
-        camNode = camNode->GetNext();
-      }
-
-      y += (int)frameHeight;
-      x = this->x();
-
-      rowNode = rowNode->GetNext();
-    }
-  }
-
-  // Create a big default window if no frames have been defined
-  if (this->frames.size() == 0)
-  {
-    frame = new GLFrame( this->x(), this->y(), this->w(), this->h(), "" );
-    this->frames.push_back( frame );
-    this->insert(*frame, windowCount);
-  }
-  
+  // First, create one big window
+  frame = new GLFrame( this->x(), this->y(), this->w(), this->h(), "" );
+  this->frames.push_back( frame );
+  this->insert(*frame, windowCount);
+ 
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -140,29 +88,22 @@
 
   stream << prefix << "<frames>\n";
 
-  int cy = -1;
   for (iter = this->frames.begin(); iter != this->frames.end(); iter++)
   {
-    int height = (int)( ((float)(*iter)->h() / this->h()) * 100 );
-    int width = (int)( ((float)(*iter)->w() / this->w()) * 100 );
+    int width = (*iter)->w();
+    int height = (*iter)->h();
+    int x = (*iter)->x();
+    int y = (*iter)->y();
     Pose3d pose = (*iter)->GetCameraPose();
 
-    if ((*iter)->y() != cy)
-    {
-      if (cy != -1)
-        stream << prefix << "  </row>\n";
-
-      cy = (*iter)->y();
-      stream << prefix << "  <row height=\"" << height << "%\">\n";
-    }
-
-    stream << prefix << "    <camera width=\"" << width << "%\">\n";
+    stream << prefix << "    <camera width=\"" << width 
+      << "\" height=\"" << height << "\" x=\"" << x << "\" y=\""
+      <<  y << "\">\n";
     stream << prefix << "      <xyz>" << pose.pos << "</xyz>\n";
     stream << prefix << "      <rpy>" << pose.rot << "</rpy>\n";
     stream << prefix << "    </camera>\n";
   }
 
-  stream << prefix << "  </row>\n";
   stream << prefix << "</frames>\n";
 }
 
@@ -181,6 +122,42 @@
 /// Initalize the window manager
 void GLFrameManager::Init()
 {
+  // Create all the frames
+  if (this->configNode)
+  {
+    GLFrame *frame = this->frames[0];
+    XMLConfigNode *camNode = NULL;
+    camNode = this->configNode->GetChild("camera");
+
+    int i = 0;
+    while (camNode)
+    {
+      int width = camNode->GetInt("width",this->w(),1);
+      int height = camNode->GetInt("height",this->h(),1);
+      int x = camNode->GetInt("x",this->x(),1);
+      int y = camNode->GetInt("y",this->y(),1);
+      std::ostringstream stream;
+      stream << "GL Window " << i;
+
+      // Create the frame
+      if (i==0)
+        frame->resize(x,y,width,height);
+      else
+      {
+        frame = new GLFrame( x, y, width, height, stream.str() );
+        frame->Load(camNode);
+
+        this->frames.push_back( frame );
+        this->insert(*frame, i);
+      }
+
+      i++;
+      camNode = camNode->GetNext();
+      this->redraw();
+    }
+  }
+
+
   std::vector<GLFrame *>::iterator iter;
   for (iter = this->frames.begin(); iter != this->frames.end(); iter++)
   {

Modified: code/gazebo/trunk/server/gui/GLFrameManager.hh
===================================================================
--- code/gazebo/trunk/server/gui/GLFrameManager.hh      2009-11-15 22:34:05 UTC 
(rev 8413)
+++ code/gazebo/trunk/server/gui/GLFrameManager.hh      2009-11-17 02:23:15 UTC 
(rev 8414)
@@ -68,6 +68,7 @@
 
     /// Vector of all the frames
     private: std::vector<GLFrame *> frames;
+    private: XMLConfigNode *configNode;
   };
 }
 #endif

Modified: code/gazebo/trunk/server/gui/Gui.cc
===================================================================
--- code/gazebo/trunk/server/gui/Gui.cc 2009-11-15 22:34:05 UTC (rev 8413)
+++ code/gazebo/trunk/server/gui/Gui.cc 2009-11-17 02:23:15 UTC (rev 8414)
@@ -126,6 +126,9 @@
 {
   std::string p = prefix + "  ";
 
+  this->sizeP->SetValue(Vector2<int>(this->GetWidth(), this->GetHeight()));
+  this->posP->SetValue(Vector2<int>(this->x(), this->y()));
+
   stream << prefix <<  "<rendering:gui>\n";
   stream << prefix <<  "  " << *(this->sizeP) << "\n";
   stream << prefix <<  "  " << *(this->posP) << "\n";

Modified: code/gazebo/trunk/server/physics/Geom.cc
===================================================================
--- code/gazebo/trunk/server/physics/Geom.cc    2009-11-15 22:34:05 UTC (rev 
8413)
+++ code/gazebo/trunk/server/physics/Geom.cc    2009-11-17 02:23:15 UTC (rev 
8414)
@@ -93,7 +93,6 @@
 // First step in the loading process
 void Geom::Load(XMLConfigNode *node)
 {
-
   XMLConfigNode *childNode = NULL;
 
   this->xmlNode=node;
@@ -138,6 +137,9 @@
       this->visuals.push_back(visual);
       visual->SetCastShadows(true);
     }
+    if (this->IsStatic())
+      visual->MakeStatic();
+
     childNode = childNode->GetNext("visual");
   }
 
@@ -179,7 +181,7 @@
 // Save the body based on our XMLConfig node
 void Geom::Save(std::string &prefix, std::ostream &stream)
 {
-  if (this->GetType() == Shape::RAY)
+  if (!this->GetSaveable())
     return;
 
   std::string p = prefix + "  ";

Modified: code/gazebo/trunk/server/physics/MapShape.cc
===================================================================
--- code/gazebo/trunk/server/physics/MapShape.cc        2009-11-15 22:34:05 UTC 
(rev 8413)
+++ code/gazebo/trunk/server/physics/MapShape.cc        2009-11-17 02:23:15 UTC 
(rev 8414)
@@ -151,6 +151,7 @@
 
     // Create the box geometry
     Geom *geom = 
this->physicsEngine->CreateGeom("box",this->parent->GetBody());
+    geom->SetSaveable(false);
 
     XMLConfig *boxConfig = new XMLConfig();
 

Modified: code/gazebo/trunk/server/physics/RayShape.cc
===================================================================
--- code/gazebo/trunk/server/physics/RayShape.cc        2009-11-15 22:34:05 UTC 
(rev 8413)
+++ code/gazebo/trunk/server/physics/RayShape.cc        2009-11-17 02:23:15 UTC 
(rev 8414)
@@ -53,6 +53,8 @@
   this->contactLen = DBL_MAX;
   this->contactRetro = 0.0;
   this->contactFiducial = -1;
+
+  this->parent->SetSaveable(false);
 }
 
 
////////////////////////////////////////////////////////////////////////////////

Modified: code/gazebo/trunk/server/physics/TrimeshShape.cc
===================================================================
--- code/gazebo/trunk/server/physics/TrimeshShape.cc    2009-11-15 22:34:05 UTC 
(rev 8413)
+++ code/gazebo/trunk/server/physics/TrimeshShape.cc    2009-11-17 02:23:15 UTC 
(rev 8414)
@@ -111,6 +111,7 @@
       Geom *newGeom = this->physicsEngine->CreateGeom( "trimesh", 
           this->parent->GetBody() );
 
+      newGeom->SetSaveable(false);
       newGeom->Load( config->GetRootNode()->GetChild() );
 
       delete config;

Modified: code/gazebo/trunk/server/rendering/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/rendering/CMakeLists.txt   2009-11-15 22:34:05 UTC 
(rev 8413)
+++ code/gazebo/trunk/server/rendering/CMakeLists.txt   2009-11-17 02:23:15 UTC 
(rev 8414)
@@ -20,6 +20,7 @@
              OgreHeightmap.cc
              Color.cc
              Material.cc
+             Light.cc
 )
 
 set (headers OgreMovableText.hh
@@ -37,6 +38,7 @@
              OgreHeightmap.hh
              Color.hh
              Material.hh
+             Light.hh
 )
 
 add_library(gazebo_rendering SHARED ${sources})

Added: code/gazebo/trunk/server/rendering/Light.cc
===================================================================
--- code/gazebo/trunk/server/rendering/Light.cc                         (rev 0)
+++ code/gazebo/trunk/server/rendering/Light.cc 2009-11-17 02:23:15 UTC (rev 
8414)
@@ -0,0 +1,235 @@
+#include <Ogre.h>
+
+#include "OgreDynamicLines.hh"
+#include "OgreVisual.hh"
+#include "OgreCreator.hh"
+#include "OgreAdaptor.hh"
+#include "XMLConfig.hh"
+#include "GazeboError.hh"
+#include "Global.hh"
+#include "GazeboMessage.hh"
+#include "Light.hh"
+
+using namespace gazebo;
+
+unsigned int Light::lightCounter = 0;
+
+////////////////////////////////////////////////////////////////////////////////
+/// Constructor
+Light::Light(Entity *parent)
+  : Entity(parent)
+{
+  std::ostringstream stream;
+
+  stream << this->parent->GetName() << "_LIGHT" << this->lightCounter;
+  this->SetName(stream.str());
+
+  this->lightCounter++;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Destructor
+Light::~Light()
+{
+  delete this->line;
+  delete this->visual;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Load the light
+void Light::Load(XMLConfigNode *node)
+{
+  Vector3 vec;
+  double range,constant,linear,quad;
+
+  try
+  {
+    this->light = OgreAdaptor::Instance()->sceneMgr->createLight(
+        this->GetName());
+  }
+  catch (Ogre::Exception e)
+  {
+    gzthrow("Ogre Error:" << e.getFullDescription() << "\n" << \
+        "Unable to create a light on " + this->parent->GetName());
+  }
+
+  // Set the light type
+  std::string lightType = node->GetString("type","point",0);
+  if (lightType == "point")
+  {
+    this->light->setType(Ogre::Light::LT_POINT);
+  }
+  else if (lightType == "directional")
+  {
+    this->light->setType(Ogre::Light::LT_DIRECTIONAL);
+  }
+  else if (lightType == "spot")
+  {
+    this->light->setType(Ogre::Light::LT_SPOTLIGHT);
+  }
+
+  // Set the diffuse color
+  vec = node->GetVector3("diffuseColor",Vector3(1.0, 1.0, 1.0));
+  this->light->setDiffuseColour(vec.x, vec.y, vec.z);
+
+  // Sets the specular color
+  vec = node->GetVector3("specularColor",Vector3(1.0, 1.0, 1.0));
+  this->light->setSpecularColour(vec.x, vec.y, vec.z);
+
+  // Set the direction which the light points
+  vec = node->GetVector3("direction", Vector3(0.0, 0.0, -1.0));
+  vec.Normalize();
+  this->light->setDirection(vec.x, vec.y, vec.z);
+
+  // Absolute range of light in world coordinates
+  range = node->GetDouble("range",0,100);
+
+  // Constant factor. 1.0 means never attenuate, 0.0 is complete attenuation
+  constant = node->GetTupleDouble("attenuation",0,1.0);
+  if (constant < 0)
+    constant = 0;
+  else if (constant > 1.0)
+    constant = 1.0;
+
+  // Linear factor. 1 means attenuate evenly over the distance
+  linear = node->GetTupleDouble("attenuation",1,0);
+  if (linear < 0)
+    linear = 0;
+  else if (linear > 1.0)
+    linear = 1.0;
+
+  // Quadartic factor.adds a curvature to the attenuation formula
+  quad = node->GetTupleDouble("attenuation",2,0);
+
+  // Set attenuation
+  this->light->setAttenuation(range, constant, linear, quad);
+
+  // TODO: More options for Spot lights, etc.
+  //  options for spotlights
+  if (lightType == "spot")
+  {
+    vec = node->GetVector3("spotCone", Vector3(5.0, 10.0, 1.0));
+    this->light->setSpotlightRange(Ogre::Radian(Ogre::Degree(vec.x)), 
+        Ogre::Radian(Ogre::Degree(vec.y)), vec.z);
+  }
+
+  this->light->setCastShadows(node->GetBool("castShadows",true,0));
+
+  this->parent->GetVisualNode()->AttachObject(light);
+
+  this->CreateVisual();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Save a light
+void Light::Save(const std::string &prefix, std::ostream &stream)
+{
+  std::string type;
+
+  if (this->light->getType() == Ogre::Light::LT_POINT)
+    type = "point";
+  else if (this->light->getType() == Ogre::Light::LT_DIRECTIONAL)
+    type = "directional";
+  else 
+    type = "spot";
+
+  Ogre::ColourValue diffuseColor = this->light->getDiffuseColour();
+  Ogre::ColourValue specularColor = this->light->getDiffuseColour();
+  Ogre::Vector3 dir = this->light->getDirection();
+  Ogre::Real attRange = this->light->getAttenuationRange();
+  Ogre::Real attConst = this->light->getAttenuationConstant();
+  Ogre::Real attLinear = this->light->getAttenuationLinear();
+  Ogre::Real attQuadric = this->light->getAttenuationQuadric();
+
+  stream << prefix << "<light>\n";
+  stream << prefix << "  <type>" << type << "</type>\n";
+
+  stream << prefix << "  <direction>" << dir.x << " " << dir.y << " " 
+         << dir.z << "</direction>\n";
+
+  stream << prefix << "  <diffuseColor>" << diffuseColor.r << " " 
+         << diffuseColor.g << " " << diffuseColor.b << " " << diffuseColor.a 
+         << "</diffuseColor>\n";
+
+  stream << prefix << "  <specularColor>" << specularColor.r << " " 
+         << specularColor.g << " " << specularColor.b << " "
+         << specularColor.a << "</specularColor>\n";
+
+  stream << prefix << "  <range>"<< attRange << "</range>\n";
+
+  stream << prefix << "  <attenuation>" << " " << attConst 
+         << " " << attLinear << " " << attQuadric << "</attenuation>\n";
+  stream << prefix << "</light>\n";
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+// Helper node to create a visual representation of the light
+void Light::CreateVisual()
+{
+  this->visual = new OgreVisual(this->parent->GetVisualNode());
+
+  // The lines draw a visualization of the camera
+  this->line = OgreCreator::Instance()->CreateDynamicLine(
+      OgreDynamicRenderable::OT_LINE_LIST);
+
+  float s=0.1;
+  this->line->AddPoint(Vector3(-s,-s,0));
+  this->line->AddPoint(Vector3(-s,s,0));
+
+  this->line->AddPoint(Vector3(-s,s,0));
+  this->line->AddPoint(Vector3(s,s,0));
+
+  this->line->AddPoint(Vector3(s,s,0));
+  this->line->AddPoint(Vector3(s,-s,0));
+
+  this->line->AddPoint(Vector3(s,-s,0));
+  this->line->AddPoint(Vector3(-s,-s,0));
+
+
+
+  this->line->AddPoint(Vector3(-s,-s,0));
+  this->line->AddPoint(Vector3(0,0,s));
+
+  this->line->AddPoint(Vector3(-s,s,0));
+  this->line->AddPoint(Vector3(0,0,s));
+
+  this->line->AddPoint(Vector3(s,s,0));
+  this->line->AddPoint(Vector3(0,0,s));
+
+  this->line->AddPoint(Vector3(s,-s,0));
+  this->line->AddPoint(Vector3(0,0,s));
+
+
+
+  this->line->AddPoint(Vector3(-s,-s,0));
+  this->line->AddPoint(Vector3(0,0,-s));
+
+  this->line->AddPoint(Vector3(-s,s,0));
+  this->line->AddPoint(Vector3(0,0,-s));
+
+  this->line->AddPoint(Vector3(s,s,0));
+  this->line->AddPoint(Vector3(0,0,-s));
+
+  this->line->AddPoint(Vector3(s,-s,0));
+  this->line->AddPoint(Vector3(0,0,-s));
+
+  this->line->setMaterial("Gazebo/WhiteEmissive");
+  this->line->setVisibilityFlags(GZ_LASER_CAMERA);
+
+  this->visual->AttachObject(line);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Set whether this entity has been selected by the user through the gui
+bool Light::SetSelected( bool s )
+{
+  Entity::SetSelected(s);
+
+  if (s)
+    this->line->setMaterial("Gazebo/PurpleEmissive");
+  else
+    this->line->setMaterial("Gazebo/WhiteEmissive");
+}
+
+

Added: code/gazebo/trunk/server/rendering/Light.hh
===================================================================
--- code/gazebo/trunk/server/rendering/Light.hh                         (rev 0)
+++ code/gazebo/trunk/server/rendering/Light.hh 2009-11-17 02:23:15 UTC (rev 
8414)
@@ -0,0 +1,52 @@
+#ifndef LIGHT_HH
+#define LIGHT_HH
+
+#include <string>
+#include <iostream>
+
+#include "Entity.hh"
+
+namespace Ogre
+{
+  class Light;
+}
+
+namespace gazebo
+{
+  class OgreVisual;
+  class XMLConfigNode;
+  class OgreDynamicLines;
+
+  /// \brief Wrapper around an ogre light source
+  class Light : public Entity
+  {
+    /// \brief Constructor
+    public: Light(Entity *parent);
+
+    /// \brief Destructor
+    public: virtual ~Light();
+
+    /// \brief Load the light
+    public: void Load(XMLConfigNode *node);
+
+    /// \brief Save a light
+    public: void Save(const std::string &prefix, std::ostream &stream);
+
+    /// \brief Set whether this entity has been selected by the user through  
+    ///        the gui
+    public: virtual bool SetSelected( bool s );
+
+    /// \private Helper node to create a visual representation of the light
+    private: void CreateVisual();
+
+    /// The OGRE light source
+    private: Ogre::Light *light;
+
+    /// Parent of the light
+    private: OgreVisual *visual;
+    private: OgreDynamicLines *line;
+
+    private: static unsigned int lightCounter;
+  };
+}
+#endif

Modified: code/gazebo/trunk/server/rendering/OgreAdaptor.cc
===================================================================
--- code/gazebo/trunk/server/rendering/OgreAdaptor.cc   2009-11-15 22:34:05 UTC 
(rev 8413)
+++ code/gazebo/trunk/server/rendering/OgreAdaptor.cc   2009-11-17 02:23:15 UTC 
(rev 8414)
@@ -75,6 +75,8 @@
   this->shadowTechniqueP = new ParamT<std::string>("shadowTechnique", 
"stencilModulative", 0);
   this->drawGridP = new ParamT<bool>("grid", true, 0);
   this->skyMaterialP = new ParamT<std::string>("material","",1);
+  this->shadowIndexSizeP = new ParamT<int>("shadowIndexSize",32768, 0);
+
   Param::End();
 }
 
@@ -199,10 +201,6 @@
   // Load Resources
   Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
 
-  Param::Begin(&this->parameters);
-  this->shadowIndexSizeP = new 
ParamT<int>("shadowIndexSize",this->sceneMgr->getShadowIndexBufferSize(), 0);
-  Param::End();
-
   this->ambientP->Load(node);
   this->shadowTextureSizeP->Load(node);
   this->shadowIndexSizeP->Load(node);
@@ -293,6 +291,9 @@
   stream << prefix << "    " << *(this->skyMaterialP) << "\n";
   stream << prefix << "  </sky>\n";
   OgreCreator::SaveFog(prefix, stream);
+  stream << prefix << "  " << *(this->shadowTechniqueP) << "\n";
+  stream << prefix << "  " << *(this->shadowTextureSizeP) << "\n";
+  stream << prefix << "  " << *(this->shadowIndexSizeP) << "\n";
   stream << prefix << "</rendering:ogre>\n";
 }
 

Modified: code/gazebo/trunk/server/rendering/OgreAdaptor.hh
===================================================================
--- code/gazebo/trunk/server/rendering/OgreAdaptor.hh   2009-11-15 22:34:05 UTC 
(rev 8413)
+++ code/gazebo/trunk/server/rendering/OgreAdaptor.hh   2009-11-17 02:23:15 UTC 
(rev 8414)
@@ -157,7 +157,6 @@
     private: ParamT<std::string> *shadowTechniqueP;
     private: ParamT<int> *shadowTextureSizeP;
     private: ParamT<int> *shadowIndexSizeP;
-    private: ParamT<double> *updateRateP;
     private: ParamT<bool> *drawGridP;
     private: ParamT<std::string> *skyMaterialP;
     private: std::vector<Param*> parameters;

Modified: code/gazebo/trunk/server/rendering/OgreCreator.cc
===================================================================
--- code/gazebo/trunk/server/rendering/OgreCreator.cc   2009-11-15 22:34:05 UTC 
(rev 8413)
+++ code/gazebo/trunk/server/rendering/OgreCreator.cc   2009-11-17 02:23:15 UTC 
(rev 8414)
@@ -49,7 +49,6 @@
 
 using namespace gazebo;
 
-unsigned int OgreCreator::lightCounter = 0;
 unsigned int OgreCreator::windowCounter = 0;
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -111,11 +110,19 @@
 /// Create a light source and attach it to the visual node
 /// Note that the properties here are not modified afterwards and thus, 
 /// we don't need a Light class. 
-std::string OgreCreator::CreateLight(XMLConfigNode *node, OgreVisual *parent)
-{
-  if (!Simulator::Instance()->GetRenderEngineEnabled())
+//std::string OgreCreator::CreateLight(XMLConfigNode *node, OgreVisual *parent)
+//{
+  /*if (!Simulator::Instance()->GetRenderEngineEnabled())
     return std::string();
 
+  Light *light = new Light(parent);
+  light->Load(node);
+  this->lights.push_back(light);
+
+  return light->GetName();
+  */
+
+  /*
   Vector3 vec;
   double range,constant,linear,quad;
   Ogre::Light *light;
@@ -200,64 +207,10 @@
   parent->AttachObject(light);
 
   return stream.str();
-}
+  */
+//}
 
-////////////////////////////////////////////////////////////////////////////////
-// Save a light's information in xml format
-void OgreCreator::SaveLight(const std::string &prefix, 
-                           const std::string lightName, std::ostream &stream)
-{
-  if (!Simulator::Instance()->GetRenderEngineEnabled())
-    return;
 
-  Ogre::Light *light = NULL;
-  std::string type;
-
-  if (!OgreAdaptor::Instance()->sceneMgr->hasLight(lightName))
-  {
-    gzerr(0) << "Unknown light[" << lightName << "]\n";
-    return;
-  }
-
-  light = OgreAdaptor::Instance()->sceneMgr->getLight(lightName);
-
-  if (light->getType() == Ogre::Light::LT_POINT)
-    type = "point";
-  else if (light->getType() == Ogre::Light::LT_DIRECTIONAL)
-    type = "directional";
-  else 
-    type = "spot";
-
-  Ogre::ColourValue diffuseColor = light->getDiffuseColour();
-  Ogre::ColourValue specularColor = light->getDiffuseColour();
-  Ogre::Vector3 dir = light->getDirection();
-  Ogre::Real attRange = light->getAttenuationRange();
-  Ogre::Real attConst = light->getAttenuationConstant();
-  Ogre::Real attLinear = light->getAttenuationLinear();
-  Ogre::Real attQuadric = light->getAttenuationQuadric();
-
-  stream << prefix << "<light>\n";
-  stream << prefix << "  <type>" << type << "</type>\n";
-
-  stream << prefix << "  <direction>" << dir.x << " " << dir.y << " " 
-         << dir.z << "</direction>\n";
-
-  stream << prefix << "  <diffuseColor>" << diffuseColor.r << " " 
-         << diffuseColor.g << " " << diffuseColor.b << " " << diffuseColor.a 
-         << "</diffuseColor>\n";
-
-  stream << prefix << "  <specularColor>" << specularColor.r << " " 
-         << specularColor.g << " " << specularColor.b << " "
-         << specularColor.a << "</specularColor>\n";
-
-  stream << prefix << "  <range>"<< attRange << "</range>\n";
-
-  stream << prefix << "  <attenuation>" << " " << attConst 
-         << " " << attLinear << " " << attQuadric << "</attenuation>\n";
-  stream << prefix << "</light>\n";
-}
-
-
 
////////////////////////////////////////////////////////////////////////////////
 // Helper function to create a camera
 Ogre::Camera *OgreCreator::CreateCamera(const std::string &name, 

Modified: code/gazebo/trunk/server/rendering/OgreCreator.hh
===================================================================
--- code/gazebo/trunk/server/rendering/OgreCreator.hh   2009-11-15 22:34:05 UTC 
(rev 8413)
+++ code/gazebo/trunk/server/rendering/OgreCreator.hh   2009-11-17 02:23:15 UTC 
(rev 8414)
@@ -78,12 +78,8 @@
     
     /// \brief Create a light source 
     /// \return The name of the light source
-    public: static std::string CreateLight(XMLConfigNode *node, OgreVisual 
*parent);
+    //public: static std::string CreateLight(XMLConfigNode *node, OgreVisual 
*parent);
 
-    /// \brief Save a light source info in xml format
-    public: static void SaveLight(const std::string &prefix, 
-                           const std::string lightName, std::ostream &stream);
-
     /// \brief Helper function to create a camera
     public: static Ogre::Camera *CreateCamera(const std::string &name, 
                 double nearClip, double farClip, double hfov, 
@@ -157,7 +153,6 @@
     /// \brief Update all the entities
     public: void Update();
 
-    private: static unsigned int lightCounter;
     private: static unsigned int windowCounter;
 
     // List of all the lines created

Modified: code/gazebo/trunk/server/rendering/OgreVisual.cc
===================================================================
--- code/gazebo/trunk/server/rendering/OgreVisual.cc    2009-11-15 22:34:05 UTC 
(rev 8413)
+++ code/gazebo/trunk/server/rendering/OgreVisual.cc    2009-11-17 02:23:15 UTC 
(rev 8414)
@@ -46,6 +46,7 @@
 OgreVisual::OgreVisual(OgreVisual *node, Entity *_owner)
   : Common()
 {
+  bool isStatic = false;
   Ogre::SceneNode *pnode = NULL;
   this->owner = _owner;
 
@@ -57,20 +58,26 @@
       pnode = node->GetSceneNode();
   }
 
-  this->ConstructorHelper(pnode);
+  if (this->owner)
+  {
+    this->SetName(this->owner->GetName() + "_visual");
+    isStatic = this->owner->IsStatic();
+  }
+
+  this->ConstructorHelper(pnode, isStatic);
 }
 
 
////////////////////////////////////////////////////////////////////////////////
 /// Constructor
-OgreVisual::OgreVisual (Ogre::SceneNode *node)
+OgreVisual::OgreVisual (Ogre::SceneNode *node, bool isStatic)
 {
   this->owner = NULL;
-  this->ConstructorHelper(node);
+  this->ConstructorHelper(node, isStatic);
 }
 
 
////////////////////////////////////////////////////////////////////////////////
 // Helper for the contructor
-void OgreVisual::ConstructorHelper(Ogre::SceneNode *node)
+void OgreVisual::ConstructorHelper(Ogre::SceneNode *node, bool isStatic)
 {
   std::ostringstream stream;
   this->mutex = new boost::recursive_mutex();
@@ -98,7 +105,6 @@
   this->sizeP = new ParamT<Vector3>("size", Vector3(1,1,1), 0);
   Param::End();
 
-  this->staticGeometry = NULL;
   this->boundingBoxNode = NULL;
 
   this->ignorePoseUpdates = false;
@@ -115,6 +121,14 @@
     // Create the scene node
     this->sceneNode = this->parentNode->createChildSceneNode( stream.str() );
   }
+
+  this->isStatic = isStatic;
+
+  if (this->isStatic)
+    this->staticGeom = this->sceneNode->getCreator()->createStaticGeometry(
+        this->GetName() + "_staticgeom");
+  else
+    this->staticGeom = NULL;
 }
 
 
@@ -281,6 +295,7 @@
     return;
 
   this->sceneNode->attachObject(obj);
+
   obj->setUserObject( this );
 }
 
@@ -333,17 +348,17 @@
   if (!Simulator::Instance()->GetRenderEngineEnabled())
     return;
 
-  if (!this->staticGeometry)
-    this->staticGeometry = 
OgreAdaptor::Instance()->sceneMgr->createStaticGeometry(this->sceneNode->getName()
 + "_Static");
+  if (!this->staticGeom)
+    this->staticGeom = 
OgreAdaptor::Instance()->sceneMgr->createStaticGeometry(this->sceneNode->getName()
 + "_Static");
 
   // Detach the scene node from the parent. Prevents double rendering
   this->sceneNode->getParent()->removeChild(this->sceneNode);
 
   // Add the scene node to the static geometry
-  this->staticGeometry->addSceneNode(this->sceneNode);
+  this->staticGeom->addSceneNode(this->sceneNode);
 
   // Build the static geometry
-  this->staticGeometry->build();
+  this->staticGeom->build();
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -369,7 +384,7 @@
 
   obj = 
(Ogre::MovableObject*)(this->sceneNode->getCreator()->createEntity(stream.str(),
 meshName));
 
-  this->sceneNode->attachObject((Ogre::Entity*)obj);
+  this->AttachObject( obj );
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -382,11 +397,11 @@
   if (!Simulator::Instance()->GetRenderEngineEnabled())
     return;
 
-
   Ogre::Vector3 vscale;
   vscale.x=scale.x;
   vscale.y=scale.y;
   vscale.z=scale.z;
+
   this->sceneNode->setScale(vscale);
 }
 
@@ -620,6 +635,9 @@
     Ogre::MovableObject *obj = this->sceneNode->getAttachedObject(i);
     obj->setCastShadows(shadows);
   }
+
+  if (this->IsStatic())
+    this->staticGeom->setCastShadows(shadows);
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -885,3 +903,12 @@
 {
   this->ignorePoseUpdates = value;
 }
+
+////////////////////////////////////////////////////////////////////////////////
+/// Return true if the  visual is a static geometry
+bool OgreVisual::IsStatic() const
+{
+  return this->isStatic;
+}
+
+

Modified: code/gazebo/trunk/server/rendering/OgreVisual.hh
===================================================================
--- code/gazebo/trunk/server/rendering/OgreVisual.hh    2009-11-15 22:34:05 UTC 
(rev 8413)
+++ code/gazebo/trunk/server/rendering/OgreVisual.hh    2009-11-17 02:23:15 UTC 
(rev 8414)
@@ -54,10 +54,10 @@
     public: OgreVisual (OgreVisual *node, Entity *owner = NULL);
 
     /// \brief Constructor
-    public: OgreVisual (Ogre::SceneNode *node);
+    public: OgreVisual (Ogre::SceneNode *node, bool isStatic=false);
 
     /// \brief Helper for the contructor
-    private: void ConstructorHelper(Ogre::SceneNode *node);
+    private: void ConstructorHelper(Ogre::SceneNode *node, bool 
isStatic=false);
 
     /// \brief Destructor
     public: virtual ~OgreVisual();
@@ -151,6 +151,9 @@
     public: bool IsDirty() const {return dirty;}
     public: void SetToDirtyPose() {SetPose(dirtyPose); dirty=false;}
 
+    /// \brief Return true if the  visual is a static geometry
+    public: bool IsStatic() const;
+
     private: Ogre::MaterialPtr origMaterial;
     private: Ogre::MaterialPtr myMaterial;
     private: Ogre::SceneBlendType sceneBlendType;
@@ -161,8 +164,6 @@
 
     private: float transparency;
 
-    private: Ogre::StaticGeometry *staticGeometry;
-
     private: static unsigned int visualCounter;
 
     private: Entity *owner;
@@ -181,6 +182,9 @@
     private: bool ignorePoseUpdates;
     private: bool dirty;
     private: Pose3d dirtyPose;
+
+    private: bool isStatic;
+    private: Ogre::StaticGeometry *staticGeom;
   };
 }
 

Modified: code/gazebo/trunk/server/rendering/UserCamera.cc
===================================================================
--- code/gazebo/trunk/server/rendering/UserCamera.cc    2009-11-15 22:34:05 UTC 
(rev 8413)
+++ code/gazebo/trunk/server/rendering/UserCamera.cc    2009-11-17 02:23:15 UTC 
(rev 8414)
@@ -194,7 +194,6 @@
 
     this->saveCount++;
   }
-
 }
 
 

Modified: code/gazebo/trunk/worlds/willowgarage.world
===================================================================
--- code/gazebo/trunk/worlds/willowgarage.world 2009-11-15 22:34:05 UTC (rev 
8413)
+++ code/gazebo/trunk/worlds/willowgarage.world 2009-11-17 02:23:15 UTC (rev 
8414)
@@ -1,163 +1,329 @@
 <?xml version="1.0"?>
+<gazebo:world
+    xmlns:xi="http://www.w3.org/2001/XInclude";
+    xmlns:gazebo="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz";
+    xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model";
+    xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor";
+    xmlns:window="http://playerstage.sourceforge.net/gazebo/xmlschema/#window";
+    xmlns:param="http://playerstage.sourceforge.net/gazebo/xmlschema/#param";
+    xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body";
+    xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom";
+    xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint";
+    
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface";
+    xmlns:ui="http://playerstage.sourceforge.net/gazebo/xmlschema/#ui";
+    
xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering";
+    
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller";
+    
xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics";>
 
-<gazebo:world 
-  xmlns:xi="http://www.w3.org/2001/XInclude";
-  xmlns:gazebo="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz"; 
-  xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model"; 
-  xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"; 
-  xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"; 
-  xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"; 
-  xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"; 
-  
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface";
 
-  
xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering";
 
-  
xmlns:renderable="http://playerstage.sourceforge.net/gazebo/xmlschema/#renderable";
 
-  
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller";
-  xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics"; 
>
-
   <verbosity>1</verbosity>
+  <logData>0</logData>
 
   <physics:ode>
     <stepTime>0.001</stepTime>
     <gravity>0 0 -9.80665</gravity>
-    <cfm>10e-8</cfm>
+    <updateRate>0</updateRate>
+    <cfm>1e-07</cfm>
     <erp>0.3</erp>
-    <quickStep>true</quickStep>
+    <quickStep>1</quickStep>
     <quickStepIters>10</quickStepIters>
     <quickStepW>1.3</quickStepW>
-    <contactMaxCorrectingVel>100.0</contactMaxCorrectingVel>
+    <contactMaxCorrectingVel>100</contactMaxCorrectingVel>
     <contactSurfaceLayer>0.001</contactSurfaceLayer>
-
-    <updateRate>0</updateRate>
   </physics:ode>
 
-  <rendering:gui>
-    <type>fltk</type>
-    <size>800 600</size>
-    <pos>0 0</pos>
-    <frames>
-      <row height="100%">
-        <camera width="100%">
-          <xyz>2.94 -2.44 7.24</xyz>
-          <rpy>0 31.1 47.20</rpy>
-        </camera>
-      </row>
-    </frames>
-  </rendering:gui>
-
   <rendering:ogre>
-    <ambient>0.1 0.1 0.1 1.0</ambient>
+    <ambient>0.1 0.1 0.1 1</ambient>
+    <grid>0</grid>
     <sky>
       <material>Gazebo/Grey</material>
     </sky>
-    <grid>false</grid>
+    <fog>
+      <type>none</type>
+      <color>1 1 1 1</color>
+      <linearStart>0</linearStart>
+      <linearEnd>0</linearEnd>
+      <density>0</density>
+    </fog>
     <shadowTechnique>stencilAdditive</shadowTechnique>
+    <shadowTextureSize>512</shadowTextureSize>
     <shadowIndexSize>100000</shadowIndexSize>
   </rendering:ogre>
 
+  <rendering:gui>
+    <size>2457 1432</size>
+    <pos>5 49</pos>
+  </rendering:gui>
+
   <model:physical name="plane1_model">
     <xyz>0 0 0</xyz>
-    <rpy>0 0 0</rpy>
-    <static>true</static>
+    <rpy>0 -0 0</rpy>
+    <enableGravity>1</enableGravity>
+    <enableFriction>1</enableFriction>
+    <collide>all</collide>
+    <static>1</static>
 
-    <body:plane name="plane1_body">
+    <body name="plane1_body">
+      <xyz>0 0 0</xyz>
+      <rpy>0 -0 0</rpy>
+
       <geom:plane name="plane1_geom">
+        <xyz>0 0 0</xyz>
+        <rpy>0 -0 0</rpy>
         <normal>0 0 1</normal>
         <size>2000 2000</size>
         <segments>10 10</segments>
         <uvTile>1000 1000</uvTile>
         <material>Gazebo/GrayGrid</material>
+        <castShadows>0</castShadows>
+        <mass>0.001</mass>
+        <laserFiducialId>-1</laserFiducialId>
+        <laserRetro>-1</laserRetro>
       </geom:plane>
-    </body:plane>
+    </body>
   </model:physical>
 
   <model:physical name="wg_model">
-    <xyz>-8 -4 0.0</xyz>
-    <static>true</static>
+    <xyz>-8 -4 0</xyz>
+    <rpy>0 -0 0</rpy>
+    <enableGravity>1</enableGravity>
+    <enableFriction>1</enableFriction>
+    <collide>all</collide>
+    <static>1</static>
 
-    <body:trimesh name="wg_body">
+    <body name="wg_body">
+      <xyz>0 0 0</xyz>
+      <rpy>0 -0 0</rpy>
+
       <geom:trimesh name="wg_geom">
+        <xyz>0 0 0</xyz>
+        <rpy>0 -0 0</rpy>
+        <mesh>willowgarage.dae</mesh>
         <scale>0.0254 0.0254 0.0254</scale>
-        <mesh>willowgarage.dae</mesh>
-
+        <mass>0.001</mass>
+        <laserFiducialId>-1</laserFiducialId>
+        <laserRetro>-1</laserRetro>
         <visual>
+          <xyz>0 0 0</xyz>
+          <rpy>0 -0 0</rpy>
+          <mesh>willowgarage.dae</mesh>
+          <material>none</material>
+          <castShadows>1</castShadows>
           <scale>0.0254 0.0254 0.0254</scale>
-          <mesh>willowgarage.dae</mesh>
         </visual>
       </geom:trimesh>
-    </body:trimesh>
-  </model:physical>
 
-  <!--
-  <model:physical name="pr2_model">
-    <xyz>0 0 0</xyz>
-    <rpy>0.0 0.0 0.0</rpy>
 
-    <include embedded="true">
-      <xi:include href="models/pr2.model" />
-    </include>
 
-    <body:box name="camera_body">
-      <xyz>-0.5 0 1.5</xyz>
-      <rpy>0 30 0</rpy>
-      <sensor:camera name="follow_camera">
-        <imageSize>640.0 480.0</imageSize>
-        <imageFormat>L8</imageFormat>
-        <hfov>90.0</hfov>
-        <nearClip>0.1</nearClip>
-        <farClip>100</farClip>
-        <updateRate>20.0</updateRate>
-      </sensor:camera>
-    </body:box>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    </body>
   </model:physical>
-  -->
 
-
-  <!-- White Point light -->
   <model:renderable name="point_white2">
-    <xyz>10 10 50</xyz>
-    <static>true</static>
-
+    <xyz>23.0083 19.1032 41.0918</xyz>
+    <rpy>0 -0 0</rpy>
+    <enableGravity>1</enableGravity>
+    <enableFriction>1</enableFriction>
+    <collide>all</collide>
     <light>
-      <castShadows>true</castShadows>
       <type>point</type>
-      <diffuseColor>1.0 1.0 1.0</diffuseColor>
-      <specularColor>0 0 0</specularColor>
+      <direction>0 0 -1</direction>
+      <diffuseColor>1 1 1 1</diffuseColor>
+      <specularColor>1 1 1 1</specularColor>
       <range>100</range>
-
-      <attenuation>0 0.01 0.001</attenuation>
+      <attenuation> 0 0.01 0.001</attenuation>
     </light>
   </model:renderable>
-  
-  <!-- White Point light -->
+
   <model:renderable name="point_white3">
-    <xyz>00 00 30</xyz>
-    <static>true</static>
-
+    <xyz>0.014406 1.98417 17.0365</xyz>
+    <rpy>0 -0 0</rpy>
+    <enableGravity>1</enableGravity>
+    <enableFriction>1</enableFriction>
+    <collide>all</collide>
     <light>
-      <castShadows>false</castShadows>
       <type>point</type>
-      <diffuseColor>0.9 0.9 0.9</diffuseColor>
-      <specularColor>.0 .0 .0</specularColor>
+      <direction>0 0 -1</direction>
+      <diffuseColor>0.9 0.9 0.9 1</diffuseColor>
+      <specularColor>0.9 0.9 0.9 1</specularColor>
       <range>90</range>
-      <attenuation>0.0 0.1 0.001</attenuation>
+      <attenuation> 0 0.1 0.001</attenuation>
     </light>
   </model:renderable>
 
-  <!-- White Point light -->
-  <!--<model:renderable name="point_white4">
-    <xyz>10 5 50</xyz>
-    <static>true</static>
 
-    <light>
-      <castShadows>false</castShadows>
-      <type>point</type>
-      <diffuseColor>0.4 0.4 0.4</diffuseColor>
-      <specularColor>.1 .1 .1</specularColor>
-      <range>200</range>
-
-      <attenuation>0.1 0.01 0.0001</attenuation>
-    </light>
-  </model:renderable>
-  -->
-
 </gazebo:world>


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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to