Revision: 8257
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8257&view=rev
Author:   natepak
Date:     2009-09-11 02:48:28 +0000 (Fri, 11 Sep 2009)

Log Message:
-----------
Updated saving of the world

Modified Paths:
--------------
    code/gazebo/trunk/CMakeLists.txt
    code/gazebo/trunk/libgazebo/CMakeLists.txt
    code/gazebo/trunk/server/physics/Body.cc
    code/gazebo/trunk/server/physics/ode/ODEPhysics.cc
    code/gazebo/trunk/server/rendering/OgreAdaptor.cc
    code/gazebo/trunk/server/rendering/OgreCreator.cc

Modified: code/gazebo/trunk/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/CMakeLists.txt    2009-09-09 22:25:27 UTC (rev 8256)
+++ code/gazebo/trunk/CMakeLists.txt    2009-09-11 02:48:28 UTC (rev 8257)
@@ -39,6 +39,8 @@
 SET (ODE_VERSION 0.10.1 CACHE INTERNAL "ODE version requirement" FORCE)
 SET (MIN_BOOST_VERSION 1.35.0 CACHE INTERNAL "Boost min version requirement" 
FORCE)
 
+SET (ENABLE_BINDINGS OFF CACHE BOOL "Enable libgazebo bindings")
+
 SET (gazebo_cmake_dir ${PROJECT_SOURCE_DIR}/cmake CACHE PATH 
      "Location of CMake scripts")
 

Modified: code/gazebo/trunk/libgazebo/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/libgazebo/CMakeLists.txt  2009-09-09 22:25:27 UTC (rev 
8256)
+++ code/gazebo/trunk/libgazebo/CMakeLists.txt  2009-09-11 02:48:28 UTC (rev 
8257)
@@ -12,7 +12,9 @@
   ${boost_include_dirs}
 )
 
-ADD_SUBDIRECTORY(bindings)
+IF (${ENABLE_BINDINGS})
+  ADD_SUBDIRECTORY(bindings)
+ENDIF (${ENABLE_BINDINGS})
 
 LINK_DIRECTORIES(${boost_library_dirs})
 

Modified: code/gazebo/trunk/server/physics/Body.cc
===================================================================
--- code/gazebo/trunk/server/physics/Body.cc    2009-09-09 22:25:27 UTC (rev 
8256)
+++ code/gazebo/trunk/server/physics/Body.cc    2009-09-11 02:48:28 UTC (rev 
8257)
@@ -270,7 +270,7 @@
   Model *model = dynamic_cast<Model*>(this->parent);
   //Vector3 pose = model->GetPose() - this->GetPose();
 
-  this->xyzP->SetValue( this->GetPose().pos - model->GetPose().pos );
+  this->xyzP->SetValue( this->GetPose().pos );
   this->rpyP->SetValue( this->GetRotation() );
 
   stream << prefix << "<body name=\"" << this->nameP->GetValue() << "\">\n";

Modified: code/gazebo/trunk/server/physics/ode/ODEPhysics.cc
===================================================================
--- code/gazebo/trunk/server/physics/ode/ODEPhysics.cc  2009-09-09 22:25:27 UTC 
(rev 8256)
+++ code/gazebo/trunk/server/physics/ode/ODEPhysics.cc  2009-09-11 02:48:28 UTC 
(rev 8257)
@@ -134,12 +134,16 @@
 void ODEPhysics::Save(std::string &prefix, std::ostream &stream)
 {
   stream << prefix << "<physics:ode>\n";
+  stream << prefix << "  " << *(this->stepTimeP) << "\n";
   stream << prefix << "  " << *(this->gravityP) << "\n";
-  stream << prefix << "  " << *(this->stepTimeP) << "\n";
   stream << prefix << "  " << *(this->updateRateP) << "\n";
   stream << prefix << "  " << *(this->globalCFMP) << "\n";
   stream << prefix << "  " << *(this->globalERPP) << "\n";
   stream << prefix << "  " << *(this->quickStepP) << "\n";
+  stream << prefix << "  " << *(this->quickStepItersP) << "\n";
+  stream << prefix << "  " << *(this->quickStepWP) << "\n";
+  stream << prefix << "  " << *(this->contactMaxCorrectingVelP) << "\n";
+  stream << prefix << "  " << *(this->contactSurfaceLayerP) << "\n";
   stream << prefix << "</physics:ode>\n";
 }
 

Modified: code/gazebo/trunk/server/rendering/OgreAdaptor.cc
===================================================================
--- code/gazebo/trunk/server/rendering/OgreAdaptor.cc   2009-09-09 22:25:27 UTC 
(rev 8256)
+++ code/gazebo/trunk/server/rendering/OgreAdaptor.cc   2009-09-11 02:48:28 UTC 
(rev 8257)
@@ -291,6 +291,8 @@
 {
   stream << prefix << "<rendering:ogre>\n";
   stream << prefix << "  " << *(this->ambientP) << "\n";
+  stream << prefix << "  " << *(this->drawGridP) << "\n";
+  stream << prefix << "  " << *(this->updateRateP) << "\n";
   stream << prefix << "  <sky>\n";
   stream << prefix << "    " << *(this->skyMaterialP) << "\n";
   stream << prefix << "  </sky>\n";

Modified: code/gazebo/trunk/server/rendering/OgreCreator.cc
===================================================================
--- code/gazebo/trunk/server/rendering/OgreCreator.cc   2009-09-09 22:25:27 UTC 
(rev 8256)
+++ code/gazebo/trunk/server/rendering/OgreCreator.cc   2009-09-11 02:48:28 UTC 
(rev 8257)
@@ -266,7 +266,9 @@
          << specularColor.g << " " << specularColor.b << " "
          << specularColor.a << "</specularColor>\n";
 
-  stream << prefix << "  <attenuation>" << attRange << " " << attConst 
+  stream << prefix << "  <range>"<< attRange << "</range>\n";
+
+  stream << prefix << "  <attenuation>" << " " << attConst 
          << " " << attLinear << " " << attQuadric << "</attenuation>\n";
   stream << prefix << "</light>\n";
 }
@@ -323,29 +325,31 @@
   if (cnode)
   {
     Ogre::ColourValue backgroundColor;
-    //Ogre::FogMode fogType = Ogre::FOG_NONE;
-    //std::string type;
+    Ogre::FogMode fogType = Ogre::FOG_NONE;
+    std::string type;
     //double density;
     double linearStart, linearEnd;
 
     backgroundColor.r = cnode->GetTupleDouble("color",0,0);
     backgroundColor.g = cnode->GetTupleDouble("color",1,0);
     backgroundColor.b = cnode->GetTupleDouble("color",2,0);
-    //type = cnode->GetString("type","linear",0);
+    type = cnode->GetString("type","linear",0);
     //density = cnode->GetDouble("density",0,0);
     linearStart = cnode->GetDouble("linearStart",0,0);
     linearEnd = cnode->GetDouble("linearEnd",1.0,0);
 
-    /*if (type == "linear")
+    if (type == "linear")
       fogType = Ogre::FOG_LINEAR;
-      else if (type == "exp")
+    else if (type == "exp")
       fogType = Ogre::FOG_EXP;
-      else if (type == "exp2")
+    else if (type == "exp2")
       fogType = Ogre::FOG_EXP2;
-      */
 
-    //OgreAdaptor::Instance()->sceneMgr->setFog(fogType, backgroundColor, 
density, linearStart, linearEnd);
-    OgreAdaptor::Instance()->sceneMgr->setFog(Ogre::FOG_LINEAR, 
backgroundColor, 0, linearStart, linearEnd);
+    if (type != "none")
+    {
+      //OgreAdaptor::Instance()->sceneMgr->setFog(fogType, backgroundColor, 
density, linearStart, linearEnd);
+      OgreAdaptor::Instance()->sceneMgr->setFog(Ogre::FOG_LINEAR, 
backgroundColor, 0, linearStart, linearEnd);
+    }
   }
 }
 


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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to