Revision: 8367
http://playerstage.svn.sourceforge.net/playerstage/?rev=8367&view=rev
Author: natepak
Date: 2009-11-04 22:58:51 +0000 (Wed, 04 Nov 2009)
Log Message:
-----------
Fixed lights in the worlds to be static
Modified Paths:
--------------
code/gazebo/trunk/server/gui/GLWindow.cc
code/gazebo/trunk/server/gui/GLWindow.hh
code/gazebo/trunk/server/physics/Body.cc
code/gazebo/trunk/server/physics/Geom.cc
code/gazebo/trunk/server/physics/ode/ODEBody.cc
code/gazebo/trunk/server/physics/ode/ODETrimeshShape.cc
code/gazebo/trunk/worlds/audio.world
code/gazebo/trunk/worlds/bandit.world
code/gazebo/trunk/worlds/bumper.world
code/gazebo/trunk/worlds/federation.world
code/gazebo/trunk/worlds/laser.world
code/gazebo/trunk/worlds/lights.world
code/gazebo/trunk/worlds/map.world
code/gazebo/trunk/worlds/openal.world
code/gazebo/trunk/worlds/pioneer2at.world
code/gazebo/trunk/worlds/pioneer2dx.world
code/gazebo/trunk/worlds/pioneer2dx_camera.world
code/gazebo/trunk/worlds/simplecar.world
code/gazebo/trunk/worlds/simpleshapes.world
code/gazebo/trunk/worlds/test_stacks.world
code/gazebo/trunk/worlds/test_stacks_with_rays.world
code/gazebo/trunk/worlds/trimesh.world
code/gazebo/trunk/worlds/willowgarage.world
code/gazebo/trunk/worlds/wizbot.world
Modified: code/gazebo/trunk/server/gui/GLWindow.cc
===================================================================
--- code/gazebo/trunk/server/gui/GLWindow.cc 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/server/gui/GLWindow.cc 2009-11-04 22:58:51 UTC (rev
8367)
@@ -75,10 +75,7 @@
this->leftMousePressed = false;
this->rightMousePressed = false;
this->middleMousePressed = false;
- this->controlKeyPressed = false;
- this->altKeyPressed = false;
-
this->keys.clear();
if (activeWin == NULL)
@@ -231,7 +228,8 @@
break;
}
- if (!this->mouseDrag && this->controlKeyPressed)
+ if (!this->mouseDrag &&
+ (this->keys[FL_Control_L] || this->keys[FL_Control_R]))
{
Entity *entity = OgreAdaptor::Instance()->GetEntityAt(this->activeCamera,
this->mousePos);
@@ -546,15 +544,7 @@
case FL_Control_L:
case FL_Control_R:
moveAmount = this->moveAmount * 10;
- this->controlKeyPressed = true;
- //std::cout << "press control" << std::endl;
break;
-
- case FL_Alt_L:
- case FL_Alt_R:
- this->altKeyPressed = true;
- //std::cout << "press alt" << std::endl;
- break;
}
}
}
@@ -623,17 +613,6 @@
case XK_q:
this->directionVec.z -= this->moveAmount;
break;
-
- case XK_Control_L:
- case XK_Control_R:
- this->controlKeyPressed = true;
- break;
-
- case XK_Alt_L:
- case XK_Alt_R:
- this->altKeyPressed = true;
- break;
-
default:
break;
}
@@ -661,18 +640,6 @@
case ']':
CameraManager::Instance()->DecActiveCamera();
break;
-
- case FL_Control_L:
- case FL_Control_R:
- this->controlKeyPressed = false;
- //std::cout << "releasing control" << std::endl;
- break;
-
- case FL_Alt_L:
- case FL_Alt_R:
- this->altKeyPressed = false;
- //std::cout << "releasing alt" << std::endl;
- break;
}
}
Modified: code/gazebo/trunk/server/gui/GLWindow.hh
===================================================================
--- code/gazebo/trunk/server/gui/GLWindow.hh 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/server/gui/GLWindow.hh 2009-11-04 22:58:51 UTC (rev
8367)
@@ -134,6 +134,7 @@
private: float moveAmount;
private: float moveScale;
+
private: float rotateAmount;
private: Vector3 directionVec;
@@ -161,8 +162,7 @@
/// gui interface, prerequisite to selecting Model / Body
/// press control+left click Model to toggle select. Left mouse button
drag updates model rotation about camera view axis, right mouse button drag
udpates model position in camera view plane.
/// press control+right click Body to toggle select body select. Left
mouse button drag applies torque, right mouse button drag applies linear force.
- private: bool controlKeyPressed;
- private: bool altKeyPressed;
+ /// press and hold shift to move the user camera around faster
};
}
Modified: code/gazebo/trunk/server/physics/Body.cc
===================================================================
--- code/gazebo/trunk/server/physics/Body.cc 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/server/physics/Body.cc 2009-11-04 22:58:51 UTC (rev
8367)
@@ -359,7 +359,7 @@
/// Attach mesh for CG visualization
/// Add a renderable visual for CG, make visible in Update()
- if (this->mass.GetAsDouble() > 0.0)
+ /*if (this->mass.GetAsDouble() > 0.0)
{
std::ostringstream visname;
visname << this->GetCompleteScopedName() + ":" + this->GetName() <<
"_CGVISUAL" ;
@@ -388,7 +388,7 @@
line->AddPoint(giter->second->GetRelativePose().pos);
}
}
- }
+ }*/
}
Modified: code/gazebo/trunk/server/physics/Geom.cc
===================================================================
--- code/gazebo/trunk/server/physics/Geom.cc 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/server/physics/Geom.cc 2009-11-04 22:58:51 UTC (rev
8367)
@@ -162,6 +162,7 @@
Vector3 max;
this->GetBoundingBox(min,max);
+ std::cout << "Bounding Box[" << min << "][" << max << "]\n";
std::ostringstream visname;
visname << this->GetCompleteScopedName() << "_BBVISUAL" ;
Modified: code/gazebo/trunk/server/physics/ode/ODEBody.cc
===================================================================
--- code/gazebo/trunk/server/physics/ode/ODEBody.cc 2009-11-04 21:26:28 UTC
(rev 8366)
+++ code/gazebo/trunk/server/physics/ode/ODEBody.cc 2009-11-04 22:58:51 UTC
(rev 8367)
@@ -326,9 +326,9 @@
this->physicsEngine->ConvertMass(&odeMass, this->mass);
// Center of Gravity must be at (0,0,0) in the body frame
- odeMass.c[0] = 0;
- odeMass.c[1] = 0;
- odeMass.c[2] = 0;
+ odeMass.c[0] = 0.0;
+ odeMass.c[1] = 0.0;
+ odeMass.c[2] = 0.0;
// Set the mass of the ODE body
dBodySetMass( this->bodyId, &odeMass );
Modified: code/gazebo/trunk/server/physics/ode/ODETrimeshShape.cc
===================================================================
--- code/gazebo/trunk/server/physics/ode/ODETrimeshShape.cc 2009-11-04
21:26:28 UTC (rev 8366)
+++ code/gazebo/trunk/server/physics/ode/ODETrimeshShape.cc 2009-11-04
22:58:51 UTC (rev 8367)
@@ -25,6 +25,7 @@
*/
#include "GazeboError.hh"
+#include "World.hh"
#include "ODEGeom.hh"
#include "ODEPhysics.hh"
#include "ODETrimeshShape.hh"
@@ -90,6 +91,7 @@
dMass odeMass;
Mass mass;
ODEGeom *pgeom = (ODEGeom*)this->parent;
+ PhysicsEngine *physics = World::Instance()->GetPhysicsEngine();
TrimeshShape::Load(node);
@@ -107,6 +109,9 @@
dMassSetTrimeshTotal(&odeMass, mass.GetAsDouble(), pgeom->GetGeomId());
+ physics->ConvertMass(&mass, &odeMass);
+ this->parent->SetMass(mass);
+
// Create the trimesh geometry
//pgeom->SetGeom(this->geomId, true);
Modified: code/gazebo/trunk/worlds/audio.world
===================================================================
--- code/gazebo/trunk/worlds/audio.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/audio.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -139,7 +139,7 @@
<!-- White Point light -->
<model:renderable name="point_white">
<xyz>0 2 2</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>point</type>
Modified: code/gazebo/trunk/worlds/bandit.world
===================================================================
--- code/gazebo/trunk/worlds/bandit.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/bandit.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -152,7 +152,7 @@
<!-- White Directional light -->
<model:renderable name="point_white">
<xyz>0 2 2</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>point</type>
<diffuseColor>0.8 0.8 0.8</diffuseColor>
Modified: code/gazebo/trunk/worlds/bumper.world
===================================================================
--- code/gazebo/trunk/worlds/bumper.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/bumper.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -128,7 +128,7 @@
<!-- White Point light -->
<model:renderable name="directional_white">
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>point</type>
<diffuseColor>1.0 1.0 1.0</diffuseColor>
Modified: code/gazebo/trunk/worlds/federation.world
===================================================================
--- code/gazebo/trunk/worlds/federation.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/federation.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -88,7 +88,7 @@
<model:physical name="pioneer2dx_model1">
<xyz>2 2 .145</xyz>
<rpy>0.0 0.0 90.0</rpy>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<enableFriction>false</enableFriction>
<controller:differential_position2d name="controller1">
@@ -102,7 +102,7 @@
<model:physical name="laser">
<xyz>0.15 0 0.18</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<attach>
<parentBody>chassis_body</parentBody>
@@ -123,7 +123,7 @@
<!-- White Point light -->
<model:renderable name="point_white">
<xyz>0 2 2</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>point</type>
Modified: code/gazebo/trunk/worlds/laser.world
===================================================================
--- code/gazebo/trunk/worlds/laser.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/laser.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -97,7 +97,7 @@
<!-- White Point light -->
<model:renderable name="directional_white">
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>point</type>
<diffuseColor>0.4 0.4 0.4</diffuseColor>
Modified: code/gazebo/trunk/worlds/lights.world
===================================================================
--- code/gazebo/trunk/worlds/lights.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/lights.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -81,7 +81,7 @@
<!--<model:renderable name="spot_red">
<xyz>0.0 0.0 2.0</xyz>
<rpy>0.0 0.0 0.0</rpy>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>spot</type>
@@ -98,7 +98,7 @@
<!--<model:renderable name="spot_green">
<xyz>0.0 0.0 5.0</xyz>
<rpy>0.0 0.0 0.0</rpy>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>spot</type>
@@ -134,7 +134,7 @@
<model:renderable name="spot_blue">
<xyz>0.0 0 0</xyz>
<rpy>0.0 0.0 0.0</rpy>
- <enableGravity>true</enableGravity>
+ <static>false</static>
<light>
<type>spot</type>
@@ -154,7 +154,7 @@
<!-- Yellow Point light -->
<model:renderable name="point_yellow">
<xyz>0 0 .5</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>point</type>
@@ -169,7 +169,7 @@
<!-- White Directional light -->
<!--<model:renderable name="directional_white">
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>directional</type>
<direction>0 0 -1</direction>
Modified: code/gazebo/trunk/worlds/map.world
===================================================================
--- code/gazebo/trunk/worlds/map.world 2009-11-04 21:26:28 UTC (rev 8366)
+++ code/gazebo/trunk/worlds/map.world 2009-11-04 22:58:51 UTC (rev 8367)
@@ -77,7 +77,7 @@
</model:physical>
<model:renderable name="directional_white">
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>directional</type>
<direction>0 -0.6 -0.4</direction>
Modified: code/gazebo/trunk/worlds/openal.world
===================================================================
--- code/gazebo/trunk/worlds/openal.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/openal.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -130,7 +130,7 @@
<!-- White Directional light -->
<model:renderable name="point_white">
<xyz>0 2 2</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>point</type>
Modified: code/gazebo/trunk/worlds/pioneer2at.world
===================================================================
--- code/gazebo/trunk/worlds/pioneer2at.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/pioneer2at.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -101,7 +101,7 @@
<!-- White Directional light -->
<model:renderable name="directional_white">
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>directional</type>
<direction>0 -0.8 -0.3</direction>
Modified: code/gazebo/trunk/worlds/pioneer2dx.world
===================================================================
--- code/gazebo/trunk/worlds/pioneer2dx.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/pioneer2dx.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -171,7 +171,7 @@
<!-- White Point light -->
<model:renderable name="point_white">
<xyz>-3 0 5</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>point</type>
Modified: code/gazebo/trunk/worlds/pioneer2dx_camera.world
===================================================================
--- code/gazebo/trunk/worlds/pioneer2dx_camera.world 2009-11-04 21:26:28 UTC
(rev 8366)
+++ code/gazebo/trunk/worlds/pioneer2dx_camera.world 2009-11-04 22:58:51 UTC
(rev 8367)
@@ -111,7 +111,7 @@
<!-- White Directional light -->
<model:renderable name="directional_white">
<xyz>2.0 0 2.0</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>spot</type>
Modified: code/gazebo/trunk/worlds/simplecar.world
===================================================================
--- code/gazebo/trunk/worlds/simplecar.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/simplecar.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -87,7 +87,7 @@
<!-- White Directional light -->
<model:renderable name="directional_white">
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>directional</type>
<direction>0 -0.8 -0.3</direction>
Modified: code/gazebo/trunk/worlds/simpleshapes.world
===================================================================
--- code/gazebo/trunk/worlds/simpleshapes.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/simpleshapes.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -137,27 +137,10 @@
</body:plane>
</model:physical>
- <!-- Directional light -->
- <model:renderable name="directional_white">
- <enableGravity>false</enableGravity>
-
- <light>
- <type>directional</type>
- <direction>0 0 -1</direction>
- <diffuseColor>0.3 0.3 0.3</diffuseColor>
- <specularColor>.1 .1 .1</specularColor>
- <range>20</range>
- <castShadows>false</castShadows>
-
- <!-- Constant(0-1) Linear(0-1) Quadratic -->
- <attenuation>0.2 0.01 0.001</attenuation>
- </light>
- </model:renderable>
-
<!-- White Point light -->
<model:renderable name="point_white">
<xyz>-4 4 5</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>point</type>
Modified: code/gazebo/trunk/worlds/test_stacks.world
===================================================================
--- code/gazebo/trunk/worlds/test_stacks.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/test_stacks.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -5457,7 +5457,7 @@
<!-- White Point light -->
<model:renderable name="point_white">
<xyz>1 1 100</xyz>
- <enableGravity>false</enableGravity>
+ <statice>true</static>
<light>
<type>point</type>
Modified: code/gazebo/trunk/worlds/test_stacks_with_rays.world
===================================================================
--- code/gazebo/trunk/worlds/test_stacks_with_rays.world 2009-11-04
21:26:28 UTC (rev 8366)
+++ code/gazebo/trunk/worlds/test_stacks_with_rays.world 2009-11-04
22:58:51 UTC (rev 8367)
@@ -4662,7 +4662,7 @@
<!-- White Point light -->
<model:renderable name="point_white">
<xyz>1 1 4</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>point</type>
Modified: code/gazebo/trunk/worlds/trimesh.world
===================================================================
--- code/gazebo/trunk/worlds/trimesh.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/trimesh.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -88,7 +88,7 @@
<body:sphere name="sphere1_body">
<geom:sphere name="sphere1_geom">
<size>0.2</size>
- <mass>0.0</mass>
+ <mass>1.0</mass>
<mu1>109999.0</mu1>
@@ -104,7 +104,7 @@
<!-- White Point light -->
<model:renderable name="point_white">
<xyz>0 0 10</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<castShadows>false</castShadows>
Modified: code/gazebo/trunk/worlds/willowgarage.world
===================================================================
--- code/gazebo/trunk/worlds/willowgarage.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/willowgarage.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -17,7 +17,7 @@
<verbosity>1</verbosity>
<physics:ode>
- <stepTime>0.0001</stepTime>
+ <stepTime>0.001</stepTime>
<gravity>0 0 -9.80665</gravity>
<cfm>10e-8</cfm>
<erp>0.3</erp>
@@ -74,6 +74,7 @@
<model:physical name="wg_model">
<xyz>0 0 0.0</xyz>
<static>true</static>
+
<body:trimesh name="wg_body">
<geom:trimesh name="wg_geom">
<scale>0.1 0.1 0.1</scale>
@@ -90,7 +91,7 @@
<!-- White Point light -->
<model:renderable name="point_white">
<xyz>200 200 100</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<castShadows>false</castShadows>
@@ -108,7 +109,7 @@
<!-- White Point light -->
<model:renderable name="point_white1">
<xyz>20 20 100</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<castShadows>false</castShadows>
@@ -125,7 +126,7 @@
<!-- White Point light -->
<model:renderable name="point_white2">
<xyz>0 200 100</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<castShadows>false</castShadows>
@@ -142,7 +143,7 @@
<!-- White Point light -->
<model:renderable name="point_white3">
<xyz>200 0 100</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<castShadows>false</castShadows>
@@ -159,7 +160,7 @@
<!-- White Point light -->
<model:renderable name="point_white4">
<xyz>100 100 100</xyz>
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<castShadows>true</castShadows>
Modified: code/gazebo/trunk/worlds/wizbot.world
===================================================================
--- code/gazebo/trunk/worlds/wizbot.world 2009-11-04 21:26:28 UTC (rev
8366)
+++ code/gazebo/trunk/worlds/wizbot.world 2009-11-04 22:58:51 UTC (rev
8367)
@@ -130,7 +130,7 @@
<!-- White Directional light -->
<model:renderable name="directional_white">
- <enableGravity>false</enableGravity>
+ <static>true</static>
<light>
<type>directional</type>
<direction>0 -0.6 -0.4</direction>
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