Revision: 7743
http://playerstage.svn.sourceforge.net/playerstage/?rev=7743&view=rev
Author: hsujohnhsu
Date: 2009-05-30 00:26:57 +0000 (Sat, 30 May 2009)
Log Message:
-----------
Merging from trunk:
svn merge -r 7722:7742
https://playerstage.svn.sourceforge.net/svnroot/playerstage/code/gazebo/trunk .
Modified Paths:
--------------
code/gazebo/branches/threads/player/CMakeLists.txt
code/gazebo/branches/threads/server/Rand.cc
code/gazebo/branches/threads/server/Rand.hh
code/gazebo/branches/threads/server/Simulator.cc
code/gazebo/branches/threads/server/World.cc
code/gazebo/branches/threads/server/rendering/OgreAdaptor.cc
code/gazebo/branches/threads/server/rendering/OgreCreator.cc
Property Changed:
----------------
code/gazebo/branches/threads/
code/gazebo/branches/threads/cmake/libgazebo_pkgconfig.cmake
Property changes on: code/gazebo/branches/threads
___________________________________________________________________
Modified: svn:mergeinfo
- /code/branches/federation/gazebo:7371-7550
/code/gazebo/branches/ogre-1.4.9:7137-7636
+ /code/branches/federation/gazebo:7371-7550
/code/gazebo/branches/ogre-1.4.9:7137-7636
/code/gazebo/trunk:7723-7742
Property changes on:
code/gazebo/branches/threads/cmake/libgazebo_pkgconfig.cmake
___________________________________________________________________
Modified: svn:mergeinfo
-
/code/branches/federation/gazebo/cmake/libgazeboshm_pkgconfig.cmake:7371-7550
/code/gazebo/branches/ogre-1.4.9/cmake/libgazeboshm_pkgconfig.cmake:7137-7636
+
/code/branches/federation/gazebo/cmake/libgazeboshm_pkgconfig.cmake:7371-7550
/code/gazebo/branches/ogre-1.4.9/cmake/libgazeboshm_pkgconfig.cmake:7137-7636
/code/gazebo/trunk/cmake/libgazebo_pkgconfig.cmake:7723-7742
Modified: code/gazebo/branches/threads/player/CMakeLists.txt
===================================================================
--- code/gazebo/branches/threads/player/CMakeLists.txt 2009-05-29 23:30:21 UTC
(rev 7742)
+++ code/gazebo/branches/threads/player/CMakeLists.txt 2009-05-30 00:26:57 UTC
(rev 7743)
@@ -1,5 +1,5 @@
-SET (sources GazeboDriver.cc
+SET (gazeboplugin_sources GazeboDriver.cc
GazeboClient.cc
GazeboInterface.cc
GazeboTime.cc
@@ -25,7 +25,7 @@
LINK_DIRECTORIES( ${PLAYER_LINK_DIRS} gazeboshm)
-ADD_LIBRARY(gazeboplugin SHARED ${sources})
-#TARGET_LINK_LIBRARIES(gazeboplugin ${PLAYER_LINK_LIBS})
+ADD_LIBRARY(gazeboplugin SHARED ${gazeboplugin_sources})
+TARGET_LINK_LIBRARIES(gazeboplugin ${PLAYER_LINK_LIBS} gazeboshm )
INSTALL(TARGETS gazeboplugin DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
Modified: code/gazebo/branches/threads/server/Rand.cc
===================================================================
--- code/gazebo/branches/threads/server/Rand.cc 2009-05-29 23:30:21 UTC (rev
7742)
+++ code/gazebo/branches/threads/server/Rand.cc 2009-05-30 00:26:57 UTC (rev
7743)
@@ -1,3 +1,29 @@
+/*
+ * 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: Random number generator
+ * Author: Nate Koenig
+ * Date: 27 May 2009
+ * SVN: $Id:$
+ */
+
#include <ctime>
#include "Rand.hh"
Modified: code/gazebo/branches/threads/server/Rand.hh
===================================================================
--- code/gazebo/branches/threads/server/Rand.hh 2009-05-29 23:30:21 UTC (rev
7742)
+++ code/gazebo/branches/threads/server/Rand.hh 2009-05-30 00:26:57 UTC (rev
7743)
@@ -1,3 +1,29 @@
+/*
+ * 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: Random number generator
+ * Author: Nate Koenig
+ * Date: 27 May 2009
+ * SVN: $Id:$
+ */
+
#ifndef RAND_HH
#define RAND_HH
Modified: code/gazebo/branches/threads/server/Simulator.cc
===================================================================
--- code/gazebo/branches/threads/server/Simulator.cc 2009-05-29 23:30:21 UTC
(rev 7742)
+++ code/gazebo/branches/threads/server/Simulator.cc 2009-05-30 00:26:57 UTC
(rev 7743)
@@ -390,7 +390,8 @@
{
this->prevRenderTime = this->GetRealTime();
- OgreAdaptor::Instance()->UpdateCameras();
+ if (this->renderEngineEnabled)
+ OgreAdaptor::Instance()->UpdateCameras();
if (this->gui)
{
Modified: code/gazebo/branches/threads/server/World.cc
===================================================================
--- code/gazebo/branches/threads/server/World.cc 2009-05-29 23:30:21 UTC
(rev 7742)
+++ code/gazebo/branches/threads/server/World.cc 2009-05-30 00:26:57 UTC
(rev 7743)
@@ -504,7 +504,7 @@
// Add a new entity to the world
void World::InsertEntity( std::string xmlString)
{
- //boost::recursive_mutex::scoped_lock
lock(*Simulator::Instance()->GetMRMutex());
+ boost::recursive_mutex::scoped_lock
mr_lock(*Simulator::Instance()->GetMRMutex());
this->toLoadEntities.push_back( xmlString );
}
Modified: code/gazebo/branches/threads/server/rendering/OgreAdaptor.cc
===================================================================
--- code/gazebo/branches/threads/server/rendering/OgreAdaptor.cc
2009-05-29 23:30:21 UTC (rev 7742)
+++ code/gazebo/branches/threads/server/rendering/OgreAdaptor.cc
2009-05-30 00:26:57 UTC (rev 7743)
@@ -196,8 +196,9 @@
else
{
this->sceneType= SCENE_EXT;
- this->sceneMgr = this->root->createSceneManager(Ogre::ST_EXTERIOR_CLOSE);
- //this->sceneMgr = this->root->createSceneManager(Ogre::ST_EXTERIOR_FAR);
+ this->sceneMgr = this->root->createSceneManager(Ogre::ST_EXTERIOR_FAR);
+ //this->sceneMgr = this->root->createSceneManager(Ogre::ST_EXTERIOR_CLOSE);
+ //this->sceneMgr = this->root->createSceneManager(Ogre::ST_GENERIC);
}
Param::Begin(&this->parameters);
@@ -211,33 +212,42 @@
this->drawGridP->Load(node);
this->updateRateP->Load(node);
+ //Preload basic shapes that can be used anywhere
+ OgreCreator::LoadBasicShapes();
ambient.r = (**(this->ambientP)).x;
ambient.g = (**(this->ambientP)).y;
ambient.b = (**(this->ambientP)).z;
ambient.a = (**(this->ambientP)).w;
- // Ambient lighting
- this->sceneMgr->setAmbientLight(ambient);
-
- this->sceneMgr->setShadowTextureSelfShadow(true);
- this->sceneMgr->setShadowTexturePixelFormat(Ogre::PF_FLOAT16_R);
- this->sceneMgr->setShadowTextureSize(**(this->shadowTextureSizeP));
- this->sceneMgr->setShadowIndexBufferSize(**(this->shadowIndexSizeP) );
-
+
// Settings for shadow mapping
if (**(this->shadowTechniqueP) == std::string("stencilAdditive"))
this->sceneMgr->setShadowTechnique( Ogre::SHADOWTYPE_STENCIL_ADDITIVE );
+ else if (**(this->shadowTechniqueP) == std::string("stencilModulative"))
+ this->sceneMgr->setShadowTechnique( Ogre::SHADOWTYPE_STENCIL_MODULATIVE );
else if (**(this->shadowTechniqueP) == std::string("textureAdditive"))
this->sceneMgr->setShadowTechnique( Ogre::SHADOWTYPE_TEXTURE_ADDITIVE );
+ else if (**(this->shadowTechniqueP) == std::string("textureModulative"))
+ this->sceneMgr->setShadowTechnique( Ogre::SHADOWTYPE_TEXTURE_MODULATIVE );
else if (**(this->shadowTechniqueP) == std::string("none"))
this->sceneMgr->setShadowTechnique( Ogre::SHADOWTYPE_NONE );
else
gzthrow(std::string("Unsupported shadow technique: ") +
**(this->shadowTechniqueP) + "\n");
- //Preload basic shapes that can be used anywhere
- OgreCreator::LoadBasicShapes();
+ this->sceneMgr->setShadowTextureSelfShadow(true);
+ this->sceneMgr->setShadowTexturePixelFormat(Ogre::PF_FLOAT16_R);
+ this->sceneMgr->setShadowTextureSize(**(this->shadowTextureSizeP));
+ this->sceneMgr->setShadowIndexBufferSize(**(this->shadowIndexSizeP) );
+ // Ambient lighting
+ this->sceneMgr->setAmbientLight(ambient);
+
+ this->sceneMgr->setShadowTextureSettings(512,2);
+ this->sceneMgr->setShowDebugShadows(true);
+ this->sceneMgr->setShadowColour(Ogre::ColourValue(0.2, 0.2, 0.2));
+ this->sceneMgr->setShadowFarDistance(30);
+
// Add a sky dome to our scene
if (node->GetChild("sky"))
{
Modified: code/gazebo/branches/threads/server/rendering/OgreCreator.cc
===================================================================
--- code/gazebo/branches/threads/server/rendering/OgreCreator.cc
2009-05-29 23:30:21 UTC (rev 7742)
+++ code/gazebo/branches/threads/server/rendering/OgreCreator.cc
2009-05-30 00:26:57 UTC (rev 7743)
@@ -173,6 +173,7 @@
// Set the direction which the light points
vec = node->GetVector3("direction", Vector3(0.0, 0.0, -1.0));
+ vec.Normalize();
light->setDirection(vec.x, vec.y, vec.z);
// Absolute range of light in world coordinates
@@ -207,6 +208,8 @@
Ogre::Radian(Ogre::Degree(vec.y)), vec.z);
}
+ light->setCastShadows(node->GetBool("castShadows",false,0));
+
parent->AttachObject(light);
return stream.str();
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit