Revision: 8447
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8447&view=rev
Author:   natepak
Date:     2009-12-04 18:12:19 +0000 (Fri, 04 Dec 2009)

Log Message:
-----------
Added patches from ROS, and fixed MAPS

Modified Paths:
--------------
    code/gazebo/trunk/CMakeLists.txt
    code/gazebo/trunk/cmake/SearchForStuff.cmake
    code/gazebo/trunk/server/CMakeLists.txt
    code/gazebo/trunk/server/Entity.cc
    code/gazebo/trunk/server/Model.cc
    code/gazebo/trunk/server/gui/CMakeLists.txt
    code/gazebo/trunk/server/physics/MapShape.cc
    code/gazebo/trunk/server/physics/bullet/CMakeLists.txt
    code/gazebo/trunk/server/rendering/OgreVisual.cc

Modified: code/gazebo/trunk/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/CMakeLists.txt    2009-12-04 16:31:55 UTC (rev 8446)
+++ code/gazebo/trunk/CMakeLists.txt    2009-12-04 18:12:19 UTC (rev 8447)
@@ -36,7 +36,7 @@
 SET (OGRE_VERSION 1.6.3 CACHE INTERNAL "Ogre version requirement" FORCE)
 
 SET (FREEIMAGE_MAJOR_VERSION 3 CACHE INTERNAL "FreeImage major version 
requirement" FORCE)
-SET (FREEIMAGE_MINOR_VERSION 10 CACHE INTERNAL "FreeImage minor version 
requirement" FORCE)
+SET (FREEIMAGE_MINOR_VERSION 9 CACHE INTERNAL "FreeImage minor version 
requirement" FORCE)
 SET (FREEIMAGE_VERSION ${FREEIMAGE_MAJOR_VERSION}.${FREEIMAGE_MINOR_VERSION}.0 
CACHE INTERNAL "FreeImage version requirement" FORCE)
 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)

Modified: code/gazebo/trunk/cmake/SearchForStuff.cmake
===================================================================
--- code/gazebo/trunk/cmake/SearchForStuff.cmake        2009-12-04 16:31:55 UTC 
(rev 8446)
+++ code/gazebo/trunk/cmake/SearchForStuff.cmake        2009-12-04 18:12:19 UTC 
(rev 8447)
@@ -7,9 +7,9 @@
 INCLUDE (${gazebo_cmake_dir}/FindOde.cmake)
 INCLUDE (${gazebo_cmake_dir}/FindFreeimage.cmake)
 
-if (NOT FLTK_FOUND)
-  BUILD_ERROR("FLTK libraries and development files not found. See the 
following website for installation instructions: http://fltk.org";)
-endif (NOT FLTK_FOUND)
+#if (NOT FLTK_FOUND)
+#  BUILD_ERROR("FLTK libraries and development files not found. See the 
following website for installation instructions: http://fltk.org";)
+#endif (NOT FLTK_FOUND)
 
 
 SET (INCLUDE_WEBGAZEBO ON CACHE BOOL "Build webgazebo" FORCE)
@@ -18,6 +18,11 @@
 SET (boost_include_dirs "" CACHE STRING "Boost include paths. Use this to 
override automatic detection.")
 SET (boost_library_dirs "" CACHE STRING "Boost library paths. Use this to 
override automatic detection.")
 SET (boost_libraries "" CACHE STRING "Boost libraries. Use this to override 
automatic detection.")
+SET (bullet_dynamics_dirs "" CACHE STRING "Bullet Dynamics libraries. Use this 
to override automatic detection.")
+SET (bullet_collision_dirs "" CACHE STRING "Bullet Collision libraries. Use 
this to override automatic detection.")
+SET (bullet_softbody_dirs "" CACHE STRING "Bullet Softbody libraries. Use this 
to override automatic detection.")
+SET (bullet_math_dirs "" CACHE STRING "Bullet LinearMath libraries. Use this 
to override automatic detection.")
+SET (bullet_cflags "" CACHE STRING "Bullet Dynamics C compile flags exported 
by rospack.")
 SET (threadpool_include_dirs "" CACHE STRING "Threadpool include paths. Use 
this to override automatic detection.")
 
 ########################################

Modified: code/gazebo/trunk/server/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/CMakeLists.txt     2009-12-04 16:31:55 UTC (rev 
8446)
+++ code/gazebo/trunk/server/CMakeLists.txt     2009-12-04 18:12:19 UTC (rev 
8447)
@@ -1,10 +1,12 @@
 INCLUDE (${gazebo_cmake_dir}/GazeboUtils.cmake)
 
-STRING (REPLACE " " ";" threadpool_include_dirs_split 
"${threadpool_include_dirs}")
-
 ########################################
 # Include all the search paths for headers
 STRING (REPLACE " " ";" threadpool_include_dirs_split 
"${threadpool_include_dirs}")
+
+
+message(status 
"\n\n\nhihi\n\n\n${CMAKE_SOURCE_DIR}/3rd_party/assimp/include\n\n\n")
+
 INCLUDE_DIRECTORIES(
   .
   ${CMAKE_SOURCE_DIR}/libgazebo 
@@ -21,6 +23,7 @@
   sensors/imu
   sensors/ir
   sensors/ray
+  ${CMAKE_SOURCE_DIR}/3rd_party/assimp/include
   ${LIBAVCODEC_PATH}
   ${LIBAVFORMAT_PATH}
   ${libtool_include_path}
@@ -33,10 +36,15 @@
 )
 
 LINK_DIRECTORIES(  
+ ${CMAKE_BINARY_DIR}/3rd_party/assimp 
  ${CMAKE_BINARY_DIR}/libgazebo 
  ${CMAKE_BINARY_DIR}/server/gui 
  ${CMAKE_BINARY_DIR}/server/physics/bullet 
  ${boost_library_dirs} 
+ ${bullet_dynamics_dirs} 
+ ${bullet_collision_dirs} 
+ ${bullet_softbody_dirs} 
+ ${bullet_math_dirs} 
  ${freeimage_library_dir}
  ${gazeboserver_link_dirs} 
 )

Modified: code/gazebo/trunk/server/Entity.cc
===================================================================
--- code/gazebo/trunk/server/Entity.cc  2009-12-04 16:31:55 UTC (rev 8446)
+++ code/gazebo/trunk/server/Entity.cc  2009-12-04 18:12:19 UTC (rev 8447)
@@ -326,7 +326,8 @@
 {
   if (Simulator::Instance()->GetRenderEngineEnabled())
   {
-    if (Simulator::Instance()->GetState() == Simulator::RUN)
+    if (Simulator::Instance()->GetState() == Simulator::RUN &&
+        !this->IsStatic())
       this->visualNode->SetDirty(true, this->relativePose);
     else
       this->visualNode->SetPose(this->relativePose);

Modified: code/gazebo/trunk/server/Model.cc
===================================================================
--- code/gazebo/trunk/server/Model.cc   2009-12-04 16:31:55 UTC (rev 8446)
+++ code/gazebo/trunk/server/Model.cc   2009-12-04 18:12:19 UTC (rev 8447)
@@ -207,7 +207,8 @@
     gzthrow("Invalid model type[" + this->type + "]\n");
 
   // Set the relative pose of the model
-  this->SetRelativePose( pose );
+  if (!this->IsStatic())
+    this->SetRelativePose( pose );
 
   // Record the model's initial pose (for reseting)
   this->SetInitPose(pose);

Modified: code/gazebo/trunk/server/gui/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/gui/CMakeLists.txt 2009-12-04 16:31:55 UTC (rev 
8446)
+++ code/gazebo/trunk/server/gui/CMakeLists.txt 2009-12-04 18:12:19 UTC (rev 
8447)
@@ -2,6 +2,19 @@
 
 include_directories( ${FLTK_INCLUDE_DIR} )
 
+LINK_DIRECTORIES(  
+ ${CMAKE_BINARY_DIR}/libgazebo 
+ ${CMAKE_BINARY_DIR}/server/gui 
+ ${CMAKE_BINARY_DIR}/server/physics/bullet 
+ ${boost_library_dirs} 
+ ${bullet_dynamics_dirs} 
+ ${bullet_collision_dirs} 
+ ${bullet_softbody_dirs} 
+ ${bullet_math_dirs} 
+ ${freeimage_library_dir}
+ ${gazeboserver_link_dirs} 
+)
+
 set (sources Gui.cc
              GLWindow.cc
              MainMenu.cc
@@ -23,11 +36,12 @@
 )
 
 LIST_TO_STRING(GAZEBO_CFLAGS "${gazeboserver_cflags}")
+
 set_source_files_properties(${sources} PROPERTIES COMPILE_FLAGS 
"${GAZEBO_CFLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}}")
 
 add_library(gazebo_gui SHARED ${sources})
 
-target_link_libraries(gazebo_gui ${FLTK_LIBRARIES} )
+target_link_libraries(gazebo_gui ${FLTK_LIBRARIES} BulletDynamics 
BulletCollision LinearMath)
 
 set_target_properties(gazebo_gui PROPERTIES OUTPUT_NAME "gazebo_gui" VERSION 
${GAZEBO_VERSION})
 

Modified: code/gazebo/trunk/server/physics/MapShape.cc
===================================================================
--- code/gazebo/trunk/server/physics/MapShape.cc        2009-12-04 16:31:55 UTC 
(rev 8446)
+++ code/gazebo/trunk/server/physics/MapShape.cc        2009-12-04 18:12:19 UTC 
(rev 8447)
@@ -133,8 +133,9 @@
 
   this->CreateBoxes(this->root);
 
-  if (this->visualNode)
+  /*if (this->visualNode)
     this->visualNode->MakeStatic();
+    */
 }
 
 
@@ -171,6 +172,7 @@
     stream << "  <xyz>" << x << " " << y << " " << z << "</xyz>";
     stream << "  <rpy>0 0 0</rpy>";
     stream << "  <size>" << xSize << " " << ySize << " " << zSize << "</size>";
+    stream << "  <static>true</static>";
     stream << "  <visual>";
     stream << "    <mesh>unit_box</mesh>";
     stream << "    <material>" << this->materialP->GetValue() << "</material>";

Modified: code/gazebo/trunk/server/physics/bullet/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/physics/bullet/CMakeLists.txt      2009-12-04 
16:31:55 UTC (rev 8446)
+++ code/gazebo/trunk/server/physics/bullet/CMakeLists.txt      2009-12-04 
18:12:19 UTC (rev 8447)
@@ -1,5 +1,47 @@
 include (${gazebo_cmake_dir}/GazeboUtils.cmake)
 
+INCLUDE_DIRECTORIES(
+  .
+  ${CMAKE_SOURCE_DIR}/libgazebo 
+  gui 
+  physics 
+  physics/ode
+  physics/bullet
+  audio_video
+  controllers 
+  rendering 
+  sensors 
+  sensors/camera
+  sensors/contact
+  sensors/imu
+  sensors/ir
+  sensors/ray
+  ${LIBAVCODEC_PATH}
+  ${LIBAVFORMAT_PATH}
+  ${libtool_include_path}
+  ${gazeboserver_include_dirs}
+  ${boost_include_dirs}
+  ${freeimage_include_dir}
+  ${bullet_include_dir}
+  ${threadpool_include_dirs_split}
+  ${FLTK_INCLUDE_DIR}
+)
+
+message(status "\n\nha\n${bullet_dynamics_dirs}\n${boost_library_dirs}\n\n")
+
+LINK_DIRECTORIES(  
+ ${CMAKE_BINARY_DIR}/libgazebo 
+ ${CMAKE_BINARY_DIR}/server/gui 
+ ${CMAKE_BINARY_DIR}/server/physics/bullet 
+ ${boost_library_dirs} 
+ ${bullet_dynamics_dirs} 
+ ${bullet_collision_dirs} 
+ ${bullet_softbody_dirs} 
+ ${bullet_math_dirs} 
+ ${freeimage_library_dir}
+ ${gazeboserver_link_dirs} 
+)
+
 SET (sources BulletPhysics.cc
              BulletGeom.cc
              BulletBody.cc
@@ -14,6 +56,8 @@
              #BulletRayGeom.cc
 )
 
+add_definitions(${bullet_cflags})
+
 #ADD_DEFINITIONS(-DBT_USE_DOUBLE_PRECISION -DBT_EULER_DEFAULT_ZYX)
 ADD_LIBRARY(gazebo_physics_bullet SHARED ${sources})
 TARGET_LINK_LIBRARIES( gazebo_physics_bullet BulletDynamics BulletCollision 
LinearMath )

Modified: code/gazebo/trunk/server/rendering/OgreVisual.cc
===================================================================
--- code/gazebo/trunk/server/rendering/OgreVisual.cc    2009-12-04 16:31:55 UTC 
(rev 8446)
+++ code/gazebo/trunk/server/rendering/OgreVisual.cc    2009-12-04 18:12:19 UTC 
(rev 8447)
@@ -126,13 +126,13 @@
 
   this->isStatic = isStatic;
 
-  if (this->isStatic)
-  {
+  /*if (this->isStatic)
     this->staticGeom = this->sceneNode->getCreator()->createStaticGeometry(
         this->GetName() + "_staticgeom");
-  }
   else
     this->staticGeom = NULL;
+    */
+  this->staticGeom = NULL;
 }
 
 
@@ -640,7 +640,7 @@
     obj->setCastShadows(shadows);
   }
 
-  if (this->IsStatic())
+  if (this->IsStatic() && this->staticGeom)
     this->staticGeom->setCastShadows(shadows);
 }
 
@@ -671,19 +671,19 @@
   if (this->ignorePoseUpdates)
     return;
 
+  /*if (this->IsStatic() && this->staticGeom)
+  {
+    this->staticGeom->reset();
+    delete this->staticGeom;
+    this->staticGeom = NULL;
+    //this->staticGeom->setOrigin( Ogre::Vector3(pos.x, pos.y, pos.z) );
+  }*/
+
   this->sceneNode->setPosition(pos.x, pos.y, pos.z);
 
-  if (this->IsStatic())
-  {
-    //this->sceneNode->setParent(this->owner->GetVisualNode()->GetSceneNode() 
);
-    //this->staticGeom->reset();
-    //this->MakeStatic();
-    //this->staticGeom->setOrigin( Ogre::Vector3(pos.x, pos.y, pos.z) );
-  }
-  else
-  {
-    //std::cout << "Dynamic SceneNodePos[" << 
this->sceneNode->_getDerivedPosition() << "] [" << pos << "]\n";
-  }
+  /*if (this->IsStatic())
+    this->MakeStatic();
+    */
 }
 
 
////////////////////////////////////////////////////////////////////////////////


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

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to