[Playerstage-commit] SF.net SVN: playerstage:[9088] code/player/trunk/libplayercore

2012-01-04 Thread natepak
Revision: 9088
  http://playerstage.svn.sourceforge.net/playerstage/?rev=9088view=rev
Author:   natepak
Date: 2012-01-04 22:18:25 + (Wed, 04 Jan 2012)
Log Message:
---
Removed some build warnings

Modified Paths:
--
code/player/trunk/libplayercore/driver.h
code/player/trunk/libplayercore/property.cpp
code/player/trunk/libplayercore/property.h

Modified: code/player/trunk/libplayercore/driver.h
===
--- code/player/trunk/libplayercore/driver.h2012-01-01 03:47:04 UTC (rev 
9087)
+++ code/player/trunk/libplayercore/driver.h2012-01-04 22:18:25 UTC (rev 
9088)
@@ -340,7 +340,7 @@
 @param addr Address of the device to subscribe to (the driver may
 have more than one interface).
 @returns Returns 0 on success, -ve on error and 1 for unimplemented. */
-virtual int Subscribe(QueuePointer queue, player_devaddr_t addr) {return 
1;};
+virtual int Subscribe(QueuePointer /*queue*/, player_devaddr_t /*addr*/) 
{return 1;};
 
 /** @brief Unsubscribe from this driver.
 
@@ -366,7 +366,7 @@
 @param addr Address of the device to unsubscribe from (the driver may
 have more than one interface).
 @returns Returns 0 on success. */
-virtual int Unsubscribe(QueuePointer queue, player_devaddr_t addr) 
{return 1;};
+virtual int Unsubscribe(QueuePointer /*queue*/, player_devaddr_t 
/*addr*/) {return 1;};
 
 /** @brief Terminate the driver.
 

Modified: code/player/trunk/libplayercore/property.cpp
===
--- code/player/trunk/libplayercore/property.cpp2012-01-01 03:47:04 UTC 
(rev 9087)
+++ code/player/trunk/libplayercore/property.cpp2012-01-04 22:18:25 UTC 
(rev 9088)
@@ -85,7 +85,7 @@
}
 }
 
-const bool Property::KeyIsEqual (const char *rhs)
+bool Property::KeyIsEqual (const char *rhs)
 {
if (!strcmp (key, rhs))
return true;

Modified: code/player/trunk/libplayercore/property.h
===
--- code/player/trunk/libplayercore/property.h  2012-01-01 03:47:04 UTC (rev 
9087)
+++ code/player/trunk/libplayercore/property.h  2012-01-04 22:18:25 UTC (rev 
9088)
@@ -69,7 +69,7 @@
virtual void GetValueToMessage (void *data) const = 0;
virtual void SetValueFromMessage (const void *data) = 0;
 
-   virtual const bool KeyIsEqual (const char *rhs);
+   virtual bool KeyIsEqual (const char *rhs);
 
// Config file read method
virtual bool ReadConfig (ConfigFile *cf, int section) = 0;

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


--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[9082] www/player-www

2011-12-08 Thread natepak
Revision: 9082
  http://playerstage.svn.sourceforge.net/playerstage/?rev=9082view=rev
Author:   natepak
Date: 2011-12-08 19:17:41 + (Thu, 08 Dec 2011)
Log Message:
---
Updated gazebo href links

Modified Paths:
--
www/player-www/developers.src
www/player-www/gazebo.src

Modified: www/player-www/developers.src
===
--- www/player-www/developers.src   2011-11-24 17:40:04 UTC (rev 9081)
+++ www/player-www/developers.src   2011-12-08 19:17:41 UTC (rev 9082)
@@ -65,7 +65,7 @@
 
 libNate Koenig/b
   ul
-  libusername:/b natepack
+  libusername:/b natepak
   librole(s):/b project maintainer, Gazebo lead
   libdirectories/b:
 ul

Modified: www/player-www/gazebo.src
===
--- www/player-www/gazebo.src   2011-11-24 17:40:04 UTC (rev 9081)
+++ www/player-www/gazebo.src   2011-12-08 19:17:41 UTC (rev 9082)
@@ -1,194 +1 @@
-
-img width=140 src=images/gazebo_button.png alt=Gazebo piecebr
-p style=margin-top:0;3D multiple robot simulator with dynamics
-
-hr
-
-
-h3About Gazebo/h3
-
-pGazebo is a multi-robot simulator for outdoor environments.  Like
-Stage, it is capable of simulating a population of robots, sensors and
-objects, but does so in a three-dimensional world.  It generates both
-realistic sensor feedback and physically plausible interactions
-between objects (it includes an accurate simulation of rigid-body
-physics)./p
-
-pFeatures:/p
-ul
-liSimulation of standard robot sensors, including sonar, scanning
-laser range-finders, GPS and IMU, monocular and stereo cameras.
-liModels for commonly used robot types such as the Pioneer2DX,
-Pioneer2AT and SegwayRMP.
-liRealistic simulation of rigid-body physics: robots can push things
-around, pick things up, and generally interact with the world in a
-plausible manner.
-liPlayer compatible: robots and sensors can be controlled through
-standard Player interfaces.
-liStand-alone operation: programs can interact directly with the
-simulator (i.e., without going through Player) using ttlibgazebo/tt
-(included in the distribution).
-
-libNew/b Stereo camera model: generates stereo image
-pairs, disparity and depth maps.
-
-libNew/b Completely re-written GUI using wxPython: most
-devices can now be directly controlled/inspected through the simulator
-GUI.
-
-libNew/b Plugin models: users can develop their own
-robot/sensor models, and have these models loaded dynamically at run
-time.
-
-libNew/b Skins: simple geometric models may be augmented
-with realisitc 'skins' from 3D modelling programs.
-
-liGazebo is free software, released under the GNU Public License.
-You are free to use, extend and modify Gazebo according to your needs,
-but we would appreciate it if you would a
-href=http://sourceforge.net/tracker/?group_id=42445;send us your
-patch/a.  
-/ul
-
-br Gazebo can be downloaded from the
-a 
href=http://sourceforge.net/project/showfiles.php?group_id=42445;SourceForge
-Download Page/a.
-
-
-h3Stage and Gazebo/h3
-
-p The Player/Stage project provides two multi-robot simulators:
-Stage and Gazebo.  Since Stage and Gazebo are both Player-compatible,
-client programs written using one simulator can usually be run on the
-other with little or no modification.  The key difference between
-these two simulators is that whereas Stage is designed to simulate a
-very large robot population with low fidelity, Gazebo is designed to
-simulated a small population with high fidelity.  Thus, the two
-simulator are complimentary, and users may switch back and forth
-between them according to their needs. /p
-
-
-h3Screen Shots/h3
-
-div align=center
-
-table
-tr
-tda href=gazebo/gazebo_at.gifimg src=images/gazebo_at.gif 
alt=gazebo_at 
-height=150/a/td
-tda href=images/gazebo_at_frustrum.gifimg 
-src=images/gazebo_at_frustrum.gif alt=gazebo_at_frustrum 
height=150/a/td
-tda href=images/gazebo_at_rays.gifimg src=images/gazebo_at_rays.gif 
alt=gazebo_at_rays height=150/a/td
-tda href=images/gazebo_at_wireframe.gifimg 
src=images/gazebo_at_wireframe.gif alt=gazebo_at_wireframe 
height=150/a/td
-/tr
-tr
-td colspan=4
-pPioneer2AT with a SICKLMS200 and SonyVID30, showing both laser rays and
-camera frustrum.
-/td
-/tr
-/table
-
-br
-table
-tr
-tda href=images/wxgazebo.gifimg src=images/wxgazebo.gif 
alt=wxgazebo height=300/a/td
-/tr
-tr
-td
-pThe wxPython GUI, showing a number of control panels.
-/td
-/tr
-/table
-
-br
-table
-tr
-tda href=images/gazebo_car_naked.gifimg 
src=images/gazebo_car_naked.gif alt=gazebo_car_naked height=150/a/td
-tda href=images/gazebo_car_skin.gifimg src=images/gazebo_car_skin.gif 
alt=gazebo_car_skin height=150/a/td
-/tr
-tr
-td colspan=2
-pModels with and without skins.
-/td
-/tr
-/table
-
-/div
-
-h3Sample Videos/h3
-
-p
-center
-bThese videos may not be used for commercial or for-profit purposes. They are
-copyrighted by the authors./b
-/center
-/p
-
-div align=center
-
-table

[Playerstage-commit] SF.net SVN: playerstage:[9083] code/gazebo/

2011-12-08 Thread natepak
Revision: 9083
  http://playerstage.svn.sourceforge.net/playerstage/?rev=9083view=rev
Author:   natepak
Date: 2011-12-08 19:21:46 + (Thu, 08 Dec 2011)
Log Message:
---
Removed gazebo

Removed Paths:
-
code/gazebo/

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


--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[9028] code/gazebo/trunk/plugins

2011-01-21 Thread natepak
Revision: 9028
  http://playerstage.svn.sourceforge.net/playerstage/?rev=9028view=rev
Author:   natepak
Date: 2011-01-21 18:26:33 + (Fri, 21 Jan 2011)

Log Message:
---
Latest changes to plugins

Modified Paths:
--
code/gazebo/trunk/plugins/CMakeLists.txt
code/gazebo/trunk/plugins/ball_drop.cc

Modified: code/gazebo/trunk/plugins/CMakeLists.txt
===
--- code/gazebo/trunk/plugins/CMakeLists.txt2011-01-18 17:23:26 UTC (rev 
9027)
+++ code/gazebo/trunk/plugins/CMakeLists.txt2011-01-21 18:26:33 UTC (rev 
9028)
@@ -26,7 +26,7 @@
 
 
 foreach (src ${plugins})
-  set_source_files_properties(${src}.cc PROPERTIES COMPILE_FLAGS 
${GAZEBO_CFLAGS})
+  #set_source_files_properties(${src}.cc PROPERTIES COMPILE_FLAGS 
${GAZEBO_CFLAGS})
   add_library(${src} SHARED ${src}.cc)
   target_link_libraries(${src} gazebo ${GAZEBO_LINK_LIBS} )
   set_target_properties(${src} PROPERTIES SKIP_BUILD_RPATH TRUE)

Modified: code/gazebo/trunk/plugins/ball_drop.cc
===
--- code/gazebo/trunk/plugins/ball_drop.cc  2011-01-18 17:23:26 UTC (rev 
9027)
+++ code/gazebo/trunk/plugins/ball_drop.cc  2011-01-21 18:26:33 UTC (rev 
9028)
@@ -43,7 +43,7 @@
   if (LOG)
 fclose(this-indexFile);
 
-  World::Instance()-DisconnectWorldUpdateStartSignal(
+  Events::DisconnectWorldUpdateStartSignal(
   boost::bind(BallDrop::UpdateCB, this));
 
   /*for (unsigned int i=0; i  this-sphere-GetChildCount(); i++)
@@ -106,7 +106,7 @@
   this-physics-SetStepTime( *this-stepTimesIter );
   this-physics-SetSORPGSIters( *this-stepItersIter );
 
-  World::Instance()-ConnectWorldUpdateStartSignal(
+  Events::ConnectWorldUpdateStartSignal(
 boost::bind(BallDrop::UpdateCB, this));
 }
 


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

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[9029] code/gazebo/branches/wx/

2011-01-21 Thread natepak
Revision: 9029
  http://playerstage.svn.sourceforge.net/playerstage/?rev=9029view=rev
Author:   natepak
Date: 2011-01-21 18:27:08 + (Fri, 21 Jan 2011)

Log Message:
---
Removing an old branch

Removed Paths:
-
code/gazebo/branches/wx/


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

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[9030] code/gazebo/branches/tbb/

2011-01-21 Thread natepak
Revision: 9030
  http://playerstage.svn.sourceforge.net/playerstage/?rev=9030view=rev
Author:   natepak
Date: 2011-01-21 18:28:04 + (Fri, 21 Jan 2011)

Log Message:
---
removing an old branch

Removed Paths:
-
code/gazebo/branches/tbb/


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

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[9022] code/gazebo/branches/dev/worlds

2011-01-17 Thread natepak
Revision: 9022
  http://playerstage.svn.sourceforge.net/playerstage/?rev=9022view=rev
Author:   natepak
Date: 2011-01-17 23:59:54 + (Mon, 17 Jan 2011)

Log Message:
---
Added directory for new world format

Added Paths:
---
code/gazebo/branches/dev/worlds/new/
code/gazebo/branches/dev/worlds/new/empty.world

Added: code/gazebo/branches/dev/worlds/new/empty.world
===
--- code/gazebo/branches/dev/worlds/new/empty.world 
(rev 0)
+++ code/gazebo/branches/dev/worlds/new/empty.world 2011-01-17 23:59:54 UTC 
(rev 9022)
@@ -0,0 +1,114 @@
+?xml version=1.0? 
+gazebo
+  config
+verbosity4/verbosity
+
+gui
+  size800 600/size
+  pos0 0/pos
+/gui
+
+rendering
+  ambient.2 .2 .2 1/ambient
+  shadowstrue/shadows
+  gridfalse/grid
+/rendering
+  /config
+
+  world name=default
+physics type=ode
+  stepTime0.001/stepTime
+  gravity0 0 -9.8/gravity
+  cfm0.01/cfm
+  erp0.2/erp
+  
+  stepTypequick/stepType
+  stepIters10/stepIters
+  stepW1.3/stepW
+  contactMaxCorrectingVel100.0/contactMaxCorrectingVel
+  contactSurfaceLayer0.0/contactSurfaceLayer
+/physics
+  
+!-- Ground Plane --
+model type=physical name=plane1_model
+  xyz0 0 0/xyz
+  rpy0 0 0/rpy
+  statictrue/static
+  body name=plane1_body
+geom type=plane name=plane1_geom
+  normal0 0 1/normal
+  mu110.0/mu1
+  mu21000.0/mu2
+
+  size100 100/size
+  meshunit_plane/mesh
+  materialGazebo/GreyGrid/material
+  uvTile100 100/uvTile
+/geom
+  /body
+/model
+
+model type=physical name=box_model
+  xyz0 0 1.5/xyz
+  staticfalse/static
+  body name=body
+geom type=box name=geom
+  size1 1 1/size
+  mass1.0/mass
+  visual
+size1 1 1/size
+meshunit_box/mesh
+materialGazebo/Red/material
+  /visual
+/geom
+  /body
+/model
+
+model type=physical name=sphere_model
+  xyz0 1.5 3.5/xyz
+  staticfalse/static
+  body name=body
+geom type=box name=geom
+  size0.5/size
+  mass1.0/mass
+  visual
+size1 1 1/size
+meshunit_sphere/mesh
+materialGazebo/Blue/material
+  /visual
+/geom
+  /body
+/model
+
+model type=physical name=cylinder_model
+  xyz0 -1.5 1.5/xyz
+  staticfalse/static
+  body name=body
+geom type=box name=geom
+  size0.5 1.0/size
+  mass1.0/mass
+  visual
+size0.5 0.5 1/size
+meshunit_cylinder/mesh
+materialGazebo/Green/material
+  /visual
+/geom
+  /body
+/model
+ 
+!-- White Point light --
+light name=point_white
+  xyz0.0 0 10/xyz
+  rpy0 0 0/rpy
+  typepoint/type
+  diffuseColor0.4 0.4 0.4 1.0/diffuseColor
+  specularColor.1 .1 .1 1.0/specularColor
+  attenuation.2 0.1 0.0/attenuation
+  range20/range
+  direction0 0 -1.0/direction
+  castShadowstrue/castShadows
+/light
+
+  /world
+
+/gazebo


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[9026] code/gazebo/branches/dev/server

2011-01-17 Thread natepak
Revision: 9026
  http://playerstage.svn.sourceforge.net/playerstage/?rev=9026view=rev
Author:   natepak
Date: 2011-01-18 05:31:59 + (Tue, 18 Jan 2011)

Log Message:
---
Fixing cg visual

Modified Paths:
--
code/gazebo/branches/dev/server/physics/Body.cc
code/gazebo/branches/dev/server/rendering/Visual.cc

Modified: code/gazebo/branches/dev/server/physics/Body.cc
===
--- code/gazebo/branches/dev/server/physics/Body.cc 2011-01-18 04:12:06 UTC 
(rev 9025)
+++ code/gazebo/branches/dev/server/physics/Body.cc 2011-01-18 05:31:59 UTC 
(rev 9026)
@@ -375,16 +375,15 @@
   this-linearAccel.Set(0,0,0);
   this-angularAccel.Set(0,0,0);
 
-  // NATY: put back in
   /// 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 ;
 
 this-cgVisualMsg = new VisualMsg();
-this-cgVisualMsg-parentId = this-comEntity-GetId();
+this-cgVisualMsg-parentId = this-comEntity-GetCompleteScopedName();
 this-cgVisualMsg-id = visname.str();
 this-cgVisualMsg-render = VisualMsg::MESH_RESOURCE;
 this-cgVisualMsg-mesh = body_cg;
@@ -392,9 +391,11 @@
 this-cgVisualMsg-castShadows = false;
 this-cgVisualMsg-attachAxes = true;
 this-cgVisualMsg-visible = false;
+this-cgVisualMsg-size.Set(0.1, 0.1, 0.1);
 Simulator::Instance()-SendMessage(*this-cgVisualMsg);
+this-cgVisualMsg-size.Set(100, 100, 100);
 
-VisualMsg msg;
+/*VisualMsg msg;
 msg.parentId = this-cgVisualMsg-id;
 msg.render = VisualMsg::LINE_LIST;
 msg.attachAxes = false;
@@ -412,7 +413,8 @@
 
   Simulator::Instance()-SendMessage(msg);
 }
-  }*/
+*/
+  }
 
   this-enabled = true;
 }

Modified: code/gazebo/branches/dev/server/rendering/Visual.cc
===
--- code/gazebo/branches/dev/server/rendering/Visual.cc 2011-01-18 04:12:06 UTC 
(rev 9025)
+++ code/gazebo/branches/dev/server/rendering/Visual.cc 2011-01-18 05:31:59 UTC 
(rev 9026)
@@ -195,6 +195,7 @@
   this-sizeP-SetValue(msg-size);
 
   this-Load(NULL);
+  this-SetVisible(msg-visible);
 }
 
 

@@ -500,13 +501,6 @@
 ///  Set the scale
 void Visual::SetScale(const Vector3 scale )
 {
-  // NATY
-  //boost::recursive_mutex::scoped_lock lock(*this-mutex);
-
-  // Stop here if the rendering engine has been disabled
-  if (!Simulator::Instance()-GetRenderEngineEnabled())
-return;
-
   Ogre::Vector3 vscale;
   vscale.x=scale.x;
   vscale.y=scale.y;
@@ -759,13 +753,7 @@
 /// Set whether the visual is visible
 void Visual::SetVisible(bool visible, bool cascade)
 {
-  // NATY
-  //boost::recursive_mutex::scoped_lock lock(*this-mutex);
-
-  // Stop here if the rendering engine has been disabled
-  if (!Simulator::Instance()-GetRenderEngineEnabled())
-return;
-
+  std::cout  VIs[  this-GetName()  ]=  visible  \n;
   this-sceneNode-setVisible( visible, cascade );
   this-visible = visible;
 }
@@ -788,13 +776,6 @@
 // Set the position of the visual
 void Visual::SetPosition( const Vector3 pos)
 {
-  // NATY
-  //boost::recursive_mutex::scoped_lock lock(*this-mutex);
-
-  // Stop here if the rendering engine has been disabled
-  if (!Simulator::Instance()-GetRenderEngineEnabled())
-return;
-
   /*if (this-IsStatic()  this-staticGeom)
   {
 this-staticGeom-reset();
@@ -1401,6 +1382,9 @@
   this-SetPose(msg-pose);
   this-SetTransparency(msg-transparency);
   this-SetScale(msg-size);
+  std::cout  Scale[  msg-size  ]\n;
+  
+  this-SetVisible(msg-visible, 1);
 }
 
 


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[9016] code/gazebo/branches/dev/server

2011-01-10 Thread natepak
Revision: 9016
  http://playerstage.svn.sourceforge.net/playerstage/?rev=9016view=rev
Author:   natepak
Date: 2011-01-10 23:52:19 + (Mon, 10 Jan 2011)

Log Message:
---
Fixed setting the pose of bodies and geoms

Modified Paths:
--
code/gazebo/branches/dev/server/Common.cc
code/gazebo/branches/dev/server/Common.hh
code/gazebo/branches/dev/server/Entity.cc
code/gazebo/branches/dev/server/Entity.hh
code/gazebo/branches/dev/server/Messages.cc
code/gazebo/branches/dev/server/Messages.hh
code/gazebo/branches/dev/server/Model.cc
code/gazebo/branches/dev/server/World.cc
code/gazebo/branches/dev/server/physics/Body.cc
code/gazebo/branches/dev/server/physics/Body.hh
code/gazebo/branches/dev/server/physics/Geom.cc
code/gazebo/branches/dev/server/physics/PlaneShape.cc
code/gazebo/branches/dev/server/physics/ode/ODEBody.cc
code/gazebo/branches/dev/server/physics/ode/ODEPhysics.cc
code/gazebo/branches/dev/server/rendering/Grid.cc
code/gazebo/branches/dev/server/rendering/Scene.cc
code/gazebo/branches/dev/server/rendering/Scene.hh
code/gazebo/branches/dev/server/rendering/Visual.cc

Modified: code/gazebo/branches/dev/server/Common.cc
===
--- code/gazebo/branches/dev/server/Common.cc   2010-12-30 02:05:37 UTC (rev 
9015)
+++ code/gazebo/branches/dev/server/Common.cc   2011-01-10 23:52:19 UTC (rev 
9016)
@@ -88,6 +88,13 @@
 }
 
 

+/// Load 
+void Common::Load(XMLConfigNode *node)
+{
+  this-nameP-Load(node);
+}
+
+
 /// Set the name of the entity
 void Common::SetName(const std::string name)
 {

Modified: code/gazebo/branches/dev/server/Common.hh
===
--- code/gazebo/branches/dev/server/Common.hh   2010-12-30 02:05:37 UTC (rev 
9015)
+++ code/gazebo/branches/dev/server/Common.hh   2011-01-10 23:52:19 UTC (rev 
9016)
@@ -47,6 +47,9 @@
 /// \brief Destructor
 public: virtual ~Common();
 
+/// \brief Load 
+public: virtual void Load(XMLConfigNode *node);
+
 /// \brief Set the name of the entity
 /// \param name Body name
 public: virtual void SetName(const std::string name);

Modified: code/gazebo/branches/dev/server/Entity.cc
===
--- code/gazebo/branches/dev/server/Entity.cc   2010-12-30 02:05:37 UTC (rev 
9015)
+++ code/gazebo/branches/dev/server/Entity.cc   2011-01-10 23:52:19 UTC (rev 
9016)
@@ -50,36 +50,42 @@
   this-staticP-Callback( Entity::SetStatic, this );
   Param::End();
  
-  std::ostringstream visname;
-  visname  Entity_  this-GetId()  _VISUAL;
-
   this-visualMsg = new VisualMsg();
-  this-visualMsg-id = visname.str();
+  //this-visualMsg-id = this-GetName();
 
   if (this-parent  this-parent-HasType(ENTITY))
   {
 Entity *ep = (Entity*)(this-parent);
-this-visualMsg-parentId = ep-GetName();
 this-SetStatic(ep-IsStatic());
   }
-  else
+  /*else
   {
 this-visualMsg = new VisualMsg();
   }
 
   Simulator::Instance()-SendMessage( *this-visualMsg );
+  */
 
   // NATY: put functionality back in
   //this-visualNode-SetOwner(this);
 }
 
+
+/// Load
+void Entity::Load(XMLConfigNode *node)
+{
+  Common::Load(node);
+  this-RegisterVisual();
+}
+ 
+
 void Entity::SetName(const std::string name)
 {
+  // TODO: if an entitie's name is changed, then the old visual is never
+  // removed. Should add in functionality to modify/update the visual
   Common::SetName(name);
-  std::ostringstream visname;
-  visname  name  _VISUAL;
-  this-visualMsg-id = visname.str();
-  Simulator::Instance()-SendMessage( *this-visualMsg );
+  //this-visualMsg-id = this-GetCompleteScopedName();
+  //Simulator::Instance()-SendMessage( *this-visualMsg );
 }
 
 

@@ -289,8 +295,9 @@
 void Entity::PoseChange(bool notify)
 {
   PoseMsg msg;
-  msg-id = this-name;
-  msg-pose = this-GetRelativePose();
+  msg.id = this-GetCompleteScopedName();
+  //std::cout  Pose[  msg.id  ]\n;
+  msg.pose = this-GetRelativePose();
   Simulator::Instance()-SendMessage( msg );
 
   if (notify)
@@ -305,3 +312,13 @@
 }
   }
 }
+
+
+// Register a visual
+void Entity::RegisterVisual()
+{
+  this-visualMsg-id = this-GetCompleteScopedName();
+  if (this-parent)
+this-visualMsg-parentId = this-parent-GetCompleteScopedName();
+  Simulator::Instance()-SendMessage( *this-visualMsg );
+}

Modified: code/gazebo/branches/dev/server/Entity.hh
===
--- code/gazebo/branches/dev

[Playerstage-commit] SF.net SVN: playerstage:[9012] code/gazebo/branches/dev/server/rendering

2010-12-14 Thread natepak
Revision: 9012
  http://playerstage.svn.sourceforge.net/playerstage/?rev=9012view=rev
Author:   natepak
Date: 2010-12-14 14:35:25 + (Tue, 14 Dec 2010)

Log Message:
---
Updates

Removed Paths:
-
code/gazebo/branches/dev/server/rendering/OgreCreator.cc
code/gazebo/branches/dev/server/rendering/OgreCreator.hh

Deleted: code/gazebo/branches/dev/server/rendering/OgreCreator.cc
===
--- code/gazebo/branches/dev/server/rendering/OgreCreator.cc2010-12-14 
14:33:40 UTC (rev 9011)
+++ code/gazebo/branches/dev/server/rendering/OgreCreator.cc2010-12-14 
14:35:25 UTC (rev 9012)
@@ -1,642 +0,0 @@
-/*
- *  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: Some functions that creates Ogre objects together
- * Author: Jordi Polo
- * Date: 27 Dec 2007
- */
-
-#include Ogre.h
-
-#include math.h
-#include iostream
-#include X11/Xlib.h
-#include X11/Xutil.h
-
-#include gazebo_config.h
-
-#include RTShaderSystem.hh
-#include RenderControl.hh
-#include Light.hh
-#include Material.hh
-#include Simulator.hh
-#include Global.hh
-#include Entity.hh
-#include XMLConfig.hh
-#include GazeboError.hh
-#include GazeboMessage.hh
-#include OgreMovableText.hh
-#include OgreAdaptor.hh
-#include Visual.hh
-#include OgreDynamicLines.hh
-#include OgreCreator.hh
-
-using namespace gazebo;
-
-
-// Constructor
-OgreCreator::OgreCreator()
-{
-}
-
-
-// Destructor
-OgreCreator::~OgreCreator()
-{
-}
-
-
-// Create a plane
-/*std::string OgreCreator::CreatePlane(const Vector3 normal, 
-const Vector2double size, const Vector2double segments, 
-const Vector2double uvTile, const std::string name)
-{
-  if (!Simulator::Instance()-GetRenderEngineEnabled())
-return std::string();
-
-  Vector3 n = normal;
-  std::string resultName;
-
-  n.Normalize();
-  Vector3 perp = n.GetPerpendicular();
-
-  Ogre::Plane plane(Ogre::Vector3(n.x, n.y, n.z), 0);
-
-  resultName = name;
-  while (!Ogre::MeshManager::getSingleton().getByName(resultName).isNull())
-resultName += A;
-
-  try
-  {
-Ogre::MeshManager::getSingleton().createPlane(resultName,
-Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, plane,
-size.x, size.y,
-(int)segments.x, (int)segments.y,
-true,1,
-uvTile.x, uvTile.y,
-Ogre::Vector3(perp.x, perp.y, perp.z));
-  }
-  catch (Ogre::ItemIdentityException e)
-  {
-std::cerr  Error creating plane\n;
-  }
-
-  return resultName;
-}*/
-
-
-/// Remove a mesh by name
-void OgreCreator::RemoveMesh(const std::string name)
-{
-  if (!Simulator::Instance()-GetRenderEngineEnabled())
-return;
-
-  if (!name.empty()  Ogre::MeshManager::getSingleton().resourceExists(name))
-Ogre::MeshManager::getSingleton().remove(name);
-}
-
-
-// Create a window for Ogre
-/*Ogre::RenderWindow *OgreCreator::CreateWindow(RenderControl *wxWindow, 
unsigned int width, unsigned int height)
-{
-  if (!Simulator::Instance()-GetRenderEngineEnabled())
-return NULL;
-
-  Ogre::RenderWindow *win = NULL;
-
-  if (wxWindow)
-  {
-//XSync(fl_display, false);
-win = OgreCreator::CreateWindow( wxWindow-GetOgreHandle(), width, height);
-
-if (win)
-  this-windows.push_back(win);
-  }
-
-  return win;
-}
-
-
-// Create a window for Ogre
-Ogre::RenderWindow *OgreCreator::CreateWindow( const std::string ogreHandle,
-   unsigned int width, 
unsigned int height)
-{
-  if (!Simulator::Instance()-GetRenderEngineEnabled())
-return NULL;
-
-  Ogre::StringVector paramsVector;
-  Ogre::NameValuePairList params;
-  Ogre

[Playerstage-commit] SF.net SVN: playerstage:[9003] code/gazebo/branches/dev/server

2010-12-05 Thread natepak
Revision: 9003
  http://playerstage.svn.sourceforge.net/playerstage/?rev=9003view=rev
Author:   natepak
Date: 2010-12-06 05:23:17 + (Mon, 06 Dec 2010)

Log Message:
---
Fixes

Modified Paths:
--
code/gazebo/branches/dev/server/Matrix4.cc
code/gazebo/branches/dev/server/Matrix4.hh
code/gazebo/branches/dev/server/MeshManager.cc
code/gazebo/branches/dev/server/MeshManager.hh
code/gazebo/branches/dev/server/rendering/Visual.cc

Modified: code/gazebo/branches/dev/server/Matrix4.cc
===
--- code/gazebo/branches/dev/server/Matrix4.cc  2010-12-04 02:43:10 UTC (rev 
9002)
+++ code/gazebo/branches/dev/server/Matrix4.cc  2010-12-06 05:23:17 UTC (rev 
9003)
@@ -6,16 +6,16 @@
 using namespace gazebo;
 
 const Matrix4 Matrix4::IDENTITY(
-   1, 0, 0, 0,
-   0, 1, 0, 0,
-   0, 0, 1, 0,
-   0, 0, 0, 1 );
+   1.0, 0.0, 0.0, 0.0,
+   0.0, 1.0, 0.0, 0.0,
+   0.0, 0.0, 1.0, 0.0,
+   0.0, 0.0, 0.0, 1.0 );
 
 const Matrix4 Matrix4::ZERO(
-   0, 0, 0, 0,
-   0, 0, 0, 0,
-   0, 0, 0, 0,
-   0, 0, 0, 0 );
+   0.0, 0.0, 0.0, 0.0,
+   0.0, 0.0, 0.0, 0.0,
+   0.0, 0.0, 0.0, 0.0,
+   0.0, 0.0, 0.0, 0.0 );
 
 
 

@@ -53,6 +53,11 @@
   this-m[2][1] = v21;
   this-m[2][2] = v22;
   this-m[2][3] = v23;
+
+  this-m[3][0] = v30;
+  this-m[3][1] = v31;
+  this-m[3][2] = v32;
+  this-m[3][3] = v33;
 }
 
 

@@ -137,7 +142,10 @@
 Vector3 Matrix4::TransformAffine( const Vector3 v ) const
 {
   if (!this-IsAffine())
+  {
+std::cout  \n  *this  ***\n;
 gzthrow(Not and affine matrix);
+  }
 
   return Vector3(
   this-m[0][0]*v.x + this-m[0][1]*v.y + this-m[0][2]*v.z + 
this-m[0][3],

Modified: code/gazebo/branches/dev/server/Matrix4.hh
===
--- code/gazebo/branches/dev/server/Matrix4.hh  2010-12-04 02:43:10 UTC (rev 
9002)
+++ code/gazebo/branches/dev/server/Matrix4.hh  2010-12-06 05:23:17 UTC (rev 
9003)
@@ -39,6 +39,8 @@
   }
   out  \n;
 }
+
+return out;
   }
 
 public: static const Matrix4 IDENTITY;

Modified: code/gazebo/branches/dev/server/MeshManager.cc
===
--- code/gazebo/branches/dev/server/MeshManager.cc  2010-12-04 02:43:10 UTC 
(rev 9002)
+++ code/gazebo/branches/dev/server/MeshManager.cc  2010-12-06 05:23:17 UTC 
(rev 9003)
@@ -314,6 +314,8 @@
   mesh-SetName(name);
   this-meshes.insert( std::make_pair(name, mesh) );
 
+  std::cout  Plane Name[  name  ]\n;
+
   SubMesh *subMesh = new SubMesh();
   mesh-AddSubMesh(subMesh);
 
@@ -326,13 +328,11 @@
   Matrix4 xlate, xform, rot;
   xlate = rot = Matrix4::IDENTITY;
 
-  std::cout  xlate  \n;
-
   Matrix3 rot3;
   rot3.SetFromAxes(xAxis, yAxis, zAxis);
 
   rot = rot3;
-  
+ 
   xlate.SetTrans( normal * -d );
   xform = xlate * rot;
 
@@ -345,9 +345,9 @@
   double xTex = uvTile.x / segments.x;
   double yTex = uvTile.y / segments.y;
 
-  for (int y = 0; y  segments.y; y++)
+  for (int y = 0; y = segments.y; y++)
   {
-for (int x = 0; x  segments.x; x++)
+for (int x = 0; x = segments.x; x++)
 {
   // Compute the position of the vertex
   vec.x = (x * xSpace) - halfWidth;
@@ -356,6 +356,8 @@
   vec = xform.TransformAffine(vec);
   subMesh-AddVertex(vec);
 
+  std::cout  Vec[  vec  ]\n;
+
   // Compute the normal
   vec = xform.TransformAffine(norm);
   subMesh-AddNormal(vec);
@@ -364,6 +366,8 @@
   subMesh-AddTexCoord(x * xTex, 1 - (y * yTex));
 }
   }
+
+  this-Tesselate2DMesh( subMesh, segments.x + 1, segments.y + 1, false  );
 }
 
 

@@ -905,3 +909,70 @@
   mesh-RecalculateNormals();
 }
 
+void MeshManager::Tesselate2DMesh(SubMesh *sm, int meshWidth, int meshHeight, 
+  bool doubleSided)
+{
+  int vInc, uInc, v, u, iterations;
+  int vCount, uCount;
+
+  if (doubleSided)
+  {
+iterations = 2;
+vInc = 1;
+v = 0; // Start with the front
+  }
+  else
+  {
+iterations = 1;
+vInc = 1;
+v = 0;
+  }
+
+  int v1, v2, v3;
+
+  while (iterations--)
+  {
+// Make tris in a zigzag pattern (compatible with strips)
+u = 0;
+uInc = 1; // Start with moving +u
+
+vCount = meshHeight - 1;
+while (vCount--)
+{
+  uCount = meshWidth - 1;
+  while (uCount--)
+  {
+// First tri in cell
+v1 = ((v + vInc) * meshWidth) + u;
+v2 = (v * meshWidth) + u;
+v3 = ((v + vInc) * meshWidth) + (u + uInc);
+// Output indexes
+sm-AddIndex(v1);
+sm-AddIndex(v2);
+sm-AddIndex(v3);
+std::cout

[Playerstage-commit] SF.net SVN: playerstage:[9002] code/gazebo/branches/dev/server

2010-12-03 Thread natepak
Revision: 9002
  http://playerstage.svn.sourceforge.net/playerstage/?rev=9002view=rev
Author:   natepak
Date: 2010-12-04 02:43:10 + (Sat, 04 Dec 2010)

Log Message:
---
Added matrix files

Added Paths:
---
code/gazebo/branches/dev/server/Matrix3.cc
code/gazebo/branches/dev/server/Matrix3.hh
code/gazebo/branches/dev/server/Matrix4.cc
code/gazebo/branches/dev/server/Matrix4.hh
code/gazebo/branches/dev/server/Messages.cc
code/gazebo/branches/dev/server/Plane.cc
code/gazebo/branches/dev/server/Plane.hh

Added: code/gazebo/branches/dev/server/Matrix3.cc
===
--- code/gazebo/branches/dev/server/Matrix3.cc  (rev 0)
+++ code/gazebo/branches/dev/server/Matrix3.cc  2010-12-04 02:43:10 UTC (rev 
9002)
@@ -0,0 +1,67 @@
+#include string.h
+
+#include GazeboError.hh
+#include Matrix3.hh
+
+using namespace gazebo;
+
+
+// Constructor
+Matrix3::Matrix3()
+{
+  memset(this-m, 0, sizeof(double)*9);
+}
+
+
+// Constructor
+Matrix3::Matrix3(const Matrix3 m)
+{
+  memcpy(this-m, m.m, sizeof(double)*9);
+}
+
+
+// Constructor
+Matrix3::Matrix3(double v00, double v01, double v02,
+double v10, double v11, double v12,
+double v20, double v21, double v22)
+{
+  this-m[0][0] = v00;
+  this-m[0][1] = v01;
+  this-m[0][2] = v02;
+  this-m[1][0] = v10;
+  this-m[1][1] = v11;
+  this-m[1][2] = v12;
+  this-m[2][0] = v20;
+  this-m[2][1] = v21;
+  this-m[2][2] = v22;
+}
+
+
+
+// Destructor
+Matrix3::~Matrix3()
+{
+}
+
+
+// Set from axes
+void Matrix3::SetFromAxes(const Vector3 xAxis, const Vector3 yAxis, 
+  const Vector3 zAxis)
+{
+  this-SetCol(0, xAxis);
+  this-SetCol(1, yAxis);
+  this-SetCol(2, zAxis);
+}
+
+
+
+/// Set a column
+void Matrix3::SetCol(unsigned int i, const Vector3 v)
+{
+  if (i = 3)
+gzthrow(Invalid column number);
+
+  m[0][i] = v.x;
+  m[1][i] = v.y;
+  m[2][i] = v.z;
+}

Added: code/gazebo/branches/dev/server/Matrix3.hh
===
--- code/gazebo/branches/dev/server/Matrix3.hh  (rev 0)
+++ code/gazebo/branches/dev/server/Matrix3.hh  2010-12-04 02:43:10 UTC (rev 
9002)
@@ -0,0 +1,28 @@
+#ifndef MATRIX3_HH
+#define MATRIX3_HH
+
+#include Vector3.hh
+
+namespace gazebo
+{
+  class Matrix3
+  {
+public: Matrix3();
+public: Matrix3(const Matrix3 m);
+public: Matrix3(double v00, double v01, double v02,
+double v10, double v11, double v12,
+double v20, double v21, double v22);
+
+public: virtual ~Matrix3();
+
+public: void SetFromAxes(const Vector3 xAxis, const Vector3 yAxis, 
+ const Vector3 zAxis);
+
+/// Set a column
+public: void SetCol(unsigned int i, const Vector3 v);
+
+protected: double m[3][3];
+friend class Matrix4;
+  };
+}
+#endif

Added: code/gazebo/branches/dev/server/Matrix4.cc
===
--- code/gazebo/branches/dev/server/Matrix4.cc  (rev 0)
+++ code/gazebo/branches/dev/server/Matrix4.cc  2010-12-04 02:43:10 UTC (rev 
9002)
@@ -0,0 +1,147 @@
+#include string.h
+
+#include GazeboError.hh
+#include Matrix4.hh
+
+using namespace gazebo;
+
+const Matrix4 Matrix4::IDENTITY(
+   1, 0, 0, 0,
+   0, 1, 0, 0,
+   0, 0, 1, 0,
+   0, 0, 0, 1 );
+
+const Matrix4 Matrix4::ZERO(
+   0, 0, 0, 0,
+   0, 0, 0, 0,
+   0, 0, 0, 0,
+   0, 0, 0, 0 );
+
+
+
+// Default constructor
+Matrix4::Matrix4()
+{
+  memset(this-m, 0, sizeof(double)*16);
+}
+
+
+// Copy constructor
+Matrix4::Matrix4(const Matrix4 m)
+{
+  memcpy(this-m, m.m, sizeof(double)*16);
+}
+
+
+// Constructor
+Matrix4::Matrix4(double v00, double v01, double v02, double v03,
+ double v10, double v11, double v12, double v13,
+ double v20, double v21, double v22, double v23,
+ double v30, double v31, double v32, double v33)
+{
+  this-m[0][0] = v00;
+  this-m[0][1] = v01;
+  this-m[0][2] = v02;
+  this-m[0][3] = v03;
+
+  this-m[1][0] = v10;
+  this-m[1][1] = v11;
+  this-m[1][2] = v12;
+  this-m[1][3

[Playerstage-commit] SF.net SVN: playerstage:[8986] code/gazebo/branches/dev

2010-11-29 Thread natepak
Revision: 8986
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8986view=rev
Author:   natepak
Date: 2010-11-29 22:49:26 + (Mon, 29 Nov 2010)

Log Message:
---
More bug fixes

Modified Paths:
--
code/gazebo/branches/dev/Media/materials/scripts/Gazebo.material
code/gazebo/branches/dev/server/CMakeLists.txt
code/gazebo/branches/dev/server/Quatern.hh
code/gazebo/branches/dev/server/Simulator.cc
code/gazebo/branches/dev/server/Simulator.hh
code/gazebo/branches/dev/server/World.cc
code/gazebo/branches/dev/server/World.hh
code/gazebo/branches/dev/server/physics/Body.cc
code/gazebo/branches/dev/server/physics/Geom.cc
code/gazebo/branches/dev/server/physics/Geom.hh
code/gazebo/branches/dev/server/rendering/Visual.cc
code/gazebo/branches/dev/server/rendering/Visual.hh
code/gazebo/branches/dev/server/rendering/WindowManager.cc
code/gazebo/branches/dev/server/wx/BoxMaker.cc
code/gazebo/branches/dev/server/wx/RenderControl.cc

Modified: code/gazebo/branches/dev/Media/materials/scripts/Gazebo.material
===
--- code/gazebo/branches/dev/Media/materials/scripts/Gazebo.material
2010-11-29 05:34:15 UTC (rev 8985)
+++ code/gazebo/branches/dev/Media/materials/scripts/Gazebo.material
2010-11-29 22:49:26 UTC (rev 8986)
@@ -271,6 +271,25 @@
}
 }
 
+material Gazebo/TurquoiseGlowOutline : Gazebo/Turquoise
+{
+   technique
+   {
+pass ambient
+{
+  ambient 0 1 1
+  polygon_mode wireframe
+}
+
+   pass light
+   {
+   emissive 0 1 1
+  diffuse 0 1 1
+  polygon_mode wireframe
+   }
+   }
+}
+
 material Gazebo/RedTransparent
 {
technique

Modified: code/gazebo/branches/dev/server/CMakeLists.txt
===
--- code/gazebo/branches/dev/server/CMakeLists.txt  2010-11-29 05:34:15 UTC 
(rev 8985)
+++ code/gazebo/branches/dev/server/CMakeLists.txt  2010-11-29 22:49:26 UTC 
(rev 8986)
@@ -132,6 +132,7 @@
  STLLoader.hh
  Events.hh
  Plugin.hh
+ Messages.hh
 )
 
 APPEND_TO_SERVER_HEADERS(${headers})

Modified: code/gazebo/branches/dev/server/Quatern.hh
===
--- code/gazebo/branches/dev/server/Quatern.hh  2010-11-29 05:34:15 UTC (rev 
8985)
+++ code/gazebo/branches/dev/server/Quatern.hh  2010-11-29 22:49:26 UTC (rev 
8986)
@@ -100,7 +100,7 @@
   public: static Quatern EulerToQuatern( const Vector3 vec );
 
   /// \brief Convert euler angles to quatern.
-  public: Quatern EulerToQuatern( double x, double y, double z);
+  public: static Quatern EulerToQuatern( double x, double y, double z);
 
   /// \brief Get the Euler roll angle in radians
   public: double GetRoll();

Modified: code/gazebo/branches/dev/server/Simulator.cc
===
--- code/gazebo/branches/dev/server/Simulator.cc2010-11-29 05:34:15 UTC 
(rev 8985)
+++ code/gazebo/branches/dev/server/Simulator.cc2010-11-29 22:49:26 UTC 
(rev 8986)
@@ -30,6 +30,7 @@
 #include boost/bind.hpp
 #include boost/thread/recursive_mutex.hpp
 
+#include Messages.hh
 #include RenderState.hh
 #include PhysicsFactory.hh
 #include gazebo_config.h
@@ -634,3 +635,11 @@
 }
   }
 }
+
+
+/// Send a message
+void Simulator::SendMessage( const Message message )
+{
+  for (unsigned int i=0; i  this-worlds.size(); i++)
+this-worlds[i]-ReceiveMessage( message );
+}

Modified: code/gazebo/branches/dev/server/Simulator.hh
===
--- code/gazebo/branches/dev/server/Simulator.hh2010-11-29 05:34:15 UTC 
(rev 8985)
+++ code/gazebo/branches/dev/server/Simulator.hh2010-11-29 22:49:26 UTC 
(rev 8986)
@@ -56,6 +56,7 @@
   class Model;
   class World;
   class Plugin;
+  class Message;
 
   /// \brief The World
   /*
@@ -155,6 +156,9 @@
   
   /// \brief Remove a plugin
   public: void RemovePlugin(const std::string plugin);
+
+  /// \brief Send a message
+  public: void SendMessage( const Message message );
   
   /// \brief Function to run gui. Used by guiThread
   private: void PhysicsLoop();
@@ -199,7 +203,7 @@
   private: unsigned int activeWorldIndex;
   
   private: std::vectorPlugin* plugins;
-  
+
   //Singleton implementation
   private: friend class DestroyerTSimulator;
   private: friend class SingletonTSimulator;

Modified: code/gazebo/branches/dev/server/World.cc
===
--- code/gazebo/branches/dev/server/World.cc2010-11-29 05:34:15 UTC (rev 
8985)
+++ code/gazebo/branches/dev/server/World.cc2010-11-29 22:49:26

[Playerstage-commit] SF.net SVN: playerstage:[8987] code/gazebo/branches/dev/server/Messages.hh

2010-11-29 Thread natepak
Revision: 8987
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8987view=rev
Author:   natepak
Date: 2010-11-29 23:05:26 + (Mon, 29 Nov 2010)

Log Message:
---
Added messages

Added Paths:
---
code/gazebo/branches/dev/server/Messages.hh

Added: code/gazebo/branches/dev/server/Messages.hh
===
--- code/gazebo/branches/dev/server/Messages.hh (rev 0)
+++ code/gazebo/branches/dev/server/Messages.hh 2010-11-29 23:05:26 UTC (rev 
8987)
@@ -0,0 +1,62 @@
+#ifndef MESSAGES_HH
+#define MESSAGES_HH
+
+#include Time.hh
+#include Pose3d.hh
+
+namespace gazebo
+{
+  enum MessageType{ INSERT_MODEL };
+
+  class Message
+  {
+public: Message(MessageType t) : type(t), stamp(Time::GetWallTime()) {}
+public: Message(const Message m) : type(m.type), stamp(m.stamp) {}
+
+public: virtual Message *Clone() const { return new Message(*this); }
+
+public: MessageType type;
+public: Time stamp;
+  };
+
+  class InsertModelMsg : public Message
+  {
+public: InsertModelMsg() : Message(INSERT_MODEL) {}
+public: InsertModelMsg(const InsertModelMsg m) : Message(m), 
+xmlStr(m.xmlStr) {}
+public: virtual Message *Clone() const 
+{ InsertModelMsg *msg = new InsertModelMsg(*this); return msg; }
+public: std::string xmlStr;
+  };
+
+  class InsertVisualMsg : public Message
+  {
+public: InsertVisualMsg() : Message(INSERT_VISUAL) {}
+public: InsertVisualMsg(const InsertVisualMsg m) : Message(m), 
+xmlStr(m.xmlStr) {}
+public: virtual Message *Clone() const 
+{ InsertVisualMsg *msg = new InsertVisualMsg(*this); return msg; }
+
+public: std::string parentId;
+public: std::string id;
+public: std::string mesh;
+public: std::string material;
+public: bool castShadows;
+public: bool attachAxes;
+public: bool visible;
+  };
+
+  class UpdatePoseMsg : public Message
+  {
+public: UpdatePoseMsg() : Message(UPDATE_POSE), id(0) {}
+public: UpdatePoseMsg(const UpdatePoseMsg m) : Message(m), 
+id(m.id), pose(m.pose) {}
+public: virtual Message *Clone() const 
+{ UpdatePoseMsg *msg = new UpdatePoseMsg(*this); return msg; }
+
+public: std::string id;
+public: Pose3d pose;
+  };
+}
+
+#endif


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

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8988] code/gazebo/branches/dev/server

2010-11-29 Thread natepak
Revision: 8988
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8988view=rev
Author:   natepak
Date: 2010-11-30 02:29:38 + (Tue, 30 Nov 2010)

Log Message:
---
Updates

Modified Paths:
--
code/gazebo/branches/dev/server/Messages.hh
code/gazebo/branches/dev/server/physics/Body.cc
code/gazebo/branches/dev/server/physics/Geom.cc
code/gazebo/branches/dev/server/physics/Geom.hh
code/gazebo/branches/dev/server/physics/Joint.cc
code/gazebo/branches/dev/server/physics/Joint.hh

Modified: code/gazebo/branches/dev/server/Messages.hh
===
--- code/gazebo/branches/dev/server/Messages.hh 2010-11-29 23:05:26 UTC (rev 
8987)
+++ code/gazebo/branches/dev/server/Messages.hh 2010-11-30 02:29:38 UTC (rev 
8988)
@@ -29,8 +29,10 @@
 public: std::string xmlStr;
   };
 
-  class InsertVisualMsg : public Message
+  class VisualMsg : public Message
   {
+public: enum ActionType {UPDATE, DELETE};
+
 public: InsertVisualMsg() : Message(INSERT_VISUAL) {}
 public: InsertVisualMsg(const InsertVisualMsg m) : Message(m), 
 xmlStr(m.xmlStr) {}
@@ -39,11 +41,14 @@
 
 public: std::string parentId;
 public: std::string id;
+public: VisualMsgActionType action;
 public: std::string mesh;
 public: std::string material;
 public: bool castShadows;
 public: bool attachAxes;
 public: bool visible;
+public: Vector3 boundingbox_min;
+public: Vector3 boundingbox_max;
   };
 
   class UpdatePoseMsg : public Message

Modified: code/gazebo/branches/dev/server/physics/Body.cc
===
--- code/gazebo/branches/dev/server/physics/Body.cc 2010-11-29 23:05:26 UTC 
(rev 8987)
+++ code/gazebo/branches/dev/server/physics/Body.cc 2010-11-30 02:29:38 UTC 
(rev 8988)
@@ -379,7 +379,7 @@
 
 this-cgVisualId = visname.str();
 
-InsertVisualMsg msg;
+VisualMsg msg;
 msg.parentId = this-comEntity-GetName();
 msg.id = this-cgVisualId;
 msg.type = MESH_RESOURCE;

Modified: code/gazebo/branches/dev/server/physics/Geom.cc
===
--- code/gazebo/branches/dev/server/physics/Geom.cc 2010-11-29 23:05:26 UTC 
(rev 8987)
+++ code/gazebo/branches/dev/server/physics/Geom.cc 2010-11-30 02:29:38 UTC 
(rev 8988)
@@ -91,18 +91,18 @@
 // Destructor
 Geom::~Geom()
 {
-  for (std::vectorVisual*::iterator iter = this-visuals.begin(); 
-   iter != this-visuals.end(); iter++)
-if (*iter)
-  delete *iter;
-  this-visuals.clear();
-
-  if (this-bbVisual)
+  for (unsigned int i=0; i  this-visualMsgs.size(); i++)
   {
-delete this-bbVisual;
-this-bbVisual = NULL;
+this-visualMsgs[i]-action = VisualMsg::DELETE;
+Simulator::Instance()-SendMessage( *this-visualMsgs[i] );
+delete this-visualMsgs[i];
   }
+  this-visualMsgs.clear();
 
+  this-bbVisualMsg-action = VisualMsg::DELETE;
+  Simulator::Instance()-SendMessage( *this-bbVisual );
+  delete this-bbVisualMsg;
+
   delete this-typeP;
   delete this-massP;
   delete this-xyzP;
@@ -114,7 +114,6 @@
   if (this-shape)
 delete this-shape;
   this-shape = NULL;
-
 }
 
 

@@ -166,18 +165,20 @@
   {
 std::ostringstream visname;
 visname  this-GetCompleteScopedName()  _VISUAL_  
-   this-visuals.size();
+   this-visualMsgs.size();
 
 
-InsertVisualMsg msg;
-msg.parentId = this-GetName();
-msg.id = visname.str();
-msg.Load(childNode);
-msg.castShadows = false;
-Simulator::Instance()-SendMessage( msg );
+VisualMsg *msg = new VisualMsg();
 
-this-visualNames.push_back(visname.str());
+msg-parentId = this-GetName();
+msg-id = visname.str();
+msg-type = VisualMsg::MESH_RESOURCE;
+msg-Load(childNode);
+msg-castShadows = false;
+Simulator::Instance()-SendMessage( *msg );
 
+this-visualMsgs.push_back(msg);
+
 // NATY: get rid of this
 //visual-SetOwner(this);
 //visual-SetCastShadows(true);
@@ -203,11 +204,17 @@
 std::ostringstream visname;
 visname  this-GetCompleteScopedName()  _BBVISUAL ;
 
-this-bbVisual = new Visual(visname.str(), this-visualNode);
-this-bbVisual-SetCastShadows(false);
-this-bbVisual-AttachBoundingBox(min,max);
-this-bbVisual-SetVisible( RenderState::GetShowBoundingBoxes() );
-this-bbVisual-SetOwner(this);
+this-bbVisualMsg = new VisualMsg();
+
+this-bbVisualMsg-type = VisualMsg::MESH_RESOURCE;
+this-bbVisualMsg-parentId = this-GetName();
+this-bbVisualMsg-id = this-GetName() + _BBVISUAL;
+this-bbVisualMsg-castShadows = false;
+this-bbVisualMsg-visible = RenderState::GetShowBoundingBoxes();
+this-bbVisualMsg-boundingbox_min = min;
+this-bbVisualMsg-boundingbox_max = max;
+
+Simulator::Instance()-SendMessage

[Playerstage-commit] SF.net SVN: playerstage:[8985] code/gazebo/branches/dev/server

2010-11-28 Thread natepak
Revision: 8985
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8985view=rev
Author:   natepak
Date: 2010-11-29 05:34:15 + (Mon, 29 Nov 2010)

Log Message:
---
Updates to camera and windows

Modified Paths:
--
code/gazebo/branches/dev/server/Quatern.cc
code/gazebo/branches/dev/server/Quatern.hh
code/gazebo/branches/dev/server/World.cc
code/gazebo/branches/dev/server/rendering/Camera.cc
code/gazebo/branches/dev/server/rendering/Scene.cc
code/gazebo/branches/dev/server/rendering/UserCamera.cc
code/gazebo/branches/dev/server/rendering/WindowManager.cc
code/gazebo/branches/dev/server/rendering/WindowManager.hh
code/gazebo/branches/dev/server/wx/RenderControl.cc
code/gazebo/branches/dev/server/wx/RenderPanel.cc
code/gazebo/branches/dev/server/wx/RenderPanel.hh
code/gazebo/branches/dev/server/wx/SimulationFrame.cc
code/gazebo/branches/dev/server/wx/TimePanel.cc
code/gazebo/branches/dev/server/wx/TimePanel.hh

Modified: code/gazebo/branches/dev/server/Quatern.cc
===
--- code/gazebo/branches/dev/server/Quatern.cc  2010-11-28 17:45:54 UTC (rev 
8984)
+++ code/gazebo/branches/dev/server/Quatern.cc  2010-11-29 05:34:15 UTC (rev 
8985)
@@ -232,6 +232,22 @@
 }
 
 

+/// Convert euler angles to quatern.
+Quatern Quatern::EulerToQuatern( const Vector3 vec )
+{
+  Quatern result;
+  result.SetFromEuler(vec);
+  return result;
+}
+
+
+/// Convert euler angles to quatern.
+Quatern Quatern::EulerToQuatern( double x, double y, double z)
+{
+  return EulerToQuatern( Vector3(x,y,z) );
+}
+
+
 /// \brief Get the Euler roll angle in radians
 double Quatern::GetRoll()
 {

Modified: code/gazebo/branches/dev/server/Quatern.hh
===
--- code/gazebo/branches/dev/server/Quatern.hh  2010-11-28 17:45:54 UTC (rev 
8984)
+++ code/gazebo/branches/dev/server/Quatern.hh  2010-11-29 05:34:15 UTC (rev 
8985)
@@ -96,6 +96,12 @@
   /// \return This quaternion as an Euler vector
   public: Vector3 GetAsEuler();
 
+  /// \brief Convert euler angles to quatern.
+  public: static Quatern EulerToQuatern( const Vector3 vec );
+
+  /// \brief Convert euler angles to quatern.
+  public: Quatern EulerToQuatern( double x, double y, double z);
+
   /// \brief Get the Euler roll angle in radians
   public: double GetRoll();
 

Modified: code/gazebo/branches/dev/server/World.cc
===
--- code/gazebo/branches/dev/server/World.cc2010-11-28 17:45:54 UTC (rev 
8984)
+++ code/gazebo/branches/dev/server/World.cc2010-11-29 05:34:15 UTC (rev 
8985)
@@ -79,6 +79,7 @@
 // Private constructor
 World::World()
 {
+  std::cout  New World\n;
   this-server = NULL;
   this-physicsEngine = NULL;
   this-graphics = NULL;

Modified: code/gazebo/branches/dev/server/rendering/Camera.cc
===
--- code/gazebo/branches/dev/server/rendering/Camera.cc 2010-11-28 17:45:54 UTC 
(rev 8984)
+++ code/gazebo/branches/dev/server/rendering/Camera.cc 2010-11-29 05:34:15 UTC 
(rev 8985)
@@ -52,6 +52,7 @@
 // Constructor
 Camera::Camera(const std::string namePrefix, Scene *scene)
 {
+  std::cout  New Camera\n;
   this-scene = scene;
 
   this-textureWidth = this-textureHeight = 0;
@@ -973,6 +974,8 @@
 
   Ogre::Viewport *cviewport;
 
+  std::cout  Creating a camera\n;
+
   this-camera = this-scene-GetManager()-createCamera(this-name);
 
   // Use X/Y as horizon, Z up

Modified: code/gazebo/branches/dev/server/rendering/Scene.cc
===
--- code/gazebo/branches/dev/server/rendering/Scene.cc  2010-11-28 17:45:54 UTC 
(rev 8984)
+++ code/gazebo/branches/dev/server/rendering/Scene.cc  2010-11-29 05:34:15 UTC 
(rev 8985)
@@ -25,6 +25,7 @@
 /// Constructor
 Scene::Scene(const std::string name)
 {
+  std::cout  New Scene\n;
   this-id = idCounter++;
   this-idString = boost::lexical_caststd::string(this-id);
 

Modified: code/gazebo/branches/dev/server/rendering/UserCamera.cc
===
--- code/gazebo/branches/dev/server/rendering/UserCamera.cc 2010-11-28 
17:45:54 UTC (rev 8984)
+++ code/gazebo/branches/dev/server/rendering/UserCamera.cc 2010-11-29 
05:34:15 UTC (rev 8985)
@@ -58,6 +58,8 @@
 {
   std::stringstream stream;
 
+  std::cout  New User Camera\n;
+
   //int w, h;
   //parentWindow-GetSize(w, h);
   //this-window = OgreCreator::Instance()-CreateWindow(parentWindow, w, h);
@@ -65,8 +67,6 @@
   stream  UserCamera_  this-count++;
   this-name = stream.str(); 
 
-  this-viewport

[Playerstage-commit] SF.net SVN: playerstage:[8978] code/gazebo/branches/dev/server/rendering/ RenderTypes.hh

2010-11-24 Thread natepak
Revision: 8978
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8978view=rev
Author:   natepak
Date: 2010-11-25 01:10:06 + (Thu, 25 Nov 2010)

Log Message:
---
Added RenderTypes

Added Paths:
---
code/gazebo/branches/dev/server/rendering/RenderTypes.hh

Added: code/gazebo/branches/dev/server/rendering/RenderTypes.hh
===
--- code/gazebo/branches/dev/server/rendering/RenderTypes.hh
(rev 0)
+++ code/gazebo/branches/dev/server/rendering/RenderTypes.hh2010-11-25 
01:10:06 UTC (rev 8978)
@@ -0,0 +1,25 @@
+#ifndef RENDERING_HH
+#define RENDERING_HH
+
+enum OperationType 
+{
+  /// A list of points, 1 vertex per point
+  RENDERING_POINT_LIST = 0,//Ogre::RenderOperation::OT_POINT_LIST,
+
+  /// A list of lines, 2 vertices per line
+  RENDERING_LINE_LIST = 1,//Ogre::RenderOperation::OT_LINE_LIST,
+
+  /// A strip of connected lines, 1 vertex per line plus 1 start vertex
+  RENDERING_LINE_STRIP = 2,//Ogre::RenderOperation::OT_LINE_STRIP,
+
+  /// A list of triangles, 3 vertices per triangle
+  RENDERING_TRIANGLE_LIST = 3,//Ogre::RenderOperation::OT_TRIANGLE_LIST,
+
+  /// A strip of triangles, 3 vertices for the first triangle, and 1 per 
triangle after that 
+  RENDERING_TRIANGLE_STRIP = 4,//Ogre::RenderOperation::OT_TRIANGLE_STRIP,
+
+  /// A fan of triangles, 3 vertices for the first triangle, and 1 per 
triangle after that
+  RENDERING_TRIANGLE_FAN = 5,//Ogre::RenderOperation::OT_TRIANGLE_FAN 
+};
+
+#endif


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

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8976] code/gazebo/branches/dev/server

2010-11-23 Thread natepak
Revision: 8976
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8976view=rev
Author:   natepak
Date: 2010-11-24 03:27:30 + (Wed, 24 Nov 2010)

Log Message:
---
Fixed some bugs

Modified Paths:
--
code/gazebo/branches/dev/server/physics/Body.cc
code/gazebo/branches/dev/server/physics/Geom.cc
code/gazebo/branches/dev/server/physics/PhysicsEngine.cc
code/gazebo/branches/dev/server/rendering/Visual.cc
code/gazebo/branches/dev/server/rendering/Visual.hh

Modified: code/gazebo/branches/dev/server/physics/Body.cc
===
--- code/gazebo/branches/dev/server/physics/Body.cc 2010-11-23 04:23:57 UTC 
(rev 8975)
+++ code/gazebo/branches/dev/server/physics/Body.cc 2010-11-24 03:27:30 UTC 
(rev 8976)
@@ -379,9 +379,9 @@
 
 if (this-cgVisual == NULL)
 {
-  this-cgVisual = new Visual(this-comEntity-GetVisualNode());
+  this-cgVisual = new Visual(this-comEntity);
   this-cgVisual-SetName(visname.str());
-  this-cvVisual-Init();
+  this-cgVisual-Init();
 }
 else
   this-cgVisual-DetachObjects();

Modified: code/gazebo/branches/dev/server/physics/Geom.cc
===
--- code/gazebo/branches/dev/server/physics/Geom.cc 2010-11-23 04:23:57 UTC 
(rev 8975)
+++ code/gazebo/branches/dev/server/physics/Geom.cc 2010-11-24 03:27:30 UTC 
(rev 8976)
@@ -171,7 +171,7 @@
 visname  this-GetCompleteScopedName()  _VISUAL_  
this-visuals.size();
 Visual *visual = new Visual(this-visualNode);
 visual-Load(childNode);
-visual-SetName(visname);
+visual-SetName(visname.str());
 visual-SetIgnorePoseUpdates(true);
 visual-SetOwner(this);
 visual-Init();

Modified: code/gazebo/branches/dev/server/physics/PhysicsEngine.cc
===
--- code/gazebo/branches/dev/server/physics/PhysicsEngine.cc2010-11-23 
04:23:57 UTC (rev 8975)
+++ code/gazebo/branches/dev/server/physics/PhysicsEngine.cc2010-11-24 
03:27:30 UTC (rev 8976)
@@ -59,8 +59,8 @@
 
   if (Simulator::Instance()-GetRenderEngineEnabled())
   {
-this-visual = new Visual(NULL);
-this-visual-SetName(Physics_Engine_Visual), this-world-GetScene());
+this-visual = new Visual(NULL); //this-world-GetScene();
+this-visual-SetName(Physics_Engine_Visual);
 this-visual-SetVisible(false);
 this-visual-SetCastShadows(false);
 this-visual-SetUseRTShader(false);
@@ -116,7 +116,7 @@
 
   if (this-visual)
   {
-OgreCreator::Instance()-DeleteVisual( this-visual );
+delete this-visual;
 this-visual = NULL;
   }
 

Modified: code/gazebo/branches/dev/server/rendering/Visual.cc
===
--- code/gazebo/branches/dev/server/rendering/Visual.cc 2010-11-23 04:23:57 UTC 
(rev 8975)
+++ code/gazebo/branches/dev/server/rendering/Visual.cc 2010-11-24 03:27:30 UTC 
(rev 8976)
@@ -47,12 +47,9 @@
 SelectionObj *Visual::selectionObj = 0;
 unsigned int Visual::visualCounter = 0;
 
- FIXING OGRE VISUAL!!
-
-
 

 // Constructor
-Visual::Visual(Common *parent)//const std::string name, Scene *scene, Visual 
*node)
+Visual::Visual(Common *parent)
   : Common(parent)
 {
   this-AddType(VISUAL);
@@ -328,7 +325,19 @@
 (*iter)-Update();
 }
 
+
+/// Set the owner
+void Visual::SetOwner(Common *common)
+{
+  this-owner = common;
+}
 
+
+// Get the owner
+Common *Visual::GetOwner() const
+{
+  return this-owner;
+}
 
 

 // Save the visual in XML format

Modified: code/gazebo/branches/dev/server/rendering/Visual.hh
===
--- code/gazebo/branches/dev/server/rendering/Visual.hh 2010-11-23 04:23:57 UTC 
(rev 8975)
+++ code/gazebo/branches/dev/server/rendering/Visual.hh 2010-11-24 03:27:30 UTC 
(rev 8976)
@@ -55,23 +55,26 @@
   class Visual : public Common, public Ogre::Any
   {
 /// \brief Constructor
-public: Visual (const std::string name, Scene *scene, Visual 
*parent=NULL, Entity *owner = NULL);
+public: Visual (Common *parent = NULL);
 
-/// \brief Constructor
-public: Visual (Ogre::SceneNode *node, bool isStatic=false);
+/// \brief Destructor
+public: virtual ~Visual();
 
 /// \brief Helper for the contructor
-private: void ConstructorHelper(Ogre::SceneNode *node, bool 
isStatic=false);
+public: void Init();
 
-/// \brief Destructor
-public: virtual ~Visual();
-
 /// \brief Load the visual
 public: void Load(XMLConfigNode *node);
 
 /// \brief Update the visual.
 public

[Playerstage-commit] SF.net SVN: playerstage:[8972] code/gazebo/branches/dev/server/rendering

2010-11-17 Thread natepak
Revision: 8972
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8972view=rev
Author:   natepak
Date: 2010-11-17 16:18:26 + (Wed, 17 Nov 2010)

Log Message:
---
Added windowmanager

Added Paths:
---
code/gazebo/branches/dev/server/rendering/WindowManager.cc
code/gazebo/branches/dev/server/rendering/WindowManager.hh

Added: code/gazebo/branches/dev/server/rendering/WindowManager.cc
===
--- code/gazebo/branches/dev/server/rendering/WindowManager.cc  
(rev 0)
+++ code/gazebo/branches/dev/server/rendering/WindowManager.cc  2010-11-17 
16:18:26 UTC (rev 8972)
@@ -0,0 +1,105 @@
+#include Ogre.h
+#include math.h
+
+#include OgreAdaptor.hh
+#include RTShaderSystem.hh
+#include Color.hh
+#include GazeboMessage.hh
+#include GazeboError.hh
+#include Camera.hh
+#include RenderControl.hh
+#include WindowManager.hh
+
+using namespace gazebo;
+
+unsigned int WindowManager::windowCounter = 0;
+
+
+// Constructor
+WindowManager::WindowManager()
+{
+}
+
+
+WindowManager::~WindowManager()
+{
+}
+
+
+int WindowManager::CreateWindow( RenderControl *control )
+{
+  int result = -1;
+
+  if (control)
+result = this-CreateWindow( control-GetOgreHandle(), 
+ control-GetWidth(), control-GetHeight());
+  else
+gzerr(0)  Invalid RenderControl\n;
+
+  return result;
+}
+
+
+/// Attach a camera to a window
+void WindowManager::SetCamera( int windowId, Camera *camera)
+{
+  Ogre::Viewport *viewport = NULL;
+ 
+  viewport = this-windows[windowId]-addViewport(camera-GetCamera());
+
+  double ratio = (double)viewport-getActualWidth() / 
(double)viewport-getActualHeight();
+  double vfov = fabs(2.0 * atan(tan(camera-GetHFOV().GetAsRadian() / 2.0) / 
ratio));
+
+  camera-SetAspectRatio( ratio );
+  camera-GetCamera()-setFOVy(Ogre::Radian(vfov));
+
+  viewport-setClearEveryFrame(true);
+  viewport-setBackgroundColour( Color(0,0,0).GetOgreColor() );
+  viewport-setVisibilityMask(camera-GetVisibilityMask());
+
+  RTShaderSystem::AttachViewport(viewport, camera-GetScene());
+}
+
+
+// Create a window
+int WindowManager::CreateWindow( const std::string ogreHandle, 
+ unsigned int width, 
+ unsigned int height) 
+{
+  Ogre::StringVector paramsVector;
+  Ogre::NameValuePairList params;
+  Ogre::RenderWindow *window = NULL;
+
+  params[parentWindowHandle] = ogreHandle;
+
+  std::ostringstream stream;
+  stream  OgreWindow(  windowCounter++  );
+
+  int attempts = 0;
+  while (window == NULL  (attempts++)  10)
+  {
+try
+{
+  window = OgreAdaptor::Instance()-root-createRenderWindow( 
stream.str(), 
+ width, height, false, params);
+}
+catch (...)
+{
+  gzerr(0)   Unable to create the rendering window\n;
+  window = NULL;
+}
+  }
+
+  if (attempts = 10)
+  {
+gzthrow(Unable to create the rendering window\n);
+  }
+
+  window-setActive(true);
+  //window-setVisible(true);
+  window-setAutoUpdated(false);
+
+  this-windows.push_back(window);
+
+  return this-windows.size()-1;
+}

Added: code/gazebo/branches/dev/server/rendering/WindowManager.hh
===
--- code/gazebo/branches/dev/server/rendering/WindowManager.hh  
(rev 0)
+++ code/gazebo/branches/dev/server/rendering/WindowManager.hh  2010-11-17 
16:18:26 UTC (rev 8972)
@@ -0,0 +1,42 @@
+#ifndef WINDOWMANAGER_HH
+#define WINDOWMANAGER_HH
+
+#include SingletonT.hh
+#include string
+#include vector
+
+namespace Ogre
+{
+  class RenderWindow;
+}
+
+namespace gazebo
+{
+  class RenderControl;
+  class Camera;
+
+  class WindowManager : public SingletonTWindowManager
+  {
+public: WindowManager();
+public: virtual ~WindowManager();
+
+public: int CreateWindow( RenderControl *control );
+
+public: int CreateWindow( std::string ogreHandle, 
+  unsigned int width, 
+  unsigned int height );
+
+
+/// \brief Attach a camera to a window
+public: void SetCamera( int windowId, Camera *camera);
+
+
+private: std::vectorOgre::RenderWindow * windows;
+
+private: static unsigned int windowCounter;
+
+private: friend class DestroyerTWindowManager;
+private: friend class SingletonTWindowManager;
+  };
+}
+#endif


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

[Playerstage-commit] SF.net SVN: playerstage:[8970] code/gazebo/trunk/Media/materials/textures/ CMakeLists.txt

2010-11-16 Thread natepak
Revision: 8970
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8970view=rev
Author:   natepak
Date: 2010-11-16 16:31:13 + (Tue, 16 Nov 2010)

Log Message:
---
Added missing CMakeLists.txt

Added Paths:
---
code/gazebo/trunk/Media/materials/textures/CMakeLists.txt

Added: code/gazebo/trunk/Media/materials/textures/CMakeLists.txt
===
--- code/gazebo/trunk/Media/materials/textures/CMakeLists.txt   
(rev 0)
+++ code/gazebo/trunk/Media/materials/textures/CMakeLists.txt   2010-11-16 
16:31:13 UTC (rev 8970)
@@ -0,0 +1,40 @@
+SET (files 
+box_create_blue.png
+box_create_grey.png
+cave.png
+ceiling_tiled.jpg
+clouds.jpg
+CMakeLists.txt
+control_end_blue.png
+control_end.png
+control_pause_blue.png
+control_pause.png
+control_play_blue.png
+control_play.png
+cursor.png
+cylinder_create_blue.png
+directionallight.png
+gazebo_icon.png
+gazebo_light_icons.svg
+grayGrid.png
+hand_cursor.png
+hanoi_blue_disk.tga
+hanoi_green_disk.tga
+hanoi_red_disk.tga
+hardwood_floor.jpg
+paintedWall.jpg
+pioneerBody.jpg
+pointlight.png
+sphere_create_blue.png
+sphere_create_grey.png
+spotlight.png
+terrain_detail.jpg
+terrain.png
+terrain_texture.jpg
+willowMap.png
+WoodPallet.png 
+)
+
+
+INSTALL(FILES ${files} DESTINATION 
${CMAKE_INSTALL_PREFIX}/share/gazebo/Media/materials/textures/)
+


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

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8958] code/gazebo/branches/dev/

2010-11-11 Thread natepak
Revision: 8958
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8958view=rev
Author:   natepak
Date: 2010-11-12 01:55:52 + (Fri, 12 Nov 2010)

Log Message:
---
Creating a development branch

Added Paths:
---
code/gazebo/branches/dev/


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

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8962] code/gazebo/branches/dev/Media/materials/ textures/CMakeLists.txt

2010-11-11 Thread natepak
Revision: 8962
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8962view=rev
Author:   natepak
Date: 2010-11-12 02:11:13 + (Fri, 12 Nov 2010)

Log Message:
---
Missing cmake

Added Paths:
---
code/gazebo/branches/dev/Media/materials/textures/CMakeLists.txt

Added: code/gazebo/branches/dev/Media/materials/textures/CMakeLists.txt
===
--- code/gazebo/branches/dev/Media/materials/textures/CMakeLists.txt
(rev 0)
+++ code/gazebo/branches/dev/Media/materials/textures/CMakeLists.txt
2010-11-12 02:11:13 UTC (rev 8962)
@@ -0,0 +1,40 @@
+SET (files 
+box_create_blue.png
+box_create_grey.png
+cave.png
+ceiling_tiled.jpg
+clouds.jpg
+CMakeLists.txt
+control_end_blue.png
+control_end.png
+control_pause_blue.png
+control_pause.png
+control_play_blue.png
+control_play.png
+cursor.png
+cylinder_create_blue.png
+directionallight.png
+gazebo_icon.png
+gazebo_light_icons.svg
+grayGrid.png
+hand_cursor.png
+hanoi_blue_disk.tga
+hanoi_green_disk.tga
+hanoi_red_disk.tga
+hardwood_floor.jpg
+paintedWall.jpg
+pioneerBody.jpg
+pointlight.png
+sphere_create_blue.png
+sphere_create_grey.png
+spotlight.png
+terrain_detail.jpg
+terrain.png
+terrain_texture.jpg
+willowMap.png
+WoodPallet.png 
+)
+
+
+INSTALL(FILES ${files} DESTINATION 
${CMAKE_INSTALL_PREFIX}/share/gazebo/Media/materials/textures/)
+


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

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8954] code/gazebo/trunk/server/wx

2010-11-03 Thread natepak
Revision: 8954
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8954view=rev
Author:   natepak
Date: 2010-11-03 22:51:07 + (Wed, 03 Nov 2010)

Log Message:
---
Updates to parameter setting

Modified Paths:
--
code/gazebo/trunk/server/wx/PhysicsPage.cc
code/gazebo/trunk/server/wx/PhysicsPage.hh
code/gazebo/trunk/server/wx/Properties.cc
code/gazebo/trunk/server/wx/Properties.hh

Modified: code/gazebo/trunk/server/wx/PhysicsPage.cc
===
--- code/gazebo/trunk/server/wx/PhysicsPage.cc  2010-11-03 16:52:46 UTC (rev 
8953)
+++ code/gazebo/trunk/server/wx/PhysicsPage.cc  2010-11-03 22:51:07 UTC (rev 
8954)
@@ -18,76 +18,34 @@
   PhysicsEngine *engine = World::Instance()-GetPhysicsEngine();
 
   wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL);
-  
-  this-propGrid = new wxPropertyGrid( this, wxID_ANY, wxDefaultPosition, 
wxDefaultSize, wxPG_DEFAULT_STYLE|wxPG_SPLITTER_AUTO_CENTER);
-  this-propGrid-Connect( wxEVT_PG_CHANGED, wxPropertyGridEventHandler( 
PhysicsPage::OnPropertyChanged), NULL, this);
 
-  unsigned int paramCount = engine-GetParamCount();
-
   PropertyFactory::RegisterAll();
 
-  for (unsigned int i = 0; i  paramCount; i++)
-  {
-Param *param = engine-GetParam(i);
-Property *prop = PropertyFactory::CreateProperty(param, this-propGrid);
+  this-propGrid = new wxPropertyGrid( this, wxID_ANY, wxDefaultPosition, 
wxDefaultSize, wxPG_DEFAULT_STYLE|wxPG_SPLITTER_AUTO_CENTER);
 
-/*wxString paramName = wxString::FromAscii(param-GetKey().c_str());
-wxString paramValue = wxString::FromAscii(param-GetAsString().c_str());
+  this-propManager = new PropertyManager(this-propGrid);
 
-wxPGProperty *prop = NULL;
-if (param-IsInt())
-  prop = this-propGrid-Append(new wxIntProperty(paramName, wxPG_LABEL));
-else if (param-IsUInt())
-  prop = this-propGrid-Append(new wxUIntProperty(paramName, wxPG_LABEL));
-else if (param-IsBool())
-{
-  prop = this-propGrid-Append(new wxBoolProperty(paramName, wxPG_LABEL));
-  if (param-GetAsString() == 1)
-paramValue = wxT(True);
-  else 
-paramValue = wxT(False);
-}
-else if (param-IsFloat() || param-IsDouble())
-  prop = this-propGrid-Append(new wxFloatProperty(paramName, 
wxPG_LABEL));
-else if (param-IsStr())
-  prop = this-propGrid-Append(new wxStringProperty(paramName, 
wxPG_LABEL));
+  unsigned int paramCount = engine-GetParamCount();
 
-if (prop)
-{
-  prop-SetValueFromString( paramValue );
-  prop-SetClientData( param );
-}
-*/
+  for (unsigned int i = 0; i  paramCount; i++)
+  {
+this-propManager-AddProperty( engine-GetParam(i) ); 
   }
 
   boxSizer-Add(this-propGrid, 1, wxEXPAND | wxALL,4);
   this-SetSizer(boxSizer);
   this-Layout();
-
 }
 
 

+// Destructor
 PhysicsPage::~PhysicsPage()
 {
-  this-propGrid-Destroy();
+  delete this-propManager;
+  this-grid-Destroy();
 }
 
 

 void PhysicsPage::Apply()
 {
 }
-
-
-// On property changed event callback
-void PhysicsPage::OnPropertyChanged(wxPropertyGridEvent event)
-{
-  wxPGProperty *wxprop = event.GetProperty();
-
-  if (!wxprop)
-return;
-
-  Property *prop = (Property*)(wxprop-GetClientData());
-
-  if (prop)
-prop-Changed();
-}

Modified: code/gazebo/trunk/server/wx/PhysicsPage.hh
===
--- code/gazebo/trunk/server/wx/PhysicsPage.hh  2010-11-03 16:52:46 UTC (rev 
8953)
+++ code/gazebo/trunk/server/wx/PhysicsPage.hh  2010-11-03 22:51:07 UTC (rev 
8954)
@@ -8,6 +8,8 @@
 
 namespace gazebo
 {
+  class PropertyManager;
+
   class PhysicsPage : public ParamPage
   {
 public: PhysicsPage(wxWindow *parent);
@@ -19,6 +21,7 @@
 private: void OnPropertyChanged(wxPropertyGridEvent event);
 
 private: wxPropertyGrid *propGrid;
+private: PropertyManager *propManager;
   };
 }
 

Modified: code/gazebo/trunk/server/wx/Properties.cc
===
--- code/gazebo/trunk/server/wx/Properties.cc   2010-11-03 16:52:46 UTC (rev 
8953)
+++ code/gazebo/trunk/server/wx/Properties.cc   2010-11-03 22:51:07 UTC (rev 
8954)
@@ -48,8 +48,48 @@
   return NULL;
 }
 
+
+// Constructor
+PropertyManager::PropertyManager()
+{
+  this-grid-Connect( wxEVT_PG_CHANGED, wxPropertyGridEventHandler( 
PropertyManager::OnPropertyChanged), NULL, this);
+}
 
 

+// Destructor
+PropertyManager::~PropertyManager()
+{
+  std::listProperty*::iterator iter;
+
+  for (iter = this-properties.begin

[Playerstage-commit] SF.net SVN: playerstage:[8955] code/gazebo/trunk/server/wx

2010-11-03 Thread natepak
Revision: 8955
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8955view=rev
Author:   natepak
Date: 2010-11-03 23:25:46 + (Wed, 03 Nov 2010)

Log Message:
---
Fixed some bugs

Modified Paths:
--
code/gazebo/trunk/server/wx/PhysicsPage.cc
code/gazebo/trunk/server/wx/PhysicsPage.hh
code/gazebo/trunk/server/wx/Properties.cc
code/gazebo/trunk/server/wx/Properties.hh

Modified: code/gazebo/trunk/server/wx/PhysicsPage.cc
===
--- code/gazebo/trunk/server/wx/PhysicsPage.cc  2010-11-03 22:51:07 UTC (rev 
8954)
+++ code/gazebo/trunk/server/wx/PhysicsPage.cc  2010-11-03 23:25:46 UTC (rev 
8955)
@@ -23,6 +23,8 @@
 
   this-propGrid = new wxPropertyGrid( this, wxID_ANY, wxDefaultPosition, 
wxDefaultSize, wxPG_DEFAULT_STYLE|wxPG_SPLITTER_AUTO_CENTER);
 
+  this-propGrid-Connect( wxEVT_PG_CHANGED, wxPropertyGridEventHandler( 
PhysicsPage::OnPropertyChanged), NULL, this);
+
   this-propManager = new PropertyManager(this-propGrid);
 
   unsigned int paramCount = engine-GetParamCount();
@@ -42,10 +44,25 @@
 PhysicsPage::~PhysicsPage()
 {
   delete this-propManager;
-  this-grid-Destroy();
+  this-propGrid-Destroy();
 }
 
 

 void PhysicsPage::Apply()
 {
 }
+
+
+// On property changed event callback
+void PhysicsPage::OnPropertyChanged(wxPropertyGridEvent event)
+{
+  wxPGProperty *wxprop = event.GetProperty();
+
+  if (!wxprop)
+return;
+
+  Property *prop = (Property*)(wxprop-GetClientData());
+
+  if (prop)
+prop-Changed();
+}

Modified: code/gazebo/trunk/server/wx/PhysicsPage.hh
===
--- code/gazebo/trunk/server/wx/PhysicsPage.hh  2010-11-03 22:51:07 UTC (rev 
8954)
+++ code/gazebo/trunk/server/wx/PhysicsPage.hh  2010-11-03 23:25:46 UTC (rev 
8955)
@@ -17,7 +17,6 @@
 
 public: virtual void Apply();
 
-/// \brief On property changed event callback
 private: void OnPropertyChanged(wxPropertyGridEvent event);
 
 private: wxPropertyGrid *propGrid;

Modified: code/gazebo/trunk/server/wx/Properties.cc
===
--- code/gazebo/trunk/server/wx/Properties.cc   2010-11-03 22:51:07 UTC (rev 
8954)
+++ code/gazebo/trunk/server/wx/Properties.cc   2010-11-03 23:25:46 UTC (rev 
8955)
@@ -50,9 +50,9 @@
 
 

 // Constructor
-PropertyManager::PropertyManager()
+PropertyManager::PropertyManager(wxPropertyGrid *g)
+  : grid(g)
 {
-  this-grid-Connect( wxEVT_PG_CHANGED, wxPropertyGridEventHandler( 
PropertyManager::OnPropertyChanged), NULL, this);
 }
 
 

@@ -70,26 +70,11 @@
 // Add a property
 void PropertyManager::AddProperty(Param *p)
 {
-  Property *prop = PropertyFactory::CreateProperty( param, this-grid );
+  Property *prop = PropertyFactory::CreateProperty( p, this-grid );
   this-properties.push_back( prop );
 }
 
 

-// On property changed event callback
-void PropertyManager::OnPropertyChanged(wxPropertyGridEvent event)
-{
-  wxPGProperty *wxprop = event.GetProperty();
-
-  if (!wxprop)
-return;
-
-  Property *prop = (Property*)(wxprop-GetClientData());
-
-  if (prop)
-prop-Changed();
-}
-
-
 // Constructor
 Property::Property(Param *p, wxPropertyGrid *grid)
   : param(p), grid(grid), property(NULL)
@@ -282,7 +267,7 @@
   this-property-SetValueFromString( 
   wxString::FromAscii(param-GetAsString().c_str()) );
 
-  ParamQuatern *pv = (ParamTQuatern*)pv;
+  ParamTQuatern *pv = (ParamTQuatern*)this-param;
   Vector3 rpy = (**pv).GetAsEuler();
 
   this-roll = this-grid-AppendIn( this-property, new wxFloatProperty( 
wxT(Roll), wxT(Roll), rpy.x) ); 

Modified: code/gazebo/trunk/server/wx/Properties.hh
===
--- code/gazebo/trunk/server/wx/Properties.hh   2010-11-03 22:51:07 UTC (rev 
8954)
+++ code/gazebo/trunk/server/wx/Properties.hh   2010-11-03 23:25:46 UTC (rev 
8955)
@@ -1,6 +1,8 @@
 #ifndef PROPERTIES_HH
 #define PROPERTIES_HH
 
+#include wx/wx.h
+
 #include Param.hh
 #include StaticPluginRegister.hh
 
@@ -27,9 +29,12 @@
 
   class PropertyManager
   {
-public: PropertyManager();
+public: PropertyManager(wxPropertyGrid *g);
 public: virtual ~PropertyManager();
 
+public: void AddProperty(Param *p);
+
+
 private: wxPropertyGrid *grid;
 private: std::listProperty* properties;
   };
@@ -128,7 +133,7 @@
 public: virtual ~TimeProperty();
 
 private: wxPGProperty *sec;
-private

[Playerstage-commit] SF.net SVN: playerstage:[8943] code/gazebo/trunk/server

2010-10-13 Thread natepak
Revision: 8943
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8943view=rev
Author:   natepak
Date: 2010-10-14 01:34:13 + (Thu, 14 Oct 2010)

Log Message:
---
Removed the gui directory

Modified Paths:
--
code/gazebo/trunk/server/physics/Geom.cc
code/gazebo/trunk/server/rendering/OgreVisual.cc

Removed Paths:
-
code/gazebo/trunk/server/gui/

Modified: code/gazebo/trunk/server/physics/Geom.cc
===
--- code/gazebo/trunk/server/physics/Geom.cc2010-10-14 01:32:14 UTC (rev 
8942)
+++ code/gazebo/trunk/server/physics/Geom.cc2010-10-14 01:34:13 UTC (rev 
8943)
@@ -195,11 +195,6 @@
 
 childNode = childNode-GetNext(visual);
   }
-
-  if (this-GetShapeType() != plane  this-GetShapeType() != heightmap)
-  {
-this-SetTransparent(false);
-  }
 }
 
 

@@ -355,7 +350,6 @@
   {
 if (*iter)
 {
-  (*iter)-ToggleVisible();
   if ((*iter)-GetTransparency() == 0.0)
 (*iter)-SetTransparency(0.6);
   else

Modified: code/gazebo/trunk/server/rendering/OgreVisual.cc
===
--- code/gazebo/trunk/server/rendering/OgreVisual.cc2010-10-14 01:32:14 UTC 
(rev 8942)
+++ code/gazebo/trunk/server/rendering/OgreVisual.cc2010-10-14 01:34:13 UTC 
(rev 8943)
@@ -668,7 +668,7 @@
 Ogre::MovableObject *obj = this-sceneNode-getAttachedObject(i);
 
 entity = dynamic_castOgre::Entity*(obj);
-//simple = dynamic_castOgre::SimpleRenderable*(obj);
+
 if (!entity)
   continue;
 
@@ -681,7 +681,7 @@
   unsigned int techniqueCount, passCount;
   Ogre::Technique *technique;
   Ogre::Pass *pass;
-  Ogre::ColourValue sc, dc;
+  Ogre::ColourValue dc;
 
   for (techniqueCount = 0; techniqueCount  material-getNumTechniques(); 
techniqueCount++)
@@ -691,30 +691,15 @@
 for (passCount=0; passCount  technique-getNumPasses(); passCount++)
 {
   pass = technique-getPass(passCount);
-  sc = pass-getDiffuse();
+  pass-setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
 
   if (this-transparency  0.0)
 pass-setDepthWriteEnabled(false);
   else
 pass-setDepthWriteEnabled(true);
 
-  switch (this-sceneBlendType)
-  {
-case Ogre::SBT_ADD:
-  dc = sc;
-  dc.r -= sc.r * this-transparency;
-  dc.g -= sc.g  * this-transparency;
-  dc.b -= sc.b * this-transparency;
-  pass-setAmbient(Ogre::ColourValue::Black);
-  break;
-
-case Ogre::SBT_TRANSPARENT_ALPHA:
-default:
-  dc = sc;
-  dc.a =  (1.0f - this-transparency);
-  pass-setAmbient(pass-getAmbient());
-  break;
-  }
+  dc = pass-getDiffuse();
+  dc.a = (1.0f - this-transparency);
   pass-setDiffuse(dc);
 }
   }


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

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8938] code/gazebo/trunk/server/rendering

2010-10-11 Thread natepak
Revision: 8938
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8938view=rev
Author:   natepak
Date: 2010-10-11 17:00:22 + (Mon, 11 Oct 2010)

Log Message:
---
Added render state

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

Added: code/gazebo/trunk/server/rendering/RenderState.cc
===
--- code/gazebo/trunk/server/rendering/RenderState.cc   
(rev 0)
+++ code/gazebo/trunk/server/rendering/RenderState.cc   2010-10-11 17:00:22 UTC 
(rev 8938)
@@ -0,0 +1,176 @@
+/*
+ *  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: Render state container
+ * Author: Nate Koenig
+ * Date: 06 Oct 2010
+ */
+
+#include boost/bind.hpp
+
+#include Events.hh
+#include RenderState.hh
+
+using namespace gazebo;
+
+bool RenderState::showLights = false;
+bool RenderState::showJoints = false;
+bool RenderState::showCameras = false;
+bool RenderState::showContacts = false;
+bool RenderState::showWireframe = false;
+bool RenderState::showPhysics = false;
+bool RenderState::showBoundingBoxes = false;
+
+RenderState *RenderState::self = NULL;
+
+
+RenderState::RenderState()
+{
+  Events::ConnectShowLightsSignal(
+  boost::bind(RenderState::ShowLightsCB,this) );
+
+  Events::ConnectShowJointsSignal(
+  boost::bind(RenderState::ShowJointsCB,this) );
+
+  Events::ConnectShowCamerasSignal(
+  boost::bind(RenderState::ShowCamerasCB,this) );
+
+  Events::ConnectShowContactsSignal(
+  boost::bind(RenderState::ShowContactsCB,this) );
+
+  Events::ConnectShowWireframeSignal(
+  boost::bind(RenderState::ShowWireframeCB,this) );
+
+  Events::ConnectShowBoundingBoxesSignal(
+  boost::bind(RenderState::ShowBoundingBoxesCB,this) );
+}
+
+
+RenderState::~RenderState()
+{
+  Events::DisconnectShowLightsSignal(
+  boost::bind(RenderState::ShowLightsCB,this) );
+
+  Events::DisconnectShowJointsSignal(
+  boost::bind(RenderState::ShowJointsCB,this) );
+
+  Events::DisconnectShowCamerasSignal(
+  boost::bind(RenderState::ShowCamerasCB,this) );
+
+  Events::DisconnectShowContactsSignal(
+  boost::bind(RenderState::ShowContactsCB,this) );
+
+  Events::DisconnectShowWireframeSignal(
+  boost::bind(RenderState::ShowWireframeCB,this) );
+
+  Events::DisconnectShowBoundingBoxesSignal(
+  boost::bind(RenderState::ShowBoundingBoxesCB,this) );
+}
+
+
+void RenderState::Init()
+{
+  if (self == NULL)
+self = new RenderState();
+}
+
+
+bool RenderState::GetShowLights()
+{
+  return showLights;
+}
+
+
+bool RenderState::GetShowJoints()
+{
+  return showJoints;
+}
+
+
+bool RenderState::GetShowCameras() 
+{
+  return showCameras;
+}
+
+
+bool RenderState::GetShowContacts() 
+{
+  return showContacts;
+}
+
+
+bool RenderState::GetShowWireframe() 
+{
+  return showWireframe;
+}
+
+
+bool RenderState::GetShowPhysics() 
+{
+  return showPhysics;
+}
+
+
+bool RenderState::GetShowBoundingBoxes() 
+{
+  return showBoundingBoxes;
+}
+
+
+void RenderState::ShowLightsCB()
+{
+  this-showLights = !this-showLights;
+}
+
+
+void RenderState::ShowJointsCB()
+{
+  this-showJoints

[Playerstage-commit] SF.net SVN: playerstage:[8935] code/gazebo/trunk

2010-10-04 Thread natepak
Revision: 8935
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8935view=rev
Author:   natepak
Date: 2010-10-04 16:53:48 + (Mon, 04 Oct 2010)

Log Message:
---
Cleaned up the build messages

Modified Paths:
--
code/gazebo/trunk/CMakeLists.txt
code/gazebo/trunk/cmake/GazeboUtils.cmake
code/gazebo/trunk/cmake/SearchForStuff.cmake

Modified: code/gazebo/trunk/CMakeLists.txt
===
--- code/gazebo/trunk/CMakeLists.txt2010-10-04 04:56:07 UTC (rev 8934)
+++ code/gazebo/trunk/CMakeLists.txt2010-10-04 16:53:48 UTC (rev 8935)
@@ -77,20 +77,30 @@
 ENDIF (NOT CMAKE_BUILD_TYPE)
 STRING(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
 
-SET (build_errors  CACHE INTERNAL build errors FORCE)
+set (build_errors  CACHE INTERNAL build errors FORCE)
+set (build_warnings  CACHE INTERNAL build warnings FORCE)
 
 MESSAGE (STATUS \n\n== Finding 3rd Party Packages ==)
 INCLUDE (${gazebo_cmake_dir}/SearchForStuff.cmake)
 MESSAGE (STATUS \n)
 
+if ( build_warnings )
+  message(STATUS BUILD WARNINGS)
+  foreach (msg ${build_warnings})
+message(STATUS ${msg})
+  endforeach (msg ${build_warnings})
+  message(STATUS END BUILD WARNINGS\n)
+endif (build_warnings)
+
 if ( build_errors )
-  message(STATUS !!! BUILD ERRORS !!!)
-  message(STATUS These errors must be resolved before compiling)
+  message(STATUS BUILD ERRORS: These must be resolved before compiling.)
   foreach (msg ${build_errors})
 message(STATUS ${msg})
   endforeach (msg ${build_errors})
-  message(STATUS !!! END BUILD ERRORS !!!\n)
+  message(STATUS END BUILD ERRORS\n)
 else (build_errors)
+
+
   
   # Write the config.h file
   configure_file (${PROJECT_SOURCE_DIR}/gazebo_config.h.in 
${PROJECT_BINARY_DIR}/gazebo_config.h)

Modified: code/gazebo/trunk/cmake/GazeboUtils.cmake
===
--- code/gazebo/trunk/cmake/GazeboUtils.cmake   2010-10-04 04:56:07 UTC (rev 
8934)
+++ code/gazebo/trunk/cmake/GazeboUtils.cmake   2010-10-04 16:53:48 UTC (rev 
8935)
@@ -76,12 +76,21 @@
 
 macro (BUILD_ERROR)
   foreach (str ${ARGN})
-SET (msg ERROR: ${str} )
+SET (msg \t${str} )
 MESSAGE (STATUS ${msg} )
 APPEND_TO_CACHED_LIST(build_errors build errors ${msg})
   endforeach (str ${ARGN})
 endmacro (BUILD_ERROR)
 
+macro (BUILD_WARNING)
+  foreach (str ${ARGN})
+SET (msg \t${str} )
+MESSAGE (STATUS ${msg} )
+APPEND_TO_CACHED_LIST(build_warnings build warning ${msg})
+  endforeach (str ${ARGN})
+endmacro (BUILD_WARNING)
+
+
 ###
 # Reset lists
 MACRO (GAZEBOSERVER_RESET_LISTS)

Modified: code/gazebo/trunk/cmake/SearchForStuff.cmake
===
--- code/gazebo/trunk/cmake/SearchForStuff.cmake2010-10-04 04:56:07 UTC 
(rev 8934)
+++ code/gazebo/trunk/cmake/SearchForStuff.cmake2010-10-04 16:53:48 UTC 
(rev 8935)
@@ -34,7 +34,7 @@
 
 include (FindOpenGL)
 if (NOT OPENGL_FOUND)
-  BUILD_ERROR (OpenGL and development files not found.)
+  BUILD_ERROR (Missing: OpenGL)
 else ()
  APPEND_TO_CACHED_LIST(gazeboserver_include_dirs 
${gazeboserver_include_dirs_desc} 
@@ -53,7 +53,7 @@
   # Find ODE
   pkg_check_modules(ODE ode=${ODE_VERSION})
   IF (NOT ODE_FOUND)
-BUILD_ERROR (ODE and development files not found. See the following 
website: http://www.ode.org;)
+BUILD_ERROR (Missing: ODE(http://www.ode.org))
 SET (INCLUDE_ODE FALSE CACHE BOOL Include support for ODE)
   ELSE (NOT ODE_FOUND)
 SET (INCLUDE_ODE TRUE CACHE BOOL Include support for ODE)
@@ -94,7 +94,7 @@
 
 pkg_check_modules(OGRE OGRE=${MIN_OGRE_VERSION})
 if (NOT OGRE_FOUND)
-  BUILD_ERROR(Ogre3d version =${MIN_OGRE_VERSION} and development files 
not found. See the following website for installation instructions: 
http://www.orge3d.org;)
+  BUILD_ERROR(Missing: Ogre3d version 
=${MIN_OGRE_VERSION}(http://www.orge3d.org))
 else (NOT OGRE_FOUND)
   set(ogre_ldflags ${OGRE_LDFLAGS})
   set(ogre_include_dirs ${OGRE_INCLUDE_DIRS})
@@ -131,7 +131,7 @@
   # Find GTK
   pkg_check_modules(GTK2 gtk+-2.0)
   IF (NOT GTK2_FOUND)
-BUILD_ERROR(gtk+-2.0 and development files not found. See the following 
website: http://www.gtk.org;)
+BUILD_ERROR(Missing: gtk+-2.0)
   ELSE (NOT GTK2_FOUND)
 APPEND_TO_CACHED_LIST(gazeboserver_include_dirs 
   ${gazeboserver_include_dirs_desc} 
@@ -158,7 +158,7 @@
   # Find XML
   pkg_check_modules(XML libxml-2.0)
   IF (NOT XML_FOUND)
-BUILD_ERROR(libxml2 and development files not found. See the following 
website: http://www.xmlsoft.org;)
+BUILD_ERROR(Missing: libxml2(http://www.xmlsoft.org))
   ELSE (NOT XML_FOUND)
 APPEND_TO_CACHED_LIST

[Playerstage-commit] SF.net SVN: playerstage:[8924] code/gazebo/branches/wx/Media/materials

2010-10-01 Thread natepak
Revision: 8924
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8924view=rev
Author:   natepak
Date: 2010-10-01 18:56:56 + (Fri, 01 Oct 2010)

Log Message:
---
Updats to the shaders

Modified Paths:
--
code/gazebo/branches/wx/Media/materials/programs/ambient_one_texture_vp.glsl

code/gazebo/branches/wx/Media/materials/programs/directional_shadow_receiver_fp.glsl

code/gazebo/branches/wx/Media/materials/programs/directional_shadow_receiver_vp.glsl
code/gazebo/branches/wx/Media/materials/programs/perpixel_fp.glsl
code/gazebo/branches/wx/Media/materials/programs/perpixel_vp.glsl

code/gazebo/branches/wx/Media/materials/programs/spot_shadow_receiver_fp.glsl

code/gazebo/branches/wx/Media/materials/programs/spot_shadow_receiver_vp.glsl
code/gazebo/branches/wx/Media/materials/scripts/CMakeLists.txt
code/gazebo/branches/wx/Media/materials/scripts/Gazebo.material
code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.material

Modified: 
code/gazebo/branches/wx/Media/materials/programs/ambient_one_texture_vp.glsl
===
--- 
code/gazebo/branches/wx/Media/materials/programs/ambient_one_texture_vp.glsl
2010-09-29 15:43:52 UTC (rev 8923)
+++ 
code/gazebo/branches/wx/Media/materials/programs/ambient_one_texture_vp.glsl
2010-10-01 18:56:56 UTC (rev 8924)
@@ -1,11 +1,8 @@
 uniform vec4 ambient;
 
-/*
-  Basic ambient lighting vertex program
-*/
 void main()
 {
gl_Position = ftransform();
gl_TexCoord[0] = gl_MultiTexCoord0;
-   gl_FrontColor = ambient;
+   gl_FrontColor =  gl_FrontMaterial.ambient * ambient;
 }

Modified: 
code/gazebo/branches/wx/Media/materials/programs/directional_shadow_receiver_fp.glsl
===
--- 
code/gazebo/branches/wx/Media/materials/programs/directional_shadow_receiver_fp.glsl
2010-09-29 15:43:52 UTC (rev 8923)
+++ 
code/gazebo/branches/wx/Media/materials/programs/directional_shadow_receiver_fp.glsl
2010-10-01 18:56:56 UTC (rev 8924)
@@ -61,7 +61,7 @@
   shadow_map_pos = shadow_map_pos / shadow_map_pos.w;
   vec2 uv = shadow_map_pos.xy;
 
-  float depth_adjust = 0.0001;
+  float depth_adjust = 0.1;
   vec2 c = Blur(shadow_map, uv, offset, 4.0, depth_adjust).xy;
 
   // standard variance shadow mapping code

Modified: 
code/gazebo/branches/wx/Media/materials/programs/directional_shadow_receiver_vp.glsl
===
--- 
code/gazebo/branches/wx/Media/materials/programs/directional_shadow_receiver_vp.glsl
2010-09-29 15:43:52 UTC (rev 8923)
+++ 
code/gazebo/branches/wx/Media/materials/programs/directional_shadow_receiver_vp.glsl
2010-10-01 18:56:56 UTC (rev 8924)
@@ -18,10 +18,10 @@
   gl_Position = world_view_proj_mat * gl_Vertex;
 
   // Vertex in world space
-  //vertex_world_view_pos = (world_view_mat * gl_Vertex).xyz;
+  vertex_world_view_pos = (world_view_mat * gl_Vertex).xyz;
 
   // Vertex normal in world space
-  //vertex_world_norm = (inv_trans_world_view_mat * vec4(gl_Normal, 1.0)).xyz;
+  vertex_world_norm = (inv_trans_world_view_mat * vec4(gl_Normal, 1.0)).xyz;
 
   shadow_distance = gl_Position.z;
 

Modified: code/gazebo/branches/wx/Media/materials/programs/perpixel_fp.glsl
===
--- code/gazebo/branches/wx/Media/materials/programs/perpixel_fp.glsl   
2010-09-29 15:43:52 UTC (rev 8923)
+++ code/gazebo/branches/wx/Media/materials/programs/perpixel_fp.glsl   
2010-10-01 18:56:56 UTC (rev 8924)
@@ -1,4 +1,4 @@
-uniform vec3 derived_light_diffuse_color;
+uniform vec4 derived_light_diffuse_color;
 uniform vec4 derived_light_specular_color;
 uniform float surface_shininess;
 
@@ -7,15 +7,12 @@
 uniform vec4 light_attenuation;
 uniform vec4 spotlight_params;
 
-uniform sampler2D diffuse_map;
-
 varying vec3 vertex_world_view_pos;
 varying vec3 vertex_world_norm;
 
 void main()
 {
-  float spot = 1.0;
-  float specular = 0.0;
+  vec4 color = gl_FrontMaterial.emission;
 
   // Normalized fragment normal
   vec3 norm = normalize(vertex_world_norm);
@@ -30,27 +27,18 @@
 
   float lambert_term = max( dot(norm, light_dir_view), 0.0 );
 
-  
//
-  // COMPUTE DIFFUSE CONTRIBUTION
-  vec4 diffuse_tex = texture2D(diffuse_map, gl_TexCoord[0].st);
-  vec4 diffuse_contrib = vec4(derived_light_diffuse_color * 
-  diffuse_tex.rgb * lambert_term,1.0);
-
-
-  
//
-  // COMPUTE SPOT AND SPECULAR COMPONENTS
   if (lambert_term  0.0) 
   {
 vec3 view = -normalize(vertex_world_view_pos.xyz);
 vec3 halfway = normalize( view + light_dir_view );
 float nDotH = dot(norm, halfway);
 
-float fAtten = 1.0

[Playerstage-commit] SF.net SVN: playerstage:[8925] code/gazebo/branches/wx/Media/materials/ scripts

2010-10-01 Thread natepak
Revision: 8925
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8925view=rev
Author:   natepak
Date: 2010-10-01 18:58:12 + (Fri, 01 Oct 2010)

Log Message:
---
Renamed shaders

Modified Paths:
--
code/gazebo/branches/wx/Media/materials/scripts/CMakeLists.txt

Added Paths:
---
code/gazebo/branches/wx/Media/materials/scripts/perpixel.program
code/gazebo/branches/wx/Media/materials/scripts/shadow_caster.program
code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.program

Removed Paths:
-
code/gazebo/branches/wx/Media/materials/scripts/shadow_caster.material
code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.material

Modified: code/gazebo/branches/wx/Media/materials/scripts/CMakeLists.txt
===
--- code/gazebo/branches/wx/Media/materials/scripts/CMakeLists.txt  
2010-10-01 18:56:56 UTC (rev 8924)
+++ code/gazebo/branches/wx/Media/materials/scripts/CMakeLists.txt  
2010-10-01 18:58:12 UTC (rev 8925)
@@ -1,7 +1,7 @@
 SET (files Gazebo.material 
-   shadow_receiver.material 
-   shadow_caster.material
-   perpixel.material
+   shadow_receiver.program 
+   shadow_caster.program
+   perpixel.program
blur.compositor
blur.material
 )

Added: code/gazebo/branches/wx/Media/materials/scripts/perpixel.program
===
--- code/gazebo/branches/wx/Media/materials/scripts/perpixel.program
(rev 0)
+++ code/gazebo/branches/wx/Media/materials/scripts/perpixel.program
2010-10-01 18:58:12 UTC (rev 8925)
@@ -0,0 +1,70 @@
+vertex_program ambient_one_texture_vp_glsl glsl
+{
+  source ambient_one_texture_vp.glsl
+
+  default_params
+  {
+param_named_auto ambient ambient_light_colour
+  }
+}
+
+vertex_program perpixel_vp_glsl glsl
+{
+  source perpixel_vp.glsl
+
+  default_params
+  {
+param_named_auto world_view_mat worldview_matrix
+param_named_auto world_view_proj_mat worldviewproj_matrix
+  }
+}
+
+fragment_program perpixel_fp_glsl glsl
+{
+  source perpixel_fp.glsl
+
+  default_params
+  {
+param_named_auto derived_light_diffuse_color derived_light_diffuse_colour 0
+param_named_auto derived_light_specular_color 
derived_light_specular_colour 0
+param_named_auto surface_shininess surface_shininess
+
+param_named_auto light_position_view_space light_position_view_space 0
+param_named_auto light_direction_view_space light_direction_view_space 0
+param_named_auto light_attenuation light_attenuation 0
+param_named_auto spotlight_params spotlight_params 0
+  }
+}
+
+abstract material perpixel_template
+{
+  technique
+  {
+pass ambient
+{
+  ambient  1 1 1
+
+  vertex_program_ref ambient_one_texture_vp_glsl {}
+}
+
+pass light
+{
+  max_lights 8
+  scene_blend add 
+  iteration once_per_light 
+
+  diffuse  1 1 1
+  specular .1 .1 .1 128
+  emissive 0 0 0
+
+  vertex_program_ref perpixel_vp_glsl {}
+  fragment_program_ref perpixel_fp_glsl {}
+}
+
+pass decal
+{
+  lighting off
+  scene_blend dest_colour zero
+}
+  }
+}

Deleted: code/gazebo/branches/wx/Media/materials/scripts/shadow_caster.material
===
--- code/gazebo/branches/wx/Media/materials/scripts/shadow_caster.material  
2010-10-01 18:56:56 UTC (rev 8924)
+++ code/gazebo/branches/wx/Media/materials/scripts/shadow_caster.material  
2010-10-01 18:58:12 UTC (rev 8925)
@@ -1,44 +0,0 @@
-vertex_program shadow_caster_vp_glsl glsl
-{
-  source shadow_caster_vp.glsl
-
-  default_params
-  {
-param_named_auto world_view_proj_mat worldviewproj_matrix
-param_named_auto texel_offsets texel_offsets
-  }
-}
-
-fragment_program shadow_caster_fp_glsl glsl
-{
-  source shadow_caster_fp.glsl
-
-  default_params
-  {
-param_named_auto depth_range scene_depth_range
-  }
-}
-
-
-material shadow_caster
-{
-  technique
-  {
-// all this will do is write depth and depth*depth to red and green
-pass
-{
-  depth_check on
-  depth_write on
-  //cull_software none
-  //cull_hardware none
-
-  vertex_program_ref shadow_caster_vp_glsl
-  {
-  }
-
-  fragment_program_ref shadow_caster_fp_glsl
-  {
-  }
-}
-  }
-}

Copied: code/gazebo/branches/wx/Media/materials/scripts/shadow_caster.program 
(from rev 8922, 
code/gazebo/branches/wx/Media/materials/scripts/shadow_caster.material)
===
--- code/gazebo/branches/wx/Media/materials/scripts/shadow_caster.program   
(rev 0)
+++ code/gazebo/branches/wx/Media/materials/scripts/shadow_caster.program   
2010-10-01 18:58:12 UTC (rev 8925)
@@ -0,0 +1,44 @@
+vertex_program

[Playerstage-commit] SF.net SVN: playerstage:[8927] code/gazebo/branches/wx

2010-10-01 Thread natepak
Revision: 8927
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8927view=rev
Author:   natepak
Date: 2010-10-01 20:00:24 + (Fri, 01 Oct 2010)

Log Message:
---
Renamed some materials

Modified Paths:
--
code/gazebo/branches/wx/server/physics/Body.cc
code/gazebo/branches/wx/server/physics/Joint.cc
code/gazebo/branches/wx/server/physics/MultiRayShape.cc
code/gazebo/branches/wx/server/physics/RayShape.cc
code/gazebo/branches/wx/server/rendering/Light.cc
code/gazebo/branches/wx/server/rendering/RTShaderSystem.cc
code/gazebo/branches/wx/server/rendering/UserCamera.cc
code/gazebo/branches/wx/worlds/empty.world

Added Paths:
---
code/gazebo/branches/wx/worlds/spheres.world

Modified: code/gazebo/branches/wx/server/physics/Body.cc
===
--- code/gazebo/branches/wx/server/physics/Body.cc  2010-10-01 18:59:56 UTC 
(rev 8926)
+++ code/gazebo/branches/wx/server/physics/Body.cc  2010-10-01 20:00:24 UTC 
(rev 8927)
@@ -397,7 +397,7 @@
   for (giter = this-geoms.begin(); giter != this-geoms.end(); giter++)
   {
 OgreDynamicLines *line = 
OgreCreator::Instance()-CreateDynamicLine(OgreDynamicRenderable::OT_LINE_LIST);
-line-setMaterial(Gazebo/GreenEmissive);
+line-setMaterial(Gazebo/GreenGlow);
 this-cgVisual-AttachObject(line);
 line-AddPoint(Vector3(0,0,0));
 line-AddPoint(giter-second-GetRelativePose().pos);

Modified: code/gazebo/branches/wx/server/physics/Joint.cc
===
--- code/gazebo/branches/wx/server/physics/Joint.cc 2010-10-01 18:59:56 UTC 
(rev 8926)
+++ code/gazebo/branches/wx/server/physics/Joint.cc 2010-10-01 20:00:24 UTC 
(rev 8927)
@@ -157,8 +157,8 @@
 this-line1 = 
OgreCreator::Instance()-CreateDynamicLine(OgreDynamicRenderable::OT_LINE_LIST);
 this-line2 = 
OgreCreator::Instance()-CreateDynamicLine(OgreDynamicRenderable::OT_LINE_LIST);
 
-this-line1-setMaterial(Gazebo/BlueEmissive);
-this-line2-setMaterial(Gazebo/BlueEmissive);
+this-line1-setMaterial(Gazebo/BlueGlow);
+this-line2-setMaterial(Gazebo/BlueGlow);
 
 this-visual-AttachObject(this-line1);
 this-visual-AttachObject(this-line2);

Modified: code/gazebo/branches/wx/server/physics/MultiRayShape.cc
===
--- code/gazebo/branches/wx/server/physics/MultiRayShape.cc 2010-10-01 
18:59:56 UTC (rev 8926)
+++ code/gazebo/branches/wx/server/physics/MultiRayShape.cc 2010-10-01 
20:00:24 UTC (rev 8927)
@@ -21,7 +21,7 @@
 this-geomParent-GetVisualNode()-AttachObject(this-rayFanOutline);
 
 this-rayFan-setMaterial(Gazebo/BlueLaser);
-this-rayFanOutline-setMaterial(Gazebo/BlueEmissive);
+this-rayFanOutline-setMaterial(Gazebo/BlueGlow);
   }
 
   Param::Begin(this-parameters);

Modified: code/gazebo/branches/wx/server/physics/RayShape.cc
===
--- code/gazebo/branches/wx/server/physics/RayShape.cc  2010-10-01 18:59:56 UTC 
(rev 8926)
+++ code/gazebo/branches/wx/server/physics/RayShape.cc  2010-10-01 20:00:24 UTC 
(rev 8927)
@@ -46,7 +46,7 @@
 
 this-geomParent-GetVisualNode()-AttachObject(this-line);
 
-this-line-setMaterial(Gazebo/BlueEmissive);
+this-line-setMaterial(Gazebo/BlueGlow);
 this-line-setVisibilityFlags(GZ_LASER_CAMERA);
   }
 

Modified: code/gazebo/branches/wx/server/rendering/Light.cc
===
--- code/gazebo/branches/wx/server/rendering/Light.cc   2010-10-01 18:59:56 UTC 
(rev 8926)
+++ code/gazebo/branches/wx/server/rendering/Light.cc   2010-10-01 20:00:24 UTC 
(rev 8927)
@@ -269,7 +269,7 @@
 
   }
 
-  this-line-setMaterial(Gazebo/WhiteEmissive);
+  this-line-setMaterial(Gazebo/WhiteGlow);
   this-line-setVisibilityFlags(GZ_LASER_CAMERA);
 
   this-visualNode-AttachObject(line);
@@ -287,9 +287,9 @@
   if (this-light-getType() != Ogre::Light::LT_DIRECTIONAL)
   {
 if (s)
-  this-line-setMaterial(Gazebo/PurpleEmissive);
+  this-line-setMaterial(Gazebo/PurpleGlow);
 else
-  this-line-setMaterial(Gazebo/WhiteEmissive);
+  this-line-setMaterial(Gazebo/WhiteGlow);
   }
 
   return true;

Modified: code/gazebo/branches/wx/server/rendering/RTShaderSystem.cc
===
--- code/gazebo/branches/wx/server/rendering/RTShaderSystem.cc  2010-10-01 
18:59:56 UTC (rev 8926)
+++ code/gazebo/branches/wx/server/rendering/RTShaderSystem.cc  2010-10-01 
20:00:24 UTC (rev 8927)
@@ -37,7 +37,7 @@
 #include RTShaderSystem.hh
 #include gz.h
 
-#define MINOR_VERSION 7
+#define MINOR_VERSION 70
 using namespace gazebo;
 
 


Modified: code/gazebo/branches/wx/server/rendering

[Playerstage-commit] SF.net SVN: playerstage:[8929] code/gazebo/branches/simpar

2010-10-01 Thread natepak
Revision: 8929
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8929view=rev
Author:   natepak
Date: 2010-10-01 21:57:32 + (Fri, 01 Oct 2010)

Log Message:
---
Updates

Modified Paths:
--
code/gazebo/branches/simpar/player/CMakeLists.txt
code/gazebo/branches/simpar/plugins/ball_drop.cc
code/gazebo/branches/simpar/plugins/box_push.cc
code/gazebo/branches/simpar/plugins/pioneer_circle.cc
code/gazebo/branches/simpar/plugins/pioneer_gripper.cc
code/gazebo/branches/simpar/plugins/pioneer_line.cc
code/gazebo/branches/simpar/server/Logger.cc
code/gazebo/branches/simpar/server/physics/ode/ODEPhysics.cc
code/gazebo/branches/simpar/worlds/empty.world
code/gazebo/branches/simpar/worlds/pioneer2dx.world
code/gazebo/branches/simpar/worlds/pioneer2dx_ramp.world
code/gazebo/branches/simpar/worlds/simpleshapes.world

Modified: code/gazebo/branches/simpar/player/CMakeLists.txt
===
--- code/gazebo/branches/simpar/player/CMakeLists.txt   2010-10-01 21:56:40 UTC 
(rev 8928)
+++ code/gazebo/branches/simpar/player/CMakeLists.txt   2010-10-01 21:57:32 UTC 
(rev 8929)
@@ -1,31 +1,30 @@
-
-set (gazeboplugin_sources GazeboDriver.cc
- GazeboClient.cc
- GazeboInterface.cc
- GazeboTime.cc
- SimulationInterface.cc
- Position2dInterface.cc
- Position3dInterface.cc
- LaserInterface.cc
- CameraInterface.cc
- FiducialInterface.cc
- PTZInterface.cc
- OpaqueInterface.cc
- ActarrayInterface.cc
- GripperInterface.cc
- BumperInterface.cc
- IRInterface.cc
-)
-
-include_directories( 
-  ${PLAYER_INCLUDE_DIRS} 
-  ${CMAKE_SOURCE_DIR}/libgazebo 
-  ${boost_include_dirs}
-)
-
-link_directories( ${PLAYER_LINK_DIRS} ${boost_library_dirs} gazeboshm)
-
-add_library(gazeboplugin SHARED ${gazeboplugin_sources})
-target_link_libraries(gazeboplugin ${PLAYER_LINK_LIBS} gazeboshm )
-
-install(TARGETS gazeboplugin DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
+#set (gazeboplugin_sources GazeboDriver.cc
+# GazeboClient.cc
+# GazeboInterface.cc
+# GazeboTime.cc
+# SimulationInterface.cc
+# Position2dInterface.cc
+# Position3dInterface.cc
+# LaserInterface.cc
+# CameraInterface.cc
+# FiducialInterface.cc
+# PTZInterface.cc
+# OpaqueInterface.cc
+# ActarrayInterface.cc
+# GripperInterface.cc
+# BumperInterface.cc
+# IRInterface.cc
+#)
+#
+#include_directories( 
+#  ${PLAYER_INCLUDE_DIRS} 
+#  ${CMAKE_SOURCE_DIR}/libgazebo 
+#  ${boost_include_dirs}
+#)
+#
+#link_directories( ${PLAYER_LINK_DIRS} ${boost_library_dirs} gazeboshm)
+#
+#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/simpar/plugins/ball_drop.cc
===
--- code/gazebo/branches/simpar/plugins/ball_drop.cc2010-10-01 21:56:40 UTC 
(rev 8928)
+++ code/gazebo/branches/simpar/plugins/ball_drop.cc2010-10-01 21:57:32 UTC 
(rev 8929)
@@ -12,17 +12,17 @@
 {
   this-sphere = NULL;
   this-model_name = sphere;
-  //this-SpawnBall(0,0,5);
+  this-SpawnBall(0,0,5);
 
   //for (double i=0.001; i  1e-5; i*=0.5) 
-  this-stepTimes.push_back(0.1);
+  this-stepTimes.push_back(0.001);
 
   //for (unsigned int i=10; i=100; i+=10)
-  this-stepIters.push_back(10);
+  this-stepIters.push_back(100);
 
-  //this-stepTypes.push_back(robust);
+  this-stepTypes.push_back(robust);
   this-stepTypes.push_back(world);
-  //this-stepTypes.push_back(quick);
+  this-stepTypes.push_back(quick);
 
   this-stepTypesIter = this-stepTypes.begin();
   this-stepTimesIter = this-stepTimes.begin();
@@ -73,7 +73,7 @@
   modelbody:sphere name='body';
   model  geom:sphere name='geom';
   modelsize0.25/size;
-  modelmass10/mass;
+  modelmass1/mass;
   modelkp1.0/kp;
   modelkd1.0/kd;
   modelbounce0/bounce;
@@ -137,7 +137,8 @@
 Time realTime = Simulator::Instance()-GetRealTime();
 Pose3d pose = this-sphere-GetWorldPose();
 
-if ( fabs(prev_z - pose.pos.z) = 1e-5 )
+double diff = fabs(prev_z - pose.pos.z);
+if (  diff = 1e-4 )
   this-prevTime = realTime;
 
 this-prev_z = pose.pos.z;
@@ -153,7 +154,7 @@
 {
   if (LOG)
   {
-   // Logger::Instance()-RemoveLog(sphere);
+Logger::Instance()-RemoveLog(sphere);
 
 std::string mv_cmd = std::string(mv

[Playerstage-commit] SF.net SVN: playerstage:[8923] code/gazebo/branches/wx

2010-09-29 Thread natepak
Revision: 8923
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8923view=rev
Author:   natepak
Date: 2010-09-29 15:43:52 + (Wed, 29 Sep 2010)

Log Message:
---
Improved shadows

Modified Paths:
--
code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt

code/gazebo/branches/wx/Media/materials/programs/directional_shadow_receiver_vp.glsl

code/gazebo/branches/wx/Media/materials/programs/spot_shadow_receiver_fp.glsl

code/gazebo/branches/wx/Media/materials/programs/spot_shadow_receiver_vp.glsl
code/gazebo/branches/wx/Media/materials/scripts/Gazebo.material
code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.material
code/gazebo/branches/wx/server/rendering/Light.cc
code/gazebo/branches/wx/worlds/empty.world

Added Paths:
---
code/gazebo/branches/wx/Media/materials/programs/perpixel_fp.glsl
code/gazebo/branches/wx/Media/materials/programs/perpixel_vp.glsl

Modified: code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt
===
--- code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt 
2010-09-28 23:23:25 UTC (rev 8922)
+++ code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt 
2010-09-29 15:43:52 UTC (rev 8923)
@@ -8,6 +8,8 @@
point_receiver_fp.glsl
ambient_one_texture_vp.glsl
blur.glsl
+   perpixel_vp.glsl
+   perpixel_fp.glsl
 ) 
 
 INSTALL(FILES ${files} DESTINATION 
${CMAKE_INSTALL_PREFIX}/share/gazebo/Media/materials/programs/)

Modified: 
code/gazebo/branches/wx/Media/materials/programs/directional_shadow_receiver_vp.glsl
===
--- 
code/gazebo/branches/wx/Media/materials/programs/directional_shadow_receiver_vp.glsl
2010-09-28 23:23:25 UTC (rev 8922)
+++ 
code/gazebo/branches/wx/Media/materials/programs/directional_shadow_receiver_vp.glsl
2010-09-29 15:43:52 UTC (rev 8923)
@@ -18,10 +18,10 @@
   gl_Position = world_view_proj_mat * gl_Vertex;
 
   // Vertex in world space
-  vertex_world_view_pos = (world_view_mat * gl_Vertex).xyz;
+  //vertex_world_view_pos = (world_view_mat * gl_Vertex).xyz;
 
   // Vertex normal in world space
-  vertex_world_norm = (inv_trans_world_view_mat * vec4(gl_Normal, 1.0)).xyz;
+  //vertex_world_norm = (inv_trans_world_view_mat * vec4(gl_Normal, 1.0)).xyz;
 
   shadow_distance = gl_Position.z;
 

Added: code/gazebo/branches/wx/Media/materials/programs/perpixel_fp.glsl
===
--- code/gazebo/branches/wx/Media/materials/programs/perpixel_fp.glsl   
(rev 0)
+++ code/gazebo/branches/wx/Media/materials/programs/perpixel_fp.glsl   
2010-09-29 15:43:52 UTC (rev 8923)
@@ -0,0 +1,75 @@
+uniform vec3 derived_light_diffuse_color;
+uniform vec4 derived_light_specular_color;
+uniform float surface_shininess;
+
+uniform vec4 light_position_view_space;
+uniform vec4 light_direction_view_space;
+uniform vec4 light_attenuation;
+uniform vec4 spotlight_params;
+
+uniform sampler2D diffuse_map;
+
+varying vec3 vertex_world_view_pos;
+varying vec3 vertex_world_norm;
+
+void main()
+{
+  float spot = 1.0;
+  float specular = 0.0;
+
+  // Normalized fragment normal
+  vec3 norm = normalize(vertex_world_norm);
+
+  // Direction from the fragment to the light 
+  vec3 light_dir_view = light_position_view_space.xyz - 
+vertex_world_view_pos.xyz * 
light_position_view_space.w;
+
+  // light_position_view_space.w == 0 for directional lights
+  float light_dist = length(light_dir_view);
+  light_dir_view = normalize(light_dir_view);
+
+  float lambert_term = max( dot(norm, light_dir_view), 0.0 );
+
+  
//
+  // COMPUTE DIFFUSE CONTRIBUTION
+  vec4 diffuse_tex = texture2D(diffuse_map, gl_TexCoord[0].st);
+  vec4 diffuse_contrib = vec4(derived_light_diffuse_color * 
+  diffuse_tex.rgb * lambert_term,1.0);
+
+
+  
//
+  // COMPUTE SPOT AND SPECULAR COMPONENTS
+  if (lambert_term  0.0) 
+  {
+vec3 view = -normalize(vertex_world_view_pos.xyz);
+vec3 halfway = normalize( view + light_dir_view );
+float nDotH = dot(norm, halfway);
+
+float fAtten = 1.0 / (light_attenuation.y + 
+  light_attenuation.z*light_dist + 
+  light_attenuation.w*light_dist*light_dist);
+
+float fSpotT = 1.0;
+
+if (!(spotlight_params.x == 1.0  spotlight_params.y == 0.0  
+  spotlight_params.z == 0.0  spotlight_params.w == 1.0))
+{
+  float rho = dot(-light_direction_view_space.xyz, light_dir_view);
+
+  float fSpotE  = clamp((rho - spotlight_params.y) / 
+  (spotlight_params.x - spotlight_params.y),0.0,1.0

[Playerstage-commit] SF.net SVN: playerstage:[8919] code/gazebo/branches/wx/Media/materials/ programs

2010-09-22 Thread natepak
Revision: 8919
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8919view=rev
Author:   natepak
Date: 2010-09-22 20:50:29 + (Wed, 22 Sep 2010)

Log Message:
---
Renamed shadow receiver

Modified Paths:
--
code/gazebo/branches/wx/Media/materials/programs/shadow_caster_fp.glsl
code/gazebo/branches/wx/Media/materials/programs/shadow_caster_vp.glsl

Added Paths:
---

code/gazebo/branches/wx/Media/materials/programs/spot_shadow_receiver_fp.glsl

code/gazebo/branches/wx/Media/materials/programs/spot_shadow_receiver_vp.glsl

Removed Paths:
-
code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_fp.glsl
code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_vp.glsl

Modified: code/gazebo/branches/wx/Media/materials/programs/shadow_caster_fp.glsl
===
--- code/gazebo/branches/wx/Media/materials/programs/shadow_caster_fp.glsl  
2010-09-22 07:56:54 UTC (rev 8918)
+++ code/gazebo/branches/wx/Media/materials/programs/shadow_caster_fp.glsl  
2010-09-22 20:50:29 UTC (rev 8919)
@@ -5,7 +5,8 @@
 
 void main()
 {
-  float depth = length(vertexDepth.xyz)/500.0;
+  float depth = length(vertexDepth.xyz)/2.4;
+  //float depth = 0.1;
   gl_FragColor = vec4(depth, depth*depth, 0.0, 1.0);
 
   //gl_FragColor = vec4(d, d * d, 0.0, 1.0);

Modified: code/gazebo/branches/wx/Media/materials/programs/shadow_caster_vp.glsl
===
--- code/gazebo/branches/wx/Media/materials/programs/shadow_caster_vp.glsl  
2010-09-22 07:56:54 UTC (rev 8918)
+++ code/gazebo/branches/wx/Media/materials/programs/shadow_caster_vp.glsl  
2010-09-22 20:50:29 UTC (rev 8919)
@@ -1,8 +1,8 @@
 uniform mat4 wvpMat;
-uniform mat4 wvMat;
-uniform mat4 pMat;
-uniform vec4 texel_offsets;
-uniform vec4 depth_range;
+//uniform mat4 wvMat;
+//uniform mat4 pMat;
+//uniform vec4 texel_offsets;
+//uniform vec4 depth_range;
 
 attribute vec4 vertex;
 
@@ -13,7 +13,8 @@
 {
   vertexDepth = wvpMat * vertex;
   //d = (vertexDepth.z - depthRange.x) * depthRange.w;
+  //d = vertexDepth.z;
 
-  gl_Position = vertexDepth;
-  gl_Position.xy += texel_offsets.zw * gl_Position.w;
+  gl_Position = wvpMat * vertex;
+  //gl_Position.xy += texel_offsets.zw * gl_Position.w;
 }

Deleted: 
code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_fp.glsl
===
--- code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_fp.glsl
2010-09-22 07:56:54 UTC (rev 8918)
+++ code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_fp.glsl
2010-09-22 20:50:29 UTC (rev 8919)
@@ -1,121 +0,0 @@
-uniform vec4 invShadowMapSize;
-uniform vec3 derived_light_diffuse_color;
-uniform vec4 derived_light_specular_color;
-uniform float surface_shininess;
-
-uniform vec4 light_position_view_space;
-uniform vec4 light_position_world_space;
-uniform vec4 light_direction_view_space;
-uniform vec4 light_attenuation;
-uniform vec4 spotlight_params;
-
-uniform float light_casts_shadows;
-
-uniform sampler2D shadowMap;
-uniform sampler2D diffuseMap;
-
-varying vec3 vertexWorldViewPos;
-varying vec3 vertexWorldPos;
-varying vec3 vertexWorldNorm;
-varying vec4 vertexLightPos;
-
-vec4 Blur(sampler2D map, vec2 uv, float radius, float steps)
-{
-  float stepSize = 2.0 * radius / steps;
-  uv.xy -= vec2(radius);
-
-  vec4 total = vec4(0.0, 0.0, 0.0, 0.0);
-  for (float x = 0.0; x  steps; x+=1.0)
-for (float y = 0.0; y  steps; y+=1.0)
-  total +=
-texture2D(map, vec2(uv.xy + vec2(x * stepSize, y * stepSize)));
-
-  return total / (steps * steps);
-}
-
-float ShadowPCF()
-{
-  // Get the shadow map position
-  vec4 shadowMapPos = vertexLightPos / vertexLightPos.w;
-  vec2 uv = shadowMapPos.xy;
-
-  float dist = length(light_position_world_space.xyz - vertexWorldPos)/500.0;
-
-  vec2 c = Blur(shadowMap, uv, invShadowMapSize.x, 4.0).xy;
-
-  if ( dist = c.x + 0.0001)
-return 1.0;
-
-  // standard variance shadow mapping code
-  float variance = min(max( c.y - (c.x * c.x), 0.0), 1.0);
-  float m_d = c.x - dist;
-  float p = variance / (variance + m_d * m_d);
-
-  return smoothstep(0.3, 1.0, p);
-}
-  
-
-void main()
-{
-  float spot = 1.0;
-  float shadowFactor = 1.0;
-  float specular = 0.0;
-
-  // Normalized fragment normal
-  vec3 N = normalize(vertexWorldNorm);
-
-  // Direction from the fragment to the light 
-  vec3 lightDirView = light_position_view_space.xyz - vertexWorldViewPos.xyz * 
light_position_view_space.w;
-
-  // light_position_view_space.w == 0 for directional lights
-  float lightDist = length(lightDirView);
-  lightDirView = normalize(lightDirView);
-
-  float lambertTerm = max( dot(N, lightDirView), 0.0 );
-
-  
//
-  // COMPUTE DIFFUSE CONTRIBUTION
-  vec4 diffuseTex = texture2D

[Playerstage-commit] SF.net SVN: playerstage:[8915] code/gazebo/branches/wx

2010-09-21 Thread natepak
Revision: 8915
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8915view=rev
Author:   natepak
Date: 2010-09-21 20:46:40 + (Tue, 21 Sep 2010)

Log Message:
---
Improved spot light shadows

Modified Paths:
--
code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt
code/gazebo/branches/wx/Media/materials/programs/shadow_caster_fp.glsl
code/gazebo/branches/wx/Media/materials/programs/shadow_caster_vp.glsl
code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_fp.glsl
code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_vp.glsl
code/gazebo/branches/wx/Media/materials/scripts/CMakeLists.txt
code/gazebo/branches/wx/Media/materials/scripts/Gazebo.material
code/gazebo/branches/wx/Media/materials/scripts/blur.material
code/gazebo/branches/wx/Media/materials/scripts/shadow_caster.material
code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.material
code/gazebo/branches/wx/server/physics/PlaneShape.cc
code/gazebo/branches/wx/server/rendering/Light.cc
code/gazebo/branches/wx/server/rendering/OgreAdaptor.cc
code/gazebo/branches/wx/server/rendering/OgreCamera.cc
code/gazebo/branches/wx/server/rendering/OgreCreator.cc
code/gazebo/branches/wx/server/rendering/Scene.cc
code/gazebo/branches/wx/server/rendering/Scene.hh
code/gazebo/branches/wx/server/wx/SimulationFrame.cc
code/gazebo/branches/wx/server/wx/SpotLightMaker.cc
code/gazebo/branches/wx/worlds/empty.world

Modified: code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt
===
--- code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt 
2010-09-20 21:58:33 UTC (rev 8914)
+++ code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt 
2010-09-21 20:46:40 UTC (rev 8915)
@@ -1,8 +1,8 @@
-SET (files pssm_vsm_caster_fp.glsl
-   pssm_vsm_caster_vp.glsl
-   pssm_vsm_receiver_fp.glsl
-   pssm_vsm_receiver_vp.glsl
-   AmbientOneTexture.glsl
+SET (files shadow_caster_fp.glsl
+   shadow_caster_vp.glsl
+   shadow_receiver_fp.glsl
+   shadow_receiver_vp.glsl
+   ambient_one_texture_vp.glsl
blur.glsl
 ) 
 

Modified: code/gazebo/branches/wx/Media/materials/programs/shadow_caster_fp.glsl
===
--- code/gazebo/branches/wx/Media/materials/programs/shadow_caster_fp.glsl  
2010-09-20 21:58:33 UTC (rev 8914)
+++ code/gazebo/branches/wx/Media/materials/programs/shadow_caster_fp.glsl  
2010-09-21 20:46:40 UTC (rev 8915)
@@ -1,11 +1,12 @@
-uniform float far;
+//uniform float far;
 
 varying vec4 vertexDepth;
+//varying float d;
 
 void main()
 {
-  //float depth = length(vertexDepth.z) / far;
-  //gl_FragColor = vec4(depth, depth*depth, 0.0, 1.0);
-  
-  gl_FragColor = vec4(vertexDepth.x, vertexDepth.x, vertexDepth.x, 1.0);
+  float depth = length(vertexDepth.xyz)/500.0;
+  gl_FragColor = vec4(depth, depth*depth, 0.0, 1.0);
+
+  //gl_FragColor = vec4(d, d * d, 0.0, 1.0);
 }

Modified: code/gazebo/branches/wx/Media/materials/programs/shadow_caster_vp.glsl
===
--- code/gazebo/branches/wx/Media/materials/programs/shadow_caster_vp.glsl  
2010-09-20 21:58:33 UTC (rev 8914)
+++ code/gazebo/branches/wx/Media/materials/programs/shadow_caster_vp.glsl  
2010-09-21 20:46:40 UTC (rev 8915)
@@ -1,15 +1,19 @@
 uniform mat4 wvpMat;
+uniform mat4 wvMat;
+uniform mat4 pMat;
 uniform vec4 texel_offsets;
 uniform vec4 depth_range;
 
 attribute vec4 vertex;
 
 varying vec4 vertexDepth;
+//varying float d;
 
 void main()
 {
-  gl_Position = wvpMat * vertex;
+  vertexDepth = wvpMat * vertex;
+  //d = (vertexDepth.z - depthRange.x) * depthRange.w;
+
+  gl_Position = vertexDepth;
   gl_Position.xy += texel_offsets.zw * gl_Position.w;
-
-  vertexDepth.x = (gl_Position.z - depth_range.x) * depth_range.w;
 }

Modified: 
code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_fp.glsl
===
--- code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_fp.glsl
2010-09-20 21:58:33 UTC (rev 8914)
+++ code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_fp.glsl
2010-09-21 20:46:40 UTC (rev 8915)
@@ -4,6 +4,7 @@
 uniform float surface_shininess;
 
 uniform vec4 light_position_view_space;
+uniform vec4 light_position_world_space;
 uniform vec4 light_direction_view_space;
 uniform vec4 light_attenuation;
 uniform vec4 spotlight_params;
@@ -16,85 +17,42 @@
 varying vec3 vertexWorldNorm;
 varying vec4 vertexLightPos;
 
+vec4 Blur(sampler2D map, vec2 uv, float radius, float steps)
+{
+  float stepSize = 2.0 * radius / steps;
+  uv.xy -= vec2(radius);
+
+  vec4 total = vec4(0.0, 0.0, 0.0, 0.0);
+  for (float x = 0.0; x  steps; x+=1.0)
+for (float y = 0.0; y

[Playerstage-commit] SF.net SVN: playerstage:[8916] code/gazebo/branches/wx/server/rendering/ Light.cc

2010-09-21 Thread natepak
Revision: 8916
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8916view=rev
Author:   natepak
Date: 2010-09-21 20:52:53 + (Tue, 21 Sep 2010)

Log Message:
---
Updates

Modified Paths:
--
code/gazebo/branches/wx/server/rendering/Light.cc

Modified: code/gazebo/branches/wx/server/rendering/Light.cc
===
--- code/gazebo/branches/wx/server/rendering/Light.cc   2010-09-21 20:46:40 UTC 
(rev 8915)
+++ code/gazebo/branches/wx/server/rendering/Light.cc   2010-09-21 20:52:53 UTC 
(rev 8916)
@@ -46,7 +46,7 @@
   this-specularP = new ParamTColor(specularColor, Color(.1, .1, .1), 0);
   this-specularP-Callback(Light::SetSpecularColor, this);
 
-  this-directionP  = new ParamTVector3(direction, Vector3(0, 0, 1), 0);
+  this-directionP  = new ParamTVector3(direction, Vector3(0, 0, -1), 0);
   this-directionP-Callback(Light::SetDirection, this);
 
   this-attenuationP  = new ParamTVector3(attenuation, Vector3(.1, 0.01, 
.001), 1);


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

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8917] code/gazebo/branches/wx

2010-09-21 Thread natepak
Revision: 8917
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8917view=rev
Author:   natepak
Date: 2010-09-21 21:33:15 + (Tue, 21 Sep 2010)

Log Message:
---
Point lights no longer cast shadows

Modified Paths:
--
code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_fp.glsl
code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.material
code/gazebo/branches/wx/server/rendering/Light.cc

Modified: 
code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_fp.glsl
===
--- code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_fp.glsl
2010-09-21 20:52:53 UTC (rev 8916)
+++ code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_fp.glsl
2010-09-21 21:33:15 UTC (rev 8917)
@@ -9,6 +9,8 @@
 uniform vec4 light_attenuation;
 uniform vec4 spotlight_params;
 
+uniform float light_casts_shadows;
+
 uniform sampler2D shadowMap;
 uniform sampler2D diffuseMap;
 
@@ -56,6 +58,7 @@
 void main()
 {
   float spot = 1.0;
+  float shadowFactor = 1.0;
   float specular = 0.0;
 
   // Normalized fragment normal
@@ -108,9 +111,11 @@
 
   
//
   // COMPUTE SHADOW CONTRIBUTION
-  float shadowAmount = ShadowPCF();
+  //shadowFactor = ShadowPCF();
+  if (light_casts_shadows)
+shadowFactor = ShadowPCF();
 
   vec4 specularContrib = specular * derived_light_specular_color;
 
-  gl_FragColor = (diffuseContrib + specularContrib) * shadowAmount * spot;
+  gl_FragColor = (diffuseContrib+ specularContrib) * spot * shadowFactor;
 }

Modified: 
code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.material
===
--- code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.material
2010-09-21 20:52:53 UTC (rev 8916)
+++ code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.material
2010-09-21 21:33:15 UTC (rev 8917)
@@ -35,6 +35,7 @@
 param_named_auto light_attenuation light_attenuation 0
 param_named_auto spotlight_params spotlight_params 0
 
+param_named_auto light_casts_shadows light_casts_shadows 0
 param_named shadowMap int 1
 param_named diffuseMap int 0
   }
@@ -72,7 +73,7 @@
 
   ambient  0 0 0
   diffuse  1 1 1
-  specular .5 .5 .5 128
+  specular 1 1 1 128
 
   vertex_program_ref receiver_vp_glsl
   {

Modified: code/gazebo/branches/wx/server/rendering/Light.cc
===
--- code/gazebo/branches/wx/server/rendering/Light.cc   2010-09-21 20:52:53 UTC 
(rev 8916)
+++ code/gazebo/branches/wx/server/rendering/Light.cc   2010-09-21 21:33:15 UTC 
(rev 8917)
@@ -396,10 +396,15 @@
 /// Set cast shadowsj
 void Light::SetCastShadows(const bool cast)
 {
-  if (**this-castShadowsP != cast)
-this-castShadowsP-SetValue( cast );
+  if (this-light-getType() == Ogre::Light::LT_POINT)
+this-light-setCastShadows(false);
+  else
+  {
+if (**this-castShadowsP != cast)
+  this-castShadowsP-SetValue( cast );
 
-  this-light-setCastShadows(cast);
+this-light-setCastShadows(cast);
+  }
 }
 
 



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

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8914] code/gazebo/branches/wx/Media/materials/ programs

2010-09-20 Thread natepak
Revision: 8914
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8914view=rev
Author:   natepak
Date: 2010-09-20 21:58:33 + (Mon, 20 Sep 2010)

Log Message:
---
Renamed glsl programs

Added Paths:
---
code/gazebo/branches/wx/Media/materials/programs/ambient_one_texture_vp.glsl
code/gazebo/branches/wx/Media/materials/programs/shadow_caster_fp.glsl
code/gazebo/branches/wx/Media/materials/programs/shadow_caster_vp.glsl
code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_fp.glsl
code/gazebo/branches/wx/Media/materials/programs/shadow_receiver_vp.glsl

Removed Paths:
-
code/gazebo/branches/wx/Media/materials/programs/Ambient.frag
code/gazebo/branches/wx/Media/materials/programs/Ambient.vert
code/gazebo/branches/wx/Media/materials/programs/AmbientOneTexture.frag
code/gazebo/branches/wx/Media/materials/programs/AmbientOneTexture.glsl
code/gazebo/branches/wx/Media/materials/programs/AmbientOneTexture.vert
code/gazebo/branches/wx/Media/materials/programs/DepthMap.frag
code/gazebo/branches/wx/Media/materials/programs/DepthMap.vert
code/gazebo/branches/wx/Media/materials/programs/DepthShadowmapCasterFp.glsl
code/gazebo/branches/wx/Media/materials/programs/DepthShadowmapCasterVp.glsl

code/gazebo/branches/wx/Media/materials/programs/DepthShadowmapReceiverFp.glsl

code/gazebo/branches/wx/Media/materials/programs/DepthShadowmapReceiverVp.glsl
code/gazebo/branches/wx/Media/materials/programs/DirectionalLight.frag
code/gazebo/branches/wx/Media/materials/programs/DirectionalLight.vert
code/gazebo/branches/wx/Media/materials/programs/PointLight.frag
code/gazebo/branches/wx/Media/materials/programs/PointLight.vert
code/gazebo/branches/wx/Media/materials/programs/SpotLight.frag
code/gazebo/branches/wx/Media/materials/programs/SpotLight.vert
code/gazebo/branches/wx/Media/materials/programs/pssm.cg
code/gazebo/branches/wx/Media/materials/programs/pssm.hlsl
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_caster_fp.glsl
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_caster_vp.glsl
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_receiver_fp.glsl
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_receiver_vp.glsl

Deleted: code/gazebo/branches/wx/Media/materials/programs/Ambient.frag
===
--- code/gazebo/branches/wx/Media/materials/programs/Ambient.frag   
2010-09-20 21:55:19 UTC (rev 8913)
+++ code/gazebo/branches/wx/Media/materials/programs/Ambient.frag   
2010-09-20 21:58:33 UTC (rev 8914)
@@ -1,4 +0,0 @@
-void main()
-{
-  gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
-}

Deleted: code/gazebo/branches/wx/Media/materials/programs/Ambient.vert
===
--- code/gazebo/branches/wx/Media/materials/programs/Ambient.vert   
2010-09-20 21:55:19 UTC (rev 8913)
+++ code/gazebo/branches/wx/Media/materials/programs/Ambient.vert   
2010-09-20 21:58:33 UTC (rev 8914)
@@ -1,7 +0,0 @@
-
-void main()
-{
-   gl_Position = ftransform();
-   //gl_TexCoord[0] = gl_MultiTexCoord0;
-   gl_FrontColor = gl_Color;
-}

Deleted: code/gazebo/branches/wx/Media/materials/programs/AmbientOneTexture.frag
===
--- code/gazebo/branches/wx/Media/materials/programs/AmbientOneTexture.frag 
2010-09-20 21:55:19 UTC (rev 8913)
+++ code/gazebo/branches/wx/Media/materials/programs/AmbientOneTexture.frag 
2010-09-20 21:58:33 UTC (rev 8914)
@@ -1,13 +0,0 @@
-// if you want to use more textures, don't forget to define them there
-uniform sampler2D diffuse_map;
-//uniform sampler2D diffuse_map2;
-//uniform sampler2D diffuse_map3;
-//uniform sampler2D diffuse_map4;
-
-varying float fogFactor;
-
-void main()
-{
-  vec4 color = texture2D( diffuse_map, gl_TexCoord[ 0 ].st ) * gl_Color;
-   gl_FragColor = mix(  vec4(gl_Fog.color), color, fogFactor);
-}

Deleted: code/gazebo/branches/wx/Media/materials/programs/AmbientOneTexture.glsl
===
--- code/gazebo/branches/wx/Media/materials/programs/AmbientOneTexture.glsl 
2010-09-20 21:55:19 UTC (rev 8913)
+++ code/gazebo/branches/wx/Media/materials/programs/AmbientOneTexture.glsl 
2010-09-20 21:58:33 UTC (rev 8914)
@@ -1,13 +0,0 @@
-uniform vec4 ambient;
-
-/*
-  Basic ambient lighting vertex program
-*/
-void main()
-{
-   gl_Position = ftransform();
-   gl_TexCoord[0] = gl_MultiTexCoord0;
-   gl_FrontColor = ambient;
-}
-
-

Deleted: code/gazebo/branches/wx/Media/materials/programs/AmbientOneTexture.vert
===
--- code/gazebo/branches/wx/Media/materials/programs/AmbientOneTexture.vert 
2010-09-20 21:55:19 UTC (rev 8913)
+++ code/gazebo/branches/wx/Media

[Playerstage-commit] SF.net SVN: playerstage:[8906] code/gazebo/branches/wx/Media/materials

2010-09-15 Thread natepak
Revision: 8906
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8906view=rev
Author:   natepak
Date: 2010-09-15 15:42:21 + (Wed, 15 Sep 2010)

Log Message:
---
Updates

Modified Paths:
--
code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_caster_vp.glsl
code/gazebo/branches/wx/Media/materials/scripts/CMakeLists.txt
code/gazebo/branches/wx/Media/materials/scripts/Gazebo.material

Added Paths:
---
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_receiver_fp.glsl
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_receiver_vp.glsl
code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.material

Removed Paths:
-
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl

code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl.bak
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_vp.glsl

code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_vp.glsl.bak
code/gazebo/branches/wx/Media/materials/scripts/diffuse.material
code/gazebo/branches/wx/Media/materials/scripts/pssm.material
code/gazebo/branches/wx/Media/materials/scripts/pssm.material.old
code/gazebo/branches/wx/Media/materials/scripts/pssm_ogre.material

Modified: code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt
===
--- code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt 
2010-09-15 02:29:40 UTC (rev 8905)
+++ code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt 
2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,18 +1,9 @@
-SET (files PointLight.vert 
-   PointLight.frag 
-   DepthMap.frag 
-   DepthMap.vert 
-   pssm_vsm_caster_fp.glsl
+SET (files pssm_vsm_caster_fp.glsl
pssm_vsm_caster_vp.glsl
-   pssm_vsm_diffuse_fp.glsl
-   pssm_vsm_diffuse_vp.glsl
-   DepthShadowmapCasterFp.glsl
-   DepthShadowmapCasterVp.glsl
-   DepthShadowmapReceiverFp.glsl
-   DepthShadowmapReceiverVp.glsl
+   pssm_vsm_receiver_fp.glsl
+   pssm_vsm_receiver_vp.glsl
AmbientOneTexture.glsl
-   blur.glsl
-   )
+) 
 
 INSTALL(FILES ${files} DESTINATION 
${CMAKE_INSTALL_PREFIX}/share/gazebo/Media/materials/programs/)
 

Modified: 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_caster_vp.glsl
===
--- code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_caster_vp.glsl
2010-09-15 02:29:40 UTC (rev 8905)
+++ code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_caster_vp.glsl
2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,4 +1,3 @@
-uniform mat4 pMat;
 uniform mat4 wvMat;
 
 varying vec4 vertexDepth;
@@ -7,8 +6,5 @@
 {
   vertexDepth = wvMat * gl_Vertex;
 
-  //gl_Position = (pMat * vertexDepth).xyzw;
-
-  // pass the vertex position, transforming it to clip space
   gl_Position = ftransform();
 }

Deleted: 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl
===
--- code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl   
2010-09-15 02:29:40 UTC (rev 8905)
+++ code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl   
2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,89 +0,0 @@
-uniform vec3 lightDif0;
-uniform vec4 lightPos0;
-uniform vec4 lightAtt0;
-uniform vec4 invSMSize;
-uniform vec4 depthRange;
-uniform vec4 spotlightParams;
-uniform sampler2D dMap;
-uniform sampler2D shadowMap;
-
-varying vec4 vertexWorldPosition;
-varying vec4 lightPosition0;
-varying vec3 vertexNormal;
-varying vec3 sdir;
-
-vec2 btex2D_rg(sampler2D map, vec2 uv, float radius, vec2 offset) 
-{
-  // simple 3x3 filter
-  vec2 o = offset;
-  vec2 c = texture2D(map, uv.xy).rg; // center
-  c += texture2D(map, uv.xy - o.xy).rg; // top left
-  c += texture2D(map, uv.xy + o.xy).rg; // bottom right
-  c += texture2D(map, vec2(uv.x - o.x, uv.y)).rg; // left
-  c += texture2D(map, vec2(uv.x + o.x, uv.y)).rg; // right
-  c += texture2D(map, vec2(uv.x, uv.y + o.y)).rg; // bottom
-  c += texture2D(map, vec2(uv.x, uv.y - o.y)).rg; // top
-  c += texture2D(map, vec2(uv.x - o.x, uv.y + o.y)).rg; // bottom left
-  c += texture2D(map, vec2(uv.x + o.x, uv.y - o.y)).rg; // top right
-  return c / 9.0;
-}
-
-float shadow(in sampler2D shadowMap, in vec4 shadowMapPos, float ourDepth, 
float radius, vec2 offset) 
-{
-  vec2 suv = shadowMapPos.xy / shadowMapPos.w;
-
-  vec2 moments = btex2D_rg(shadowMap, suv, radius, offset);
-
-  float litFactor = (ourDepth = moments.x ? 1.0 : 0.0);
-
-  // standard variance shadow mapping code
-  float E_x2 = moments.y;
-  float Ex_2 = moments.x * moments.x

[Playerstage-commit] SF.net SVN: playerstage:[8841] code/gazebo/branches/wx/server/wx

2010-07-30 Thread natepak
Revision: 8841
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8841view=rev
Author:   natepak
Date: 2010-07-30 15:16:51 + (Fri, 30 Jul 2010)

Log Message:
---
Added more menu items

Modified Paths:
--
code/gazebo/branches/wx/server/wx/RenderPanel.cc
code/gazebo/branches/wx/server/wx/RenderPanel.hh
code/gazebo/branches/wx/server/wx/SimulationFrame.cc
code/gazebo/branches/wx/server/wx/SimulationFrame.hh

Modified: code/gazebo/branches/wx/server/wx/RenderPanel.cc
===
--- code/gazebo/branches/wx/server/wx/RenderPanel.cc2010-07-29 14:44:49 UTC 
(rev 8840)
+++ code/gazebo/branches/wx/server/wx/RenderPanel.cc2010-07-30 15:16:51 UTC 
(rev 8841)
@@ -43,6 +43,8 @@
   Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( RenderPanel::OnMouseEvent ), 
NULL, this );
   Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( RenderPanel::OnMouseEvent 
), NULL, this );
 
+  Connect( wxEVT_KEY_UP, wxKeyEventHandler(RenderPanel::OnCharEvent), NULL, 
this);
+
   Events::ConnectCreateEntitySignal( boost::bind(RenderPanel::CreateEntity, 
this, _1) );
 }
 
@@ -94,6 +96,15 @@
   return handle;
 }
 
+
+// On char event
+void RenderPanel::OnCharEvent( wxKeyEvent event)
+{
+  printf(Key Event\n);
+}
+
+
+// On mouse event callback
 void RenderPanel::OnMouseEvent( wxMouseEvent event)
 {
   this-mouseEvent.pos.Set( event.GetX(), event.GetY() );
@@ -138,6 +149,8 @@
   this-mouseEvent.prevPos = this-mouseEvent.pos;
 }
 
+
+// Reparent the window
 bool RenderPanel::Reparent(wxWindowBase* new_parent)
 {
   bool ret = true;

Modified: code/gazebo/branches/wx/server/wx/RenderPanel.hh
===
--- code/gazebo/branches/wx/server/wx/RenderPanel.hh2010-07-29 14:44:49 UTC 
(rev 8840)
+++ code/gazebo/branches/wx/server/wx/RenderPanel.hh2010-07-30 15:16:51 UTC 
(rev 8841)
@@ -36,6 +36,8 @@
 
 public: void OnMouseEvent( wxMouseEvent event);
 
+public: void OnCharEvent( wxKeyEvent event);
+
 public: void Init();
 
 /// \brief Create the camera

Modified: code/gazebo/branches/wx/server/wx/SimulationFrame.cc
===
--- code/gazebo/branches/wx/server/wx/SimulationFrame.cc2010-07-29 
14:44:49 UTC (rev 8840)
+++ code/gazebo/branches/wx/server/wx/SimulationFrame.cc2010-07-30 
15:16:51 UTC (rev 8841)
@@ -36,6 +36,7 @@
 
   wxMenuBar *menuBar = new wxMenuBar;
   wxMenu *fileMenu = new wxMenu;
+  wxMenu *viewMenu = new wxMenu;
 
   wxMenuItem *openItem = fileMenu-Append(ID_OPEN, wxT(Open\tCtrl-O) );
   Connect(openItem-GetId(), wxEVT_COMMAND_MENU_SELECTED, 
wxCommandEventHandler(SimulationFrame::OnOpen), NULL, this);
@@ -49,7 +50,33 @@
   wxMenuItem *quitItem = fileMenu-Append(wxID_EXIT, wxT(Quit\tCtrl-Q) );
   Connect(quitItem-GetId(), wxEVT_COMMAND_MENU_SELECTED, 
wxCommandEventHandler(SimulationFrame::OnQuit), NULL, this);
 
+
+
+
+  wxMenuItem *wireItem = viewMenu-AppendCheckItem(ID_WIREFRAME, 
wxT(Wireframe));
+  Connect(wireItem-GetId(), wxEVT_COMMAND_MENU_SELECTED, 
wxCommandEventHandler(SimulationFrame::OnWireframe), NULL, this);
+
+  wxMenuItem *showPhysicsItem= viewMenu-AppendCheckItem(ID_PHYSICS, wxT(Show 
Physics));
+  Connect(showPhysicsItem-GetId(), wxEVT_COMMAND_MENU_SELECTED, 
wxCommandEventHandler(SimulationFrame::OnShowPhysics), NULL, this);
+
+  wxMenuItem *showBoundingBoxesItem= viewMenu-AppendCheckItem(ID_BOUNDING, 
wxT(Show Bounding Boxes));
+  Connect(showBoundingBoxesItem-GetId(), wxEVT_COMMAND_MENU_SELECTED, 
wxCommandEventHandler(SimulationFrame::OnShowBoundingBoxes), NULL, this);
+
+  wxMenuItem *showJointsItem= viewMenu-AppendCheckItem(ID_JOINTS, wxT(Show 
Joints));
+  Connect(showJointsItem-GetId(), wxEVT_COMMAND_MENU_SELECTED, 
wxCommandEventHandler(SimulationFrame::OnShowJoints), NULL, this);
+
+  wxMenuItem *showContactsItem= viewMenu-AppendCheckItem(ID_CONTACTS, 
wxT(Show Contacts));
+  Connect(showContactsItem-GetId(), wxEVT_COMMAND_MENU_SELECTED, 
wxCommandEventHandler(SimulationFrame::OnShowContacts), NULL, this);
+
+  wxMenuItem *showLightsItem= viewMenu-AppendCheckItem(ID_LIGHTS, wxT(Show 
Lights));
+  Connect(showLightsItem-GetId(), wxEVT_COMMAND_MENU_SELECTED, 
wxCommandEventHandler(SimulationFrame::OnShowLights), NULL, this);
+
+  wxMenuItem *showCamerasItem= viewMenu-AppendCheckItem(ID_CAMERAS, wxT(Show 
Cameras));
+  Connect(showCamerasItem-GetId(), wxEVT_COMMAND_MENU_SELECTED, 
wxCommandEventHandler(SimulationFrame::OnShowCameras), NULL, this);
+
+
   menuBar-Append( fileMenu, _(File) );
+  menuBar-Append( viewMenu, _(View) );
   SetMenuBar( menuBar );
 
   this-toolbar = NULL;
@@ -228,7 +255,7

[Playerstage-commit] SF.net SVN: playerstage:[8840] code/gazebo/branches/wx

2010-07-29 Thread natepak
Revision: 8840
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8840view=rev
Author:   natepak
Date: 2010-07-29 14:44:49 + (Thu, 29 Jul 2010)

Log Message:
---
Fixed loading of world files

Modified Paths:
--
code/gazebo/branches/wx/libgazebo/Server.cc
code/gazebo/branches/wx/server/Simulator.cc
code/gazebo/branches/wx/server/World.cc
code/gazebo/branches/wx/server/rendering/Light.cc
code/gazebo/branches/wx/server/rendering/OgreAdaptor.cc
code/gazebo/branches/wx/server/rendering/RTShaderSystem.cc

Modified: code/gazebo/branches/wx/libgazebo/Server.cc
===
--- code/gazebo/branches/wx/libgazebo/Server.cc 2010-07-29 01:11:17 UTC (rev 
8839)
+++ code/gazebo/branches/wx/libgazebo/Server.cc 2010-07-29 14:44:49 UTC (rev 
8840)
@@ -61,24 +61,7 @@
 // Destroy a server
 Server::~Server()
 {
-  if (rmdir(this-filename.c_str()))
-  {
-std::cerr  Error deleting directory\n;
-/*if (errno == EEXIST)
-{
-  errStream  directory [   this-filename
-] already exists (previous crash?)
-   remove the directory and re-run gazebo;
-  throw(errStream.str());
-}
-else
-{
-  errStream  failed to create [  this-filename  ] : [
-strerror(errno)  ];
-  throw(errStream.str());
-}
-*/
-  }
+  this-Fini();
 }
 
 

@@ -200,6 +183,7 @@
   {
 std::ostringstream stream;
 stream  error deleting pid file:   strerror(errno);
+std::cerr  stream.str();
 throw(stream.str());
   }
 

Modified: code/gazebo/branches/wx/server/Simulator.cc
===
--- code/gazebo/branches/wx/server/Simulator.cc 2010-07-29 01:11:17 UTC (rev 
8839)
+++ code/gazebo/branches/wx/server/Simulator.cc 2010-07-29 14:44:49 UTC (rev 
8840)
@@ -711,7 +711,6 @@
   Time lastTime = this-GetRealTime();
   struct timespec req, rem;
 
-
   while (!this-physicsQuit)
   {
 //DiagnosticTimer timer(PhysicsLoop Timer );

Modified: code/gazebo/branches/wx/server/World.cc
===
--- code/gazebo/branches/wx/server/World.cc 2010-07-29 01:11:17 UTC (rev 
8839)
+++ code/gazebo/branches/wx/server/World.cc 2010-07-29 14:44:49 UTC (rev 
8840)
@@ -103,6 +103,7 @@
   (*iter) = NULL;
 }
   }
+  this-models.clear();
 
   if (this-physicsEngine)
   {
@@ -117,6 +118,14 @@
   delete this-simIface;
   this-simIface = NULL;
 }
+
+if (this-graphics)
+  delete this-graphics;
+this-graphics = NULL;
+
+if (this-factory)
+  delete this-factory;
+this-factory = NULL;
   }
   catch (std::string e)
   {
@@ -129,12 +138,7 @@
 this-server =NULL;
   }
 
-  if (this-factory)
-  {
-delete this-factory;
-this-factory = NULL;
-  }
-
+  /*
   if (this-saveStateTimeoutP)
 delete this-saveStateTimeoutP;
   this-saveStateTimeoutP = NULL;
@@ -146,6 +150,7 @@
   if (this-threadsP)
 delete this-threadsP;
   this-threadsP = NULL;
+  */
 
 #ifdef USE_THREADPOOL
   if (this-threadPool)

Modified: code/gazebo/branches/wx/server/rendering/Light.cc
===
--- code/gazebo/branches/wx/server/rendering/Light.cc   2010-07-29 01:11:17 UTC 
(rev 8839)
+++ code/gazebo/branches/wx/server/rendering/Light.cc   2010-07-29 14:44:49 UTC 
(rev 8840)
@@ -71,6 +71,9 @@
 /// Destructor
 Light::~Light()
 {
+  if (this-light)
+OgreAdaptor::Instance()-sceneMgr-destroyLight(this-GetName());
+
   delete this-line;
   delete this-visual;
 

Modified: code/gazebo/branches/wx/server/rendering/OgreAdaptor.cc
===
--- code/gazebo/branches/wx/server/rendering/OgreAdaptor.cc 2010-07-29 
01:11:17 UTC (rev 8839)
+++ code/gazebo/branches/wx/server/rendering/OgreAdaptor.cc 2010-07-29 
14:44:49 UTC (rev 8840)
@@ -106,6 +106,7 @@
   if (this-frameListener)
 delete this-frameListener;
   this-frameListener = NULL;
+  this-Fini();
 }
 
 


Modified: code/gazebo/branches/wx/server/rendering/RTShaderSystem.cc
===
--- code/gazebo/branches/wx/server/rendering/RTShaderSystem.cc  2010-07-29 
01:11:17 UTC (rev 8839)
+++ code/gazebo/branches/wx/server/rendering/RTShaderSystem.cc  2010-07-29 
14:44:49 UTC (rev 8840)
@@ -49,6 +49,7 @@
 /// Destructor
 RTShaderSystem::~RTShaderSystem()
 {
+  this-Fini();
 }
 
 



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

--
The Palm PDK Hot Apps

[Playerstage-commit] SF.net SVN: playerstage:[8836] code/gazebo/branches/wx

2010-07-28 Thread natepak
Revision: 8836
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8836view=rev
Author:   natepak
Date: 2010-07-28 15:38:26 + (Wed, 28 Jul 2010)

Log Message:
---
Added more improvements to wx

Modified Paths:
--
code/gazebo/branches/wx/libgazebo/Server.cc
code/gazebo/branches/wx/server/Param.hh
code/gazebo/branches/wx/server/Simulator.cc
code/gazebo/branches/wx/server/Simulator.hh
code/gazebo/branches/wx/server/World.cc
code/gazebo/branches/wx/server/World.hh
code/gazebo/branches/wx/server/physics/PhysicsEngine.cc
code/gazebo/branches/wx/server/physics/PhysicsEngine.hh
code/gazebo/branches/wx/server/physics/bullet/BulletPhysics.cc
code/gazebo/branches/wx/server/physics/bullet/BulletPhysics.hh
code/gazebo/branches/wx/server/physics/ode/ODEPhysics.cc
code/gazebo/branches/wx/server/physics/ode/ODEPhysics.hh
code/gazebo/branches/wx/server/rendering/OgreAdaptor.cc
code/gazebo/branches/wx/server/wx/SimulationFrame.cc
code/gazebo/branches/wx/server/wx/SimulationFrame.hh

Modified: code/gazebo/branches/wx/libgazebo/Server.cc
===
--- code/gazebo/branches/wx/libgazebo/Server.cc 2010-07-27 14:49:44 UTC (rev 
8835)
+++ code/gazebo/branches/wx/libgazebo/Server.cc 2010-07-28 15:38:26 UTC (rev 
8836)
@@ -61,6 +61,24 @@
 // Destroy a server
 Server::~Server()
 {
+  if (rmdir(this-filename.c_str()))
+  {
+std::cerr  Error deleting directory\n;
+/*if (errno == EEXIST)
+{
+  errStream  directory [   this-filename
+] already exists (previous crash?)
+   remove the directory and re-run gazebo;
+  throw(errStream.str());
+}
+else
+{
+  errStream  failed to create [  this-filename  ] : [
+strerror(errno)  ];
+  throw(errStream.str());
+}
+*/
+  }
 }
 
 


Modified: code/gazebo/branches/wx/server/Param.hh
===
--- code/gazebo/branches/wx/server/Param.hh 2010-07-27 14:49:44 UTC (rev 
8835)
+++ code/gazebo/branches/wx/server/Param.hh 2010-07-28 15:38:26 UTC (rev 
8836)
@@ -118,7 +118,7 @@
 public: T GetValue() const;
 
 /// \brief Set the value of the parameter
-public: void SetValue(const T value);
+public: void SetValue(const T value, bool callback=false);
 
 public: inline T operator*() const {return value;}
 
@@ -238,9 +238,12 @@
   
//
   /// Set the value of the parameter
   templatetypename T
-  void ParamTT::SetValue(const T v)
+  void ParamTT::SetValue(const T v, bool callback)
   {
 this-value = v;
+
+if (callback)
+  this-changeSignal(this-value);
   }
 
 }

Modified: code/gazebo/branches/wx/server/Simulator.cc
===
--- code/gazebo/branches/wx/server/Simulator.cc 2010-07-27 14:49:44 UTC (rev 
8835)
+++ code/gazebo/branches/wx/server/Simulator.cc 2010-07-28 15:38:26 UTC (rev 
8836)
@@ -97,8 +97,7 @@
 

 // Constructor
 Simulator::Simulator()
-: xmlFile(NULL),
-  gui(NULL),
+: gui(NULL),
   renderEngine(NULL),
   gazeboConfig(NULL),
   loaded(false),
@@ -111,6 +110,7 @@
   renderUpdates(0),
   stepInc(false),
   userQuit(false),
+  physicsQuit(false),
   guiEnabled(true),
   renderEngineEnabled(true),
   physicsEnabled(true),
@@ -133,12 +133,6 @@
 this-gazeboConfig = NULL;
   }
 
-  if (this-xmlFile)
-  {
-delete this-xmlFile;
-this-xmlFile = NULL;
-  }
-
   if (this-render_mutex)
   {
 delete this-render_mutex;
@@ -166,13 +160,6 @@
   if (!this-loaded)
 return;
 
-  if (this-gui)
-  {
-delete this-gui;
-this-gui = NULL;
-  }
-
-
   gazebo::World::Instance()-Close();
 
   if (this-renderEngineEnabled)
@@ -193,14 +180,14 @@
   }
 
   // Load the world file
-  this-xmlFile=new gazebo::XMLConfig();
+  XMLConfig *xmlFile=new gazebo::XMLConfig();
 
   try
   {
 if (worldFileName.size())
-  this-xmlFile-Load(worldFileName);
+  xmlFile-Load(worldFileName);
 else
-  this-xmlFile-LoadString(defaultWorld);
+  xmlFile-LoadString(defaultWorld);
   }
   catch (GazeboError e)
   {
@@ -226,7 +213,6 @@
   if (this-renderEngineEnabled)
 OgreAdaptor::Instance()-Load(rootNode);
 
-
   // Create and initialize the Gui
   if (this-renderEngineEnabled  this-guiEnabled)
   {
@@ -250,15 +236,10 @@
   }
 
 // Create the GUI
-  if (childNode || !rootNode)
+  if (!this-gui  (childNode || !rootNode))
   {
 this-gui = new SimulationApp();
 this-gui-Load();
-
-/*this-gui = new Gui(x, y, width, height, Gazebo);
-this-gui-Load(childNode);
-this-gui-CreateCameras();
-*/
   }
 }
 catch

[Playerstage-commit] SF.net SVN: playerstage:[8835] code/gazebo/branches/wx/server/wx

2010-07-27 Thread natepak
Revision: 8835
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8835view=rev
Author:   natepak
Date: 2010-07-27 14:49:44 + (Tue, 27 Jul 2010)

Log Message:
---
Added a pop-up menu for the tree browser

Modified Paths:
--
code/gazebo/branches/wx/server/wx/SimulationFrame.cc
code/gazebo/branches/wx/server/wx/SimulationFrame.hh

Modified: code/gazebo/branches/wx/server/wx/SimulationFrame.cc
===
--- code/gazebo/branches/wx/server/wx/SimulationFrame.cc2010-07-26 
19:48:56 UTC (rev 8834)
+++ code/gazebo/branches/wx/server/wx/SimulationFrame.cc2010-07-27 
14:49:44 UTC (rev 8835)
@@ -1,7 +1,9 @@
 #include wx/aui/aui.h
-#include wx/treectrl.h
+#include stack
 
 #include propgrid/propgrid.h
+#include OgreCamera.hh
+#include CameraManager.hh
 #include World.hh
 #include Entity.hh
 #include Model.hh
@@ -46,6 +48,7 @@
   this-propGrid-Connect( wxEVT_PG_CHANGED, wxPropertyGridEventHandler( 
SimulationFrame::OnPropertyChanged), NULL, this);
 
   Connect(this-treeCtrl-GetId(), wxEVT_COMMAND_TREE_SEL_CHANGED, 
wxTreeEventHandler(SimulationFrame::OnTreeClick), NULL, this); 
+  this-treeCtrl-Connect(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, 
wxTreeEventHandler(SimulationFrame::OnTreeRightClick), NULL, this);
 
 
   this-MakeToolbar();
@@ -67,6 +70,7 @@
  Simulator::Instance()-ConnectPauseSignal( 
boost::bind(SimulationFrame::OnPause, this, _1) );
 
  World::Instance()-ConnectAddEntitySignal( 
boost::bind(SimulationFrame::AddEntityCB, this, _1) );
+ World::Instance()-ConnectDeleteEntitySignal( 
boost::bind(SimulationFrame::DeleteEntityCB, this, _1) );
 }
 
 

@@ -123,6 +127,43 @@
 }
 
 

+// Delete entity callback
+void SimulationFrame::DeleteEntityCB(const std::string name)
+{
+  this-treeCtrl-Delete( this-FindTreeItem(name) );
+}
+
+
+// Find an item in a tree
+wxTreeItemId SimulationFrame::FindTreeItem(const std::string name)
+{
+  std::stackwxTreeItemId items;
+
+  if (this-treeCtrl-GetRootItem().IsOk())
+items.push(this-treeCtrl-GetRootItem());
+
+  while (!items.empty())
+  {
+wxTreeItemId next = items.top();
+items.pop();
+
+if (next != this-treeCtrl-GetRootItem()  
+   ((EntityTreeItemData*)this-treeCtrl-GetItemData(next))-name == name)
+  return next;
+
+wxTreeItemIdValue cookie;
+wxTreeItemId nextChild = this-treeCtrl-GetFirstChild(next, cookie);
+while (nextChild.IsOk())
+{
+  items.push(nextChild);
+  nextChild = this-treeCtrl-GetNextSibling(nextChild);
+}
+  }
+
+  return wxTreeItemId();
+}
+
+
 void SimulationFrame::OnPause(bool pause)
 {
   if (pause)
@@ -291,6 +332,46 @@
 }
 
 

+// Callback when an entity in the tree is clicked
+void SimulationFrame::OnTreeRightClick(wxTreeEvent event)
+{
+  EntityTreeItemData *data = 
(EntityTreeItemData*)this-treeCtrl-GetItemData(event.GetItem());
+
+  if (data-name != World)
+  {
+wxMenu mnu;
+mnu.Append(0,  wxT(Move to));
+mnu.Append(1,  wxT(Modify));
+mnu.Append(2,  wxT(Delete));
+mnu.Connect(wxEVT_COMMAND_MENU_SELECTED, 
(wxObjectEventFunction)SimulationFrame::OnTreePopupClick, NULL, this);
+PopupMenu(mnu);
+  }
+}
+
+
+// When a popup menu item has been click in the tree widget
+void SimulationFrame::OnTreePopupClick( wxCommandEvent event )
+{
+  EntityTreeItemData *data = 
(EntityTreeItemData*)this-treeCtrl-GetItemData(this-treeCtrl-GetSelection());
+
+  Entity *ent = World::Instance()-GetEntityByName(data-name);
+
+  if (ent)
+  {
+if (event.GetId() == 0)
+{
+  OgreCamera *cam = CameraManager::Instance()-GetActiveCamera();
+  if (cam)
+cam-MoveToEntity(ent);
+}
+else if (event.GetId() == 1)
+  World::Instance()-SetSelectedEntity(ent);
+else if (event.GetId() == 2)
+  World::Instance()-DeleteEntity(data-name);
+  }
+}
+
+
 // On property changed event callback
 void SimulationFrame::OnPropertyChanged(wxPropertyGridEvent event)
 {

Modified: code/gazebo/branches/wx/server/wx/SimulationFrame.hh
===
--- code/gazebo/branches/wx/server/wx/SimulationFrame.hh2010-07-26 
19:48:56 UTC (rev 8834)
+++ code/gazebo/branches/wx/server/wx/SimulationFrame.hh2010-07-27 
14:49:44 UTC (rev 8835)
@@ -1,11 +1,10 @@
 #include wx/wx.h
+#include wx/treectrl.h
 
 class wxAuiManager;
 class wxAuiManagerEvent;
 class

[Playerstage-commit] SF.net SVN: playerstage:[8828] code/gazebo/branches/wx/server/wx

2010-07-22 Thread natepak
Revision: 8828
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8828view=rev
Author:   natepak
Date: 2010-07-22 16:01:47 + (Thu, 22 Jul 2010)

Log Message:
---
More improvements to wx gazebo

Modified Paths:
--
code/gazebo/branches/wx/server/wx/RenderPanel.cc
code/gazebo/branches/wx/server/wx/RenderPanel.hh
code/gazebo/branches/wx/server/wx/SimulationFrame.cc
code/gazebo/branches/wx/server/wx/SimulationFrame.hh

Modified: code/gazebo/branches/wx/server/wx/RenderPanel.cc
===
--- code/gazebo/branches/wx/server/wx/RenderPanel.cc2010-07-21 22:23:22 UTC 
(rev 8827)
+++ code/gazebo/branches/wx/server/wx/RenderPanel.cc2010-07-22 16:01:47 UTC 
(rev 8828)
@@ -17,16 +17,22 @@
 using namespace gazebo;
 
 IMPLEMENT_CLASS(RenderPanel, wxControl)
+BEGIN_EVENT_TABLE(RenderPanel, wxControl)
+EVT_SIZE (RenderPanel::OnSize)
+END_EVENT_TABLE()
 
 

 // Constructor
 RenderPanel::RenderPanel(wxWindow *parent)
   : wxControl(parent, wxID_ANY, wxDefaultPosition, wxSize(320,240), 
wxSUNKEN_BORDER, wxDefaultValidator)
 {
+
   this-userCamera = NULL;
   this-cursorState = default;
   this-currMaker = NULL;
 
+  SetFocus();
+
   Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( RenderPanel::OnMouseEvent ), 
NULL, this );
   Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( RenderPanel::OnMouseEvent 
), NULL, this );
   Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( RenderPanel::OnMouseEvent ), 
NULL, this );
@@ -101,10 +107,20 @@
   this-mouseEvent.left = event.LeftIsDown() ? MouseEvent::DOWN : 
MouseEvent::UP;
   this-mouseEvent.right = event.RightIsDown() ? MouseEvent::DOWN : 
MouseEvent::UP;
   this-mouseEvent.middle = event.MiddleIsDown() ? MouseEvent::DOWN : 
MouseEvent::UP;
+ 
+  if (event.GetWheelRotation()  0) 
+  {
+this-mouseEvent.scroll.y = 1;
+this-mouseEvent.middle = MouseEvent::SCROLL;
+  }
+  else if (event.GetWheelRotation()  0)
+  {
+this-mouseEvent.scroll.y = -1;
+this-mouseEvent.middle = MouseEvent::SCROLL;
+  }
 
   this-mouseEvent.dragging = event.Dragging();
 
-
   if (this-currMaker)
   {
 if (event.LeftDown())
@@ -204,6 +220,7 @@
   this-userCamera-Load(NULL);
 }
 
+
 void RenderPanel::Init()
 {
   Pose3d pose;
@@ -213,6 +230,7 @@
   this-userCamera-SetWorldPose(pose);
 }
 
+
 void RenderPanel::CreateEntity(std::string name)
 {
   if (this-currMaker)
@@ -244,3 +262,17 @@
   if (this-currMaker)
 this-currMaker-Start();
 }
+
+void RenderPanel::OnSize( wxSizeEvent evt )
+{
+  int width;
+  int height;
+  wxSize size = evt.GetSize ();
+  width = size.GetWidth ();
+  height = size.GetHeight ();
+
+  if (this-userCamera)
+this-userCamera-Resize(width,height);
+
+  evt.Skip();
+}

Modified: code/gazebo/branches/wx/server/wx/RenderPanel.hh
===
--- code/gazebo/branches/wx/server/wx/RenderPanel.hh2010-07-21 22:23:22 UTC 
(rev 8827)
+++ code/gazebo/branches/wx/server/wx/RenderPanel.hh2010-07-22 16:01:47 UTC 
(rev 8828)
@@ -19,6 +19,7 @@
   class RenderPanel : public wxControl
   {
 DECLARE_CLASS(RenderPanel)
+DECLARE_EVENT_TABLE()
 
 /// \brief Constructor
 public: RenderPanel(wxWindow *parent);
@@ -40,8 +41,11 @@
 /// \brief Create the camera
 public: void CreateCamera();
 
+protected: virtual void OnSize( wxSizeEvent evt );
+
 private: void CreateEntity(std::string name);
 
+
 private: UserCamera *userCamera;
 
 private: MouseEvent mouseEvent;

Modified: code/gazebo/branches/wx/server/wx/SimulationFrame.cc
===
--- code/gazebo/branches/wx/server/wx/SimulationFrame.cc2010-07-21 
22:23:22 UTC (rev 8827)
+++ code/gazebo/branches/wx/server/wx/SimulationFrame.cc2010-07-22 
16:01:47 UTC (rev 8828)
@@ -51,6 +51,20 @@
   image.Load(cylinder_create_blue.png);
   wxBitmap cylinder_bitmap(wxString::FromAscii(image.GetFilename().c_str()), 
wxBITMAP_TYPE_PNG);
 
+  image.Load(pointlight.png);
+  wxBitmap pointlight_bitmap(wxString::FromAscii(image.GetFilename().c_str()), 
wxBITMAP_TYPE_PNG);
+
+  image.Load(spotlight.png);
+  wxBitmap spotlight_bitmap(wxString::FromAscii(image.GetFilename().c_str()), 
wxBITMAP_TYPE_PNG);
+
+  image.Load(directionallight.png);
+  wxBitmap 
directionallight_bitmap(wxString::FromAscii(image.GetFilename().c_str()), 
wxBITMAP_TYPE_PNG);
+
+  image.Load(cursor.png);
+  wxBitmap cursor_bitmap(wxString::FromAscii(image.GetFilename().c_str()), 
wxBITMAP_TYPE_PNG);
+
+
+
   this-toolbar = new wxToolBar(this, wxID_ANY, wxDefaultPosition, 
wxDefaultSize, wxNO_BORDER|wxTB_HORIZONTAL);
   this-toolbar-Connect

[Playerstage-commit] SF.net SVN: playerstage:[8827] code/gazebo/branches/wx

2010-07-21 Thread natepak
Revision: 8827
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8827view=rev
Author:   natepak
Date: 2010-07-21 22:23:22 + (Wed, 21 Jul 2010)

Log Message:
---
Move improvements to the wx gui

Modified Paths:
--
code/gazebo/branches/wx/Media/materials/textures/box_create_blue.png
code/gazebo/branches/wx/Media/materials/textures/control_end_blue.png
code/gazebo/branches/wx/Media/materials/textures/control_pause_blue.png
code/gazebo/branches/wx/Media/materials/textures/control_play_blue.png
code/gazebo/branches/wx/Media/materials/textures/cylinder_create_blue.png
code/gazebo/branches/wx/Media/materials/textures/sphere_create_blue.png
code/gazebo/branches/wx/cmake/SearchForStuff.cmake
code/gazebo/branches/wx/server/Simulator.cc
code/gazebo/branches/wx/server/Simulator.hh
code/gazebo/branches/wx/server/main.cc
code/gazebo/branches/wx/server/rendering/Image.cc
code/gazebo/branches/wx/server/rendering/Image.hh
code/gazebo/branches/wx/server/rendering/OgreCreator.cc
code/gazebo/branches/wx/server/wx/CMakeLists.txt
code/gazebo/branches/wx/server/wx/RenderPanel.cc
code/gazebo/branches/wx/server/wx/RenderPanel.hh
code/gazebo/branches/wx/server/wx/SimulationApp.cc
code/gazebo/branches/wx/server/wx/SimulationApp.hh
code/gazebo/branches/wx/server/wx/SimulationFrame.cc
code/gazebo/branches/wx/server/wx/SimulationFrame.hh

Added Paths:
---
code/gazebo/branches/wx/server/wx/TimePanel.cc
code/gazebo/branches/wx/server/wx/TimePanel.hh

Modified: code/gazebo/branches/wx/Media/materials/textures/box_create_blue.png
===
(Binary files differ)

Modified: code/gazebo/branches/wx/Media/materials/textures/control_end_blue.png
===
(Binary files differ)

Modified: 
code/gazebo/branches/wx/Media/materials/textures/control_pause_blue.png
===
(Binary files differ)

Modified: code/gazebo/branches/wx/Media/materials/textures/control_play_blue.png
===
(Binary files differ)

Modified: 
code/gazebo/branches/wx/Media/materials/textures/cylinder_create_blue.png
===
(Binary files differ)

Modified: 
code/gazebo/branches/wx/Media/materials/textures/sphere_create_blue.png
===
(Binary files differ)

Modified: code/gazebo/branches/wx/cmake/SearchForStuff.cmake
===
--- code/gazebo/branches/wx/cmake/SearchForStuff.cmake  2010-07-18 20:14:30 UTC 
(rev 8826)
+++ code/gazebo/branches/wx/cmake/SearchForStuff.cmake  2010-07-21 22:23:22 UTC 
(rev 8827)
@@ -339,7 +339,7 @@
 
 
 # Find wxWidgets
-find_package(wxWidgets COMPONENTS base core gl)
+find_package(wxWidgets)
 if (NOT wxWidgets_FOUND)
 BUILD_ERROR (wxWidgets not found. See the following website: 
http://www.wxwidgets.org;)
 endif (NOT wxWidgets_FOUND)

Modified: code/gazebo/branches/wx/server/Simulator.cc
===
--- code/gazebo/branches/wx/server/Simulator.cc 2010-07-18 20:14:30 UTC (rev 
8826)
+++ code/gazebo/branches/wx/server/Simulator.cc 2010-07-21 22:23:22 UTC (rev 
8827)
@@ -121,6 +121,7 @@
   this-startTime = this-GetWallTime();
   this-gazeboConfig=new gazebo::GazeboConfig();
   this-pause = false;
+
 }
 
 

@@ -406,7 +407,7 @@
 
 

 /// Main simulation loop, when this loop ends the simulation finish
-void Simulator::MainLoop()
+void Simulator::Run()
 {
   this-state = RUN;
 
@@ -419,14 +420,51 @@
   this-physicsThread = new boost::thread( 
  boost::bind(Simulator::PhysicsLoop, this));
 
-  // Update the gui
-  while (!this-userQuit)
+  if (this-gui)
+this-gui-Run();
+  else
   {
-currTime = this-GetWallTime();
-if ( currTime - lastTime  1.0/freq)
+while (!this-userQuit)
 {
-  lastTime = this-GetWallTime();
+  currTime = this-GetWallTime();
+  if ( currTime - lastTime  1.0/freq)
+  {
+lastTime = this-GetWallTime();
 
+this-GraphicsUpdate();
+currTime = this-GetWallTime();
+if (currTime - lastTime  1/freq)
+{
+  Time sleepTime = ( Time(1.0/freq) - (currTime - lastTime));
+  timeSpec.tv_sec = sleepTime.sec;
+  timeSpec.tv_nsec = sleepTime.nsec;
+
+  nanosleep(timeSpec, NULL);
+}
+  }
+  else
+  {
+Time sleepTime = ( Time(1.0/freq) - (currTime - lastTime));
+timeSpec.tv_sec = sleepTime.sec

[Playerstage-commit] SF.net SVN: playerstage:[8815] code/gazebo/trunk/server/GazeboConfig.cc

2010-07-06 Thread natepak
Revision: 8815
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8815view=rev
Author:   natepak
Date: 2010-07-06 18:40:10 + (Tue, 06 Jul 2010)

Log Message:
---
More fixes to config paths

Modified Paths:
--
code/gazebo/trunk/server/GazeboConfig.cc

Modified: code/gazebo/trunk/server/GazeboConfig.cc
===
--- code/gazebo/trunk/server/GazeboConfig.cc2010-07-06 18:10:34 UTC (rev 
8814)
+++ code/gazebo/trunk/server/GazeboConfig.cc2010-07-06 18:40:10 UTC (rev 
8815)
@@ -59,15 +59,15 @@
   std::string delim(:);
 
   char *ogre_resource_path = getenv(OGRE_RESOURCE_PATH);
-  if(this-ogrePaths.empty()  ogre_resource_path) 
+  if(ogre_resource_path) 
 this-AddOgrePaths(std::string(ogre_resource_path));
 
   char *gazebo_resource_path = getenv(GAZEBO_RESOURCE_PATH);
-  if(this-gazeboPaths.empty()  gazebo_resource_path) 
+  if(gazebo_resource_path) 
 this-AddGazeboPaths(std::string(gazebo_resource_path));
 
   char *gazebo_plugin_path = getenv(GAZEBO_PLUGIN_PATH);
-  if(this-pluginPaths.empty()  gazebo_plugin_path) 
+  if(gazebo_plugin_path) 
 this-AddPluginPaths(std::string(gazebo_plugin_path));
 
   if (cfgFile.is_open())


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

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8810] code/gazebo/trunk/server/rendering

2010-06-30 Thread natepak
Revision: 8810
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8810view=rev
Author:   natepak
Date: 2010-06-30 14:54:08 + (Wed, 30 Jun 2010)

Log Message:
---
Added check of graphic card capabilities to enable/disable RT shaders

Modified Paths:
--
code/gazebo/trunk/server/rendering/OgreAdaptor.cc
code/gazebo/trunk/server/rendering/OgreAdaptor.hh
code/gazebo/trunk/server/rendering/RTShaderSystem.cc
code/gazebo/trunk/server/rendering/RTShaderSystem.hh

Modified: code/gazebo/trunk/server/rendering/OgreAdaptor.cc
===
--- code/gazebo/trunk/server/rendering/OgreAdaptor.cc   2010-06-30 02:24:20 UTC 
(rev 8809)
+++ code/gazebo/trunk/server/rendering/OgreAdaptor.cc   2010-06-30 14:54:08 UTC 
(rev 8810)
@@ -133,6 +133,8 @@
 
   // Initialize the root node, and don't create a window
   this-root-initialise(false);
+
+
 }
 
 

@@ -253,25 +255,23 @@
   exit(-1);
 }
   }
-  
 
-  // Create our frame listener and register it
-  /*this-frameListener = new OgreFrameListener();
-  this-root-addFrameListener(this-frameListener);
-  */
-
   this-raySceneQuery = this-sceneMgr-createRayQuery( Ogre::Ray() );
   this-raySceneQuery-setSortByDistance(true);
   this-raySceneQuery-setQueryMask(Ogre::SceneManager::ENTITY_TYPE_MASK);
 
-  RTShaderSystem::Instance()-Init();
+  if (this-HasGLSL())
+RTShaderSystem::Instance()-Init();
 }
 
+
+
 

 /// Finalize
 void OgreAdaptor::Fini()
 {
-  RTShaderSystem::Instance()-Fini();
+  if (this-HasGLSL())
+RTShaderSystem::Instance()-Fini();
 }
  
 

@@ -452,6 +452,7 @@
   */
 
   this-root-setRenderSystem(renderSys);
+
 }
 
 
@@ -637,5 +638,26 @@
   }
 }
 
+
+// Returns true if the graphics card support GLSL
+bool OgreAdaptor::HasGLSL()
+{
+  const Ogre::RenderSystemCapabilities *capabilities;
+  Ogre::RenderSystemCapabilities::ShaderProfiles profiles;
+  Ogre::RenderSystemCapabilities::ShaderProfiles::const_iterator iter;
 
+  capabilities = this-root-getRenderSystem()-getCapabilities();
+  profiles = capabilities-getSupportedShaderProfiles();
 
+  iter = std::find(profiles.begin(), profiles.end(), glsl2);
+
+  // Print all the shader profiles
+  /*std::cout  Shader profiles:\n;
+  for (iter = profiles.begin(); iter != profiles.end(); iter++)
+  {
+std::cout  *iter  \n;
+  }
+  */
+
+  return iter != profiles.end();
+}

Modified: code/gazebo/trunk/server/rendering/OgreAdaptor.hh
===
--- code/gazebo/trunk/server/rendering/OgreAdaptor.hh   2010-06-30 02:24:20 UTC 
(rev 8809)
+++ code/gazebo/trunk/server/rendering/OgreAdaptor.hh   2010-06-30 14:54:08 UTC 
(rev 8810)
@@ -119,6 +119,9 @@
 
 public: void PrintSceneGraph();
 
+/// \brief Returns true if the graphics card support GLSL
+public: bool HasGLSL();
+
 /// \brief Print scene graph
 private: void PrintSceneGraphHelper(std::string prefix, 
 Ogre::Node *node);

Modified: code/gazebo/trunk/server/rendering/RTShaderSystem.cc
===
--- code/gazebo/trunk/server/rendering/RTShaderSystem.cc2010-06-30 
02:24:20 UTC (rev 8809)
+++ code/gazebo/trunk/server/rendering/RTShaderSystem.cc2010-06-30 
14:54:08 UTC (rev 8810)
@@ -43,6 +43,7 @@
 /// Constructor
 RTShaderSystem::RTShaderSystem()
 {
+  this-initialized = false;
 }
 
 

@@ -158,6 +159,8 @@
 
 // Invalidate the scheme in order to re-generate all shaders based 
technique related to this scheme.
 
this-shaderGenerator-invalidateScheme(Ogre::RTShader::ShaderGenerator::DEFAULT_SCHEME_NAME);
+
+this-initialized = true;
   }
   else
 gzerr(0)  RT Shader system failed to initialize\n;
@@ -166,7 +169,9 @@
 
 void RTShaderSystem::Fini()
 {
-#if INCLUDE_RTSHADER  OGRE_VERSION_MAJOR = 1  OGRE_VERSION_MINOR = 
MINOR_VERSION
+  if (!this-initialized)
+return;
+
   // Restore default scheme.
   
Ogre::MaterialManager::getSingleton().setActiveScheme(Ogre::MaterialManager::DEFAULT_SCHEME_NAME);
 
@@ -184,46 +189,49 @@
 Ogre::RTShader::ShaderGenerator::finalize();
 this-shaderGenerator = NULL;
   }
-#endif
 }
 
 

 // Set an Ogre::Entity to use RT shaders
 void RTShaderSystem::AttachEntity(OgreVisual *vis)
 {
-#if INCLUDE_RTSHADER  OGRE_VERSION_MAJOR = 1  OGRE_VERSION_MINOR = 
MINOR_VERSION
+  if (!this-initialized)
+return;
+
   this-GenerateShaders(vis

[Playerstage-commit] SF.net SVN: playerstage:[8808] code/gazebo/trunk/player

2010-06-29 Thread natepak
Revision: 8808
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8808view=rev
Author:   natepak
Date: 2010-06-29 14:52:18 + (Tue, 29 Jun 2010)

Log Message:
---
Fixed namespace issues

Modified Paths:
--
code/gazebo/trunk/player/ActarrayInterface.cc
code/gazebo/trunk/player/ActarrayInterface.hh
code/gazebo/trunk/player/BumperInterface.cc
code/gazebo/trunk/player/BumperInterface.hh
code/gazebo/trunk/player/CMakeLists.txt
code/gazebo/trunk/player/CameraInterface.cc
code/gazebo/trunk/player/CameraInterface.hh
code/gazebo/trunk/player/FiducialInterface.cc
code/gazebo/trunk/player/FiducialInterface.hh
code/gazebo/trunk/player/GazeboClient.cc
code/gazebo/trunk/player/GazeboClient.hh
code/gazebo/trunk/player/GazeboDriver.cc
code/gazebo/trunk/player/GazeboDriver.hh
code/gazebo/trunk/player/GazeboInterface.cc
code/gazebo/trunk/player/GazeboInterface.hh
code/gazebo/trunk/player/GazeboTime.cc
code/gazebo/trunk/player/GazeboTime.hh
code/gazebo/trunk/player/Graphics3dInterface.cc
code/gazebo/trunk/player/Graphics3dInterface.hh
code/gazebo/trunk/player/GripperInterface.cc
code/gazebo/trunk/player/GripperInterface.hh
code/gazebo/trunk/player/IRInterface.cc
code/gazebo/trunk/player/IRInterface.hh
code/gazebo/trunk/player/LaserInterface.cc
code/gazebo/trunk/player/LaserInterface.hh
code/gazebo/trunk/player/OpaqueInterface.cc
code/gazebo/trunk/player/OpaqueInterface.hh
code/gazebo/trunk/player/PTZInterface.cc
code/gazebo/trunk/player/PTZInterface.hh
code/gazebo/trunk/player/Position2dInterface.cc
code/gazebo/trunk/player/Position2dInterface.hh
code/gazebo/trunk/player/Position3dInterface.cc
code/gazebo/trunk/player/Position3dInterface.hh
code/gazebo/trunk/player/SimulationInterface.cc
code/gazebo/trunk/player/SimulationInterface.hh

Modified: code/gazebo/trunk/player/ActarrayInterface.cc
===
--- code/gazebo/trunk/player/ActarrayInterface.cc   2010-06-28 21:02:18 UTC 
(rev 8807)
+++ code/gazebo/trunk/player/ActarrayInterface.cc   2010-06-29 14:52:18 UTC 
(rev 8808)
@@ -33,7 +33,7 @@
 #include GazeboDriver.hh
 #include ActarrayInterface.hh
 
-using namespace gazebo;
+using namespace libgazebo;
 
 boost::recursive_mutex *ActarrayInterface::mutex = NULL;
 

Modified: code/gazebo/trunk/player/ActarrayInterface.hh
===
--- code/gazebo/trunk/player/ActarrayInterface.hh   2010-06-28 21:02:18 UTC 
(rev 8807)
+++ code/gazebo/trunk/player/ActarrayInterface.hh   2010-06-29 14:52:18 UTC 
(rev 8808)
@@ -33,7 +33,7 @@
   class recursive_mutex;
 }
 
-namespace gazebo
+namespace libgazebo
 {
 /// \addtogroup player_iface
 /// \{

Modified: code/gazebo/trunk/player/BumperInterface.cc
===
--- code/gazebo/trunk/player/BumperInterface.cc 2010-06-28 21:02:18 UTC (rev 
8807)
+++ code/gazebo/trunk/player/BumperInterface.cc 2010-06-29 14:52:18 UTC (rev 
8808)
@@ -42,7 +42,7 @@
 #include GazeboDriver.hh
 #include BumperInterface.hh
 
-using namespace gazebo;
+using namespace libgazebo;
 boost::recursive_mutex *BumperInterface::mutex = NULL;
 
 ///

Modified: code/gazebo/trunk/player/BumperInterface.hh
===
--- code/gazebo/trunk/player/BumperInterface.hh 2010-06-28 21:02:18 UTC (rev 
8807)
+++ code/gazebo/trunk/player/BumperInterface.hh 2010-06-29 14:52:18 UTC (rev 
8808)
@@ -34,7 +34,7 @@
   class recursive_mutex;
 }
 
-namespace gazebo
+namespace libgazebo
 {
   /// \addtogroup player_iface 
   /// \{

Modified: code/gazebo/trunk/player/CMakeLists.txt
===
--- code/gazebo/trunk/player/CMakeLists.txt 2010-06-28 21:02:18 UTC (rev 
8807)
+++ code/gazebo/trunk/player/CMakeLists.txt 2010-06-29 14:52:18 UTC (rev 
8808)
@@ -25,7 +25,7 @@
 
 link_directories( ${PLAYER_LINK_DIRS} ${boost_library_dirs} gazeboshm)
 
-add_library(gazeboplugin SHARED ${gazeboplugin_sources})
-target_link_libraries(gazeboplugin ${PLAYER_LINK_LIBS} gazeboshm )
+add_library(gazeboplayerplugin SHARED ${gazeboplugin_sources})
+target_link_libraries(gazeboplayerplugin ${PLAYER_LINK_LIBS} gazeboshm )
 
-install(TARGETS gazeboplugin DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
+install(TARGETS gazeboplayerplugin DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )

Modified: code/gazebo/trunk/player/CameraInterface.cc
===
--- code/gazebo/trunk/player/CameraInterface.cc 2010-06-28 21:02:18 UTC (rev 
8807)
+++ code/gazebo/trunk/player/CameraInterface.cc 2010-06-29 14:52:18 UTC (rev 
8808)
@@ -32,7 +32,7 @@
 #include GazeboDriver.hh
 #include

[Playerstage-commit] SF.net SVN: playerstage:[8803] code/gazebo/trunk/plugins

2010-06-28 Thread natepak
Revision: 8803
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8803view=rev
Author:   natepak
Date: 2010-06-28 16:19:35 + (Mon, 28 Jun 2010)

Log Message:
---
Added an elevator plugin

Modified Paths:
--
code/gazebo/trunk/plugins/CMakeLists.txt

Added Paths:
---
code/gazebo/trunk/plugins/elevator.cc

Modified: code/gazebo/trunk/plugins/CMakeLists.txt
===
--- code/gazebo/trunk/plugins/CMakeLists.txt2010-06-28 04:50:31 UTC (rev 
8802)
+++ code/gazebo/trunk/plugins/CMakeLists.txt2010-06-28 16:19:35 UTC (rev 
8803)
@@ -21,6 +21,7 @@
  ball_drop
  box_push
  box_stack
+ elevator
  )
 
 

Added: code/gazebo/trunk/plugins/elevator.cc
===
--- code/gazebo/trunk/plugins/elevator.cc   (rev 0)
+++ code/gazebo/trunk/plugins/elevator.cc   2010-06-28 16:19:35 UTC (rev 
8803)
@@ -0,0 +1,73 @@
+#include gazebo/gazeboserver.hh
+#include boost/bind.hpp
+
+namespace gazebo
+{
+  class Elevator : public Plugin
+  {
+/// Constructor
+public: Elevator() : Plugin() 
+{
+  this-open = 0;
+  this-raise = 0;
+}
+
+/// Mandatory load function, neded by gazebo
+public: void Load()
+{
+  // Get the right and left doors, and the lift
+  this-rightDoor = 
(Body*)World::Instance()-GetEntityByName(doors::right);
+  this-leftDoor = 
(Body*)World::Instance()-GetEntityByName(doors::left);
+  this-lift = (Body*)World::Instance()-GetEntityByName(lift::body);
+
+  // Get the first contact sensor
+  this-contact = 
(Geom*)World::Instance()-GetEntityByName(contact::body::COM_Entity::geom);
+  this-contact-SetContactsEnabled(true);
+  this-contact-ConnectContactCallback(boost::bind(Elevator::ContactCB, 
this));
+
+
+  // Get the second contact sensor
+  this-contact2 = 
(Geom*)World::Instance()-GetEntityByName(lift::body::COM_Entity::contact);
+  this-contact2-SetContactsEnabled(true);
+  
this-contact2-ConnectContactCallback(boost::bind(Elevator::Contact2CB, 
this));
+
+  // Get an update callback
+  World::Instance()-ConnectWorldUpdateStartSignal(
+boost::bind(Elevator::UpdateCB, this));
+}
+
+/// Gazebo callback that contact occured on the plate in front of the door
+private: void ContactCB()
+{
+  this-open = 1;
+}
+
+/// Gazebo callback that contact occured on the plate in the elevator
+private: void Contact2CB()
+{
+  this-raise = 1;
+}
+
+/// Gazebo update callback
+public: void UpdateCB()
+{
+  if (this-open == 1)
+  {
+this-rightDoor-SetLinearVel(Vector3(0, -0.5, 0));
+this-leftDoor-SetLinearVel(Vector3(0, 0.5, 0));
+  }
+
+  if (this-raise == 1)
+  {
+this-lift-SetLinearVel(Vector3(0,0,0.5));
+  }
+}
+
+private: int open, raise;
+private: Body *rightDoor, *leftDoor, *lift;
+private: Geom *contact, *contact2;
+  };
+
+  /// Register this plugin with gazebo. This is mandatory
+  GZ_REGISTER_PLUGIN(Elevator, Elevator)
+}


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

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8804] code/gazebo/trunk/worlds/elevator.world

2010-06-28 Thread natepak
Revision: 8804
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8804view=rev
Author:   natepak
Date: 2010-06-28 16:19:58 + (Mon, 28 Jun 2010)

Log Message:
---
Added an elevator world

Added Paths:
---
code/gazebo/trunk/worlds/elevator.world

Added: code/gazebo/trunk/worlds/elevator.world
===
--- code/gazebo/trunk/worlds/elevator.world (rev 0)
+++ code/gazebo/trunk/worlds/elevator.world 2010-06-28 16:19:58 UTC (rev 
8804)
@@ -0,0 +1,454 @@
+?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;
+
+  verbosity0/verbosity
+  logData0/logData
+
+  physics:ode
+stepTime0.001/stepTime
+gravity0 0 -9.8/gravity
+updateRate0/updateRate
+cfm1e-10/cfm
+erp0.2/erp
+stepTypequick/stepType
+stepIters10/stepIters
+stepW1.3/stepW
+contactMaxCorrectingVel100/contactMaxCorrectingVel
+contactSurfaceLayer0.001/contactSurfaceLayer
+  /physics:ode
+
+  rendering:ogre
+ambient.1 .1 .1 1/ambient
+fog
+  typenone/type
+  color1 1 1 1/color
+  linearStart0/linearStart
+  linearEnd0/linearEnd
+  density0/density
+/fog
+shadows1/shadows
+  /rendering:ogre
+
+  rendering:gui
+size800 600/size
+pos1 52/pos
+frames
+camera width=550 height=485 x=250 y=50
+  xyz-2 0 2/xyz
+  rpy0 30 0/rpy
+/camera
+/frames
+  /rendering:gui
+
+  model:physical name=plane1_model
+xyz0 0 0/xyz
+rpy0 -0 0/rpy
+enableGravity1/enableGravity
+enableFriction1/enableFriction
+collideall/collide
+static1/static
+
+body name=plane1_body
+  xyz0 0 0/xyz
+  rpy0 -0 0/rpy
+
+  geom:plane name=plane1_geom
+xyz0 0 0/xyz
+rpy0 -0 0/rpy
+normal0 0 1/normal
+size100 100/size
+segments10 10/segments
+uvTile100 100/uvTile
+materialGazebo/GrayGrid/material
+castShadows0/castShadows
+mass0.001/mass
+laserFiducialId-1/laserFiducialId
+laserRetro-1/laserRetro
+  /geom:plane
+/body
+  /model:physical
+
+  !--
+  model:physical name=user_box0
+xyz1.0 1.5 1.5/xyz
+rpy0 0 0/rpy
+statictrue/static
+
+body name=body
+  geom:box name=geom
+size0.1 1.5 3/size
+mass0.1/mass
+visual
+  meshunit_box_U1V1/mesh
+  materialGazebo/Grey/material
+  castShadows1/castShadows
+  scale0.1 1.5 3/scale
+/visual
+  /geom:box
+/body
+  /model:physical
+
+  model:physical name=user_box1
+xyz1.0 -1.5 1.5/xyz
+rpy0 0 0/rpy
+statictrue/static
+
+body name=body
+  geom:box name=geom
+size0.1 1.5 3/size
+mass0.1/mass
+visual
+  meshunit_box_U1V1/mesh
+  materialGazebo/Grey/material
+  castShadows1/castShadows
+  scale0.1 1.5 3/scale
+/visual
+  /geom:box
+/body
+  /model:physical
+  --
+
+  model:physical name=frame
+xyz1.1 0 1.5/xyz
+statictrue/static
+
+body name=body
+  geom:box name=right-front
+xyz-0.1 -1.5 0.1/xyz
+size0.1 1.5 3/size
+visual
+  meshunit_box_U1V1/mesh
+  materialGazebo/Grey/material
+  castShadows1/castShadows
+  scale0.1 1.5 3/scale
+/visual
+  /geom:box
+
+  geom:box name=right-back
+xyz0.1 -1.5 0.1/xyz
+size0.1 1.5 3/size
+visual
+  meshunit_box_U1V1/mesh
+  materialGazebo/Grey/material
+  castShadows1/castShadows
+  scale0.1 1.5 3/scale
+/visual
+  /geom:box
+
+  geom:box name=left-front
+xyz-0.1 1.5 0.1/xyz
+size0.1 1.5 3/size
+visual
+  meshunit_box_U1V1/mesh
+  materialGazebo/Grey/material
+  castShadows1/castShadows
+  scale0.1 1.5 3/scale
+/visual

[Playerstage-commit] SF.net SVN: playerstage:[8805] code/gazebo/trunk/server

2010-06-28 Thread natepak
Revision: 8805
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8805view=rev
Author:   natepak
Date: 2010-06-28 16:20:53 + (Mon, 28 Jun 2010)

Log Message:
---
Added ability to make bodies kinematic only

Modified Paths:
--
code/gazebo/trunk/server/Param.hh
code/gazebo/trunk/server/physics/Body.cc
code/gazebo/trunk/server/physics/Body.hh
code/gazebo/trunk/server/physics/bullet/BulletBody.hh
code/gazebo/trunk/server/physics/ode/ODEBody.cc
code/gazebo/trunk/server/physics/ode/ODEBody.hh

Modified: code/gazebo/trunk/server/Param.hh
===
--- code/gazebo/trunk/server/Param.hh   2010-06-28 16:19:58 UTC (rev 8804)
+++ code/gazebo/trunk/server/Param.hh   2010-06-28 16:20:53 UTC (rev 8805)
@@ -66,11 +66,18 @@
 /// \brief Set the parameter value from a string
 public: virtual void SetFromString(const std::string , bool 
callback=false) {}
 
+/// \brief Set the help string
+public: void SetHelp(const std::string h) {this-help = h;}
+
+/// \brief Get the help string
+public: std::string GetHelp() const {return this-help;}
+
 /// List of created parameters
 private: static std::vectorParam* *params;
 
 protected: std::string key;
 protected: std::string typeName;
+protected: std::string help;
   };
 
 

Modified: code/gazebo/trunk/server/physics/Body.cc
===
--- code/gazebo/trunk/server/physics/Body.cc2010-06-28 16:19:58 UTC (rev 
8804)
+++ code/gazebo/trunk/server/physics/Body.cc2010-06-28 16:20:53 UTC (rev 
8805)
@@ -90,6 +90,10 @@
   this-ixzP = new ParamTdouble(ixz,0.0,0);
   this-iyzP = new ParamTdouble(iyz,0.0,0);
 
+  this-kinematicP = new ParamTbool(kinematic,true,0);
+  this-kinematicP-SetHelp(true = kinematic state only, false = dynamic 
body);
+  this-kinematicP-Callback( Body::SetKinematic, this );
+
   Param::End();
 
 }
@@ -139,6 +143,7 @@
   delete this-ixyP;
   delete this-ixzP;
   delete this-iyzP;
+  delete this-kinematicP;
 }
 
 

@@ -162,6 +167,7 @@
   this-ixyP-Load(node);
   this-ixzP-Load(node);
   this-iyzP-Load(node);
+  this-kinematicP-Load(node);
 
   this-customMass.SetCoG(**this-cxP, **this-cyP,** this-czP);
   this-customMass.SetInertiaMatrix( **this-ixxP, **this-iyyP, **this-izzP,
@@ -210,6 +216,8 @@
 childNode = childNode-GetNextByNSPrefix(sensor);
   }
 
+  this-SetKinematic(**this-kinematicP);
+
   //this-GetModel()-ConnectUpdateSignal( boost::bind(Body::Update, this) );
 }
 
@@ -722,3 +730,4 @@
   this-customMass = mass;
 }
 
+

Modified: code/gazebo/trunk/server/physics/Body.hh
===
--- code/gazebo/trunk/server/physics/Body.hh2010-06-28 16:19:58 UTC (rev 
8804)
+++ code/gazebo/trunk/server/physics/Body.hh2010-06-28 16:20:53 UTC (rev 
8805)
@@ -222,6 +222,12 @@
 
 public: Entity *GetCoMEntity() { return this-comEntity; }
 
+/// \brief Set whether this body is in the kinematic state
+public: virtual void SetKinematic(const bool ) {}
+
+/// \brief Get whether this body is in the kinematic state
+public: virtual bool GetKinematic() const {return false;}
+
 /// \brief Connect a boost::slot the the add entity signal
 public: templatetypename T
 boost::signals::connection ConnectEnabledSignal( T subscriber )
@@ -280,6 +286,7 @@
 protected: ParamTdouble *ixyP;
 protected: ParamTdouble *ixzP;
 protected: ParamTdouble *iyzP;
+protected: ParamTbool *kinematicP;
 protected: Mass customMass;
 
 private: boost::signalvoid (bool) enabledSignal;

Modified: code/gazebo/trunk/server/physics/bullet/BulletBody.hh
===
--- code/gazebo/trunk/server/physics/bullet/BulletBody.hh   2010-06-28 
16:19:58 UTC (rev 8804)
+++ code/gazebo/trunk/server/physics/bullet/BulletBody.hh   2010-06-28 
16:20:53 UTC (rev 8805)
@@ -109,7 +109,6 @@
 /// \brief Get the gravity mode
 public: virtual bool GetGravityMode();
 
-
 /// \brief Set whether this body will collide with others in the model
 public: void SetSelfCollide(bool collide);
 

Modified: code/gazebo/trunk/server/physics/ode/ODEBody.cc
===
--- code/gazebo/trunk/server/physics/ode/ODEBody.cc 2010-06-28 16:19:58 UTC 
(rev 8804)
+++ code/gazebo/trunk/server/physics/ode/ODEBody.cc 2010-06-28 16:20:53 UTC 
(rev 8805)
@@ -486,3 +486,27 @@
 dBodySetAngularDamping(this-GetODEId(), damping); 
 }
 
+
+// Set whether this body is in the kinematic state
+void ODEBody::SetKinematic(const bool state)
+{
+  if (this-bodyId)
+  {
+if (state)
+  dBodySetKinematic(this-bodyId

[Playerstage-commit] SF.net SVN: playerstage:[8806] code/gazebo/branches/wx/

2010-06-28 Thread natepak
Revision: 8806
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8806view=rev
Author:   natepak
Date: 2010-06-28 20:31:24 + (Mon, 28 Jun 2010)

Log Message:
---
Created WX branch

Added Paths:
---
code/gazebo/branches/wx/


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

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8807] code/gazebo/branches/wx

2010-06-28 Thread natepak
Revision: 8807
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8807view=rev
Author:   natepak
Date: 2010-06-28 21:02:18 + (Mon, 28 Jun 2010)

Log Message:
---
A few very minor changes

Modified Paths:
--
code/gazebo/branches/wx/TODO
code/gazebo/branches/wx/benchmarks/pioneer_circle_benchmark.cc
code/gazebo/branches/wx/server/Global.hh
code/gazebo/branches/wx/server/Simulator.cc
code/gazebo/branches/wx/server/XMLConfig.cc
code/gazebo/branches/wx/server/physics/Joint.cc
code/gazebo/branches/wx/server/physics/bullet/BulletHinge2Joint.cc
code/gazebo/branches/wx/server/physics/bullet/BulletHingeJoint.cc

Modified: code/gazebo/branches/wx/TODO
===
--- code/gazebo/branches/wx/TODO2010-06-28 20:31:24 UTC (rev 8806)
+++ code/gazebo/branches/wx/TODO2010-06-28 21:02:18 UTC (rev 8807)
@@ -3,25 +3,18 @@
 ///
 
 GUI
-- Hand of god
-  - Select models and get info
-  - Move models
-  -Implement in CameraSensor class.
-- Allow person to display and change XML parameters through the GUI.
-- Better fonts
-- Better camera movement. Translate is too slow over long distances
+-Set pose of object numerically
+-Model importer
+-Set joints
+-Set physics params, and other global params
+-Set Object parameters
+  - Apply materials, set friction, set visual  collision models, numerically 
set forces and torques
+- Orbit camera movement
 
 Rendering
-- FSAA: See OgreCreator::CreateWindow
-- Shadows draw on multiple surfaces(seem to pass through walls).
-- Removing the sky results in a black screen
 - Paging heightmaps. 
   - Positioning the current heightmap is a big hack
 - BSP loader and worlds
-- Fog
-- Anti Aliasing
-- Better lights
-  - GLSL per pixel lighting. Make this user selectable.
 - Dynamic textures
 
 

Modified: code/gazebo/branches/wx/benchmarks/pioneer_circle_benchmark.cc
===
--- code/gazebo/branches/wx/benchmarks/pioneer_circle_benchmark.cc  
2010-06-28 20:31:24 UTC (rev 8806)
+++ code/gazebo/branches/wx/benchmarks/pioneer_circle_benchmark.cc  
2010-06-28 21:02:18 UTC (rev 8807)
@@ -278,9 +278,11 @@
   for (iter = step_types.begin(); iter != step_types.end(); iter++)
   {
 std::string path = 
std::string(/home/nate/work/simpar/data/pioneer_circle/) + *iter + /;
-system((std::string(mkdir -p )+path).c_str());
+if (system((std::string(mkdir -p )+path).c_str()) == -1)
+  std::cerr  Error\n;
 
 
+
 FILE *out = fopen(std::string(path+index.txt).c_str(), w);
 fprintf(out,# index step_time iterations\n);
 
@@ -303,7 +305,8 @@
 RunSim(step);
 
 std::string mv_cmd = std::string(mv /tmp/pioneer.log ) + path + 
pioneer_circle_benchmark_ + *iter + _ + boost::lexical_caststd::string(i) 
+ .data;
-system(mv_cmd.c_str());
+if (system(mv_cmd.c_str()) == -1)
+  std::cerr  Error\n;
   }
 }
 

Modified: code/gazebo/branches/wx/server/Global.hh
===
--- code/gazebo/branches/wx/server/Global.hh2010-06-28 20:31:24 UTC (rev 
8806)
+++ code/gazebo/branches/wx/server/Global.hh2010-06-28 21:02:18 UTC (rev 
8807)
@@ -28,16 +28,6 @@
 #define GZGLOBAL_HH
 
 /
-// Includes
-/
-
-#include math.h
-
-#include GazeboError.hh
-#include GazeboMessage.hh
-
-
-/
 // Defines
 /
 #ifndef NULL
@@ -65,6 +55,17 @@
 // Macros
 /
 
+#if defined(__GNUC__)
+#define GAZEBO_DEPRECATED __attribute__((deprecated))
+#define GAZEBO_FORCEINLINE __attribute__((always_inline))
+#elif defined(MSVC)
+#define GAZEBO_DEPRECATED
+#define GAZEBO_FORCEINLINE __forceinline
+#else
+#define GAZEBO_DEPRECATED
+#define GAZEBO_FORCEINLINE
+#endif
+
 // Convert radians to degrees
 #define RTOD(r) ((r) * 180 / M_PI)
 

Modified: code/gazebo/branches/wx/server/Simulator.cc
===
--- code/gazebo/branches/wx/server/Simulator.cc 2010-06-28 20:31:24 UTC (rev 
8806)
+++ code/gazebo/branches/wx/server/Simulator.cc 2010-06-28 21:02:18 UTC (rev 
8807)
@@ -46,6 +46,7 @@
 #include PhysicsEngine.hh
 #include OgreAdaptor.hh
 #include GazeboMessage.hh
+#include GazeboError.hh
 #include Global.hh
 
 #include Simulator.hh

Modified: code/gazebo/branches/wx/server/XMLConfig.cc
===
--- code/gazebo/branches/wx/server/XMLConfig.cc 2010-06-28 20:31:24 UTC (rev 
8806)
+++ code/gazebo/branches/wx/server

[Playerstage-commit] SF.net SVN: playerstage:[8784] code/gazebo/trunk/worlds

2010-06-23 Thread natepak
Revision: 8784
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8784view=rev
Author:   natepak
Date: 2010-06-23 14:16:25 + (Wed, 23 Jun 2010)

Log Message:
---
Updated a few world files

Modified Paths:
--
code/gazebo/trunk/worlds/models/sicklms200.model
code/gazebo/trunk/worlds/pioneer2dx_ramp.world

Modified: code/gazebo/trunk/worlds/models/sicklms200.model
===
--- code/gazebo/trunk/worlds/models/sicklms200.model2010-06-22 23:03:53 UTC 
(rev 8783)
+++ code/gazebo/trunk/worlds/models/sicklms200.model2010-06-23 14:16:25 UTC 
(rev 8784)
@@ -52,6 +52,7 @@
   minRange0.1/minRange
   maxRange8/maxRange
   resRange.1/resRange
+  alwaysActivetrue/alwaysActive
 
   controller:sicklms200_laser name=laser_controller_1
 interface:laser name=laser_iface_0/

Modified: code/gazebo/trunk/worlds/pioneer2dx_ramp.world
===
--- code/gazebo/trunk/worlds/pioneer2dx_ramp.world  2010-06-22 23:03:53 UTC 
(rev 8783)
+++ code/gazebo/trunk/worlds/pioneer2dx_ramp.world  2010-06-23 14:16:25 UTC 
(rev 8784)
@@ -21,12 +21,14 @@
   physics:ode
 stepTime0.001/stepTime
 gravity0 0 -9.8/gravity
-cfm10e-5/cfm
-erp0.3/erp
-!-- updateRate: 0 == throttle simTime to match realTime.
-  0 == No throttling
- 0 == Frequency at which to throttle the sim -- 
-updateRate0/updateRate
+cfm0.01/cfm
+erp0.2/erp
+
+stepTypeworld/stepType
+stepIters50/stepIters
+stepW1.3/stepW
+contactMaxCorrectingVel100.0/contactMaxCorrectingVel
+contactSurfaceLayer0.001/contactSurfaceLayer
   /physics:ode
 
   rendering:gui
@@ -39,16 +41,11 @@
 
   rendering:ogre
 ambient0.1 0.1 0.1 1.0/ambient
-sky
-  materialGazebo/CloudySky/material
-/sky
-
 fog
   color1.0 1.0 1.0/color
   linearStart10/linearStart
   linearEnd100/linearEnd
 /fog
-
 gridfalse/grid
   /rendering:ogre
 


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

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8785] code/gazebo/trunk/server/physics/BallJoint. hh

2010-06-23 Thread natepak
Revision: 8785
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8785view=rev
Author:   natepak
Date: 2010-06-23 16:18:35 + (Wed, 23 Jun 2010)

Log Message:
---
Fixed a warning message

Modified Paths:
--
code/gazebo/trunk/server/physics/BallJoint.hh

Modified: code/gazebo/trunk/server/physics/BallJoint.hh
===
--- code/gazebo/trunk/server/physics/BallJoint.hh   2010-06-23 14:16:25 UTC 
(rev 8784)
+++ code/gazebo/trunk/server/physics/BallJoint.hh   2010-06-23 16:18:35 UTC 
(rev 8785)
@@ -100,10 +100,10 @@
 public: virtual void SetLowStop(int index, Angle angle) {}
  
 /// \brief Get the high stop of an axis(index).
-public: virtual Angle GetHighStop(int index) {}
+public: virtual Angle GetHighStop(int index) {return Angle();}
 
 /// \brief Get the low stop of an axis(index).
-public: virtual Angle GetLowStop(int index) {}
+public: virtual Angle GetLowStop(int index) { return Angle();}
 
   };
   


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

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8786] code/gazebo/trunk/server/rendering/ RTShaderSystem.cc

2010-06-23 Thread natepak
Revision: 8786
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8786view=rev
Author:   natepak
Date: 2010-06-23 16:25:47 + (Wed, 23 Jun 2010)

Log Message:
---
Minor update

Modified Paths:
--
code/gazebo/trunk/server/rendering/RTShaderSystem.cc

Modified: code/gazebo/trunk/server/rendering/RTShaderSystem.cc
===
--- code/gazebo/trunk/server/rendering/RTShaderSystem.cc2010-06-23 
16:18:35 UTC (rev 8785)
+++ code/gazebo/trunk/server/rendering/RTShaderSystem.cc2010-06-23 
16:25:47 UTC (rev 8786)
@@ -60,9 +60,10 @@
   {
 this-shaderGenerator = Ogre::RTShader::ShaderGenerator::getSingletonPtr();
 this-shaderGenerator-addSceneManager(OgreAdaptor::Instance()-sceneMgr);
- 
+Ogre::StringVector groupVector;
+
 // Setup the core libraries and shader cache path 
-Ogre::StringVector groupVector = 
Ogre::ResourceGroupManager::getSingleton().getResourceGroups();
+groupVector = 
Ogre::ResourceGroupManager::getSingleton().getResourceGroups();
 Ogre::StringVector::iterator itGroup = groupVector.begin();
 Ogre::StringVector::iterator itGroupEnd = groupVector.end();
 Ogre::String shaderCoreLibsPath;


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

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8787] code/gazebo/trunk/server

2010-06-23 Thread natepak
Revision: 8787
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8787view=rev
Author:   natepak
Date: 2010-06-23 16:39:45 + (Wed, 23 Jun 2010)

Log Message:
---
Added in a gazebo config patch from ROS

Modified Paths:
--
code/gazebo/trunk/server/GazeboConfig.cc
code/gazebo/trunk/server/GazeboConfig.hh

Modified: code/gazebo/trunk/server/GazeboConfig.cc
===
--- code/gazebo/trunk/server/GazeboConfig.cc2010-06-23 16:25:47 UTC (rev 
8786)
+++ code/gazebo/trunk/server/GazeboConfig.cc2010-06-23 16:39:45 UTC (rev 
8787)
@@ -59,15 +59,15 @@
   std::string delim(:);
 
   char *ogre_resource_path = getenv(OGRE_RESOURCE_PATH);
-  if(ogre_resource_path) 
+  if(this-ogrePaths.empty()  ogre_resource_path) 
 this-AddOgrePaths(std::string(ogre_resource_path));
 
   char *gazebo_resource_path = getenv(GAZEBO_RESOURCE_PATH);
-  if(gazebo_resource_path) 
+  if(this-gazeboPaths.empty()  gazebo_resource_path) 
 this-AddGazeboPaths(std::string(gazebo_resource_path));
 
   char *gazebo_plugin_path = getenv(GAZEBO_PLUGIN_PATH);
-  if(gazebo_plugin_path) 
+  if(this-pluginPaths.empty()  gazebo_plugin_path) 
 this-AddPluginPaths(std::string(gazebo_plugin_path));
 
   if (cfgFile.is_open())
@@ -77,7 +77,7 @@
 rc.Load(rcFilename);
 
 // if gazebo path is set, skip reading from .gazeborc
-if(!gazebo_resource_path)
+if(this-ogrePaths.empty()  !ogre_resource_path)
 {
   node = rc.GetRootNode()-GetChild(gazeboPath);
   while (node)
@@ -90,7 +90,7 @@
 }
 
 // if ogre path is set, skip reading from .gazeborc
-if(!ogre_resource_path)
+if(this-ogrePaths.empty()  !ogre_resource_path)
 {
   node = rc.GetRootNode()-GetChild(ogrePath);
   while (node)
@@ -106,13 +106,13 @@
   {
 gzmsg(0)  Unable to find the file ~/.gazeborc. Using default paths. 
This may cause OGRE to fail.\n;
 
-if ( !gazebo_resource_path )
+if (this-gazeboPaths.empty()   !gazebo_resource_path )
 {
   this-gazeboPaths.push_back(/usr/local/share/gazebo);
   this-AddPluginPaths(/usr/local/share/gazebo/plugins);
 }
 
-if ( !ogre_resource_path )
+if (this-ogrePaths.empty()   !ogre_resource_path )
 {
   this-ogrePaths.push_back(/usr/local/lib/OGRE);
   this-ogrePaths.push_back(/usr/lib/OGRE);
@@ -121,6 +121,19 @@
   }
 }
 
+void GazeboConfig::ClearGazeboPaths()
+{
+  this-gazeboPaths.clear();
+}
+void GazeboConfig::ClearOgrePaths()
+{
+  this-ogrePaths.clear();
+}
+void GazeboConfig::ClearPluginPaths()
+{
+  this-pluginPaths.clear();
+}
+
 std::liststd::string GazeboConfig::GetGazeboPaths() 
 {
   return this-gazeboPaths;

Modified: code/gazebo/trunk/server/GazeboConfig.hh
===
--- code/gazebo/trunk/server/GazeboConfig.hh2010-06-23 16:25:47 UTC (rev 
8786)
+++ code/gazebo/trunk/server/GazeboConfig.hh2010-06-23 16:39:45 UTC (rev 
8787)
@@ -64,7 +64,11 @@
  
 /// \brief Add colon delimited paths to plugins
 public: void AddPluginPaths(std::string path);
- 
+
+public: void ClearGazeboPaths();
+public: void ClearOgrePaths();
+public: void ClearPluginPaths();
+
 /// Paths gazebo install
 private: std::liststd::string gazeboPaths;
 


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

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8771] code/gazebo/trunk

2010-06-22 Thread natepak
Revision: 8771
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8771view=rev
Author:   natepak
Date: 2010-06-22 21:45:59 + (Tue, 22 Jun 2010)

Log Message:
---
Moved when the sensor manager is updated

Modified Paths:
--
code/gazebo/trunk/server/World.cc
code/gazebo/trunk/worlds/empty.world

Modified: code/gazebo/trunk/server/World.cc
===
--- code/gazebo/trunk/server/World.cc   2010-06-22 21:42:18 UTC (rev 8770)
+++ code/gazebo/trunk/server/World.cc   2010-06-22 21:45:59 UTC (rev 8771)
@@ -355,9 +355,6 @@
 
   }
 
-  /// Update all the sensors
-  SensorManager::Instance()-Update();
-
   if (!Simulator::Instance()-IsPaused() 
Simulator::Instance()-GetPhysicsEnabled())
   {
@@ -373,6 +370,10 @@
 }*/
   }
 
+  /// Update all the sensors
+  SensorManager::Instance()-Update();
+
+
   this-factory-Update();
 
   this-worldUpdateEndSignal();

Modified: code/gazebo/trunk/worlds/empty.world
===
--- code/gazebo/trunk/worlds/empty.world2010-06-22 21:42:18 UTC (rev 
8770)
+++ code/gazebo/trunk/worlds/empty.world2010-06-22 21:45:59 UTC (rev 
8771)
@@ -41,11 +41,11 @@
   rendering:ogre
 ambient0 0 0 1/ambient
 shadowstrue/shadows
-   gridfalse/grid
+gridfalse/grid
   /rendering:ogre
 
-   !-- Ground Plane --
-   model:physical name=plane1_model
+  !-- Ground Plane --
+  model:physical name=plane1_model
 xyz0 0 0/xyz
 rpy0 0 0/rpy
 statictrue/static
@@ -77,4 +77,729 @@
 /light
   /model:renderable
 
+  model:physical  name=continuous_pendulum
+xyz0 0 0/xyz
+rpy0 0 0/rpy
+body:box name=link1
+  massMatrixtrue/massMatrix
+  mass1/mass
+  ixx0/ixx
+  ixy0/ixy
+  ixz0/ixz
+  iyy0/iyy
+  iyz0/iyz
+  izz0/izz
+  cx0/cx
+  cy1/cy
+  cz0/cz
+  xyz0 0 35/xyz
+  rpy0 -0 0/rpy
+  geom:box name=link1_geom
+xyz0 0.5 0/xyz
+rpy0 -0 0/rpy
+size0.2 1 0.2/size
+visual
+  xyz0 0 0/xyz
+  rpy0 -0 0/rpy
+  scale0.2 1 0.2/scale
+  meshunit_box/mesh
+  materialGazebo/GrassFloor/material
+/visual
+  /geom:box
+  turnGravityOfffalse/turnGravityOff
+  selfCollidefalse/selfCollide
+/body:box
+joint:hinge name=link1_joint
+  body1link1/body1
+  body2world/body2
+  anchorlink1/anchor
+  axis1 0 0/axis
+  damping0/damping
+/joint:hinge
+body:box name=link2
+  massMatrixtrue/massMatrix
+  mass1/mass
+  ixx0/ixx
+  ixy0/ixy
+  ixz0/ixz
+  iyy0/iyy
+  iyz0/iyz
+  izz0/izz
+  cx0/cx
+  cy1/cy
+  cz0/cz
+  xyz0 1 35/xyz
+  rpy0 -0 0/rpy
+  geom:box name=link2_geom
+xyz0 0.5 0/xyz
+rpy0 -0 0/rpy
+size0.2 1 0.2/size
+visual
+  xyz0 0 0/xyz
+  rpy0 -0 0/rpy
+  scale0.2 1 0.2/scale
+  meshunit_box/mesh
+  materialGazebo/LightWood/material
+/visual
+  /geom:box
+  turnGravityOfffalse/turnGravityOff
+  selfCollidefalse/selfCollide
+/body:box
+joint:hinge name=link2_joint
+  body1link2/body1
+  body2link1/body2
+  anchorlink2/anchor
+  axis1 0 0/axis
+  damping0/damping
+/joint:hinge
+body:box name=link3
+  massMatrixtrue/massMatrix
+  mass1/mass
+  ixx0/ixx
+  ixy0/ixy
+  ixz0/ixz
+  iyy0/iyy
+  iyz0/iyz
+  izz0/izz
+  cx0/cx
+  cy1/cy
+  cz0/cz
+  xyz0 2 35/xyz
+  rpy0 -0 0/rpy
+  geom:box name=link3_geom
+xyz0 0.5 0/xyz
+rpy0 -0 0/rpy
+size0.2 1 0.2/size
+visual
+  xyz0 0 0/xyz
+  rpy0 -0 0/rpy
+  scale0.2 1 0.2/scale
+  meshunit_box/mesh
+  materialGazebo/LightWood/material
+/visual
+  /geom:box
+  turnGravityOfffalse/turnGravityOff
+  selfCollidefalse/selfCollide
+/body:box
+joint:hinge name=link3_joint
+  body1link3/body1
+  body2link2/body2
+  anchorlink3/anchor
+  axis1 0 0/axis
+  damping0/damping
+/joint:hinge
+body:box name=link4
+  massMatrixtrue/massMatrix
+  mass1/mass
+  ixx0/ixx
+  ixy0/ixy
+  ixz0/ixz
+  iyy0/iyy
+  iyz0/iyz
+  izz0/izz
+  cx0/cx
+  cy1/cy
+  cz0/cz
+  xyz0 3 35/xyz
+  rpy0 -0 0/rpy
+  geom:box name=link4_geom
+xyz0 0.5 0/xyz
+rpy0 -0 0/rpy
+size0.2 1 0.2/size
+visual
+  xyz0 0 0/xyz
+  rpy0 -0 0/rpy
+  scale0.2 1 0.2/scale
+  meshunit_box/mesh
+  materialGazebo/LightWood/material
+/visual
+  /geom:box
+  turnGravityOfffalse/turnGravityOff
+  selfCollidefalse/selfCollide
+/body:box
+joint:hinge name=link4_joint
+  body1link4/body1
+  body2link3/body2
+  anchorlink4/anchor

[Playerstage-commit] SF.net SVN: playerstage:[8772] code/gazebo/trunk/3rd_party/

2010-06-22 Thread natepak
Revision: 8772
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8772view=rev
Author:   natepak
Date: 2010-06-22 22:35:04 + (Tue, 22 Jun 2010)

Log Message:
---
Removed internal assimp

Removed Paths:
-
code/gazebo/trunk/3rd_party/


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

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8773] code/gazebo/trunk/Media

2010-06-22 Thread natepak
Revision: 8773
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8773view=rev
Author:   natepak
Date: 2010-06-22 22:37:04 + (Tue, 22 Jun 2010)

Log Message:
---
Added more models

Modified Paths:
--
code/gazebo/trunk/Media/materials/scripts/Gazebo.material
code/gazebo/trunk/Media/models/CMakeLists.txt

Added Paths:
---
code/gazebo/trunk/Media/models/pr2_gripper/
code/gazebo/trunk/Media/models/pr2_gripper/CMakeLists.txt
code/gazebo/trunk/Media/models/pr2_gripper/finger_H_Color_100430.tif
code/gazebo/trunk/Media/models/pr2_gripper/finger_H_UV_100430.dae
code/gazebo/trunk/Media/models/pr2_gripper/finger_tip_H_UV_100430.dae
code/gazebo/trunk/Media/models/pr2_gripper/fingertip_H_Color_100430.tif
code/gazebo/trunk/Media/models/pr2_gripper/float_H_Color_100430.tif
code/gazebo/trunk/Media/models/pr2_gripper/float_H_UV_100430.dae
code/gazebo/trunk/Media/models/pr2_gripper/gripper_palm.dae
code/gazebo/trunk/Media/models/pr2_gripper/gripper_palm_color.tif
code/gazebo/trunk/Media/models/pr2_gripper/gripper_palm_normals.tif
code/gazebo/trunk/Media/models/pr2_gripper/l_finger.dae
code/gazebo/trunk/Media/models/pr2_gripper/l_finger_color.tif
code/gazebo/trunk/Media/models/pr2_gripper/l_finger_normals.tif
code/gazebo/trunk/Media/models/pr2_gripper/l_finger_tip.dae
code/gazebo/trunk/Media/models/pr2_gripper/l_finger_tip_color.tif
code/gazebo/trunk/Media/models/pr2_gripper/l_finger_tip_normals.tif
code/gazebo/trunk/Media/models/pr2_gripper/l_float.dae
code/gazebo/trunk/Media/models/pr2_gripper/l_float_color.tif
code/gazebo/trunk/Media/models/pr2_gripper/l_float_normals.tif
code/gazebo/trunk/Media/models/pr2_gripper/palm_H_Color_100430.tif
code/gazebo/trunk/Media/models/pr2_gripper/palm_H_UV_100430.dae

Removed Paths:
-
code/gazebo/trunk/Media/models/pr2_gripper/CMakeLists.txt
code/gazebo/trunk/Media/models/pr2_gripper/finger_H_Color_100430.tif
code/gazebo/trunk/Media/models/pr2_gripper/finger_H_UV_100430.dae
code/gazebo/trunk/Media/models/pr2_gripper/finger_tip_H_UV_100430.dae
code/gazebo/trunk/Media/models/pr2_gripper/fingertip_H_Color_100430.tif
code/gazebo/trunk/Media/models/pr2_gripper/float_H_Color_100430.tif
code/gazebo/trunk/Media/models/pr2_gripper/float_H_UV_100430.dae
code/gazebo/trunk/Media/models/pr2_gripper/gripper_palm.dae
code/gazebo/trunk/Media/models/pr2_gripper/gripper_palm_color.tif
code/gazebo/trunk/Media/models/pr2_gripper/gripper_palm_normals.tif
code/gazebo/trunk/Media/models/pr2_gripper/l_finger.dae
code/gazebo/trunk/Media/models/pr2_gripper/l_finger_color.tif
code/gazebo/trunk/Media/models/pr2_gripper/l_finger_normals.tif
code/gazebo/trunk/Media/models/pr2_gripper/l_finger_tip.dae
code/gazebo/trunk/Media/models/pr2_gripper/l_finger_tip_color.tif
code/gazebo/trunk/Media/models/pr2_gripper/l_finger_tip_normals.tif
code/gazebo/trunk/Media/models/pr2_gripper/l_float.dae
code/gazebo/trunk/Media/models/pr2_gripper/l_float_color.tif
code/gazebo/trunk/Media/models/pr2_gripper/l_float_normals.tif
code/gazebo/trunk/Media/models/pr2_gripper/palm_H_Color_100430.tif
code/gazebo/trunk/Media/models/pr2_gripper/palm_H_UV_100430.dae

Property Changed:

code/gazebo/trunk/Media/models/pioneer2at/
code/gazebo/trunk/Media/models/pioneer2at/CMakeLists.txt
code/gazebo/trunk/Media/models/pioneer2at/Cylinder.012.mesh.xml
code/gazebo/trunk/Media/models/pioneer2at/OgreXMLConverter.log
code/gazebo/trunk/Media/models/pioneer2at/Scene.material
code/gazebo/trunk/Media/models/pioneer2at/chassis.mesh
code/gazebo/trunk/Media/models/pioneer2at/chassis_top.mesh
code/gazebo/trunk/Media/models/pioneer2at/hub.mesh
code/gazebo/trunk/Media/models/pioneer2at/pioneer3at.blend
code/gazebo/trunk/Media/models/pioneer2at/sonar.mesh
code/gazebo/trunk/Media/models/pioneer2at/sonarbank.mesh
code/gazebo/trunk/Media/models/pioneer2at/tire.mesh
code/gazebo/trunk/Media/models/pioneer2at/wheel.mesh
code/gazebo/trunk/Media/models/pioneer2dx/
code/gazebo/trunk/Media/models/pioneer2dx/CMakeLists.txt
code/gazebo/trunk/Media/models/pioneer2dx/Scene.material
code/gazebo/trunk/Media/models/pioneer2dx/chassis.mesh
code/gazebo/trunk/Media/models/pioneer2dx/chassis_top.mesh
code/gazebo/trunk/Media/models/pioneer2dx/hub.mesh
code/gazebo/trunk/Media/models/pioneer2dx/pioneer3dx.blend
code/gazebo/trunk/Media/models/pioneer2dx/sonar.mesh
code/gazebo/trunk/Media/models/pioneer2dx/sonarbank.mesh
code/gazebo/trunk/Media/models/pioneer2dx/tire.mesh
code/gazebo/trunk/Media/models/pioneer2dx/wheel.mesh

Modified: code/gazebo/trunk/Media/materials/scripts/Gazebo.material
===
--- code/gazebo/trunk/Media/materials/scripts/Gazebo.material   2010-06-22 
22:35:04

[Playerstage-commit] SF.net SVN: playerstage:[8775] code/gazebo/trunk/examples/libgazebo

2010-06-22 Thread natepak
Revision: 8775
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8775view=rev
Author:   natepak
Date: 2010-06-22 22:39:28 + (Tue, 22 Jun 2010)

Log Message:
---
Added libgazebo as a namespace

Modified Paths:
--
code/gazebo/trunk/examples/libgazebo/bandit/bandit.cc
code/gazebo/trunk/examples/libgazebo/bumper/bumper.cc
code/gazebo/trunk/examples/libgazebo/camera/camera.cc
code/gazebo/trunk/examples/libgazebo/epuck/main.cc
code/gazebo/trunk/examples/libgazebo/factory/factory.cc
code/gazebo/trunk/examples/libgazebo/graphics3d/graphics3d.cc
code/gazebo/trunk/examples/libgazebo/laser/laser.cc
code/gazebo/trunk/examples/libgazebo/openal/openal.cc
code/gazebo/trunk/examples/libgazebo/position/position.cc
code/gazebo/trunk/examples/libgazebo/simiface/simiface.cc
code/gazebo/trunk/examples/libgazebo/stereo/stereo.cc

Modified: code/gazebo/trunk/examples/libgazebo/bandit/bandit.cc
===
--- code/gazebo/trunk/examples/libgazebo/bandit/bandit.cc   2010-06-22 
22:37:46 UTC (rev 8774)
+++ code/gazebo/trunk/examples/libgazebo/bandit/bandit.cc   2010-06-22 
22:39:28 UTC (rev 8775)
@@ -13,9 +13,9 @@
 
 int main()
 {
-  gazebo::Client *client = new gazebo::Client();
-  gazebo::SimulationIface *simIface = new gazebo::SimulationIface();
-  gazebo::ActarrayIface *actarrayIface = new gazebo::ActarrayIface();
+  liblibgazebo::Client *client = new libgazebo::Client();
+  liblibgazebo::SimulationIface *simIface = new libgazebo::SimulationIface();
+  liblibgazebo::ActarrayIface *actarrayIface = new libgazebo::ActarrayIface();
 
   int serverId = 0;
 

Modified: code/gazebo/trunk/examples/libgazebo/bumper/bumper.cc
===
--- code/gazebo/trunk/examples/libgazebo/bumper/bumper.cc   2010-06-22 
22:37:46 UTC (rev 8774)
+++ code/gazebo/trunk/examples/libgazebo/bumper/bumper.cc   2010-06-22 
22:39:28 UTC (rev 8775)
@@ -3,8 +3,8 @@
 
 int main()
 {
-  gazebo::Client *client = new gazebo::Client();
-  gazebo::BumperIface *bumperIface = new gazebo::BumperIface();
+  libgazebo::Client *client = new gazebo::Client();
+  libgazebo::BumperIface *bumperIface = new gazebo::BumperIface();
 
   int serverId = 0;
 
@@ -13,7 +13,7 @@
   {
 client-ConnectWait(serverId, GZ_CLIENT_ID_USER_FIRST);
   }
-  catch (gazebo::GazeboError e)
+  catch (libgazebo::GazeboError e)
   {
 std::cout  Gazebo error: Unable to connect\n  e  \n;
 return -1;

Modified: code/gazebo/trunk/examples/libgazebo/camera/camera.cc
===
--- code/gazebo/trunk/examples/libgazebo/camera/camera.cc   2010-06-22 
22:37:46 UTC (rev 8774)
+++ code/gazebo/trunk/examples/libgazebo/camera/camera.cc   2010-06-22 
22:39:28 UTC (rev 8775)
@@ -3,7 +3,7 @@
 
 

 // Save an image frame
-void SaveFrame(const char *filename, gazebo::CameraData *data)
+void SaveFrame(const char *filename, libgazebo::CameraData *data)
 {
   int i, width, height;
   FILE *file;
@@ -28,9 +28,9 @@
 
 int main()
 {
-  gazebo::Client *client = new gazebo::Client();
-  gazebo::SimulationIface *simIface = new gazebo::SimulationIface();
-  gazebo::CameraIface *camIface = new gazebo::CameraIface();
+  libgazebo::Client *client = new gazebo::Client();
+  libgazebo::SimulationIface *simIface = new gazebo::SimulationIface();
+  libgazebo::CameraIface *camIface = new gazebo::CameraIface();
 
   int serverId = 0;
 
@@ -39,7 +39,7 @@
   {
 client-ConnectWait(serverId, GZ_CLIENT_ID_USER_FIRST);
   }
-  catch (gazebo::GazeboError e)
+  catch (libgazebo::GazeboError e)
   {
 std::cout  Gazebo error: Unable to connect\n  e  \n;
 return -1;
@@ -50,7 +50,7 @@
   {
 simIface-Open(client, default);
   }
-  catch (gazebo::GazeboError e)
+  catch (libgazebo::GazeboError e)
   {
 std::cout  Gazebo error: Unable to connect to the sim interface\n  e 
 \n;
 return -1;

Modified: code/gazebo/trunk/examples/libgazebo/epuck/main.cc
===
--- code/gazebo/trunk/examples/libgazebo/epuck/main.cc  2010-06-22 22:37:46 UTC 
(rev 8774)
+++ code/gazebo/trunk/examples/libgazebo/epuck/main.cc  2010-06-22 22:39:28 UTC 
(rev 8775)
@@ -11,9 +11,9 @@
 
 int main()
 {
-  gazebo::Client *client = new gazebo::Client();
-  gazebo::SimulationIface *simIface = new gazebo::SimulationIface();
-  gazebo::FactoryIface *factoryIface = new gazebo::FactoryIface();
+  libgazebo::Client *client = new gazebo::Client();
+  libgazebo::SimulationIface *simIface = new gazebo::SimulationIface();
+  libgazebo::FactoryIface *factoryIface = new gazebo::FactoryIface();
 
  
   int serverId = 0;
@@ -23,7 +23,7 @@
   {
 client-ConnectWait(serverId, GZ_CLIENT_ID_USER_FIRST);
   }
-  catch (gazebo::GazeboError e)
+  catch

[Playerstage-commit] SF.net SVN: playerstage:[8777] code/gazebo/trunk/worlds

2010-06-22 Thread natepak
Revision: 8777
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8777view=rev
Author:   natepak
Date: 2010-06-22 22:53:04 + (Tue, 22 Jun 2010)

Log Message:
---
Fixed the worlds

Modified Paths:
--
code/gazebo/trunk/worlds/3shortstacks.world
code/gazebo/trunk/worlds/handler.world
code/gazebo/trunk/worlds/simpleshapes.world
code/gazebo/trunk/worlds/single_box.world

Modified: code/gazebo/trunk/worlds/3shortstacks.world
===
--- code/gazebo/trunk/worlds/3shortstacks.world 2010-06-22 22:40:10 UTC (rev 
8776)
+++ code/gazebo/trunk/worlds/3shortstacks.world 2010-06-22 22:53:04 UTC (rev 
8777)
@@ -19,7 +19,7 @@
 gravity0 0 -9.8/gravity
 cfm0.001/cfm
 erp0.1/erp
-stepTyperobust/stepType
+stepTypequick/stepType
 stepIters10/stepIters
 stepW1.3/stepW
 contactSurfaceLayer0.00/contactSurfaceLayer

Modified: code/gazebo/trunk/worlds/handler.world
===
--- code/gazebo/trunk/worlds/handler.world  2010-06-22 22:40:10 UTC (rev 
8776)
+++ code/gazebo/trunk/worlds/handler.world  2010-06-22 22:53:04 UTC (rev 
8777)
@@ -19,7 +19,7 @@
 gravity0 0 -9.8/gravity
 cfm10e-10/cfm
 erp0.2/erp
-stepTyperobust/stepType
+stepTypequick/stepType
 stepIters50/stepIters
 stepW1.3/stepW
 contactMaxCorrectingVel100.0/contactMaxCorrectingVel
@@ -45,7 +45,7 @@
 gridfalse/grid
   /rendering:ogre
 
-  handler plugin=libtest.so/
+  plugin fileanem=libtest.so handle=test/
 
   model:physical name=sphere1_model
 xyz0 0 0.2/xyz

Modified: code/gazebo/trunk/worlds/simpleshapes.world
===
--- code/gazebo/trunk/worlds/simpleshapes.world 2010-06-22 22:40:10 UTC (rev 
8776)
+++ code/gazebo/trunk/worlds/simpleshapes.world 2010-06-22 22:53:04 UTC (rev 
8777)
@@ -19,7 +19,7 @@
 gravity0 0 -9.8/gravity
 cfm10e-10/cfm
 erp0.2/erp
-stepTyperobust/stepType
+stepTypequick/stepType
 stepIters50/stepIters
 stepW1.3/stepW
 contactMaxCorrectingVel100.0/contactMaxCorrectingVel
@@ -38,7 +38,7 @@
   /rendering:gui
 
   rendering:ogre
-ambient1 1 1 1/ambient
+ambient.1 .1 .1 1/ambient
 sky
   materialGazebo/CloudySky/material
 /sky
@@ -60,9 +60,9 @@
 
 visual
   size0.4 0.4 0.4/size
-  meshlightsensor.3ds/mesh
+  meshunit_box/mesh
   shaderpixel/shader
-  !--materialGazebo/Rocky/material--
+  materialGazebo/Rocky/material
 /visual
   /geom:sphere
 /body:sphere
@@ -98,7 +98,7 @@
   specularColor.1 .1 .1/specularColor
   range20/range
 
-  attenuation0.1 0.01 0.001/attenuation
+  attenuation0.1 0.01 0.01/attenuation
 /light
   /model:renderable
  

Modified: code/gazebo/trunk/worlds/single_box.world
===
--- code/gazebo/trunk/worlds/single_box.world   2010-06-22 22:40:10 UTC (rev 
8776)
+++ code/gazebo/trunk/worlds/single_box.world   2010-06-22 22:53:04 UTC (rev 
8777)
@@ -20,7 +20,7 @@
 cfm10e-10/cfm
 erp0.2/erp
 
-stepTyperobust/stepType
+stepTypequick/stepType
 stepIters100/stepIters
 stepW1.3/stepW
 contactMaxCorrectingVel100.0/contactMaxCorrectingVel


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

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8779] code/gazebo/trunk/cmake

2010-06-22 Thread natepak
Revision: 8779
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8779view=rev
Author:   natepak
Date: 2010-06-22 22:59:54 + (Tue, 22 Jun 2010)

Log Message:
---
Updated the build system

Modified Paths:
--
code/gazebo/trunk/cmake/GazeboUtils.cmake
code/gazebo/trunk/cmake/SearchForStuff.cmake

Property Changed:

code/gazebo/trunk/cmake/libgazebo_pkgconfig.cmake

Modified: code/gazebo/trunk/cmake/GazeboUtils.cmake
===
--- code/gazebo/trunk/cmake/GazeboUtils.cmake   2010-06-22 22:57:21 UTC (rev 
8778)
+++ code/gazebo/trunk/cmake/GazeboUtils.cmake   2010-06-22 22:59:54 UTC (rev 
8779)
@@ -37,6 +37,9 @@
 APPEND_TO_CACHED_LIST(gazeboserver_headers
   ${gazeboserver_headers_desc}   
   ${CMAKE_CURRENT_SOURCE_DIR}/${src})
+APPEND_TO_CACHED_LIST(gazeboserver_headers_nopath
+  gazeboserver_headers_nopath   
+  ${src})
   ENDFOREACH (src ${ARGN})
 ENDMACRO (APPEND_TO_SERVER_HEADERS)
 
@@ -86,6 +89,8 @@
${gazeboserver_sources_desc} FORCE)
   SET (gazeboserver_headers  CACHE INTERNAL 
${gazeboserver_sources_desc} FORCE)
+  SET (gazeboserver_headers_nopath  CACHE INTERNAL 
+   gazeboserver_headers_nopath FORCE)
   SET (gazeboserver_include_dirs  CACHE INTERNAL 
${gazeboserver_include_dirs_desc} FORCE)
   SET (gazeboserver_link_dirs  CACHE INTERNAL 

Modified: code/gazebo/trunk/cmake/SearchForStuff.cmake
===
--- code/gazebo/trunk/cmake/SearchForStuff.cmake2010-06-22 22:57:21 UTC 
(rev 8778)
+++ code/gazebo/trunk/cmake/SearchForStuff.cmake2010-06-22 22:59:54 UTC 
(rev 8779)
@@ -1,7 +1,8 @@
 include (${gazebo_cmake_dir}/GazeboUtils.cmake)
 include (CheckCXXSourceCompiles)
 
-set (use_internal_assimp OFF CACHE BOOL Use internal assimp FORCE)
+# John - ode version with joint damping
+SET(ODE_JOINT_DAMPING_VERSION 0.11.1.1 CACHE INTERNAL ODE version with joint 
damping FORCE)
 
 set (INCLUDE_WEBGAZEBO ON CACHE BOOL Build webgazebo FORCE)
 set (OGRE_LIBRARY_PATH /usr/local/lib CACHE INTERNAL Ogre library path)
@@ -47,6 +48,40 @@
 
 
   #
+  # Find ODE
+  pkg_check_modules(ODE ode)
+  IF (NOT ODE_FOUND)
+BUILD_ERROR (ODE and development files not found. See the following 
website: http://www.ode.org;)
+set (INCLUDE_ODE FALSE CACHE BOOL Include support for ODE)
+  else (NOT ODE_FOUND)
+set (INCLUDE_ODE TRUE CACHE BOOL Include support for ODE)
+  
+APPEND_TO_CACHED_LIST(gazeboserver_include_dirs 
+  ${gazeboserver_include_dirs_desc} 
+  ${ODE_INCLUDE_DIRS})
+APPEND_TO_CACHED_LIST(gazeboserver_link_dirs 
+  ${gazeboserver_link_dirs_desc} 
+  ${ODE_LIBRARY_DIRS})
+APPEND_TO_CACHED_LIST(gazeboserver_link_libs 
+  ${gazeboserver_link_libs_desc} 
+  ${ODE_LINK_LIBS})
+APPEND_TO_CACHED_LIST(gazeboserver_link_libs 
+  ${gazeboserver_link_libs_desc} 
+  ${ODE_LIBRARIES})
+APPEND_TO_CACHED_LIST(gazeboserver_ldflags
+  ${gazeboserver_ldflags_desc} 
+  ${ODE_LDFLAGS})
+  endif (NOT ODE_FOUND)
+
+  pkg_check_modules(ODE_JOINT_DAMPING ode=${ODE_JOINT_DAMPING_VERSION})
+  if (NOT ODE_JOINT_DAMPING_FOUND)
+set (INCLUDE_ODE_JOINT_DAMPING FALSE CACHE BOOL No support for ODE 
damping)
+  else (NOT ODE_JOINT_DAMPING_FOUND)
+set (INCLUDE_ODE_JOINT_DAMPING TRUE CACHE BOOL Include support for ODE 
damping)
+  endif (NOT ODE_JOINT_DAMPING_FOUND)
+
+
+  #
   # Find OGRE 
   pkg_check_modules(OGRE-RTShaderSystem 
OGRE-RTShaderSystem=${MIN_OGRE_VERSION})
   if (OGRE-RTShaderSystem_FOUND)
@@ -57,10 +92,12 @@
 set(ogre_libraries ${OGRE-RTShaderSystem_LIBRARIES})
 set(ogre_cflags ${OGRE-RTShaderSystem_CFLAGS})
 
-add_definitions(-DUSE_RTSHADER_SYSTEM)
+set (INCLUDE_RTSHADER ON CACHE BOOL Enable GPU shaders)
 
   else (OGRE-RTShaderSystem_FOUND)
 
+set (INCLUDE_RTSHADER OFF CACHE BOOL Enable GPU shaders)
+
 pkg_check_modules(OGRE OGRE=${MIN_OGRE_VERSION})
 if (NOT OGRE_FOUND)
   BUILD_ERROR(Ogre3d version =${MIN_OGRE_VERSION} and development files 
not found. See the following website for installation instructions: 
http://www.orge3d.org;)
@@ -467,18 +504,15 @@
   
   find_library(assimp_library assimp ENV LD_LIBRARY_PATH)
   
-  if (NOT assimp_library)
-message (STATUS Looking for libassimp - not found. Using builtin 
version.)
-#BUILD_ERROR(libassimp not found. See the following website for 
installation instructions: http://assimp.sourceforge.net;)
-  else

[Playerstage-commit] SF.net SVN: playerstage:[8780] code/gazebo/trunk/tools

2010-06-22 Thread natepak
Revision: 8780
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8780view=rev
Author:   natepak
Date: 2010-06-22 23:00:46 + (Tue, 22 Jun 2010)

Log Message:
---
Update the tools and added a gazeboplugin tool

Modified Paths:
--
code/gazebo/trunk/tools/CMakeLists.txt
code/gazebo/trunk/tools/Toolbase.cc
code/gazebo/trunk/tools/Toolbase.hh
code/gazebo/trunk/tools/gazebobody.cc
code/gazebo/trunk/tools/gazebomodel.cc

Added Paths:
---
code/gazebo/trunk/tools/gazeboplugin.cc

Modified: code/gazebo/trunk/tools/CMakeLists.txt
===
--- code/gazebo/trunk/tools/CMakeLists.txt  2010-06-22 22:59:54 UTC (rev 
8779)
+++ code/gazebo/trunk/tools/CMakeLists.txt  2010-06-22 23:00:46 UTC (rev 
8780)
@@ -14,19 +14,24 @@
 )
 
 
-set (sources gazebomodel.cc gazebobody.cc Toolbase.cc)
+set (sources gazebomodel.cc gazebobody.cc gazeboplugin.cc Toolbase.cc)
 
 set_source_files_properties(${sources} PROPERTIES COMPILE_FLAGS -ggdb -g2 
-Wall)
 
 add_executable(gazebomodel gazebomodel.cc Toolbase.cc)
 add_executable(gazebobody gazebobody.cc Toolbase.cc)
+add_executable(gazeboplugin gazeboplugin.cc Toolbase.cc)
 
 target_link_libraries(gazebomodel gazebo yaml ${boost_libraries})
 target_link_libraries(gazebobody gazebo yaml ${boost_libraries})
+target_link_libraries(gazeboplugin gazebo yaml ${boost_libraries})
 
 set_target_properties(gazebomodel PROPERTIES SKIP_BUILD_RPATH TRUE)
 set_target_properties(gazebomodel PROPERTIES LINK_FLAGS ${LINK_FLAGS} 
${gazebo_lflags})
 set_target_properties(gazebobody PROPERTIES SKIP_BUILD_RPATH TRUE)
 set_target_properties(gazebobody PROPERTIES LINK_FLAGS ${LINK_FLAGS} 
${gazebo_lflags})
+set_target_properties(gazeboplugin PROPERTIES SKIP_BUILD_RPATH TRUE)
+set_target_properties(gazeboplugin PROPERTIES LINK_FLAGS ${LINK_FLAGS} 
${gazebo_lflags})
 
-install (TARGETS gazebomodel gazebobody DESTINATION 
${CMAKE_INSTALL_PREFIX}/bin)
+
+install (TARGETS gazebomodel gazebobody gazeboplugin DESTINATION 
${CMAKE_INSTALL_PREFIX}/bin)

Modified: code/gazebo/trunk/tools/Toolbase.cc
===
--- code/gazebo/trunk/tools/Toolbase.cc 2010-06-22 22:59:54 UTC (rev 8779)
+++ code/gazebo/trunk/tools/Toolbase.cc 2010-06-22 23:00:46 UTC (rev 8780)
@@ -47,9 +47,9 @@
 
   this-ParseYAML();
 
-  this-client = new gazebo::Client();
-  this-simIface = new gazebo::SimulationIface();
-  this-factoryIface = new gazebo::FactoryIface();
+  this-client = new libgazebo::Client();
+  this-simIface = new libgazebo::SimulationIface();
+  this-factoryIface = new libgazebo::FactoryIface();
 
   try
   {

Modified: code/gazebo/trunk/tools/Toolbase.hh
===
--- code/gazebo/trunk/tools/Toolbase.hh 2010-06-22 22:59:54 UTC (rev 8779)
+++ code/gazebo/trunk/tools/Toolbase.hh 2010-06-22 23:00:46 UTC (rev 8780)
@@ -41,9 +41,9 @@
   /// \brief Print all the commands to stdout
   protected: void PrintCommands(std::string prefix);
 
-  protected: gazebo::Client *client;
-  protected: gazebo::SimulationIface *simIface;
-  protected: gazebo::FactoryIface *factoryIface;
+  protected: libgazebo::Client *client;
+  protected: libgazebo::SimulationIface *simIface;
+  protected: libgazebo::FactoryIface *factoryIface;
 
   protected: std::mapstd::string, std::string yamlValues;
   protected: std::vectorstd::string params;

Modified: code/gazebo/trunk/tools/gazebobody.cc
===
--- code/gazebo/trunk/tools/gazebobody.cc   2010-06-22 22:59:54 UTC (rev 
8779)
+++ code/gazebo/trunk/tools/gazebobody.cc   2010-06-22 23:00:46 UTC (rev 
8780)
@@ -15,7 +15,7 @@
   public: void PrintBody(std::string name, std::string prefix)
   {
 std::string type;
-gazebo::Pose pose;
+libgazebo::Pose pose;
 
 this-simIface-GetEntityType(name, type);
 if (type == body)

Modified: code/gazebo/trunk/tools/gazebomodel.cc
===
--- code/gazebo/trunk/tools/gazebomodel.cc  2010-06-22 22:59:54 UTC (rev 
8779)
+++ code/gazebo/trunk/tools/gazebomodel.cc  2010-06-22 23:00:46 UTC (rev 
8780)
@@ -1,5 +1,9 @@
 #include iostream
+#include sys/types.h
+#include sys/stat.h
+#include unistd.h
 #include stdio.h
+#include stdlib.h
 #include boost/regex.hpp
 #include boost/algorithm/string.hpp
 #include boost/lexical_cast.hpp
@@ -14,7 +18,7 @@
   public: void PrintModel(std::string name, std::string prefix)
   {
 std::string type;
-gazebo::Pose pose;
+libgazebo::Pose pose;
 
 std::cout  prefix  name  \n;
 
@@ -70,8 +74,8 @@
   {
 std::string name = params[i];
 std::string type;
-gazebo::Pose pose;
-gazebo::Vec3 linearVel, linearAccel, angularVel, angularAccel;
+libgazebo::Pose pose;
+libgazebo::Vec3 linearVel

[Playerstage-commit] SF.net SVN: playerstage:[8781] code/gazebo/trunk/libgazebo

2010-06-22 Thread natepak
Revision: 8781
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8781view=rev
Author:   natepak
Date: 2010-06-22 23:01:14 + (Tue, 22 Jun 2010)

Log Message:
---
Added hooks for the new plugins

Modified Paths:
--
code/gazebo/trunk/libgazebo/Client.cc
code/gazebo/trunk/libgazebo/FactoryIface.cc
code/gazebo/trunk/libgazebo/Graphics3dIface.cc
code/gazebo/trunk/libgazebo/Iface.cc
code/gazebo/trunk/libgazebo/IfaceFactory.cc
code/gazebo/trunk/libgazebo/IfaceFactory.hh
code/gazebo/trunk/libgazebo/Server.cc
code/gazebo/trunk/libgazebo/SimIface.cc
code/gazebo/trunk/libgazebo/gz.h

Modified: code/gazebo/trunk/libgazebo/Client.cc
===
--- code/gazebo/trunk/libgazebo/Client.cc   2010-06-22 23:00:46 UTC (rev 
8780)
+++ code/gazebo/trunk/libgazebo/Client.cc   2010-06-22 23:01:14 UTC (rev 
8781)
@@ -43,7 +43,7 @@
 
 #include gz.h
 
-using namespace gazebo;
+using namespace libgazebo;
 
 

 // Create a client object
@@ -85,7 +85,7 @@
 void Client::ConnectWait(int serverId, int clientId)
 {
   bool simulationIfaceIsValid = false;
-  gazebo::SimulationIface *simIface = new gazebo::SimulationIface();
+  libgazebo::SimulationIface *simIface = new libgazebo::SimulationIface();
 
   while (!simulationIfaceIsValid)
   {
@@ -157,14 +157,14 @@
   {
 // a gazebo process is still alive.
 // it might however, still being booted up, so we need to check by 
connecting
-// Connect to gazebo::SimulationIface and check for changing 
realTime,
+// Connect to libgazebo::SimulationIface and check for changing 
realTime,
 // if simulationIface-data-realTime is not changing, the server 
might
 // be stale leftovers from previous gazebo crash,
 // disconnect and reconnect client
 try
 {
   // Open the Simulation Interface
-  gazebo::SimulationIface simulationIface;
+  libgazebo::SimulationIface simulationIface;
   simulationIface.Open(this,default);
   // grab a t0
   simulationIface.Lock(1);

Modified: code/gazebo/trunk/libgazebo/FactoryIface.cc
===
--- code/gazebo/trunk/libgazebo/FactoryIface.cc 2010-06-22 23:00:46 UTC (rev 
8780)
+++ code/gazebo/trunk/libgazebo/FactoryIface.cc 2010-06-22 23:01:14 UTC (rev 
8781)
@@ -2,7 +2,7 @@
 
 #include gz.h
 
-using namespace gazebo;
+using namespace libgazebo;
 
 /// Delete a model by name
 bool FactoryIface::DeleteEntity(const std::string model_name)

Modified: code/gazebo/trunk/libgazebo/Graphics3dIface.cc
===
--- code/gazebo/trunk/libgazebo/Graphics3dIface.cc  2010-06-22 23:00:46 UTC 
(rev 8780)
+++ code/gazebo/trunk/libgazebo/Graphics3dIface.cc  2010-06-22 23:01:14 UTC 
(rev 8781)
@@ -2,7 +2,7 @@
 
 #include iostream
 
-using namespace gazebo;
+using namespace libgazebo;
 
 

 /// Constructor
@@ -190,3 +190,21 @@
 
   this-Unlock();
 }
+
+
+/// Draw a ribbon trail following an entity
+void Graphics3dIface::DrawRibbonTrail(const std::string name)
+{
+  this-Lock(1);
+  Graphics3dDrawData *cmd = (this-data-commands[this-data-cmdCount++]);
+
+  cmd-drawMode = Graphics3dDrawData::RIBBONTRAIL;
+
+  // Set the name of the graphics drawable
+  memset( cmd-name, 0, GAZEBO_GRAPHICS3D_MAX_NAME);
+  strcpy( cmd-name, name.c_str());
+
+  cmd-intVar = 1;
+
+  this-Unlock();
+}

Modified: code/gazebo/trunk/libgazebo/Iface.cc
===
--- code/gazebo/trunk/libgazebo/Iface.cc2010-06-22 23:00:46 UTC (rev 
8780)
+++ code/gazebo/trunk/libgazebo/Iface.cc2010-06-22 23:01:14 UTC (rev 
8781)
@@ -43,7 +43,7 @@
 
 #include gz.h
 
-using namespace gazebo;
+using namespace libgazebo;
 
 GZ_REGISTER_IFACE(simulation, SimulationIface);
 GZ_REGISTER_IFACE(position, PositionIface);

Modified: code/gazebo/trunk/libgazebo/IfaceFactory.cc
===
--- code/gazebo/trunk/libgazebo/IfaceFactory.cc 2010-06-22 23:00:46 UTC (rev 
8780)
+++ code/gazebo/trunk/libgazebo/IfaceFactory.cc 2010-06-22 23:01:14 UTC (rev 
8781)
@@ -31,7 +31,7 @@
 #include gz.h
 #include IfaceFactory.hh
 
-using namespace gazebo;
+using namespace libgazebo;
 
 std::mapstd::string, IfaceFactoryFn IfaceFactory::ifaces;
 

Modified: code/gazebo/trunk/libgazebo/IfaceFactory.hh
===
--- code/gazebo/trunk/libgazebo/IfaceFactory.hh 2010-06-22 23:00:46 UTC (rev 
8780)
+++ code

[Playerstage-commit] SF.net SVN: playerstage:[8783] code/gazebo/trunk

2010-06-22 Thread natepak
Revision: 8783
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8783view=rev
Author:   natepak
Date: 2010-06-22 23:03:53 + (Tue, 22 Jun 2010)

Log Message:
---
updates

Modified Paths:
--
code/gazebo/trunk/CMakeLists.txt
code/gazebo/trunk/gazebo.h.in

Added Paths:
---
code/gazebo/trunk/gazebo_config.h.in

Modified: code/gazebo/trunk/CMakeLists.txt
===
--- code/gazebo/trunk/CMakeLists.txt2010-06-22 23:02:52 UTC (rev 8782)
+++ code/gazebo/trunk/CMakeLists.txt2010-06-22 23:03:53 UTC (rev 8783)
@@ -93,7 +93,8 @@
 else (build_errors)
   
   # Write the config.h file
-  configure_file (${PROJECT_SOURCE_DIR}/config.h.in 
${PROJECT_BINARY_DIR}/config.h)
+  configure_file (${PROJECT_SOURCE_DIR}/gazebo_config.h.in 
${PROJECT_BINARY_DIR}/gazebo_config.h)
+  install(FILES ${PROJECT_BINARY_DIR}/gazebo_config.h DESTINATION 
${CMAKE_INSTALL_PREFIX}/include/gazebo)
 
   configure_file (${PROJECT_SOURCE_DIR}/gazebo.h.in 
${PROJECT_BINARY_DIR}/gazebo.h)
   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gazebo.h DESTINATION 
${CMAKE_INSTALL_PREFIX}/include/gazebo)
@@ -110,10 +111,6 @@
   if (BUILD_GAZEBO)
 include (libgazebo)
 
-if (use_internal_assimp)
-  add_subdirectory(3rd_party)
-endif (use_internal_assimp)
-
 add_subdirectory(libgazebo)
 add_subdirectory(server)
 add_subdirectory(worlds)

Modified: code/gazebo/trunk/gazebo.h.in
===
--- code/gazebo/trunk/gazebo.h.in   2010-06-22 23:02:52 UTC (rev 8782)
+++ code/gazebo/trunk/gazebo.h.in   2010-06-22 23:03:53 UTC (rev 8783)
@@ -25,10 +25,5 @@
  * SVN: $Id$
  */
 
-/* Version number */
-#define GAZEBO_MAJOR_VERSION ${GAZEBO_MAJOR_VERSION}
-#define GAZEBO_MINOR_VERSION ${GAZEBO_MINOR_VERSION}
-#define GAZEBO_PATCH_VERSION ${GAZEBO_PATCH_VERSION}
-#define GAZEBO_VERSION ${GAZEBO_VERSION}
-
+#include gazebo/gazebo_config.h
 #include gazebo/gz.h

Copied: code/gazebo/trunk/gazebo_config.h.in (from rev 8771, 
code/gazebo/branches/simpar/gazebo_config.h.in)
===
--- code/gazebo/trunk/gazebo_config.h.in(rev 0)
+++ code/gazebo/trunk/gazebo_config.h.in2010-06-22 23:03:53 UTC (rev 
8783)
@@ -0,0 +1,18 @@
+/* config.h. Generated by CMake for @project_n...@. */
+
+/* Version number */
+#define GAZEBO_MAJOR_VERSION ${GAZEBO_MAJOR_VERSION}
+#define GAZEBO_MINOR_VERSION ${GAZEBO_MINOR_VERSION}
+#define GAZEBO_PATCH_VERSION ${GAZEBO_PATCH_VERSION}
+
+#define GAZEBO_VERSION ${GAZEBO_VERSION}
+
+#cmakedefine HAVE_OPENAL 1
+#cmakedefine HAVE_FFMPEG 1
+#cmakedefine HAVE_LTDL 1
+#cmakedefine HAVE_DL 1
+#cmakedefine ENABLE_SHADOWS 1
+#cmakedefine INCLUDE_BULLET 1
+#cmakedefine INCLUDE_ODE 1
+#cmakedefine INCLUDE_ODE_JOINT_DAMPING 1
+#cmakedefine INCLUDE_RTSHADER 1


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

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8769] code/gazebo/branches/simpar

2010-06-21 Thread natepak
Revision: 8769
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8769view=rev
Author:   natepak
Date: 2010-06-22 02:19:53 + (Tue, 22 Jun 2010)

Log Message:
---
Added ability to log contacts

Modified Paths:
--
code/gazebo/branches/simpar/plugins/ball_drop.cc
code/gazebo/branches/simpar/plugins/box_stack.cc
code/gazebo/branches/simpar/plugins/pioneer_gripper.cc
code/gazebo/branches/simpar/server/Entity.cc
code/gazebo/branches/simpar/server/Entity.hh
code/gazebo/branches/simpar/server/Logger.cc
code/gazebo/branches/simpar/server/World.cc
code/gazebo/branches/simpar/server/World.hh
code/gazebo/branches/simpar/server/physics/Body.cc
code/gazebo/branches/simpar/server/physics/Geom.cc
code/gazebo/branches/simpar/server/physics/Geom.hh
code/gazebo/branches/simpar/worlds/3shortstacks.world
code/gazebo/branches/simpar/worlds/empty.world

Modified: code/gazebo/branches/simpar/plugins/ball_drop.cc
===
--- code/gazebo/branches/simpar/plugins/ball_drop.cc2010-06-20 19:34:02 UTC 
(rev 8768)
+++ code/gazebo/branches/simpar/plugins/ball_drop.cc2010-06-22 02:19:53 UTC 
(rev 8769)
@@ -13,17 +13,17 @@
 {
   this-sphere = NULL;
   this-model_name = sphere;
-  //this-SpawnBall(0,0,5);
+  this-SpawnBall(0,0,5);
 
-  for (double i=0.001; i  1e-5; i*=0.5) 
-this-stepTimes.push_back(i);
+  //for (double i=0.001; i  1e-5; i*=0.5) 
+  this-stepTimes.push_back(0.1);
 
-  for (unsigned int i=10; i=100; i+=10)
-this-stepIters.push_back(i);
+  //for (unsigned int i=10; i=100; i+=10)
+  this-stepIters.push_back(10);
 
-  this-stepTypes.push_back(robust);
-  this-stepTypes.push_back(world);
-  this-stepTypes.push_back(quick);
+  //this-stepTypes.push_back(robust);
+  //this-stepTypes.push_back(world);
+  //this-stepTypes.push_back(quick);
 
   this-stepTypesIter = this-stepTypes.begin();
   this-stepTimesIter = this-stepTimes.begin();
@@ -74,13 +74,14 @@
   modelbody:sphere name='body';
   model  geom:sphere name='geom';
   modelsize0.25/size;
-  modelmass1/mass;
+  modelmass10/mass;
   modelkp1.0/kp;
   modelkd1.0/kd;
   modelbounce0/bounce;
   modelbounceVel10/bounceVel;
   modelslip10.01/slip1;
   modelslip20.01/slip2;
+  modelenableContactstrue/enableContacts;
   modelvisual;
   model  size0.5 0.5 0.5/size;
   model  meshunit_sphere/mesh;
@@ -101,6 +102,10 @@
   this-count = 0;
   this-prev_z = 0;
 
+  this-physics-SetStepType( *this-stepTypesIter );
+  this-physics-SetStepTime( *this-stepTimesIter );
+  this-physics-SetSORPGSIters( *this-stepItersIter );
+
   World::Instance()-ConnectWorldUpdateStartSignal(
 boost::bind(BallDrop::UpdateCB, this));
 
@@ -108,7 +113,7 @@
 
 public: void UpdateCB()
 {
-  /*if (this-sphere == NULL)
+  if (this-sphere == NULL)
   {
 this-sphere = 
(Model*)World::Instance()-GetEntityByName(this-model_name);
 if (this-sphere)
@@ -118,7 +123,7 @@
   this-prevTime = Simulator::Instance()-GetRealTime();
 
   if (LOG)
-Logger::Instance()-AddLog(sphere,/tmp/sphere.log);
+
Logger::Instance()-AddLog(sphere::body::COM_Entity::geom,/tmp/sphere.log);
 
   World::Instance()-ConnectWorldUpdateStartSignal(
   boost::bind(BallDrop::UpdateCB, this));
@@ -140,10 +145,9 @@
 
 if (realTime - this-prevTime  10.0)
 {
-*/
   this-UpdateJob();
-//}
-  //}
+}
+  }
 }
 
 public: void UpdateJob()
@@ -180,10 +184,9 @@
 }
   }
 
-  /*this-physics-SetStepType( *this-stepTypesIter );
+  this-physics-SetStepType( *this-stepTypesIter );
   this-physics-SetStepTime( *this-stepTimesIter );
   this-physics-SetSORPGSIters( *this-stepItersIter );
-  */
 
   this-count++;
   std::cout  Type[  *this-stepTypesIter  ] 

Modified: code/gazebo/branches/simpar/plugins/box_stack.cc
===
--- code/gazebo/branches/simpar/plugins/box_stack.cc2010-06-20 19:34:02 UTC 
(rev 8768)
+++ code/gazebo/branches/simpar/plugins/box_stack.cc2010-06-22 02:19:53 UTC 
(rev 8769)
@@ -15,13 +15,13 @@
 
   //for (double i=0.001; i  1e-5; i*=0.5) 
 //this-stepTimes.push_back(i);
-  this-stepTimes.push_back(0.001);
+  this-stepTimes.push_back(0.01);
 
   //for (unsigned int i=10; i=100; i+=10)
   this-stepIters.push_back(100);
 
+  //this-stepTypes.push_back(quick);
   //this-stepTypes.push_back(world);
-  //this-stepTypes.push_back(quick);
   this-stepTypes.push_back(robust

[Playerstage-commit] SF.net SVN: playerstage:[8768] code/gazebo/branches/simpar

2010-06-20 Thread natepak
Revision: 8768
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8768view=rev
Author:   natepak
Date: 2010-06-20 19:34:02 + (Sun, 20 Jun 2010)

Log Message:
---
Updates to the plugins

Modified Paths:
--
code/gazebo/branches/simpar/plugins/pioneer_circle.cc
code/gazebo/branches/simpar/plugins/pioneer_gripper.cc
code/gazebo/branches/simpar/plugins/pioneer_line.cc
code/gazebo/branches/simpar/worlds/pioneer2dx.world
code/gazebo/branches/simpar/worlds/pioneer2dx_gripper.world

Modified: code/gazebo/branches/simpar/plugins/pioneer_circle.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-06-19 
07:53:59 UTC (rev 8767)
+++ code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-06-20 
19:34:02 UTC (rev 8768)
@@ -2,7 +2,7 @@
 
 #include gazebo/gazeboserver.hh
 
-#define LOG true
+#define LOG false
 
 namespace gazebo
 {
@@ -11,15 +11,15 @@
   {
 public: PioneerCircle() : Handler() 
 {
-  for (double i=0.001; i  1e-5; i*=0.5) 
-this-stepTimes.push_back(i);
+  //for (double i=0.001; i  1e-5; i*=0.5) 
+this-stepTimes.push_back(0.001);
 
-  for (unsigned int i=10; i=100; i+=10)
-this-stepIters.push_back(i);
+  //for (unsigned int i=10; i=100; i+=10)
+this-stepIters.push_back(10);
 
+  //this-stepTypes.push_back(world);
   this-stepTypes.push_back(quick);
-  this-stepTypes.push_back(robust);
-  this-stepTypes.push_back(world);
+  //this-stepTypes.push_back(robust);
 
   this-stepTypesIter = this-stepTypes.begin();
   this-stepTimesIter = this-stepTimes.begin();
@@ -32,7 +32,7 @@
 
   if (LOG)
   {
-this-indexFile = fopen(std::string(this-path + index.txt).c_str(), 
w);
+this-indexFile = fopen(std::string(this-path + index.txt).c_str(), 
a);
 fprintf(this-indexFile, # index step_type step_time 
step_iterations\n);
   }
 }
@@ -134,6 +134,7 @@
 {
   if (LOG)
   {
+printf(HERE. Count[%d]\n, this-count);
 Logger::Instance()-RemoveLog(pioneer);
 
 std::string mv_cmd = std::string(mv /tmp/pioneer.log ) + this-path 
+ 

Modified: code/gazebo/branches/simpar/plugins/pioneer_gripper.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_gripper.cc  2010-06-19 
07:53:59 UTC (rev 8767)
+++ code/gazebo/branches/simpar/plugins/pioneer_gripper.cc  2010-06-20 
19:34:02 UTC (rev 8768)
@@ -2,7 +2,7 @@
 #include boost/bind.hpp
 #include gazebo/gazeboserver.hh
 
-#define LOG false
+#define LOG true
 
 namespace gazebo
 {
@@ -13,14 +13,15 @@
 {
   //for (double i=0.001; i  1e-5; i*=0.5) 
 //this-stepTimes.push_back(i);
-  this-stepTimes.push_back(0.1);
+  this-stepTimes.push_back(0.0001);
 
-  for (unsigned int i=10; i=100; i+=10)
-this-stepIters.push_back(i);
+  //for (unsigned int i=10; i=100; i+=10)
+//this-stepIters.push_back(10);
+  this-stepIters.push_back(10);
 
-  this-stepTypes.push_back(quick);
-  this-stepTypes.push_back(robust);
+  //this-stepTypes.push_back(quick);
   this-stepTypes.push_back(world);
+  //this-stepTypes.push_back(robust);
 
   this-stepTypesIter = this-stepTypes.begin();
   this-stepTimesIter = this-stepTimes.begin();
@@ -29,11 +30,11 @@
   this-path = std::string(/home/nate/work/simpar/data/pioneer_gripper/);
   system( (std::string(mkdir -p ) + this-path).c_str() );
 
-  this-count = 0;
+  this-count = 1;
 
   if (LOG)
   {
-this-indexFile = fopen(std::string(this-path + index.txt).c_str(), 
w);
+this-indexFile = fopen(std::string(this-path + index.txt).c_str(), 
a);
 fprintf(this-indexFile, # index step_type step_time 
step_iterations\n);
   }
 }
@@ -58,12 +59,15 @@
 }
   }
   this-robot-Reset();
+  this-box-Reset();
 }
 
 public: void Load()
 {
   std::string model_name = pioneer_gripper;
   this-robot = (Model*)World::Instance()-GetEntityByName(model_name);
+  this-box =  (Model*)World::Instance()-GetEntityByName(custom_box);
+  Simulator::Instance()-SetPaused(false);
 
   if (this-robot)
   {
@@ -85,19 +89,19 @@
   Logger::Instance()-AddLog(custom_box,/tmp/box.log);
 }
 
-/*this-physics-SetStepTime( *this-stepTimesIter );
+this-physics-SetStepTime( *this-stepTimesIter );
 this-physics-SetStepType( *this-stepTypesIter );
 this-physics-SetSORPGSIters( *this-stepItersIter );
 std::cout  Type[  *this-stepTypesIter  ]  
Time[  *this-stepTimesIter  ] 
Iters[  *this-stepItersIter  ]\n;
-*/
   }
   else
 std::cerr  Unable to find model[  model_name  ]\n;
 
   this-spawned = false; this-leftForce = 0;
   this-rightForce

[Playerstage-commit] SF.net SVN: playerstage:[8766] code/gazebo/branches/simpar/plugins/ pioneer_circle.cc

2010-06-15 Thread natepak
Revision: 8766
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8766view=rev
Author:   natepak
Date: 2010-06-15 18:50:40 + (Tue, 15 Jun 2010)

Log Message:
---
Updates

Modified Paths:
--
code/gazebo/branches/simpar/plugins/pioneer_circle.cc

Modified: code/gazebo/branches/simpar/plugins/pioneer_circle.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-06-15 
03:40:50 UTC (rev 8765)
+++ code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-06-15 
18:50:40 UTC (rev 8766)
@@ -25,10 +25,10 @@
   this-stepTimesIter = this-stepTimes.begin();
   this-stepItersIter = this-stepIters.begin();
 
-  this-path = 
std::string(/home/nkoenig/work/simpar/data/pioneer_circle/);
+  this-path = std::string(/home/nate/work/simpar/data/pioneer_circle/);
   system( (std::string(mkdir -p ) + this-path).c_str() );
 
-  this-circleCount = 1;
+  this-circleCount = 0;
 
   if (LOG)
   {
@@ -108,7 +108,7 @@
   this-startPose.pos == Vector3(0,0,0))
 this-startPose = pose;
 
-  if (this-circleCount = 1)
+  if (this-circleCount  3)
   {
 if (this-leftWheel-GetRelativeAngularVel().z  2.2) 
   this-leftWheel-SetTorque(Vector3(0.0, 0.0, 0.01));


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

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8763] code/gazebo/branches/simpar/plugins/ box_stack.cc

2010-06-14 Thread natepak
Revision: 8763
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8763view=rev
Author:   natepak
Date: 2010-06-14 14:49:04 + (Mon, 14 Jun 2010)

Log Message:
---
Update to the box stack plugin

Modified Paths:
--
code/gazebo/branches/simpar/plugins/box_stack.cc

Modified: code/gazebo/branches/simpar/plugins/box_stack.cc
===
--- code/gazebo/branches/simpar/plugins/box_stack.cc2010-06-11 20:54:20 UTC 
(rev 8762)
+++ code/gazebo/branches/simpar/plugins/box_stack.cc2010-06-14 14:49:04 UTC 
(rev 8763)
@@ -20,9 +20,9 @@
   //for (unsigned int i=10; i=100; i+=10)
   this-stepIters.push_back(100);
 
-  this-stepTypes.push_back(world);
-  this-stepTypes.push_back(quick);
-  //this-stepTypes.push_back(robust);
+  //this-stepTypes.push_back(world);
+  //this-stepTypes.push_back(quick);
+  this-stepTypes.push_back(robust);
 
   this-stepTypesIter = this-stepTypes.begin();
   this-stepTimesIter = this-stepTimes.begin();
@@ -51,7 +51,7 @@
 {
   this-box = (Model*)World::Instance()-GetEntityByName(board);
   this-physics = World::Instance()-GetPhysicsEngine();
-  this-count = 0;
+  this-count = 2;
 
   World::Instance()-ConnectWorldUpdateStartSignal(
 boost::bind(BoxStack::UpdateCB, this));


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

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8764] code/gazebo/branches/simpar

2010-06-14 Thread natepak
Revision: 8764
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8764view=rev
Author:   natepak
Date: 2010-06-14 15:02:52 + (Mon, 14 Jun 2010)

Log Message:
---
Removed internal assimp

Modified Paths:
--
code/gazebo/branches/simpar/CMakeLists.txt
code/gazebo/branches/simpar/cmake/SearchForStuff.cmake

Removed Paths:
-
code/gazebo/branches/simpar/3rd_party/

Modified: code/gazebo/branches/simpar/CMakeLists.txt
===
--- code/gazebo/branches/simpar/CMakeLists.txt  2010-06-14 14:49:04 UTC (rev 
8763)
+++ code/gazebo/branches/simpar/CMakeLists.txt  2010-06-14 15:02:52 UTC (rev 
8764)
@@ -111,10 +111,6 @@
   if (BUILD_GAZEBO)
 include (libgazebo)
 
-if (use_internal_assimp)
-  add_subdirectory(3rd_party)
-endif (use_internal_assimp)
-
 add_subdirectory(libgazebo)
 add_subdirectory(server)
 add_subdirectory(worlds)

Modified: code/gazebo/branches/simpar/cmake/SearchForStuff.cmake
===
--- code/gazebo/branches/simpar/cmake/SearchForStuff.cmake  2010-06-14 
14:49:04 UTC (rev 8763)
+++ code/gazebo/branches/simpar/cmake/SearchForStuff.cmake  2010-06-14 
15:02:52 UTC (rev 8764)
@@ -4,8 +4,6 @@
 # John - ode version with joint damping
 SET(ODE_JOINT_DAMPING_VERSION 0.11.1.1 CACHE INTERNAL ODE version with joint 
damping FORCE)
 
-set (use_internal_assimp OFF CACHE BOOL Use internal assimp FORCE)
-
 set (INCLUDE_WEBGAZEBO ON CACHE BOOL Build webgazebo FORCE)
 set (OGRE_LIBRARY_PATH /usr/local/lib CACHE INTERNAL Ogre library path)
 
@@ -480,18 +478,15 @@
   
   find_library(assimp_library assimp ENV LD_LIBRARY_PATH)
   
-  if (NOT assimp_library)
-message (STATUS Looking for libassimp - not found. Using builtin 
version.)
-#BUILD_ERROR(libassimp not found. See the following website for 
installation instructions: http://assimp.sourceforge.net;)
-  else (NOT assimp_library)
+  if (assimp_library)
 message (STATUS Looking for libassimp - found)
 APPEND_TO_CACHED_LIST(assimp_libraries
   Assimp libraries Use this to override automatic 
detection.
   ${assimp_library})
-  endif (NOT assimp_library)
+  endif (assimp_library)
  
   if (NOT assimp_include_dir OR NOT assimp_library)
-set (use_internal_assimp ON CACHE BOOL Use internal assimp FORCE)
+BUILD_ERROR(assimp not found. See the following website for installation 
instructions: http://assimp.sourceforge.net;)
   endif (NOT assimp_include_dir OR NOT assimp_library)
 
 endif (NOT assimp_include_dirs AND NOT assimp_library_dirs AND NOT 
assimp_libraries )


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

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8765] code/gazebo/branches/simpar

2010-06-14 Thread natepak
Revision: 8765
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8765view=rev
Author:   natepak
Date: 2010-06-15 03:40:50 + (Tue, 15 Jun 2010)

Log Message:
---
Fixed searching for assimp, and the pioneer circle plugin

Modified Paths:
--
code/gazebo/branches/simpar/cmake/SearchForStuff.cmake
code/gazebo/branches/simpar/plugins/pioneer_circle.cc
code/gazebo/branches/simpar/worlds/pioneer2dx.world

Modified: code/gazebo/branches/simpar/cmake/SearchForStuff.cmake
===
--- code/gazebo/branches/simpar/cmake/SearchForStuff.cmake  2010-06-14 
15:02:52 UTC (rev 8764)
+++ code/gazebo/branches/simpar/cmake/SearchForStuff.cmake  2010-06-15 
03:40:50 UTC (rev 8765)
@@ -49,7 +49,7 @@
 
   #
   # Find ODE
-  pkg_check_modules(ODE ode=${ODE_VERSION})
+  pkg_check_modules(ODE ode)
   IF (NOT ODE_FOUND)
 BUILD_ERROR (ODE and development files not found. See the following 
website: http://www.ode.org;)
 set (INCLUDE_ODE FALSE CACHE BOOL Include support for ODE)

Modified: code/gazebo/branches/simpar/plugins/pioneer_circle.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-06-14 
15:02:52 UTC (rev 8764)
+++ code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-06-15 
03:40:50 UTC (rev 8765)
@@ -17,18 +17,18 @@
   for (unsigned int i=10; i=100; i+=10)
 this-stepIters.push_back(i);
 
+  this-stepTypes.push_back(quick);
   this-stepTypes.push_back(robust);
   this-stepTypes.push_back(world);
-  this-stepTypes.push_back(quick);
 
   this-stepTypesIter = this-stepTypes.begin();
   this-stepTimesIter = this-stepTimes.begin();
   this-stepItersIter = this-stepIters.begin();
 
-  this-path = std::string(/home/nate/work/simpar/data/pioneer_circle/);
+  this-path = 
std::string(/home/nkoenig/work/simpar/data/pioneer_circle/);
   system( (std::string(mkdir -p ) + this-path).c_str() );
 
-  this-circleCount = 4;
+  this-circleCount = 1;
 
   if (LOG)
   {
@@ -66,6 +66,7 @@
 
   if (this-robot)
   {
+this-startPose = this-robot-GetWorldPose();
 this-robot-GetVisualNode()-SetRibbonTrail(true);
 this-leftWheel = (Body*)this-robot-GetChild(left_wheel);
 this-rightWheel = (Body*)this-robot-GetChild(right_wheel);
@@ -73,6 +74,8 @@
 this-physics = World::Instance()-GetPhysicsEngine();
 
 this-prevTime = Simulator::Instance()-GetSimTime();
+this-startTime = Simulator::Instance()-GetSimTime();
+
 this-count = 0;
 this-circleCount = 0;
 
@@ -82,6 +85,10 @@
 World::Instance()-ConnectWorldUpdateStartSignal(
 boost::bind(PioneerCircle::UpdateCB, this));
 
+this-physics-SetStepType( *this-stepTypesIter );
+this-physics-SetStepTime( *this-stepTimesIter );
+this-physics-SetSORPGSIters( *this-stepItersIter );
+
 std::cout  Type[  *this-stepTypesIter  ]  
Time[  *this-stepTimesIter  ] 
Iters[  *this-stepItersIter  ]\n;
@@ -95,22 +102,32 @@
   Time simTime = Simulator::Instance()-GetSimTime();
   Pose3d pose = this-robot-GetWorldPose();
 
+  double dist = pose.pos.Distance(this-startPose.pos);
+
+  if (simTime - this-startTime  10  
+  this-startPose.pos == Vector3(0,0,0))
+this-startPose = pose;
+
   if (this-circleCount = 1)
   {
 if (this-leftWheel-GetRelativeAngularVel().z  2.2) 
-  this-leftWheel-SetTorque(Vector3(0.0, 0.0, 0.2));
+  this-leftWheel-SetTorque(Vector3(0.0, 0.0, 0.01));
 
 if (this-rightWheel-GetRelativeAngularVel().z  2.1)
-  this-rightWheel-SetTorque(Vector3(0.0, 0.0, -0.2));
+  this-rightWheel-SetTorque(Vector3(0.0, 0.0, -0.01));
 
-if (simTime - this-prevTime  10.0  fabs(pose.pos.x)  0.1 )
+if (simTime - this-prevTime  10.0  dist  this-prevDist )
 {
+  this-startPose = pose;
+  std::cout  CIRCLE\n;
   this-prevTime = simTime;
   this-circleCount++;
 }
   }
   else 
 this-UpdateJob();
+
+  this-prevDist = dist;
 }
 
 public: void UpdateJob()
@@ -179,10 +196,13 @@
 private: Body *rightWheel;
 
 private: FILE *indexFile;
-private: Time prevTime;
+private: Time prevTime, startTime;
 private: PhysicsEngine *physics;
 private: unsigned int circleCount;
 private: unsigned int count;
+
+private: double prevDist;
+private: Pose3d startPose;
   };
 
   GZ_REGISTER_HANDLER(PioneerCircle, PioneerCircle)

Modified: code/gazebo/branches/simpar/worlds/pioneer2dx.world
===
--- code/gazebo/branches/simpar/worlds/pioneer2dx.world 2010-06-14 15:02:52 UTC 
(rev

[Playerstage-commit] SF.net SVN: playerstage:[8761] code/gazebo/branches/simpar

2010-06-11 Thread natepak
Revision: 8761
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8761view=rev
Author:   natepak
Date: 2010-06-11 18:12:50 + (Fri, 11 Jun 2010)

Log Message:
---
Update the box push plugin

Modified Paths:
--
code/gazebo/branches/simpar/plugins/box_push.cc
code/gazebo/branches/simpar/server/Quatern.cc
code/gazebo/branches/simpar/server/physics/ode/ODEBody.cc
code/gazebo/branches/simpar/worlds/3stacks.world
code/gazebo/branches/simpar/worlds/single_box.world

Modified: code/gazebo/branches/simpar/plugins/box_push.cc
===
--- code/gazebo/branches/simpar/plugins/box_push.cc 2010-06-11 14:22:25 UTC 
(rev 8760)
+++ code/gazebo/branches/simpar/plugins/box_push.cc 2010-06-11 18:12:50 UTC 
(rev 8761)
@@ -17,12 +17,12 @@
 //this-stepTimes.push_back(i);
   this-stepTimes.push_back(0.001);
 
-  for (unsigned int i=10; i=100; i+=10)
-this-stepIters.push_back(i);
+  //for (unsigned int i=10; i=100; i+=10)
+  this-stepIters.push_back(100);
 
+  this-stepTypes.push_back(quick);
+  this-stepTypes.push_back(world);
   this-stepTypes.push_back(robust);
-  this-stepTypes.push_back(world);
-  this-stepTypes.push_back(quick);
 
   this-stepTypesIter = this-stepTypes.begin();
   this-stepTimesIter = this-stepTimes.begin();
@@ -45,20 +45,6 @@
 
   World::Instance()-DisconnectWorldUpdateStartSignal(
   boost::bind(BoxPush::UpdateCB, this));
-
-  /*for (unsigned int i=0; i  this-box-GetChildCount(); i++)
-  {
-Body *body = dynamic_castBody*(this-box-GetChild(i));
-if (body)
-{
-  body-SetForce(Vector3(0,0,0));
-  body-SetTorque(Vector3(0,0,0));
-  body-SetLinearVel(Vector3(0,0,0));
-  body-SetAngularVel(Vector3(0,0,0));
-}
-  }
-  this-box-Reset();
-  */
 }
 
 public: void Load()
@@ -67,6 +53,7 @@
   this-physics = World::Instance()-GetPhysicsEngine();
   this-count = 0;
   this-velReached = false;
+  this-skipCount = 10;
 
   World::Instance()-ConnectWorldUpdateStartSignal(
 boost::bind(BoxPush::UpdateCB, this));
@@ -83,6 +70,10 @@
 World::Instance()-ConnectWorldUpdateStartSignal(
 boost::bind(BoxPush::UpdateCB, this));
 
+this-physics-SetStepType( *this-stepTypesIter );
+this-physics-SetStepTime( *this-stepTimesIter );
+this-physics-SetSORPGSIters( *this-stepItersIter );
+
 std::cout  Type[  *this-stepTypesIter  ]  
Time[  *this-stepTimesIter  ] 
Iters[  *this-stepItersIter  ]\n;
@@ -91,6 +82,12 @@
 
 public: void UpdateCB()
 {
+  if (this-skipCount  0)
+  {
+this-skipCount--;
+return;
+  }
+
   Time simTime = Simulator::Instance()-GetSimTime();
   Pose3d pose = this-box-GetWorldPose();
   Body *body = (Body*)this-box-GetChild(0);
@@ -148,6 +145,8 @@
   this-physics-SetStepTime( *this-stepTimesIter );
   this-physics-SetSORPGSIters( *this-stepItersIter );
 
+  this-skipCount = 10;
+
   this-count++;
   std::cout  Type[  *this-stepTypesIter  ] 
  Time[  *this-stepTimesIter  ]  
@@ -178,6 +177,7 @@
 private: PhysicsEngine *physics;
 private: unsigned int count;
 private: bool velReached;
+private: int skipCount;
   };
 
   GZ_REGISTER_HANDLER(BoxPush, BoxPush)

Modified: code/gazebo/branches/simpar/server/Quatern.cc
===
--- code/gazebo/branches/simpar/server/Quatern.cc   2010-06-11 14:22:25 UTC 
(rev 8760)
+++ code/gazebo/branches/simpar/server/Quatern.cc   2010-06-11 18:12:50 UTC 
(rev 8761)
@@ -414,6 +414,9 @@
 this-z = 0;
   if (!finite(this-u))
 this-u = 1;
+
+  if (this-u == 0  this-x == 0  this-y == 0  this-z == 0)
+this-u = 1;
 }
 
 

Modified: code/gazebo/branches/simpar/server/physics/ode/ODEBody.cc
===
--- code/gazebo/branches/simpar/server/physics/ode/ODEBody.cc   2010-06-11 
14:22:25 UTC (rev 8760)
+++ code/gazebo/branches/simpar/server/physics/ode/ODEBody.cc   2010-06-11 
18:12:50 UTC (rev 8761)
@@ -114,6 +114,9 @@
 
   pp.Correct();
 
+  if ( isnan(pp.pos.x) || isnan(pp.pos.y) || isnan(pp.pos.z) )
+printf(NAN!!!\n);
+
   self-SetWorldPose(pp, false);
 }
 

Modified: code/gazebo/branches/simpar/worlds/3stacks.world
===
--- code/gazebo/branches/simpar/worlds/3stacks.world2010-06-11 14:22:25 UTC 
(rev 8760)
+++ code/gazebo/branches/simpar/worlds/3stacks.world2010-06-11 18:12:50 UTC 
(rev 8761)
@@ -15,14 +15,14 @@
   verbosity5/verbosity
 
   physics:ode
-stepTime0.01/stepTime
+stepTime0.001/stepTime
 gravity0 0 -9.8/gravity
 cfm0.001/cfm
 erp0.1/erp

[Playerstage-commit] SF.net SVN: playerstage:[8762] code/gazebo/branches/simpar

2010-06-11 Thread natepak
Revision: 8762
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8762view=rev
Author:   natepak
Date: 2010-06-11 20:54:20 + (Fri, 11 Jun 2010)

Log Message:
---
Added box_stack plugin

Modified Paths:
--
code/gazebo/branches/simpar/plugins/CMakeLists.txt
code/gazebo/branches/simpar/worlds/3stacks.world

Added Paths:
---
code/gazebo/branches/simpar/plugins/box_stack.cc
code/gazebo/branches/simpar/worlds/3shortstacks.world

Modified: code/gazebo/branches/simpar/plugins/CMakeLists.txt
===
--- code/gazebo/branches/simpar/plugins/CMakeLists.txt  2010-06-11 18:12:50 UTC 
(rev 8761)
+++ code/gazebo/branches/simpar/plugins/CMakeLists.txt  2010-06-11 20:54:20 UTC 
(rev 8762)
@@ -20,6 +20,7 @@
  pioneer_gripper
  ball_drop
  box_push
+ box_stack
  )
 
 

Added: code/gazebo/branches/simpar/plugins/box_stack.cc
===
--- code/gazebo/branches/simpar/plugins/box_stack.cc
(rev 0)
+++ code/gazebo/branches/simpar/plugins/box_stack.cc2010-06-11 20:54:20 UTC 
(rev 8762)
@@ -0,0 +1,158 @@
+#include boost/bind.hpp
+
+#include gazebo/gazeboserver.hh
+
+#define LOG true
+
+namespace gazebo
+{
+
+  class BoxStack : public Handler
+  {
+public: BoxStack() : Handler() 
+{
+  this-box = NULL;
+
+  //for (double i=0.001; i  1e-5; i*=0.5) 
+//this-stepTimes.push_back(i);
+  this-stepTimes.push_back(0.001);
+
+  //for (unsigned int i=10; i=100; i+=10)
+  this-stepIters.push_back(100);
+
+  this-stepTypes.push_back(world);
+  this-stepTypes.push_back(quick);
+  //this-stepTypes.push_back(robust);
+
+  this-stepTypesIter = this-stepTypes.begin();
+  this-stepTimesIter = this-stepTimes.begin();
+  this-stepItersIter = this-stepIters.begin();
+
+  this-path = std::string(/home/nate/work/simpar/data/box_stack/);
+  system( (std::string(mkdir -p ) + this-path).c_str() );
+
+  if (LOG)
+  {
+this-indexFile = fopen(std::string(this-path + index.txt).c_str(), 
w);
+fprintf(this-indexFile, # index step_type step_time 
step_iterations\n);
+  }
+}
+
+public: ~BoxStack()
+{
+  if (LOG)
+fclose(this-indexFile);
+
+  World::Instance()-DisconnectWorldUpdateStartSignal(
+  boost::bind(BoxStack::UpdateCB, this));
+}
+
+public: void Load()
+{
+  this-box = (Model*)World::Instance()-GetEntityByName(board);
+  this-physics = World::Instance()-GetPhysicsEngine();
+  this-count = 0;
+
+  World::Instance()-ConnectWorldUpdateStartSignal(
+boost::bind(BoxStack::UpdateCB, this));
+
+  if (this-box)
+  {
+this-prevTime = Simulator::Instance()-GetSimTime();
+
+if (LOG)
+  Logger::Instance()-AddLog(board,/tmp/board.log);
+
+World::Instance()-ConnectWorldUpdateStartSignal(
+boost::bind(BoxStack::UpdateCB, this));
+
+this-physics-SetStepType( *this-stepTypesIter );
+this-physics-SetStepTime( *this-stepTimesIter );
+this-physics-SetSORPGSIters( *this-stepItersIter );
+
+std::cout  Type[  *this-stepTypesIter  ]  
+   Time[  *this-stepTimesIter  ] 
+   Iters[  *this-stepItersIter  ]\n;
+  }
+  Simulator::Instance()-SetPaused(false);
+}
+
+public: void UpdateCB()
+{
+  if (Simulator::Instance()-GetSimTime() - this-prevTime  20.0)
+this-UpdateJob();
+}
+
+public: void UpdateJob()
+{
+  if (LOG)
+  {
+Logger::Instance()-RemoveLog(board);
+
+std::string mv_cmd = std::string(mv /tmp/board.log ) + this-path + 
+  box_stack_ + boost::lexical_caststd::string(this-count) + 
+  .data;
+
+fprintf(this-indexFile,%d %s %f %d\n,this-count, 
+(*this-stepTypesIter).c_str(), *this-stepTimesIter, 
+*this-stepItersIter);
+
+system(mv_cmd.c_str());
+  }
+
+  this-stepItersIter++;
+  if (this-stepItersIter == this-stepIters.end())
+  {
+this-stepItersIter = this-stepIters.begin();
+this-stepTimesIter++;
+if (this-stepTimesIter == this-stepTimes.end())
+{
+  this-stepTimesIter = this-stepTimes.begin();
+  this-stepTypesIter++;
+  if (this-stepTypesIter == this-stepTypes.end())
+  {
+Simulator::Instance()-SetUserQuit();
+Simulator::Instance()-RemoveHandler(this-name);
+return;
+  }
+}
+  }
+
+  this-physics-SetStepType( *this-stepTypesIter );
+  this-physics-SetStepTime( *this-stepTimesIter );
+  this-physics-SetSORPGSIters( *this-stepItersIter );
+
+  World::Instance()-Reset();
+
+  this-count++;
+  std::cout  Type[  *this-stepTypesIter

[Playerstage-commit] SF.net SVN: playerstage:[8755] code/gazebo/branches/simpar/Media/models/ pr2_gripper

2010-06-09 Thread natepak
Revision: 8755
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8755view=rev
Author:   natepak
Date: 2010-06-09 15:26:38 + (Wed, 09 Jun 2010)

Log Message:
---
Added a pr2 gripper model

Added Paths:
---
code/gazebo/branches/simpar/Media/models/pr2_gripper/CMakeLists.txt

code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_H_Color_100430.tif
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_H_UV_100430.dae

code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_H_UV_100430.dae

code/gazebo/branches/simpar/Media/models/pr2_gripper/fingertip_H_Color_100430.tif

code/gazebo/branches/simpar/Media/models/pr2_gripper/float_H_Color_100430.tif
code/gazebo/branches/simpar/Media/models/pr2_gripper/float_H_UV_100430.dae
code/gazebo/branches/simpar/Media/models/pr2_gripper/gripper_palm.dae
code/gazebo/branches/simpar/Media/models/pr2_gripper/gripper_palm_color.tif

code/gazebo/branches/simpar/Media/models/pr2_gripper/gripper_palm_normals.tif
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger.dae
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger_color.tif
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger_normals.tif
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger_tip.dae
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger_tip_color.tif

code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger_tip_normals.tif
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_float.dae
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_float_color.tif
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_float_normals.tif
code/gazebo/branches/simpar/Media/models/pr2_gripper/palm_H_Color_100430.tif
code/gazebo/branches/simpar/Media/models/pr2_gripper/palm_H_UV_100430.dae

Removed Paths:
-
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_l.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_pad2_l.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_pad2_r.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_r.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/gripper_palm.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger_tip.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_floating.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/upper_finger_l.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/upper_finger_r.stl

Added: code/gazebo/branches/simpar/Media/models/pr2_gripper/CMakeLists.txt
===
--- code/gazebo/branches/simpar/Media/models/pr2_gripper/CMakeLists.txt 
(rev 0)
+++ code/gazebo/branches/simpar/Media/models/pr2_gripper/CMakeLists.txt 
2010-06-09 15:26:38 UTC (rev 8755)
@@ -0,0 +1,26 @@
+SET (files 
+  finger_H_UV_100430.dae
+  finger_tip_H_UV_100430.dae
+  float_H_UV_100430.dae
+  gripper_palm.dae
+  l_finger.dae
+  l_finger_tip.dae
+  l_float.dae
+  palm_H_UV_100430.dae
+  finger_H_Color_100430.tif
+  fingertip_H_Color_100430.tif
+  float_H_Color_100430.tif
+  gripper_palm_color.tif
+  gripper_palm_normals.tif
+  l_finger_color.tif
+  l_finger_normals.tif
+  l_finger_tip_color.tif
+  l_finger_tip_normals.tif
+  l_float_color.tif
+  l_float_normals.tif
+  palm_H_Color_100430.tif
+)
+
+INSTALL(FILES ${files} DESTINATION 
${CMAKE_INSTALL_PREFIX}/share/gazebo/Media/models/pr2_gripper)
+
+

Added: 
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_H_Color_100430.tif
===
(Binary files differ)


Property changes on: 
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_H_Color_100430.tif
___
Added: svn:mime-type
   + application/octet-stream

Added: 
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_H_UV_100430.dae
===
--- code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_H_UV_100430.dae 
(rev 0)
+++ code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_H_UV_100430.dae 
2010-06-09 15:26:38 UTC (rev 8755)
@@ -0,0 +1,159 @@
+?xml version=1.0 encoding=utf-8?
+COLLADA xmlns=http://www.collada.org/2005/11/COLLADASchema; version=1.4.1
+  asset
+contributor
+  authorWakiMudi/author
+  authoring_toolOpenCOLLADA2009 x64/authoring_tool
+  comments
+   ColladaMaya export options: 
+   
bakeTransforms=0;relativePaths=0;copyTextures=0;exportTriangles=0;exportCgfxFileReferences=1;
+   
isSampling=0;curveConstrainSampling=0;removeStaticCurves=1;exportPolygonMeshes=1;exportLights=1

[Playerstage-commit] SF.net SVN: playerstage:[8756] code/gazebo/branches/simpar

2010-06-09 Thread natepak
Revision: 8756
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8756view=rev
Author:   natepak
Date: 2010-06-09 15:28:40 + (Wed, 09 Jun 2010)

Log Message:
---
Update the pioneer2 gripper and added more plugins

Modified Paths:
--
code/gazebo/branches/simpar/Media/materials/scripts/Gazebo.material
code/gazebo/branches/simpar/plugins/CMakeLists.txt
code/gazebo/branches/simpar/plugins/pioneer_circle.cc
code/gazebo/branches/simpar/plugins/pioneer_line.cc
code/gazebo/branches/simpar/server/physics/Joint.cc
code/gazebo/branches/simpar/server/physics/ode/ODEJoint.cc
code/gazebo/branches/simpar/server/rendering/OgreVisual.cc
code/gazebo/branches/simpar/worlds/empty.world
code/gazebo/branches/simpar/worlds/models/pioneer2gripper.model
code/gazebo/branches/simpar/worlds/pioneer2dx_gripper.world

Added Paths:
---
code/gazebo/branches/simpar/plugins/ball_drop.cc
code/gazebo/branches/simpar/plugins/pioneer_gripper.cc

Modified: code/gazebo/branches/simpar/Media/materials/scripts/Gazebo.material
===
--- code/gazebo/branches/simpar/Media/materials/scripts/Gazebo.material 
2010-06-09 15:26:38 UTC (rev 8755)
+++ code/gazebo/branches/simpar/Media/materials/scripts/Gazebo.material 
2010-06-09 15:28:40 UTC (rev 8756)
@@ -103,8 +103,6 @@
{
ambient 0.00 0.00 0.00 1.00
diffuse 0.00 0.00 0.00 1.00
-   specular 0.00 0.00 0.00 1.00 
-   emissive 0.00 0.00 0.00 0.00
   lighting on
   shading phong
}

Modified: code/gazebo/branches/simpar/plugins/CMakeLists.txt
===
--- code/gazebo/branches/simpar/plugins/CMakeLists.txt  2010-06-09 15:26:38 UTC 
(rev 8755)
+++ code/gazebo/branches/simpar/plugins/CMakeLists.txt  2010-06-09 15:28:40 UTC 
(rev 8756)
@@ -16,7 +16,10 @@
 endif (PKG_CONFIG_FOUND)
 
 set (plugins pioneer_line 
- pioneer_circle)
+ pioneer_circle
+ pioneer_gripper
+ ball_drop
+ )
 
 
 foreach (src ${plugins})

Added: code/gazebo/branches/simpar/plugins/ball_drop.cc
===
--- code/gazebo/branches/simpar/plugins/ball_drop.cc
(rev 0)
+++ code/gazebo/branches/simpar/plugins/ball_drop.cc2010-06-09 15:28:40 UTC 
(rev 8756)
@@ -0,0 +1,225 @@
+#include boost/bind.hpp
+
+#include gazebo/gazeboserver.hh
+
+#define LOG true
+
+namespace gazebo
+{
+
+  class BallDrop : public Handler
+  {
+public: BallDrop() : Handler() 
+{
+  this-sphere = NULL;
+  this-model_name = sphere;
+  //this-SpawnBall(0,0,5);
+
+  for (double i=0.001; i  1e-5; i*=0.5) 
+this-stepTimes.push_back(i);
+
+  for (unsigned int i=10; i=100; i+=10)
+this-stepIters.push_back(i);
+
+  this-stepTypes.push_back(robust);
+  this-stepTypes.push_back(world);
+  this-stepTypes.push_back(quick);
+
+  this-stepTypesIter = this-stepTypes.begin();
+  this-stepTimesIter = this-stepTimes.begin();
+  this-stepItersIter = this-stepIters.begin();
+
+  this-path = std::string(/home/nate/work/simpar/data/ball_drop/);
+  system( (std::string(mkdir -p ) + this-path).c_str() );
+
+  if (LOG)
+  {
+this-indexFile = fopen(std::string(this-path + index.txt).c_str(), 
w);
+fprintf(this-indexFile, # index step_type step_time 
step_iterations\n);
+  }
+}
+
+public: ~BallDrop()
+{
+  if (LOG)
+fclose(this-indexFile);
+
+  World::Instance()-DisconnectWorldUpdateStartSignal(
+  boost::bind(BallDrop::UpdateCB, this));
+
+  /*for (unsigned int i=0; i  this-sphere-GetChildCount(); i++)
+  {
+Body *body = dynamic_castBody*(this-sphere-GetChild(i));
+if (body)
+{
+  body-SetForce(Vector3(0,0,0));
+  body-SetTorque(Vector3(0,0,0));
+  body-SetLinearVel(Vector3(0,0,0));
+  body-SetAngularVel(Vector3(0,0,0));
+}
+  }
+  this-sphere-Reset();
+  */
+}
+
+public: void SpawnBall(double x, double y, double z=1)
+{
+  std::ostringstream model;
+
+  model  ?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: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-commit] SF.net SVN: playerstage:[8757] code/gazebo/branches/simpar/worlds

2010-06-09 Thread natepak
Revision: 8757
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8757view=rev
Author:   natepak
Date: 2010-06-09 15:50:46 + (Wed, 09 Jun 2010)

Log Message:
---
Updated the pioneer2 gripper

Modified Paths:
--
code/gazebo/branches/simpar/worlds/models/pioneer2gripper.model
code/gazebo/branches/simpar/worlds/pioneer2dx_gripper.world

Modified: code/gazebo/branches/simpar/worlds/models/pioneer2gripper.model
===
--- code/gazebo/branches/simpar/worlds/models/pioneer2gripper.model 
2010-06-09 15:28:40 UTC (rev 8756)
+++ code/gazebo/branches/simpar/worlds/models/pioneer2gripper.model 
2010-06-09 15:50:46 UTC (rev 8757)
@@ -1,7 +1,7 @@
 ?xml version=1.0?
 
 !-- Generic Pioneer2dx Model --
-model:physical name=default_pioneer_model
+model:physical name=pioneer_gripper
   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; 
@@ -12,18 +12,18 @@
   
xmlns:interface=http://playerstage.sourceforge.net/gazebo/xmlschema/#interface;
 
   
 
-xyz0 0 0.0/xyz
+xyz0 0 0.065/xyz
 rpy0.0 0.0 0.0/rpy
 
 canonicalBodygripper_base_body/canonicalBody
 
 body:box name=gripper_base_body
-  xyz0.0 0 0.065/xyz
+  xyz0.0 0 0.0/xyz
 
   geom:box name=gripper_base_geom
 xyz0 0 0/xyz
 size0.053 0.123 0.130/size
-mass0.1/mass
+mass10.1/mass
 
 visual
   size0.053 0.123 0.130/size
@@ -89,7 +89,7 @@
   --
 /body:box
 
-joint:hinge name=fixed
+!--joint:hinge name=fixed
   body1gripper_base_body/body1
   body2world/body2
   anchorgripper_base_body/anchor
@@ -100,6 +100,7 @@
   erp0.4/erp
   cfm0.01/cfm
 /joint:hinge
+--
 
 
 joint:slider name=lift_slider_joint

Modified: code/gazebo/branches/simpar/worlds/pioneer2dx_gripper.world
===
--- code/gazebo/branches/simpar/worlds/pioneer2dx_gripper.world 2010-06-09 
15:28:40 UTC (rev 8756)
+++ code/gazebo/branches/simpar/worlds/pioneer2dx_gripper.world 2010-06-09 
15:50:46 UTC (rev 8757)
@@ -24,8 +24,8 @@
 cfm0.01/cfm
 erp0.2/erp
 
-stepTyperobust/stepType
-stepIters10/stepIters
+stepTypeworld/stepType
+stepIters100/stepIters
 stepW1.3/stepW
 contactMaxCorrectingVel100.0/contactMaxCorrectingVel
 contactSurfaceLayer0.00/contactSurfaceLayer
@@ -59,34 +59,117 @@
 /body:plane
   /model:physical
 
-  !--model:physical name=pioneer2dx_model1
-xyz0 0 0.148/xyz
+  model:physical name=pioneer_gripper
+xyz0 0 0.065/xyz
 rpy0.0 0.0 0.0/rpy
+  
+body:box name=gripper_base_body
+  xyz0.0 0 0.0/xyz
+  geom:box name=gripper_base_geom
+xyz0 0 0/xyz
+size0.053 0.123 0.130/size
+mass10.1/mass
+visual
+  size0.053 0.123 0.130/size
+  meshunit_box/mesh
+  materialGazebo/Black/material
+/visual
+  /geom:box
+/body:box
+
+body:box name=lift_body
+   xyz0.061 0 0/xyz
+  geom:box name=lift_geom
+xyz0 0 0/xyz
+size0.069 0.313 0.063/size
+mass0.1/mass
+visual
+  size0.069 0.313 0.063/size
+  meshunit_box/mesh
+  materialGazebo/Black/material
+/visual
+  /geom:box
+/body:box
+
+body:box name=left_paddle_body
+  xyz0.145 0.0135 0/xyz
+  geom:box name=left_paddle_geom
+xyz0 0 0/xyz
+size0.095 0.025 0.039/size
+mass0.1/mass
+visual
+  size0.095 0.025 0.039/size
+  meshunit_box/mesh
+  materialGazebo/Blue/material
+/visual
+  /geom:box
+/body:box
+
+body:box name=right_paddle_body
+  xyz0.145 -0.0135 0/xyz
+  geom:box name=right_paddle_geom
+xyz0 0 0/xyz
+size0.095 0.025 0.039/size
+mass0.1/mass
+
+visual
+  size0.095 0.025 0.039/size
+  meshunit_box/mesh
+  materialGazebo/Red/material
+/visual
+  /geom:box
+/body:box
+
+!--joint:hinge name=fixed
+  body1gripper_base_body/body1
+  body2world/body2
+  anchorgripper_base_body/anchor
+  anchorOffset0 0 -0.130/anchorOffset
+  axis0 0 1/axis
+  lowStop0/lowStop
+  highStop0/highStop
+  erp0.4/erp
+  cfm0.01/cfm
+/joint:hinge
 --
+
+
+joint:slider name=lift_slider_joint
+  body1gripper_base_body/body1
+  body2lift_body/body2
+  anchorgripper_base_body/anchor
+  axis0 0 1/axis
+  lowStop-0.1/lowStop
+  highStop0.1/highStop
+  erp0.3/erp
+  cfm10e-5/cfm
+/joint:slider
+
+joint:slider name=left_paddle_joint
+  body1lift_body/body1
+  body2left_paddle_body/body2
+  anchorlift_body/anchor
+  anchorOffset0.085 0 0 /anchorOffset
+  axis0 1 0/axis
+  lowStop-0.12/lowStop

[Playerstage-commit] SF.net SVN: playerstage:[8758] code/gazebo/branches/simpar

2010-06-09 Thread natepak
Revision: 8758
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8758view=rev
Author:   natepak
Date: 2010-06-10 00:29:44 + (Thu, 10 Jun 2010)

Log Message:
---
Updates

Modified Paths:
--
code/gazebo/branches/simpar/plugins/pioneer_gripper.cc
code/gazebo/branches/simpar/worlds/pioneer2dx_gripper.world

Modified: code/gazebo/branches/simpar/plugins/pioneer_gripper.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_gripper.cc  2010-06-09 
15:50:46 UTC (rev 8757)
+++ code/gazebo/branches/simpar/plugins/pioneer_gripper.cc  2010-06-10 
00:29:44 UTC (rev 8758)
@@ -79,15 +79,19 @@
 this-physics = World::Instance()-GetPhysicsEngine();
 
 if (LOG)
-  Logger::Instance()-AddLog(pioneer,/tmp/pioneer.log);
+{
+  
Logger::Instance()-AddLog(pioneer_gripper::left_paddle_body,/tmp/pioneer_left.log);
+  
Logger::Instance()-AddLog(pioneer_gripper::right_paddle_body,/tmp/pioneer_right.log);
+  Logger::Instance()-AddLog(custom_box,/tmp/box.log);
+}
 
 /*this-physics-SetStepTime( *this-stepTimesIter );
 this-physics-SetStepType( *this-stepTypesIter );
 this-physics-SetSORPGSIters( *this-stepItersIter );
-*/
 std::cout  Type[  *this-stepTypesIter  ]  
Time[  *this-stepTimesIter  ] 
Iters[  *this-stepItersIter  ]\n;
+*/
   }
   else
 std::cerr  Unable to find model[  model_name  ]\n;
@@ -96,59 +100,33 @@
   this-rightForce = 0;
 }
 
-public: void SpawnBox(double x, double y, double z=1)
+public: void Open()
 {
-  std::ostringstream model;
+  Vector3 leftVel = this-leftPaddle-GetWorldLinearVel();
+  Vector3 rightVel = this-rightPaddle-GetWorldLinearVel();
 
-  model  ?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: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' 
;
-
-  model  model:physical name='custom_box';
-  modelxyz  x y z  /xyz;
-  modelrpy0 0 0/rpy;
-  modelbody:box name='body';
-  model  geom:box name='geom';
-  modelsize0.1 0.10 0.2/size;
-  modelmass0.01/mass;
-  modelkp1.0/kp;
-  modelkd1.0/kd;
-  modelbounce0/bounce;
-  modelbounceVel10/bounceVel;
-  modelslip10.01/slip1;
-  modelslip20.01/slip2;
-  modelvisual;
-  model  size0.1 0.1 0.2/size;
-  model  meshunit_box/mesh;
-  model  materialGazebo/Rocky/material;
-  model/visual;
-  model  /geom:box;
-  model/body:box;
-  model  /model:physical;
-
-  model  /gazebo:world;
-
-  World::Instance()-InsertEntity( model.str() );
-
-  this-spawned = true;
+  this-leftForce = (0.08 - leftVel.y) * 0.5;
+  this-rightForce = (-0.08 - rightVel.y) * 0.5;
 }
 
-public: void Open()
+public: void Close()
 {
-  std::cout  Open ;
-  this-leftForce = 0.01;
-  this-rightForce = -0.01;
+  Vector3 leftVel = this-leftPaddle-GetWorldLinearVel();
+  Vector3 rightVel = this-rightPaddle-GetWorldLinearVel();
+
+  this-leftForce = (-0.08 - leftVel.y) * 0.5;
+  this-rightForce = (0.08 - rightVel.y) * 0.5;
 }
 
-public: void Close()
+public: void Grip()
 {
-  std::cout  Close ;
-  this-leftForce = -1.00;
-  this-rightForce = 1.00;
+  this-leftForce = -10.0;
+  this-rightForce = 10.0;
 }
 
 public: void Lift()
 {
-  std::cout  Lift ;
-  this-liftBody-SetForce(Vector3(0,0,5.0));
+  this-liftBody-SetForce(Vector3(0,0,10.0));
 }
 
 public: bool IsOpen()
@@ -161,11 +139,8 @@
 {
   double diff = this-leftPaddle-GetWorldPose().pos.y - 
 this-rightPaddle-GetWorldPose().pos.y;
-  std::cout  DIFF[  diff  ]\n;
 
   return fabs(diff)  0.130;
-  //return this-leftPaddle-GetWorldPose().pos.y = 0.07 
- //this-rightPaddle-GetWorldPose().pos.y = -0.07;
 }
 
 public

[Playerstage-commit] SF.net SVN: playerstage:[8752] code/gazebo/branches/simpar

2010-06-07 Thread natepak
Revision: 8752
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8752view=rev
Author:   natepak
Date: 2010-06-07 18:08:53 + (Mon, 07 Jun 2010)

Log Message:
---
Fixed a problem with the bullet compilation

Modified Paths:
--
code/gazebo/branches/simpar/plugins/pioneer_circle.cc
code/gazebo/branches/simpar/plugins/pioneer_line.cc
code/gazebo/branches/simpar/server/physics/bullet/BulletMotionState.cc
code/gazebo/branches/simpar/server/physics/bullet/BulletMotionState.hh
code/gazebo/branches/simpar/worlds/pioneer2dx.world

Modified: code/gazebo/branches/simpar/plugins/pioneer_circle.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-06-06 
12:49:34 UTC (rev 8751)
+++ code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-06-07 
18:08:53 UTC (rev 8752)
@@ -2,6 +2,8 @@
 
 #include gazebo/gazeboserver.hh
 
+#define LOG false
+
 namespace gazebo
 {
 
@@ -15,9 +17,9 @@
   for (unsigned int i=10; i=100; i+=10)
 this-stepIters.push_back(i);
 
+  this-stepTypes.push_back(robust);
   this-stepTypes.push_back(world);
   this-stepTypes.push_back(quick);
-  //this-stepTypes.push_back(robust);
 
   this-stepTypesIter = this-stepTypes.begin();
   this-stepTimesIter = this-stepTimes.begin();
@@ -28,13 +30,17 @@
 
   this-circleCount = 4;
 
-  this-indexFile = fopen(std::string(this-path + index.txt).c_str(), 
w);
-  fprintf(this-indexFile, # index step_type step_time 
step_iterations\n);
+  if (LOG)
+  {
+this-indexFile = fopen(std::string(this-path + index.txt).c_str(), 
w);
+fprintf(this-indexFile, # index step_type step_time 
step_iterations\n);
+  }
 }
 
 public: ~PioneerCircle()
 {
-  fclose(this-indexFile);
+  if (LOG)
+fclose(this-indexFile);
 
   World::Instance()-DisconnectWorldUpdateStartSignal(
   boost::bind(PioneerCircle::UpdateCB, this));
@@ -70,7 +76,8 @@
 this-count = 0;
 this-circleCount = 0;
 
-Logger::Instance()-AddLog(pioneer,/tmp/pioneer.log);
+if (LOG)
+  Logger::Instance()-AddLog(pioneer,/tmp/pioneer.log);
 
 World::Instance()-ConnectWorldUpdateStartSignal(
 boost::bind(PioneerCircle::UpdateCB, this));
@@ -108,17 +115,20 @@
 
 public: void UpdateJob()
 {
-  Logger::Instance()-RemoveLog(pioneer);
+  if (LOG)
+  {
+Logger::Instance()-RemoveLog(pioneer);
 
-  std::string mv_cmd = std::string(mv /tmp/pioneer.log ) + this-path + 
-pioneer_circle_ + boost::lexical_caststd::string(this-count) + 
-.data;
+std::string mv_cmd = std::string(mv /tmp/pioneer.log ) + this-path 
+ 
+  pioneer_circle_ + boost::lexical_caststd::string(this-count) + 
+  .data;
 
-  fprintf(this-indexFile,%d %s %f %d\n,this-count, 
-  (*this-stepTypesIter).c_str(), *this-stepTimesIter, 
-  *this-stepItersIter);
+fprintf(this-indexFile,%d %s %f %d\n,this-count, 
+(*this-stepTypesIter).c_str(), *this-stepTimesIter, 
+*this-stepItersIter);
 
-  system(mv_cmd.c_str());
+system(mv_cmd.c_str());
+  }
 
   this-stepItersIter++;
   if (this-stepItersIter == this-stepIters.end())
@@ -150,7 +160,9 @@
 
   this-robot-Reset();
   this-prevTime = Simulator::Instance()-GetRealTime();
-  Logger::Instance()-AddLog(pioneer,/tmp/pioneer.log);
+
+  if (LOG)
+Logger::Instance()-AddLog(pioneer,/tmp/pioneer.log);
 }
 private: std::vectorunsigned int stepIters;
 private: std::vectorunsigned int::iterator stepItersIter;

Modified: code/gazebo/branches/simpar/plugins/pioneer_line.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_line.cc 2010-06-06 12:49:34 UTC 
(rev 8751)
+++ code/gazebo/branches/simpar/plugins/pioneer_line.cc 2010-06-07 18:08:53 UTC 
(rev 8752)
@@ -2,6 +2,8 @@
 #include boost/bind.hpp
 #include gazebo/gazeboserver.hh
 
+#define LOG false
+
 namespace gazebo
 {
 
@@ -15,9 +17,9 @@
   for (unsigned int i=10; i=100; i+=10)
 this-stepIters.push_back(i);
 
+  this-stepTypes.push_back(robust);
   this-stepTypes.push_back(world);
   this-stepTypes.push_back(quick);
-  //this-stepTypes.push_back(robust);
 
   this-stepTypesIter = this-stepTypes.begin();
   this-stepTimesIter = this-stepTimes.begin();
@@ -28,13 +30,17 @@
 
   this-count = 0;
 
-  this-indexFile = fopen(std::string(this-path + index.txt).c_str(), 
w);
-  fprintf(this-indexFile, # index step_type step_time 
step_iterations\n);
+  if (LOG)
+  {
+this-indexFile = fopen(std::string(this-path + index.txt).c_str(), 
w);
+fprintf(this-indexFile, # index step_type step_time 
step_iterations\n);
+  }
 }
 
 public: ~PioneerLine

[Playerstage-commit] SF.net SVN: playerstage:[8753] code/gazebo/branches/simpar/Media/models

2010-06-07 Thread natepak
Revision: 8753
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8753view=rev
Author:   natepak
Date: 2010-06-07 20:11:53 + (Mon, 07 Jun 2010)

Log Message:
---
Added meshes for pr2_gripper

Modified Paths:
--
code/gazebo/branches/simpar/Media/models/CMakeLists.txt

Added Paths:
---
code/gazebo/branches/simpar/Media/models/pr2_gripper/
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_l.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_pad2_l.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_pad2_r.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_r.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/gripper_palm.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger_tip.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_floating.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/upper_finger_l.stl
code/gazebo/branches/simpar/Media/models/pr2_gripper/upper_finger_r.stl

Modified: code/gazebo/branches/simpar/Media/models/CMakeLists.txt
===
--- code/gazebo/branches/simpar/Media/models/CMakeLists.txt 2010-06-07 
18:08:53 UTC (rev 8752)
+++ code/gazebo/branches/simpar/Media/models/CMakeLists.txt 2010-06-07 
20:11:53 UTC (rev 8753)
@@ -6,6 +6,7 @@
 add_subdirectory(pioneer2at)
 add_subdirectory(sonyvid30)
 add_subdirectory(rovio)
+add_subdirectory(pr2_gripper)
 
 set (files column.mesh
geosphere4500.mesh

Added: code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_l.stl
===
(Binary files differ)


Property changes on: 
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_l.stl
___
Added: svn:mime-type
   + application/octet-stream

Added: 
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_pad2_l.stl
===
(Binary files differ)


Property changes on: 
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_pad2_l.stl
___
Added: svn:mime-type
   + application/octet-stream

Added: 
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_pad2_r.stl
===
(Binary files differ)


Property changes on: 
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_pad2_r.stl
___
Added: svn:mime-type
   + application/octet-stream

Added: code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_r.stl
===
(Binary files differ)


Property changes on: 
code/gazebo/branches/simpar/Media/models/pr2_gripper/finger_tip_r.stl
___
Added: svn:mime-type
   + application/octet-stream

Added: code/gazebo/branches/simpar/Media/models/pr2_gripper/gripper_palm.stl
===
(Binary files differ)


Property changes on: 
code/gazebo/branches/simpar/Media/models/pr2_gripper/gripper_palm.stl
___
Added: svn:mime-type
   + application/octet-stream

Added: code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger.stl
===
(Binary files differ)


Property changes on: 
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger.stl
___
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Added: code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger_tip.stl
===
(Binary files differ)


Property changes on: 
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_finger_tip.stl
___
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Added: code/gazebo/branches/simpar/Media/models/pr2_gripper/l_floating.stl
===
(Binary files differ)


Property changes on: 
code/gazebo/branches/simpar/Media/models/pr2_gripper/l_floating.stl
___
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Added: code/gazebo/branches/simpar/Media/models/pr2_gripper/upper_finger_l.stl
===
(Binary files differ)


Property

[Playerstage-commit] SF.net SVN: playerstage:[8751] code/gazebo/branches/simpar

2010-06-06 Thread natepak
Revision: 8751
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8751view=rev
Author:   natepak
Date: 2010-06-06 12:49:34 + (Sun, 06 Jun 2010)

Log Message:
---
Fixing the ERP values

Modified Paths:
--
code/gazebo/branches/simpar/plugins/pioneer_circle.cc
code/gazebo/branches/simpar/plugins/pioneer_line.cc
code/gazebo/branches/simpar/server/World.cc
code/gazebo/branches/simpar/server/physics/SurfaceParams.cc
code/gazebo/branches/simpar/server/physics/ode/ODEJoint.cc
code/gazebo/branches/simpar/server/physics/ode/ODEPhysics.cc

Modified: code/gazebo/branches/simpar/plugins/pioneer_circle.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-06-03 
00:34:23 UTC (rev 8750)
+++ code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-06-06 
12:49:34 UTC (rev 8751)
@@ -7,10 +7,35 @@
 
   class PioneerCircle : public Handler
   {
-public: PioneerCircle() : Handler() {}
+public: PioneerCircle() : Handler() 
+{
+  for (double i=0.001; i  1e-5; i*=0.5) 
+this-stepTimes.push_back(i);
 
+  for (unsigned int i=10; i=100; i+=10)
+this-stepIters.push_back(i);
+
+  this-stepTypes.push_back(world);
+  this-stepTypes.push_back(quick);
+  //this-stepTypes.push_back(robust);
+
+  this-stepTypesIter = this-stepTypes.begin();
+  this-stepTimesIter = this-stepTimes.begin();
+  this-stepItersIter = this-stepIters.begin();
+
+  this-path = std::string(/home/nate/work/simpar/data/pioneer_circle/);
+  system( (std::string(mkdir -p ) + this-path).c_str() );
+
+  this-circleCount = 4;
+
+  this-indexFile = fopen(std::string(this-path + index.txt).c_str(), 
w);
+  fprintf(this-indexFile, # index step_type step_time 
step_iterations\n);
+}
+
 public: ~PioneerCircle()
 {
+  fclose(this-indexFile);
+
   World::Instance()-DisconnectWorldUpdateStartSignal(
   boost::bind(PioneerCircle::UpdateCB, this));
 
@@ -25,6 +50,7 @@
   body-SetAngularVel(Vector3(0,0,0));
 }
   }
+  this-robot-Reset();
 }
 
 public: void Load()
@@ -38,8 +64,20 @@
 this-leftWheel = (Body*)this-robot-GetChild(left_wheel);
 this-rightWheel = (Body*)this-robot-GetChild(right_wheel);
 
+this-physics = World::Instance()-GetPhysicsEngine();
+
+this-prevTime = Simulator::Instance()-GetRealTime();
+this-count = 0;
+this-circleCount = 0;
+
+Logger::Instance()-AddLog(pioneer,/tmp/pioneer.log);
+
 World::Instance()-ConnectWorldUpdateStartSignal(
 boost::bind(PioneerCircle::UpdateCB, this));
+
+std::cout  Type[  *this-stepTypesIter  ]  
+   Time[  *this-stepTimesIter  ] 
+   Iters[  *this-stepItersIter  ]\n;
   }
   else
 std::cerr  Unable to find model[  model_name  ]\n;
@@ -47,16 +85,92 @@
 
 public: void UpdateCB()
 {
-  if (this-leftWheel-GetRelativeAngularVel().z  2.2) 
-this-leftWheel-SetTorque(Vector3(0.0, 0.0, 0.2));
+  Time realTime = Simulator::Instance()-GetRealTime();
+  Pose3d pose = this-robot-GetWorldPose();
 
-  if (this-rightWheel-GetRelativeAngularVel().z  2.1)
-this-rightWheel-SetTorque(Vector3(0.0, 0.0, -0.2));
+  if (this-circleCount = 1)
+  {
+if (this-leftWheel-GetRelativeAngularVel().z  2.2) 
+  this-leftWheel-SetTorque(Vector3(0.0, 0.0, 0.2));
+
+if (this-rightWheel-GetRelativeAngularVel().z  2.1)
+  this-rightWheel-SetTorque(Vector3(0.0, 0.0, -0.2));
+
+if (realTime - this-prevTime  5.0  fabs(pose.pos.x)  0.1 )
+{
+  this-prevTime = realTime;
+  this-circleCount++;
+}
+  }
+  else 
+this-UpdateJob();
 }
 
+public: void UpdateJob()
+{
+  Logger::Instance()-RemoveLog(pioneer);
+
+  std::string mv_cmd = std::string(mv /tmp/pioneer.log ) + this-path + 
+pioneer_circle_ + boost::lexical_caststd::string(this-count) + 
+.data;
+
+  fprintf(this-indexFile,%d %s %f %d\n,this-count, 
+  (*this-stepTypesIter).c_str(), *this-stepTimesIter, 
+  *this-stepItersIter);
+
+  system(mv_cmd.c_str());
+
+  this-stepItersIter++;
+  if (this-stepItersIter == this-stepIters.end())
+  {
+this-stepItersIter = this-stepIters.begin();
+this-stepTimesIter++;
+if (this-stepTimesIter == this-stepTimes.end())
+{
+  this-stepTimesIter = this-stepTimes.begin();
+  this-stepTypesIter++;
+  if (this-stepTypesIter == this-stepTypes.end())
+  {
+Simulator::Instance()-RemoveHandler(this-name);
+return;
+  }
+}
+  }
+
+  this-physics-SetStepType( *this-stepTypesIter );
+  this-physics-SetStepTime( *this-stepTimesIter );
+  this-physics

[Playerstage-commit] SF.net SVN: playerstage:[8748] code/gazebo/branches/simpar/plugins

2010-06-02 Thread natepak
Revision: 8748
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8748view=rev
Author:   natepak
Date: 2010-06-02 14:59:12 + (Wed, 02 Jun 2010)

Log Message:
---
Update to the plugins

Modified Paths:
--
code/gazebo/branches/simpar/plugins/pioneer_circle.cc
code/gazebo/branches/simpar/plugins/pioneer_spiral.cc
code/gazebo/branches/simpar/plugins/pioneer_spiral.hh

Modified: code/gazebo/branches/simpar/plugins/pioneer_circle.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-06-02 
07:04:20 UTC (rev 8747)
+++ code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-06-02 
14:59:12 UTC (rev 8748)
@@ -1,10 +1,10 @@
 #include boost/bind.hpp
+
 #include gazebo/gazeboserver.hh
 
 namespace gazebo
 {
 
-
   class PioneerCircle : public Handler
   {
 public: PioneerCircle() : Handler() {}
@@ -29,7 +29,6 @@
 
 public: void Load()
 {
-
   std::string model_name = pioneer;
   this-robot = (Model*)World::Instance()-GetEntityByName(model_name);
 
@@ -48,24 +47,16 @@
 
 public: void UpdateCB()
 {
-  if (this-leftWheel-GetAngularVel().z  4.2) 
-  {
+  if (this-leftWheel-GetRelativeAngularVel().z  2.2) 
 this-leftWheel-SetTorque(Vector3(0.0, 0.0, 0.2));
-  }
 
-  if (this-rightWheel-GetAngularVel().z  4.0)
+  if (this-rightWheel-GetRelativeAngularVel().z  2.1)
 this-rightWheel-SetTorque(Vector3(0.0, 0.0, -0.2));
-
-//this-rightWheel-SetTorque(Vector3(0.0, 0.0, 0.01));
-//this-rightWheel-SetTorque(Vector3(0.0, 0.0, 0));
-//this-leftWheel-SetAngularVel(Vector3(0.0, 0.3, 0));
-//this-rightWheel-SetAngularVel(Vector3(0.0, 0.1, 0));
 }
 
 private: Model *robot;
 private: Body *leftWheel;
 private: Body *rightWheel;
-
   };
 
   GZ_REGISTER_HANDLER(PioneerCircle, PioneerCircle)

Modified: code/gazebo/branches/simpar/plugins/pioneer_spiral.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_spiral.cc   2010-06-02 
07:04:20 UTC (rev 8747)
+++ code/gazebo/branches/simpar/plugins/pioneer_spiral.cc   2010-06-02 
14:59:12 UTC (rev 8748)
@@ -1,3 +1,4 @@
+#include stdlib.h
 #include boost/bind.hpp
 #include pioneer_spiral.hh
 
@@ -7,10 +8,33 @@
 
 PioneerSpiral::PioneerSpiral() : Handler()
 {
+  for (double i=0.001; i  1e-5; i*=0.5) 
+this-stepTimes.push_back(i);
+
+  for (unsigned int i=10; i=100; i+=10)
+this-stepIters.push_back(i);
+
+  this-stepTypes.push_back(world);
+  this-stepTypes.push_back(quick);
+  //this-stepTypes.push_back(robust);
+
+  this-stepTypesIter = this-stepTypes.begin();
+  this-stepTimesIter = this-stepTimes.begin();
+  this-stepItersIter = this-stepIters.begin();
+
+  this-path = std::string(/home/nate/work/simpar/data/pioneer_spiral/);
+  system( (std::string(mkdir -p ) + this-path).c_str() );
+
+  this-count = 0;
+
+  this-indexFile = fopen(std::string(this-path + index.txt).c_str(), w);
+  fprintf(this-indexFile, # index step_type step_time step_iterations\n);
 }
 
 PioneerSpiral::~PioneerSpiral()
 {
+  fclose(this-indexFile);
+
   World::Instance()-DisconnectWorldUpdateStartSignal(
   boost::bind(PioneerSpiral::UpdateCB, this));
 
@@ -29,32 +53,32 @@
 
 void PioneerSpiral::Load()
 {
-
   std::string model_name = pioneer;
   this-robot = (Model*)World::Instance()-GetEntityByName(model_name);
 
+
   if (this-robot)
   {
+
 this-robot-GetVisualNode()-SetRibbonTrail(true);
 this-leftWheel = (Body*)this-robot-GetChild(left_wheel);
 this-rightWheel = (Body*)this-robot-GetChild(right_wheel);
 
-Geom *leftWheelGeom = this-leftWheel-GetGeom(left_wheel_geom);
-Geom *rightWheelGeom = this-rightWheel-GetGeom(right_wheel_geom);
+World::Instance()-ConnectWorldUpdateStartSignal(
+boost::bind(PioneerSpiral::UpdateCB, this));
 
-/*leftWheelGeom-SetContactsEnabled(true);
-rightWheelGeom-SetContactsEnabled(true);
+this-prevTime = Simulator::Instance()-GetRealTime();
 
-leftWheelGeom-ConnectContactCallback(
-boost::bind(PioneerSpiral::LeftContactCB, this, _1));
-rightWheelGeom-ConnectContactCallback(
-boost::bind(PioneerSpiral::RightContactCB, this, _1));
-*/
+this-physics = World::Instance()-GetPhysicsEngine();
 
-World::Instance()-ConnectWorldUpdateStartSignal(
-boost::bind(PioneerSpiral::UpdateCB, this));
+Logger::Instance()-AddLog(pioneer);
 
-this-prevTime = Simulator::Instance()-GetRealTime();
+this-physics-SetStepTime( *this-stepTimesIter );
+this-physics-SetStepType( *this-stepTypesIter );
+this-physics-SetSORPGSIters( *this-stepItersIter );
+std::cout  Type[  *this-stepTypesIter  ]  
+   Time[  *this-stepTimesIter  ] 
+   Iters[  *this-stepItersIter  ]\n;
   }
   else
 std::cerr  Unable to find model[  model_name  ]\n

[Playerstage-commit] SF.net SVN: playerstage:[8750] code/gazebo/branches/simpar

2010-06-02 Thread natepak
Revision: 8750
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8750view=rev
Author:   natepak
Date: 2010-06-03 00:34:23 + (Thu, 03 Jun 2010)

Log Message:
---
Updates

Modified Paths:
--
code/gazebo/branches/simpar/benchmarks/box_drop_benchmark.cc
code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc
code/gazebo/branches/simpar/benchmarks/pioneer_spiral_benchmark.cc
code/gazebo/branches/simpar/benchmarks/table_benchmark.cc
code/gazebo/branches/simpar/libgazebo/SimIface.cc
code/gazebo/branches/simpar/libgazebo/gz.h
code/gazebo/branches/simpar/plugins/CMakeLists.txt
code/gazebo/branches/simpar/server/GazeboMessage.hh
code/gazebo/branches/simpar/server/Logger.cc
code/gazebo/branches/simpar/server/Logger.hh
code/gazebo/branches/simpar/server/World.cc
code/gazebo/branches/simpar/server/physics/Joint.cc
code/gazebo/branches/simpar/server/physics/SurfaceParams.cc
code/gazebo/branches/simpar/worlds/models/pioneer2dx.model
code/gazebo/branches/simpar/worlds/pioneer2dx.world
code/gazebo/branches/simpar/worlds/simpleshapes.world

Added Paths:
---
code/gazebo/branches/simpar/plugins/pioneer_line.cc

Removed Paths:
-
code/gazebo/branches/simpar/plugins/pioneer_spiral.cc
code/gazebo/branches/simpar/plugins/pioneer_spiral.hh

Modified: code/gazebo/branches/simpar/benchmarks/box_drop_benchmark.cc
===
--- code/gazebo/branches/simpar/benchmarks/box_drop_benchmark.cc
2010-06-02 15:00:16 UTC (rev 8749)
+++ code/gazebo/branches/simpar/benchmarks/box_drop_benchmark.cc
2010-06-03 00:34:23 UTC (rev 8750)
@@ -66,7 +66,7 @@
 
 void RunSim()
 {
-  simIface-StartLogEntity(box);
+  simIface-StartLogEntity(box, /tmp/box.log);
   simIface-Unpause();
   /*libgazebo::Vec3 linearVel, angularVel, linearAccel, angularAccel;
   libgazebo::Pose modelPose;

Modified: code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc
===
--- code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc  
2010-06-02 15:00:16 UTC (rev 8749)
+++ code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc  
2010-06-03 00:34:23 UTC (rev 8750)
@@ -173,7 +173,7 @@
 
 void RunSim(double stepTime)
 {
-  simIface-StartLogEntity(pioneer);
+  simIface-StartLogEntity(pioneer, /tmp/pioneer.log);
   simIface-Unpause();
 
   double angle = 10;

Modified: code/gazebo/branches/simpar/benchmarks/pioneer_spiral_benchmark.cc
===
--- code/gazebo/branches/simpar/benchmarks/pioneer_spiral_benchmark.cc  
2010-06-02 15:00:16 UTC (rev 8749)
+++ code/gazebo/branches/simpar/benchmarks/pioneer_spiral_benchmark.cc  
2010-06-03 00:34:23 UTC (rev 8750)
@@ -170,7 +170,7 @@
 
 void RunSim()
 {
-  simIface-StartLogEntity(pioneer);
+  simIface-StartLogEntity(pioneer, /tmp/pioneer.log);
   simIface-Unpause();
 
   libgazebo::Pose pose;

Modified: code/gazebo/branches/simpar/benchmarks/table_benchmark.cc
===
--- code/gazebo/branches/simpar/benchmarks/table_benchmark.cc   2010-06-02 
15:00:16 UTC (rev 8749)
+++ code/gazebo/branches/simpar/benchmarks/table_benchmark.cc   2010-06-03 
00:34:23 UTC (rev 8750)
@@ -190,8 +190,8 @@
   usleep(10);
   spawn_box(0, 0, prev_z);
   usleep(100);
-  simIface-StartLogEntity(box);
-  simIface-StartLogEntity(table);
+  simIface-StartLogEntity(box,/tmp/box.log);
+  simIface-StartLogEntity(table,/tmp/table.log);
   simIface-Unpause();
 
   libgazebo::Vec3 linearVel, angularVel, linearAccel, angularAccel;

Modified: code/gazebo/branches/simpar/libgazebo/SimIface.cc
===
--- code/gazebo/branches/simpar/libgazebo/SimIface.cc   2010-06-02 15:00:16 UTC 
(rev 8749)
+++ code/gazebo/branches/simpar/libgazebo/SimIface.cc   2010-06-03 00:34:23 UTC 
(rev 8750)
@@ -898,7 +898,8 @@
 
 

 /// Start logging entity information
-void SimulationIface::StartLogEntity(const std::string entityName)
+void SimulationIface::StartLogEntity(const std::string entityName,
+ const std::string filename)
 {
   this-Lock(1);
 
@@ -912,6 +913,10 @@
   strncpy(request-name, entityName.c_str(), 512);
   request-name[511] = '\0';
 
+  memset(request-strValue, 0, 512);
+  strncpy(request-strValue, filename.c_str(), 512);
+  request-strValue[511] = '\0';
+
   this-Unlock();
 }
 

Modified: code/gazebo/branches/simpar/libgazebo/gz.h
===
--- code/gazebo/branches/simpar/libgazebo/gz.h  2010-06-02 15:00:16 UTC (rev 
8749)
+++ code/gazebo/branches/simpar/libgazebo/gz.h  2010-06-03 00:34:23 UTC (rev 
8750)
@@ -670,7

[Playerstage-commit] SF.net SVN: playerstage:[8742] code/gazebo/branches/simpar

2010-06-01 Thread natepak
Revision: 8742
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8742view=rev
Author:   natepak
Date: 2010-06-01 06:22:38 + (Tue, 01 Jun 2010)

Log Message:
---
Updates

Modified Paths:
--
code/gazebo/branches/simpar/plugins/pioneer_circle.cc
code/gazebo/branches/simpar/plugins/pioneer_spiral.cc
code/gazebo/branches/simpar/plugins/pioneer_spiral.hh
code/gazebo/branches/simpar/server/physics/ode/ODEBody.cc
code/gazebo/branches/simpar/server/physics/ode/ODEPhysics.cc
code/gazebo/branches/simpar/worlds/models/pioneer2dx.model
code/gazebo/branches/simpar/worlds/pioneer2dx.world

Modified: code/gazebo/branches/simpar/plugins/pioneer_circle.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-05-31 
21:18:10 UTC (rev 8741)
+++ code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-06-01 
06:22:38 UTC (rev 8742)
@@ -14,9 +14,6 @@
   World::Instance()-DisconnectWorldUpdateStartSignal(
   boost::bind(PioneerCircle::UpdateCB, this));
 
-  World::Instance()-DisconnectWorldUpdateEndSignal(
-  boost::bind(PioneerCircle::UpdateEndCB, this));
-
   for (unsigned int i=0; i  this-robot-GetChildCount(); i++)
   {
 Body *body = dynamic_castBody*(this-robot-GetChild(i));
@@ -44,9 +41,6 @@
 
 World::Instance()-ConnectWorldUpdateStartSignal(
 boost::bind(PioneerCircle::UpdateCB, this));
-
-World::Instance()-ConnectWorldUpdateEndSignal(
-boost::bind(PioneerCircle::UpdateEndCB, this));
   }
   else
 std::cerr  Unable to find model[  model_name  ]\n;
@@ -54,13 +48,13 @@
 
 public: void UpdateCB()
 {
-  if (this-leftWheel-GetAngularVel().y  0.2) 
+  if (this-leftWheel-GetAngularVel().z  4.2) 
   {
-this-leftWheel-SetTorque(Vector3(0.0, 0.0, 0.08));
+this-leftWheel-SetTorque(Vector3(0.0, 0.0, 0.2));
   }
 
-  if (this-rightWheel-GetAngularVel().y  0.1)
-this-rightWheel-SetTorque(Vector3(0.0, 0.0, -0.08));
+  if (this-rightWheel-GetAngularVel().z  4.0)
+this-rightWheel-SetTorque(Vector3(0.0, 0.0, -0.2));
 
 //this-rightWheel-SetTorque(Vector3(0.0, 0.0, 0.01));
 //this-rightWheel-SetTorque(Vector3(0.0, 0.0, 0));
@@ -68,12 +62,6 @@
 //this-rightWheel-SetAngularVel(Vector3(0.0, 0.1, 0));
 }
 
-public: void UpdateEndCB()
-{
-  //std::cout  this-leftWheel-GetTorque()  \n;
-  //std::cout  this-rightWheel-GetAngularVel()  \n;
-}
-
 private: Model *robot;
 private: Body *leftWheel;
 private: Body *rightWheel;

Modified: code/gazebo/branches/simpar/plugins/pioneer_spiral.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_spiral.cc   2010-05-31 
21:18:10 UTC (rev 8741)
+++ code/gazebo/branches/simpar/plugins/pioneer_spiral.cc   2010-06-01 
06:22:38 UTC (rev 8742)
@@ -30,7 +30,7 @@
 void PioneerSpiral::Load()
 {
 
-  std::string model_name = pioneer2dx_model;
+  std::string model_name = pioneer;
   this-robot = (Model*)World::Instance()-GetEntityByName(model_name);
 
   if (this-robot)
@@ -42,16 +42,19 @@
 Geom *leftWheelGeom = this-leftWheel-GetGeom(left_wheel_geom);
 Geom *rightWheelGeom = this-rightWheel-GetGeom(right_wheel_geom);
 
-leftWheelGeom-SetContactsEnabled(true);
+/*leftWheelGeom-SetContactsEnabled(true);
 rightWheelGeom-SetContactsEnabled(true);
 
 leftWheelGeom-ConnectContactCallback(
 boost::bind(PioneerSpiral::LeftContactCB, this, _1));
 rightWheelGeom-ConnectContactCallback(
 boost::bind(PioneerSpiral::RightContactCB, this, _1));
+*/
 
 World::Instance()-ConnectWorldUpdateStartSignal(
 boost::bind(PioneerSpiral::UpdateCB, this));
+
+this-prevTime = Simulator::Instance()-GetRealTime();
   }
   else
 std::cerr  Unable to find model[  model_name  ]\n;
@@ -59,36 +62,35 @@
 
 void PioneerSpiral::UpdateCB()
 {
-  //std::cout  torqu[  this-leftWheel-GetAngularVel()  ]\n;
 
-  if (this-leftWheel-GetAngularVel().GetLength()  0.1) 
+  Time currTime = Simulator::Instance()-GetRealTime();
+  if (currTime - prevTime  Time(0,2)) 
   {
-printf(HERE\n);
-this-leftWheel-SetTorque(Vector3(0.0,1.0,0));
-this-rightWheel-SetTorque(Vector3(0.0,0.5,0));
+this-leftWheel-SetTorque(Vector3(0.0,0.0,.01));
+this-rightWheel-SetTorque(Vector3(0.0,0.0,.01));
   }
+
 }
 
-void PioneerSpiral::LeftContactCB(const Contact contact)
+/*void PioneerSpiral::LeftContactCB(const Contact contact)
 {
-  /*std::cout  Left contact\n;
+  std::cout  Left contact\n;
   for (unsigned int i=0; i  contact.positions.size(); i++)
   {
 std::coutPos[  contact.positions[i]  ] 
Norm[  contact.normals[i]  ] 
Depth[  contact.depths[i]  ]\n;
   }
-  */
 }
 
 void PioneerSpiral

[Playerstage-commit] SF.net SVN: playerstage:[8741] code/gazebo/branches/simpar

2010-05-31 Thread natepak
Revision: 8741
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8741view=rev
Author:   natepak
Date: 2010-05-31 21:18:10 + (Mon, 31 May 2010)

Log Message:
---
Updates

Modified Paths:
--
code/gazebo/branches/simpar/plugins/CMakeLists.txt
code/gazebo/branches/simpar/server/physics/Body.cc
code/gazebo/branches/simpar/server/physics/ode/ODEBody.cc
code/gazebo/branches/simpar/worlds/pioneer2dx.world

Added Paths:
---
code/gazebo/branches/simpar/plugins/pioneer_circle.cc

Modified: code/gazebo/branches/simpar/plugins/CMakeLists.txt
===
--- code/gazebo/branches/simpar/plugins/CMakeLists.txt  2010-05-30 00:37:46 UTC 
(rev 8740)
+++ code/gazebo/branches/simpar/plugins/CMakeLists.txt  2010-05-31 21:18:10 UTC 
(rev 8741)
@@ -15,8 +15,10 @@
   link_directories(${GAZEBO_LIBRARY_DIRS})
 endif (PKG_CONFIG_FOUND)
 
-set (plugins pioneer_spiral )
+set (plugins pioneer_spiral 
+ pioneer_circle)
 
+
 foreach (src ${plugins})
   set_source_files_properties(${src}.cc PROPERTIES COMPILE_FLAGS 
${GAZEBO_CFLAGS})
   add_library(${src} SHARED ${src}.cc)

Added: code/gazebo/branches/simpar/plugins/pioneer_circle.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_circle.cc   
(rev 0)
+++ code/gazebo/branches/simpar/plugins/pioneer_circle.cc   2010-05-31 
21:18:10 UTC (rev 8741)
@@ -0,0 +1,84 @@
+#include boost/bind.hpp
+#include gazebo/gazeboserver.hh
+
+namespace gazebo
+{
+
+
+  class PioneerCircle : public Handler
+  {
+public: PioneerCircle() : Handler() {}
+
+public: ~PioneerCircle()
+{
+  World::Instance()-DisconnectWorldUpdateStartSignal(
+  boost::bind(PioneerCircle::UpdateCB, this));
+
+  World::Instance()-DisconnectWorldUpdateEndSignal(
+  boost::bind(PioneerCircle::UpdateEndCB, this));
+
+  for (unsigned int i=0; i  this-robot-GetChildCount(); i++)
+  {
+Body *body = dynamic_castBody*(this-robot-GetChild(i));
+if (body)
+{
+  body-SetForce(Vector3(0,0,0));
+  body-SetTorque(Vector3(0,0,0));
+  body-SetLinearVel(Vector3(0,0,0));
+  body-SetAngularVel(Vector3(0,0,0));
+}
+  }
+}
+
+public: void Load()
+{
+
+  std::string model_name = pioneer;
+  this-robot = (Model*)World::Instance()-GetEntityByName(model_name);
+
+  if (this-robot)
+  {
+this-robot-GetVisualNode()-SetRibbonTrail(true);
+this-leftWheel = (Body*)this-robot-GetChild(left_wheel);
+this-rightWheel = (Body*)this-robot-GetChild(right_wheel);
+
+World::Instance()-ConnectWorldUpdateStartSignal(
+boost::bind(PioneerCircle::UpdateCB, this));
+
+World::Instance()-ConnectWorldUpdateEndSignal(
+boost::bind(PioneerCircle::UpdateEndCB, this));
+  }
+  else
+std::cerr  Unable to find model[  model_name  ]\n;
+}
+
+public: void UpdateCB()
+{
+  if (this-leftWheel-GetAngularVel().y  0.2) 
+  {
+this-leftWheel-SetTorque(Vector3(0.0, 0.0, 0.08));
+  }
+
+  if (this-rightWheel-GetAngularVel().y  0.1)
+this-rightWheel-SetTorque(Vector3(0.0, 0.0, -0.08));
+
+//this-rightWheel-SetTorque(Vector3(0.0, 0.0, 0.01));
+//this-rightWheel-SetTorque(Vector3(0.0, 0.0, 0));
+//this-leftWheel-SetAngularVel(Vector3(0.0, 0.3, 0));
+//this-rightWheel-SetAngularVel(Vector3(0.0, 0.1, 0));
+}
+
+public: void UpdateEndCB()
+{
+  //std::cout  this-leftWheel-GetTorque()  \n;
+  //std::cout  this-rightWheel-GetAngularVel()  \n;
+}
+
+private: Model *robot;
+private: Body *leftWheel;
+private: Body *rightWheel;
+
+  };
+
+  GZ_REGISTER_HANDLER(PioneerCircle, PioneerCircle)
+}

Modified: code/gazebo/branches/simpar/server/physics/Body.cc
===
--- code/gazebo/branches/simpar/server/physics/Body.cc  2010-05-30 00:37:46 UTC 
(rev 8740)
+++ code/gazebo/branches/simpar/server/physics/Body.cc  2010-05-31 21:18:10 UTC 
(rev 8741)
@@ -409,10 +409,10 @@
   Vector3 avel;
 
   // Apply our linear accel
-  this-SetForce(this-linearAccel);
+  //this-SetForce(this-linearAccel);
 
   // Apply our angular accel
-  this-SetTorque(this-angularAccel);
+  //this-SetTorque(this-angularAccel);
 
   // FIXME: FIXME: @todo: @todo: race condition on factory-based model 
loading!
   // if (this-GetEnabled() != this-enabled)

Modified: code/gazebo/branches/simpar/server/physics/ode/ODEBody.cc
===
--- code/gazebo/branches/simpar/server/physics/ode/ODEBody.cc   2010-05-30 
00:37:46 UTC (rev 8740)
+++ code/gazebo/branches/simpar/server/physics/ode/ODEBody.cc   2010-05-31 
21:18:10 UTC (rev 8741)
@@ -434,7 +434,7

[Playerstage-commit] SF.net SVN: playerstage:[8731] code/gazebo/branches/simpar

2010-05-29 Thread natepak
Revision: 8731
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8731view=rev
Author:   natepak
Date: 2010-05-29 17:04:31 + (Sat, 29 May 2010)

Log Message:
---
Added ability to load plugins from the command line

Modified Paths:
--
code/gazebo/branches/simpar/libgazebo/SimIface.cc
code/gazebo/branches/simpar/libgazebo/gz.h
code/gazebo/branches/simpar/server/GazeboConfig.cc
code/gazebo/branches/simpar/server/Simulator.cc
code/gazebo/branches/simpar/server/Simulator.hh
code/gazebo/branches/simpar/server/World.cc
code/gazebo/branches/simpar/tools/gazebomodel.cc
code/gazebo/branches/simpar/worlds/pioneer2dx.world

Added Paths:
---
code/gazebo/branches/simpar/plugins/
code/gazebo/branches/simpar/plugins/CMakeLists.txt
code/gazebo/branches/simpar/plugins/pioneer_spiral.cc
code/gazebo/branches/simpar/plugins/pioneer_spiral.hh

Modified: code/gazebo/branches/simpar/libgazebo/SimIface.cc
===
--- code/gazebo/branches/simpar/libgazebo/SimIface.cc   2010-05-29 16:47:21 UTC 
(rev 8730)
+++ code/gazebo/branches/simpar/libgazebo/SimIface.cc   2010-05-29 17:04:31 UTC 
(rev 8731)
@@ -1001,3 +1001,23 @@
   assert(this-data-responseCount == 1);
   return data-responses[0].strValue;
 }
+
+
+/// Add a handler
+void SimulationIface::AddHandler(const std::string name)
+{
+  this-Lock(1);
+
+  this-data-responseCount = 0;
+  SimulationRequestData *request;
+
+  request = (this-data-requests[this-data-requestCount++]);
+  request-type = SimulationRequestData::ADD_HANDLER;
+  memset(request-strValue, 0, 512);
+  strncpy(request-strValue, name.c_str(), 512);
+  request-strValue[511] = '\0';
+
+  this-Unlock();
+}
+
+

Modified: code/gazebo/branches/simpar/libgazebo/gz.h
===
--- code/gazebo/branches/simpar/libgazebo/gz.h  2010-05-29 16:47:21 UTC (rev 
8730)
+++ code/gazebo/branches/simpar/libgazebo/gz.h  2010-05-29 17:04:31 UTC (rev 
8731)
@@ -454,7 +454,8 @@
   SET_STEP_TYPE,
   GET_STEP_TYPE,
   APPLY_FORCE,
-  APPLY_TORQUE
+  APPLY_TORQUE,
+  ADD_HANDLER
};
 
   public: Type type; 
@@ -685,6 +686,9 @@
   /// \brief Get the step type
   public: std::string GetStepType();
 
+  /// \brief Add a handler
+  public: void AddHandler(const std::string name);
+
   private: void BlockThread();
 
   /// \brief Wait for a return message

Added: code/gazebo/branches/simpar/plugins/CMakeLists.txt
===
--- code/gazebo/branches/simpar/plugins/CMakeLists.txt  
(rev 0)
+++ code/gazebo/branches/simpar/plugins/CMakeLists.txt  2010-05-29 17:04:31 UTC 
(rev 8731)
@@ -0,0 +1,27 @@
+project(benchmarks)
+
+cmake_minimum_required( VERSION 2.4 FATAL_ERROR )
+
+if(COMMAND cmake_policy)
+  cmake_policy(SET CMP0003 NEW)
+  cmake_policy(SET CMP0004 NEW)
+endif(COMMAND cmake_policy)
+
+include (FindPkgConfig)
+
+if (PKG_CONFIG_FOUND)
+  pkg_check_modules(GAZEBO gazeboserver)
+  include_directories(${GAZEBO_INCLUDE_DIRS})
+  link_directories(${GAZEBO_LIBRARY_DIRS})
+endif (PKG_CONFIG_FOUND)
+
+set (plugins pioneer_spiral )
+
+foreach (src ${plugins})
+  set_source_files_properties(${src}.cc PROPERTIES COMPILE_FLAGS 
${GAZEBO_CFLAGS})
+  add_library(${src} SHARED ${src}.cc)
+  target_link_libraries(${src} gazebo ${GAZEBO_LINK_LIBS} )
+  set_target_properties(${src} PROPERTIES SKIP_BUILD_RPATH TRUE)
+  set_target_properties(${src} PROPERTIES LINK_FLAGS ${GAZEBO_LDFLAGS})
+  install (TARGETS ${src} DESTINATION 
${CMAKE_INSTALL_PREFIX}/share/gazebo/plugins/)
+endforeach (src ${benchmarks})

Added: code/gazebo/branches/simpar/plugins/pioneer_spiral.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_spiral.cc   
(rev 0)
+++ code/gazebo/branches/simpar/plugins/pioneer_spiral.cc   2010-05-29 
17:04:31 UTC (rev 8731)
@@ -0,0 +1,38 @@
+#include boost/bind.hpp
+#include pioneer_spiral.hh
+
+using namespace gazebo;
+
+GZ_REGISTER_HANDLER(PioneerSpiral, PioneerSpiral)
+
+PioneerSpiral::PioneerSpiral() : Handler()
+{
+}
+
+PioneerSpiral::~PioneerSpiral()
+{
+}
+
+void PioneerSpiral::Load()
+{
+
+  std::string model_name = pioneer2dx_model;
+  this-robot = (Model*)World::Instance()-GetEntityByName(model_name);
+
+  if (this-robot)
+  {
+this-robot-GetVisualNode()-SetRibbonTrail(true);
+this-leftWheel = (Body*)this-robot-GetChild(left_wheel);
+this-rightWheel = (Body*)this-robot-GetChild(right_wheel);
+
+World::Instance()-ConnectWorldUpdateStartSignal(
+boost::bind(PioneerSpiral::UpdateCB, this));
+  }
+  else
+std::cerr

[Playerstage-commit] SF.net SVN: playerstage:[8732] code/gazebo/branches/simpar

2010-05-29 Thread natepak
Revision: 8732
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8732view=rev
Author:   natepak
Date: 2010-05-29 17:19:24 + (Sat, 29 May 2010)

Log Message:
---
Added remove handler function

Modified Paths:
--
code/gazebo/branches/simpar/libgazebo/SimIface.cc
code/gazebo/branches/simpar/libgazebo/gz.h
code/gazebo/branches/simpar/plugins/pioneer_spiral.cc
code/gazebo/branches/simpar/server/Handler.cc
code/gazebo/branches/simpar/server/Handler.hh
code/gazebo/branches/simpar/server/Simulator.cc
code/gazebo/branches/simpar/server/Simulator.hh
code/gazebo/branches/simpar/server/World.cc
code/gazebo/branches/simpar/tools/gazebomodel.cc

Modified: code/gazebo/branches/simpar/libgazebo/SimIface.cc
===
--- code/gazebo/branches/simpar/libgazebo/SimIface.cc   2010-05-29 17:04:31 UTC 
(rev 8731)
+++ code/gazebo/branches/simpar/libgazebo/SimIface.cc   2010-05-29 17:19:24 UTC 
(rev 8732)
@@ -1020,4 +1020,20 @@
   this-Unlock();
 }
 
+
+/// Remove a handler
+void SimulationIface::RemoveHandler(const std::string name)
+{
+  this-Lock(1);
 
+  this-data-responseCount = 0;
+  SimulationRequestData *request;
+
+  request = (this-data-requests[this-data-requestCount++]);
+  request-type = SimulationRequestData::REMOVE_HANDLER;
+  memset(request-strValue, 0, 512);
+  strncpy(request-strValue, name.c_str(), 512);
+  request-strValue[511] = '\0';
+
+  this-Unlock();
+}

Modified: code/gazebo/branches/simpar/libgazebo/gz.h
===
--- code/gazebo/branches/simpar/libgazebo/gz.h  2010-05-29 17:04:31 UTC (rev 
8731)
+++ code/gazebo/branches/simpar/libgazebo/gz.h  2010-05-29 17:19:24 UTC (rev 
8732)
@@ -455,7 +455,8 @@
   GET_STEP_TYPE,
   APPLY_FORCE,
   APPLY_TORQUE,
-  ADD_HANDLER
+  ADD_HANDLER,
+  REMOVE_HANDLER
};
 
   public: Type type; 
@@ -689,6 +690,9 @@
   /// \brief Add a handler
   public: void AddHandler(const std::string name);
 
+  /// \brief Remove a handler
+  public: void RemoveHandler(const std::string name);
+
   private: void BlockThread();
 
   /// \brief Wait for a return message

Modified: code/gazebo/branches/simpar/plugins/pioneer_spiral.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_spiral.cc   2010-05-29 
17:04:31 UTC (rev 8731)
+++ code/gazebo/branches/simpar/plugins/pioneer_spiral.cc   2010-05-29 
17:19:24 UTC (rev 8732)
@@ -11,6 +11,8 @@
 
 PioneerSpiral::~PioneerSpiral()
 {
+  World::Instance()-DisconnectWorldUpdateStartSignal(
+  boost::bind(PioneerSpiral::UpdateCB, this));
 }
 
 void PioneerSpiral::Load()

Modified: code/gazebo/branches/simpar/server/Handler.cc
===
--- code/gazebo/branches/simpar/server/Handler.cc   2010-05-29 17:04:31 UTC 
(rev 8731)
+++ code/gazebo/branches/simpar/server/Handler.cc   2010-05-29 17:19:24 UTC 
(rev 8732)
@@ -22,8 +22,17 @@
 Handler::Handler() {}
 Handler::~Handler() {}
 
+
+/// Get the name of the handler
+std::string Handler::GetName() const
+{
+  return this-name;
+}
+
+
 Handler *Handler::Create(const std::string plugin)
 {
+  Handler *result = NULL;
   struct stat st;
   bool found = false;
   std::string fullname;
@@ -55,7 +64,7 @@
   }
 
   // Register the new controller.
-  return registerFunc();
+  result = registerFunc();
 
 #elif HAVE_LTDL
 
@@ -93,7 +102,7 @@
   }
 
   // Register the new controller.
-  return registerFunc();
+  result = registerFunc();
 
 #else // HAVE_LTDL
 
@@ -101,5 +110,7 @@
 
 #endif // HAVE_LTDL
 
+  result-name = plugin;
 
+  return result;
 }

Modified: code/gazebo/branches/simpar/server/Handler.hh
===
--- code/gazebo/branches/simpar/server/Handler.hh   2010-05-29 17:04:31 UTC 
(rev 8731)
+++ code/gazebo/branches/simpar/server/Handler.hh   2010-05-29 17:19:24 UTC 
(rev 8732)
@@ -13,7 +13,12 @@
 public: virtual ~Handler();
 public: virtual void Load() = 0;
 
+/// \brief Get the name of the handler
+public: std::string GetName() const;
+
 public: static Handler *Create(const std::string name);
+
+protected: std::string name;
   };
 }
 

Modified: code/gazebo/branches/simpar/server/Simulator.cc
===
--- code/gazebo/branches/simpar/server/Simulator.cc 2010-05-29 17:04:31 UTC 
(rev 8731)
+++ code/gazebo/branches/simpar/server/Simulator.cc 2010-05-29 17:19:24 UTC 
(rev 8732)
@@ -309,15 +309,6

[Playerstage-commit] SF.net SVN: playerstage:[8733] code/gazebo/branches/simpar/server/Simulator .cc

2010-05-29 Thread natepak
Revision: 8733
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8733view=rev
Author:   natepak
Date: 2010-05-29 17:28:37 + (Sat, 29 May 2010)

Log Message:
---
Fixed handler removal

Modified Paths:
--
code/gazebo/branches/simpar/server/Simulator.cc

Modified: code/gazebo/branches/simpar/server/Simulator.cc
===
--- code/gazebo/branches/simpar/server/Simulator.cc 2010-05-29 17:19:24 UTC 
(rev 8732)
+++ code/gazebo/branches/simpar/server/Simulator.cc 2010-05-29 17:28:37 UTC 
(rev 8733)
@@ -782,6 +782,7 @@
 {
   delete (*iter);
   this-handlers.erase(iter);
+  break;
 }
   }
 }


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

--

___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8736] code/gazebo/branches/simpar/worlds

2010-05-29 Thread natepak
Revision: 8736
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8736view=rev
Author:   natepak
Date: 2010-05-29 20:08:58 + (Sat, 29 May 2010)

Log Message:
---
removed the laser and fixed the wheel size of the pioneer model

Modified Paths:
--
code/gazebo/branches/simpar/worlds/models/pioneer2dx.model
code/gazebo/branches/simpar/worlds/pioneer2dx.world

Modified: code/gazebo/branches/simpar/worlds/models/pioneer2dx.model
===
--- code/gazebo/branches/simpar/worlds/models/pioneer2dx.model  2010-05-29 
18:21:16 UTC (rev 8735)
+++ code/gazebo/branches/simpar/worlds/models/pioneer2dx.model  2010-05-29 
20:08:58 UTC (rev 8736)
@@ -71,14 +71,14 @@
 
 visual
   rpy-90 0 0/rpy
-  size0.125 0.05 0.125/size
+  size0.15 0.05 0.15/size
   meshPioneer2dx/tire.mesh/mesh
   materialGazebo/Black/material
 /visual
 
 visual
   rpy-90 0 0/rpy
-  size0.073 0.05 0.073/size
+  size0.088 0.05 0.088/size
   meshPioneer2at/wheel.mesh/mesh
   materialGazebo/Gold/material
 /visual
@@ -106,14 +106,14 @@
 
 visual
   rpy-90 0 0/rpy
-  size0.125 0.05 0.125/size
+  size0.15 0.05 0.15/size
   meshPioneer2dx/tire.mesh/mesh
   materialGazebo/Black/material
 /visual
 
 visual
   rpy-90 0 0/rpy
-  size0.073 0.05 0.073/size
+  size0.088 0.05 0.088/size
   meshPioneer2at/wheel.mesh/mesh
   materialGazebo/Gold/material
 /visual

Modified: code/gazebo/branches/simpar/worlds/pioneer2dx.world
===
--- code/gazebo/branches/simpar/worlds/pioneer2dx.world 2010-05-29 18:21:16 UTC 
(rev 8735)
+++ code/gazebo/branches/simpar/worlds/pioneer2dx.world 2010-05-29 20:08:58 UTC 
(rev 8736)
@@ -94,6 +94,7 @@
 xyz0 0 0.15/xyz
 rpy0.0 0.0 90.0/rpy
 
+!--
 model:physical name=laser
   xyz0.15 0 0.18/xyz
 
@@ -106,6 +107,7 @@
 xi:include href=models/sicklms200.model /
   /include
 /model:physical
+--
 
 include embedded=true
   xi:include href=models/pioneer2dx.model /


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

--

___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8737] code/gazebo/branches/simpar

2010-05-29 Thread natepak
Revision: 8737
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8737view=rev
Author:   natepak
Date: 2010-05-29 20:50:41 + (Sat, 29 May 2010)

Log Message:
---
Added better contact callback

Modified Paths:
--
code/gazebo/branches/simpar/plugins/pioneer_spiral.cc
code/gazebo/branches/simpar/plugins/pioneer_spiral.hh

code/gazebo/branches/simpar/server/controllers/gripper/pioneer2/Pioneer2_Gripper.cc
code/gazebo/branches/simpar/server/physics/Geom.cc
code/gazebo/branches/simpar/server/physics/Geom.hh
code/gazebo/branches/simpar/server/physics/ode/ODEPhysics.cc

Modified: code/gazebo/branches/simpar/plugins/pioneer_spiral.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_spiral.cc   2010-05-29 
20:08:58 UTC (rev 8736)
+++ code/gazebo/branches/simpar/plugins/pioneer_spiral.cc   2010-05-29 
20:50:41 UTC (rev 8737)
@@ -39,6 +39,17 @@
 this-leftWheel = (Body*)this-robot-GetChild(left_wheel);
 this-rightWheel = (Body*)this-robot-GetChild(right_wheel);
 
+Geom *leftWheelGeom = this-leftWheel-GetGeom(left_wheel_geom);
+Geom *rightWheelGeom = this-rightWheel-GetGeom(right_wheel_geom);
+
+leftWheelGeom-SetContactsEnabled(true);
+rightWheelGeom-SetContactsEnabled(true);
+
+leftWheelGeom-ConnectContactCallback(
+boost::bind(PioneerSpiral::LeftContactCB, this, _1));
+rightWheelGeom-ConnectContactCallback(
+boost::bind(PioneerSpiral::RightContactCB, this, _1));
+
 World::Instance()-ConnectWorldUpdateStartSignal(
 boost::bind(PioneerSpiral::UpdateCB, this));
   }
@@ -50,3 +61,25 @@
 {
   this-leftWheel-SetTorque(Vector3(0,0,0.5));
 }
+
+void PioneerSpiral::LeftContactCB(const Contact contact)
+{
+  std::cout  Left contact\n;
+  for (unsigned int i=0; i  contact.positions.size(); i++)
+  {
+std::coutPos[  contact.positions[i]  ] 
+   Norm[  contact.normals[i]  ] 
+   Depth[  contact.depths[i]  ]\n;
+  }
+}
+
+void PioneerSpiral::RightContactCB(const Contact contact)
+{
+  std::cout  Right contact\n;
+  for (unsigned int i=0; i  contact.positions.size(); i++)
+  {
+std::coutPos[  contact.positions[i]  ] 
+   Norm[  contact.normals[i]  ] 
+   Depth[  contact.depths[i]  ]\n;
+  }
+}

Modified: code/gazebo/branches/simpar/plugins/pioneer_spiral.hh
===
--- code/gazebo/branches/simpar/plugins/pioneer_spiral.hh   2010-05-29 
20:08:58 UTC (rev 8736)
+++ code/gazebo/branches/simpar/plugins/pioneer_spiral.hh   2010-05-29 
20:50:41 UTC (rev 8737)
@@ -16,6 +16,9 @@
 
 public: void UpdateCB();
 
+public: void LeftContactCB(const Contact contact);
+public: void RightContactCB(const Contact contact);
+
 private: Model *robot;
 private: Body *leftWheel;
 private: Body *rightWheel;

Modified: 
code/gazebo/branches/simpar/server/controllers/gripper/pioneer2/Pioneer2_Gripper.cc
===
--- 
code/gazebo/branches/simpar/server/controllers/gripper/pioneer2/Pioneer2_Gripper.cc
 2010-05-29 20:08:58 UTC (rev 8736)
+++ 
code/gazebo/branches/simpar/server/controllers/gripper/pioneer2/Pioneer2_Gripper.cc
 2010-05-29 20:50:41 UTC (rev 8737)
@@ -62,6 +62,9 @@
 // Destructor
 Pioneer2_Gripper::~Pioneer2_Gripper()
 {
+  
this-paddles[LEFT]-DisconnectContactCallback(boost::bind(Pioneer2_Gripper::LeftPaddleCB,
 this));
+  
this-paddles[RIGHT]-DisconnectContactCallback(boost::bind(Pioneer2_Gripper::RightPaddleCB,
 this));
+
   if (this-holdJoint)
 delete this-holdJoint;
   this-holdJoint = NULL;
@@ -191,8 +194,10 @@
   this-holdJoint = 
World::Instance()-GetPhysicsEngine()-CreateJoint(Joint::SLIDER);
   this-holdJoint-SetName(this-GetName() + _Hold_Joint);
 
-  this-paddles[LEFT]-ContactCallback(Pioneer2_Gripper::LeftPaddleCB, this);
-  this-paddles[RIGHT]-ContactCallback(Pioneer2_Gripper::RightPaddleCB, 
this);
+  this-paddles[LEFT]-ConnectContactCallback(
+  boost::bind(Pioneer2_Gripper::LeftPaddleCB, this, _1));
+  this-paddles[RIGHT]-ConnectContactCallback(
+  boost::bind(Pioneer2_Gripper::RightPaddleCB, this, _1));
 }
 
 


Modified: code/gazebo/branches/simpar/server/physics/Geom.cc
===
--- code/gazebo/branches/simpar/server/physics/Geom.cc  2010-05-29 20:08:58 UTC 
(rev 8736)
+++ code/gazebo/branches/simpar/server/physics/Geom.cc  2010-05-29 20:50:41 UTC 
(rev 8737)
@@ -489,6 +489,7 @@
   if (this-GetShapeType() == Shape::RAY || this-GetShapeType() == 
Shape::PLANE)
 return;
 
+  std::cout  Contact\n;
   this-contacts.push_back( contact.Clone() );
   this-contactSignal( contact );
 }

Modified: code/gazebo/branches/simpar/server/physics/Geom.hh

[Playerstage-commit] SF.net SVN: playerstage:[8739] code/gazebo/branches/simpar/worlds

2010-05-29 Thread natepak
Revision: 8739
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8739view=rev
Author:   natepak
Date: 2010-05-29 23:25:31 + (Sat, 29 May 2010)

Log Message:
---
Update the pioneer model

Modified Paths:
--
code/gazebo/branches/simpar/worlds/empty.world
code/gazebo/branches/simpar/worlds/models/pioneer2dx.model
code/gazebo/branches/simpar/worlds/pioneer2dx.world

Modified: code/gazebo/branches/simpar/worlds/empty.world
===
--- code/gazebo/branches/simpar/worlds/empty.world  2010-05-29 21:06:13 UTC 
(rev 8738)
+++ code/gazebo/branches/simpar/worlds/empty.world  2010-05-29 23:25:31 UTC 
(rev 8739)
@@ -20,7 +20,7 @@
 cfm0.01/cfm
 erp0.2/erp
 
-stepTypeworld/stepType
+stepTyperobust/stepType
 stepIters100/stepIters
 stepW1.3/stepW
 contactMaxCorrectingVel100.0/contactMaxCorrectingVel

Modified: code/gazebo/branches/simpar/worlds/models/pioneer2dx.model
===
--- code/gazebo/branches/simpar/worlds/models/pioneer2dx.model  2010-05-29 
21:06:13 UTC (rev 8738)
+++ code/gazebo/branches/simpar/worlds/models/pioneer2dx.model  2010-05-29 
23:25:31 UTC (rev 8739)
@@ -130,7 +130,7 @@
 /body:cylinder
 
 body:sphere name=castor_body
-  xyz-0.200 0 -0.11/xyz
+  xyz-0.200 0 -0.108/xyz
   rpy0 0 0/rpy
   geom:sphere name=castor_geom
 size0.04/size

Modified: code/gazebo/branches/simpar/worlds/pioneer2dx.world
===
--- code/gazebo/branches/simpar/worlds/pioneer2dx.world 2010-05-29 21:06:13 UTC 
(rev 8738)
+++ code/gazebo/branches/simpar/worlds/pioneer2dx.world 2010-05-29 23:25:31 UTC 
(rev 8739)
@@ -24,11 +24,11 @@
 cfm0.01/cfm
 erp0.2/erp
 
-stepTypequick/stepType
+stepTyperobust/stepType
 stepIters100/stepIters
 stepW1.3/stepW
 contactMaxCorrectingVel100.0/contactMaxCorrectingVel
-contactSurfaceLayer0.001/contactSurfaceLayer
+contactSurfaceLayer0.00/contactSurfaceLayer
   /physics:ode
 
   rendering:gui
@@ -91,7 +91,7 @@
   --
 
   model:physical name=pioneer2dx_model
-xyz0 0 0.15/xyz
+xyz0 0 0.147/xyz
 rpy0.0 0.0 90.0/rpy
 
 !--


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

--

___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8740] code/gazebo/branches/simpar

2010-05-29 Thread natepak
Revision: 8740
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8740view=rev
Author:   natepak
Date: 2010-05-30 00:37:46 + (Sun, 30 May 2010)

Log Message:
---
Update the pioneer_spiral plugin

Modified Paths:
--
code/gazebo/branches/simpar/plugins/pioneer_spiral.cc
code/gazebo/branches/simpar/server/physics/Geom.cc
code/gazebo/branches/simpar/worlds/pioneer2dx.world

Modified: code/gazebo/branches/simpar/plugins/pioneer_spiral.cc
===
--- code/gazebo/branches/simpar/plugins/pioneer_spiral.cc   2010-05-29 
23:25:31 UTC (rev 8739)
+++ code/gazebo/branches/simpar/plugins/pioneer_spiral.cc   2010-05-30 
00:37:46 UTC (rev 8740)
@@ -59,27 +59,36 @@
 
 void PioneerSpiral::UpdateCB()
 {
-  this-leftWheel-SetTorque(Vector3(0,0,0.5));
+  //std::cout  torqu[  this-leftWheel-GetAngularVel()  ]\n;
+
+  if (this-leftWheel-GetAngularVel().GetLength()  0.1) 
+  {
+printf(HERE\n);
+this-leftWheel-SetTorque(Vector3(0.0,1.0,0));
+this-rightWheel-SetTorque(Vector3(0.0,0.5,0));
+  }
 }
 
 void PioneerSpiral::LeftContactCB(const Contact contact)
 {
-  std::cout  Left contact\n;
+  /*std::cout  Left contact\n;
   for (unsigned int i=0; i  contact.positions.size(); i++)
   {
 std::coutPos[  contact.positions[i]  ] 
Norm[  contact.normals[i]  ] 
Depth[  contact.depths[i]  ]\n;
   }
+  */
 }
 
 void PioneerSpiral::RightContactCB(const Contact contact)
 {
-  std::cout  Right contact\n;
+  /*std::cout  Right contact\n;
   for (unsigned int i=0; i  contact.positions.size(); i++)
   {
 std::coutPos[  contact.positions[i]  ] 
Norm[  contact.normals[i]  ] 
Depth[  contact.depths[i]  ]\n;
   }
+  */
 }

Modified: code/gazebo/branches/simpar/server/physics/Geom.cc
===
--- code/gazebo/branches/simpar/server/physics/Geom.cc  2010-05-29 23:25:31 UTC 
(rev 8739)
+++ code/gazebo/branches/simpar/server/physics/Geom.cc  2010-05-30 00:37:46 UTC 
(rev 8740)
@@ -489,7 +489,6 @@
   if (this-GetShapeType() == Shape::RAY || this-GetShapeType() == 
Shape::PLANE)
 return;
 
-  std::cout  Contact\n;
   this-contacts.push_back( contact.Clone() );
   this-contactSignal( contact );
 }

Modified: code/gazebo/branches/simpar/worlds/pioneer2dx.world
===
--- code/gazebo/branches/simpar/worlds/pioneer2dx.world 2010-05-29 23:25:31 UTC 
(rev 8739)
+++ code/gazebo/branches/simpar/worlds/pioneer2dx.world 2010-05-30 00:37:46 UTC 
(rev 8740)
@@ -24,7 +24,7 @@
 cfm0.01/cfm
 erp0.2/erp
 
-stepTyperobust/stepType
+stepTypequick/stepType
 stepIters100/stepIters
 stepW1.3/stepW
 contactMaxCorrectingVel100.0/contactMaxCorrectingVel
@@ -92,7 +92,7 @@
 
   model:physical name=pioneer2dx_model
 xyz0 0 0.147/xyz
-rpy0.0 0.0 90.0/rpy
+rpy0.0 0.0 0.0/rpy
 
 !--
 model:physical name=laser


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

--

___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8720] code/gazebo/branches/simpar

2010-05-28 Thread natepak
Revision: 8720
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8720view=rev
Author:   natepak
Date: 2010-05-28 06:00:36 + (Fri, 28 May 2010)

Log Message:
---
Updates

Modified Paths:
--
code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc
code/gazebo/branches/simpar/worlds/empty.world

Modified: code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc
===
--- code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc  
2010-05-28 02:44:32 UTC (rev 8719)
+++ code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc  
2010-05-28 06:00:36 UTC (rev 8720)
@@ -252,11 +252,11 @@
 
   std::vectorstd::string  step_types;
   std::vectorstd::string ::iterator iter;
-  //step_types.push_back(robust);
-  step_types.push_back(world);
-  step_types.push_back(quick);
+  step_types.push_back(robust);
+  //step_types.push_back(world);
+  //step_types.push_back(quick);
 
-  for (iter = step_types.begin(); iter != step_types.end(); iter++)
+  /*for (iter = step_types.begin(); iter != step_types.end(); iter++)
   {
 std::string path = 
std::string(/home/nate/work/simpar/data/pioneer_circle/) + *iter + /;
 system((std::string(mkdir -p )+path).c_str());
@@ -289,13 +289,15 @@
 
 fclose(out);
   }
+  */
 
   // This will make a spiral
-  /*for (int i=0; i  50; i++)
+  //for (int i=0; i  50; i++)
+  while(1)
   {
 simIface-ApplyTorque(pioneer::left_wheel,gazebo::Vec3(0,0,-50));
 usleep(10);
-  }*/
+  }
 
   factoryIface-Close();
   simIface-Close();

Modified: code/gazebo/branches/simpar/worlds/empty.world
===
--- code/gazebo/branches/simpar/worlds/empty.world  2010-05-28 02:44:32 UTC 
(rev 8719)
+++ code/gazebo/branches/simpar/worlds/empty.world  2010-05-28 06:00:36 UTC 
(rev 8720)
@@ -15,13 +15,13 @@
   verbosity4/verbosity
 
   physics:ode
-stepTime0.001/stepTime
+stepTime0.01/stepTime
 gravity0 0 -9.8/gravity
 cfm0.01/cfm
 erp0.2/erp
 
-stepTypequick/stepType
-stepIters10/stepIters
+stepTyperobust/stepType
+stepIters100/stepIters
 stepW1.3/stepW
 contactMaxCorrectingVel100.0/contactMaxCorrectingVel
 contactSurfaceLayer0.001/contactSurfaceLayer


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

--

___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8721] code/gazebo/branches/simpar

2010-05-28 Thread natepak
Revision: 8721
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8721view=rev
Author:   natepak
Date: 2010-05-28 16:20:21 + (Fri, 28 May 2010)

Log Message:
---
Updated to fix a build issue

Modified Paths:
--
code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc
code/gazebo/branches/simpar/cmake/FindOde.cmake
code/gazebo/branches/simpar/worlds/empty.world

Added Paths:
---
code/gazebo/branches/simpar/benchmarks/pioneer_spiral_benchmark.cc

Modified: code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc
===
--- code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc  
2010-05-28 06:00:36 UTC (rev 8720)
+++ code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc  
2010-05-28 16:20:21 UTC (rev 8721)
@@ -173,15 +173,13 @@
   simIface-StartLogEntity(pioneer);
   simIface-Unpause();
 
-  double left = 0.1/stepTime;
-  if (left  5)
-left = 5.0;
-  double right = left * 0.5;
+  double left = 1.0;
+  double right = left*1.8;
 
   std::cout  Left[  left  ] Right[  right  ]\n;
 
-  double time = simIface-data-realTime;
-  while(simIface-data-realTime - time  60)
+  double time = simIface-data-simTime;
+  while(simIface-data-simTime - time  60)
   {
 simIface-SetAngularVel(pioneer::left_wheel, gazebo::Vec3(0,0,left));
 simIface-SetAngularVel(pioneer::right_wheel, gazebo::Vec3(0,0, right));
@@ -252,11 +250,11 @@
 
   std::vectorstd::string  step_types;
   std::vectorstd::string ::iterator iter;
-  step_types.push_back(robust);
+  //step_types.push_back(robust);
   //step_types.push_back(world);
-  //step_types.push_back(quick);
+  step_types.push_back(quick);
 
-  /*for (iter = step_types.begin(); iter != step_types.end(); iter++)
+  for (iter = step_types.begin(); iter != step_types.end(); iter++)
   {
 std::string path = 
std::string(/home/nate/work/simpar/data/pioneer_circle/) + *iter + /;
 system((std::string(mkdir -p )+path).c_str());
@@ -268,7 +266,7 @@
 int i = 0;
 
 simIface-SetStepType(*iter);
-for (double step=0.01; step  1e-5; step *= 0.5)
+for (double step=0.0001; step  1e-5; step *= 0.5)
 {
   unsigned int iterations = 10;
   if (*iter == world)
@@ -279,7 +277,8 @@
 simIface-SetStepIterations(iterations);
 
 fprintf(out,%d %f %d\n,i,step, iterations);
-std::cout  Type[  *iter  ] Step[  step  ] Iterations[ 
 iterations  ]\n;
+std::cout  Type[  *iter  ] Step[  step 
+   ] Iterations[  iterations  ]\n;
 RunSim(step);
 
 std::string mv_cmd = std::string(mv /tmp/pioneer.log ) + path + 
pioneer_circle_benchmark_ + *iter + _ + boost::lexical_caststd::string(i) 
+ .data;
@@ -289,16 +288,7 @@
 
 fclose(out);
   }
-  */
 
-  // This will make a spiral
-  //for (int i=0; i  50; i++)
-  while(1)
-  {
-simIface-ApplyTorque(pioneer::left_wheel,gazebo::Vec3(0,0,-50));
-usleep(10);
-  }
-
   factoryIface-Close();
   simIface-Close();
   graphicsIface-Close();

Added: code/gazebo/branches/simpar/benchmarks/pioneer_spiral_benchmark.cc
===
--- code/gazebo/branches/simpar/benchmarks/pioneer_spiral_benchmark.cc  
(rev 0)
+++ code/gazebo/branches/simpar/benchmarks/pioneer_spiral_benchmark.cc  
2010-05-28 16:20:21 UTC (rev 8721)
@@ -0,0 +1,295 @@
+#include iostream
+#include stdio.h
+#include stdlib.h
+#include vector
+#include libgazebo/gz.h
+#include boost/lexical_cast.hpp
+
+gazebo::Client *client = NULL;
+gazebo::SimulationIface *simIface = NULL;
+gazebo::FactoryIface *factoryIface = NULL;
+gazebo::Graphics3dIface *graphicsIface = NULL;
+
+std::string test_name=Pioneer Spiral Benchmark;
+std::string data_filename = /tmp/pioneer_spiral_benchmark.data;
+
+void spawn_robot()
+{
+  std::ostringstream model;
+
+  model  model:physical name='pioneer';
+  modelxyz0 0 0.15/xyz;
+  modelrpy0.0 0.0 0.0/rpy;
+  model   canonicalBodychassis_body/canonicalBody;
+  model   body:box name='chassis_body';
+  model xyz0.0 0.0 0.0/xyz;
+  model rpy0.0 0.0 0.0/rpy;
+  model geom:box name='chassis_geom';
+  model   xyz0 0 0.0/xyz;
+  model   size0.445 0.277 0.17/size;
+  model   mass2.0/mass;
+  model   mu11/mu1;
+  model   visual;
+  model size0.5 0.277 0.17/size;
+  model xyz0 0 0.04/xyz;
+  model rpy0 180 0/rpy;
+  model meshPioneer2dx/chassis.mesh/mesh;
+  model materialGazebo/Pioneer2Body/material;
+  model   /visual;
+  model   visual;
+  model xyz0.015 0 0.09/xyz;
+  model rpy0 0 0/rpy;
+  model meshPioneer2at/chassis_top.mesh/mesh;
+  model materialGazebo/Black/material;
+  model   /visual;
+  model   visual;
+  model xyz0.21 0.0 0.068/xyz;
+  model rpy0 0 0/rpy;
+  model size0.12 0.29 0.034/size

[Playerstage-commit] SF.net SVN: playerstage:[8722] code/gazebo/trunk/cmake

2010-05-28 Thread natepak
Revision: 8722
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8722view=rev
Author:   natepak
Date: 2010-05-28 16:25:10 + (Fri, 28 May 2010)

Log Message:
---
Simplified finding ODE

Modified Paths:
--
code/gazebo/trunk/cmake/SearchForStuff.cmake

Removed Paths:
-
code/gazebo/trunk/cmake/FindOde.cmake

Deleted: code/gazebo/trunk/cmake/FindOde.cmake
===
--- code/gazebo/trunk/cmake/FindOde.cmake   2010-05-28 16:20:21 UTC (rev 
8721)
+++ code/gazebo/trunk/cmake/FindOde.cmake   2010-05-28 16:25:10 UTC (rev 
8722)
@@ -1,65 +0,0 @@
-INCLUDE (FindPkgConfig)
-
-SET(REQUIRED_ODE_VERSION ${ODE_VERSION})
-
-
-# Find packages
-IF (PKG_CONFIG_FOUND)
-  pkg_check_modules(ODE ode=${ODE_VERSION})
-ENDIF (PKG_CONFIG_FOUND)
-
-# if we didnt find it in pkg-config try ode-config
-IF (NOT ODE_FOUND)
-  SET(ODE_CONFIG_PATH ode-config)
-  EXEC_PROGRAM(${ODE_CONFIG_PATH} ARGS --version RETURN_VALUE 
ODE_CONFIG_RETURN OUTPUT_VARIABLE DETECTED_ODE_VERSION )
-  STRING(REGEX REPLACE [\r\n]   ${DETECTED_ODE_VERSION} 
${${DETECTED_ODE_VERSION}})
-
-  # ode-config exists then get the details
-  IF(NOT ODE_CONFIG_RETURN)
-IF(NOT ${REQUIRED_ODE_VERSION} VERSION_LESS ${DETECTED_ODE_VERSION} )
-  MESSAGE(STATUS   ode-config reports version ${DETECTED_ODE_VERSION})
-  EXEC_PROGRAM(${ODE_CONFIG_PATH} ARGS --cflags RETURN_VALUE 
ODE_CONFIG_RETURN OUTPUT_VARIABLE ODE_INCLUDE_DIRS )
-  STRING(REGEX REPLACE [\r\n]   ${ODE_INCLUDE_DIRS} 
${${ODE_INCLUDE_DIRS}})
-
-  # we want to extract -DdSINGLE or -DdDOUBLE to compile with the correct 
flag
-  STRING(REGEX REPLACE .*-Dd([^ ]+).* -Dd\\1 ODE_CFLAGS_OTHER 
${ODE_INCLUDE_DIRS})
-  MESSAGE(STATUS ${ODE_CFLAGS_OTHER} used to compile against the ODE 
library)
-
-  EXEC_PROGRAM(${ODE_CONFIG_PATH} ARGS --libs RETURN_VALUE 
ODE_CONFIG_RETURN OUTPUT_VARIABLE ODE_LDFLAGS )
-  STRING(REGEX REPLACE [\r\n]   ${ODE_LDFLAGS} ${${ODE_LDFLAGS}})
-
-  SET(ODE_FOUND ${DETECTED_ODE_VERSION})
-ELSE(NOT ${REQUIRED_ODE_VERSION} VERSION_LESS ${DETECTED_ODE_VERSION} )
-  MESSAGE(STATUS ode-config reports wrong version 
(${DETECTED_ODE_VERSION}  ${REQUIRED_ODE_VERSION}))
-ENDIF(NOT ${REQUIRED_ODE_VERSION} VERSION_LESS ${DETECTED_ODE_VERSION} )
-  ELSE(NOT ODE_CONFIG_RETURN)
-  MESSAGE(STATUS no ode-config found)
-  ENDIF(NOT ODE_CONFIG_RETURN)
-ENDIF (NOT ODE_FOUND)
-
-IF (NOT ODE_FOUND)
-  BUILD_ERROR (ODE and development files not found. See the following 
website: http://www.ode.org;)
-  SET (INCLUDE_ODE FALSE CACHE BOOL Include support for ODE)
-ELSE (NOT ODE_FOUND)
-  SET (INCLUDE_ODE TRUE CACHE BOOL Include support for ODE)
-
-  APPEND_TO_CACHED_LIST(gazeboserver_cflags
-${gazeboserver_cflags_desc}
-${ODE_CFLAGS_OTHER})
-
-  APPEND_TO_CACHED_LIST(gazeboserver_include_dirs 
-${gazeboserver_include_dirs_desc} 
-${ODE_INCLUDE_DIRS})
-  APPEND_TO_CACHED_LIST(gazeboserver_link_dirs 
-${gazeboserver_link_dirs_desc} 
-${ODE_LIBRARY_DIRS})
-  APPEND_TO_CACHED_LIST(gazeboserver_link_libs 
-${gazeboserver_link_libs_desc} 
-${ODE_LINK_LIBS})
-  APPEND_TO_CACHED_LIST(gazeboserver_link_libs 
-${gazeboserver_link_libs_desc} 
-${ODE_LIBRARIES})
-  APPEND_TO_CACHED_LIST(gazeboserver_ldflags
-${gazeboserver_ldflags_desc} 
-${ODE_LDFLAGS})
-ENDIF (NOT ODE_FOUND)

Modified: code/gazebo/trunk/cmake/SearchForStuff.cmake
===
--- code/gazebo/trunk/cmake/SearchForStuff.cmake2010-05-28 16:20:21 UTC 
(rev 8721)
+++ code/gazebo/trunk/cmake/SearchForStuff.cmake2010-05-28 16:25:10 UTC 
(rev 8722)
@@ -28,7 +28,6 @@
 
 include (${gazebo_cmake_dir}/FindOS.cmake)
 include (FindPkgConfig)
-include (${gazebo_cmake_dir}/FindOde.cmake)
 include (${gazebo_cmake_dir}/FindFreeimage.cmake)
 
 
@@ -125,6 +124,32 @@
   ENDIF (NOT XML_FOUND)
 
   
+  # Find ODE
+  pkg_check_modules(ODE ode=${ODE_VERSION})
+  IF (NOT ODE_FOUND)
+BUILD_ERROR (ODE and development files not found. See the following 
website: http://www.ode.org;)
+SET (INCLUDE_ODE FALSE CACHE BOOL Include support for ODE)
+  ELSE (NOT ODE_FOUND)
+SET (INCLUDE_ODE TRUE CACHE BOOL Include support for ODE)
+  
+APPEND_TO_CACHED_LIST(gazeboserver_include_dirs 
+  ${gazeboserver_include_dirs_desc} 
+  ${ODE_INCLUDE_DIRS})
+APPEND_TO_CACHED_LIST(gazeboserver_link_dirs 
+  ${gazeboserver_link_dirs_desc} 
+  ${ODE_LIBRARY_DIRS

[Playerstage-commit] SF.net SVN: playerstage:[8723] code/gazebo/trunk/server/physics/ode

2010-05-28 Thread natepak
Revision: 8723
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8723view=rev
Author:   natepak
Date: 2010-05-28 16:29:15 + (Fri, 28 May 2010)

Log Message:
---
Fixed compilation of ODE with double precision

Modified Paths:
--
code/gazebo/trunk/server/physics/ode/CMakeLists.txt
code/gazebo/trunk/server/physics/ode/ODEPhysics.hh

Modified: code/gazebo/trunk/server/physics/ode/CMakeLists.txt
===
--- code/gazebo/trunk/server/physics/ode/CMakeLists.txt 2010-05-28 16:25:10 UTC 
(rev 8722)
+++ code/gazebo/trunk/server/physics/ode/CMakeLists.txt 2010-05-28 16:29:15 UTC 
(rev 8723)
@@ -39,6 +39,8 @@
 ${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE}})
 endif (CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE})
 
-set_target_properties(gazebo_physics_ode PROPERTIES COMPILE_FLAGS -fPIC)
+LIST_TO_STRING(MY_ODE_CFLAGS ${ODE_CFLAGS})
+
+set_target_properties(gazebo_physics_ode PROPERTIES COMPILE_FLAGS -fPIC 
${MY_ODE_CFLAGS})
 target_link_libraries( gazebo_physics_ode ${ODE_LIBRARIES})
 install ( TARGETS gazebo_physics_ode DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )

Modified: code/gazebo/trunk/server/physics/ode/ODEPhysics.hh
===
--- code/gazebo/trunk/server/physics/ode/ODEPhysics.hh  2010-05-28 16:25:10 UTC 
(rev 8722)
+++ code/gazebo/trunk/server/physics/ode/ODEPhysics.hh  2010-05-28 16:29:15 UTC 
(rev 8723)
@@ -27,9 +27,6 @@
 #ifndef ODEPHYSICS_HH
 #define ODEPHYSICS_HH
 
-// Use single precision in ODE
-#define dSINGLE 1
-
 #include ode/ode.h
 
 #include Param.hh


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

--

___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8724] code/gazebo/trunk/benchmarks/ spinningbox_benchmark.cc

2010-05-28 Thread natepak
Revision: 8724
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8724view=rev
Author:   natepak
Date: 2010-05-28 16:30:17 + (Fri, 28 May 2010)

Log Message:
---
Update to spinning box benchmark

Modified Paths:
--
code/gazebo/trunk/benchmarks/spinningbox_benchmark.cc

Modified: code/gazebo/trunk/benchmarks/spinningbox_benchmark.cc
===
--- code/gazebo/trunk/benchmarks/spinningbox_benchmark.cc   2010-05-28 
16:29:15 UTC (rev 8723)
+++ code/gazebo/trunk/benchmarks/spinningbox_benchmark.cc   2010-05-28 
16:30:17 UTC (rev 8724)
@@ -6,6 +6,7 @@
 
 gazebo::Client *client = NULL;
 gazebo::SimulationIface *simIface = NULL;
+gazebo::FactoryIface *factoryIface = NULL;
 
 std::string test_name=Spinning Box Benchmark;
 std::string xlabel = Spinning Box Count;
@@ -29,10 +30,39 @@
 std::cerr  Error\n;
 }
 
+void spawn_box()
+{
+  std::ostringstream model;
+
+  model  model:physical name='box';
+  modelstaticfalse/static;
+  modelxyz0 0 0.5/xyz;
+  modelrpy00 00 0/rpy;
+  modelbody:box name='body';
+  model  geom:box name='geom';
+  modelsize1 1 1/size;
+  modelmass1/mass;
+  modelmu1.1/mu1;
+  modelmu2.1/mu2;
+  modelvisual;
+  model  size1 1 1/size;
+  model  meshunit_box/mesh;
+  model  materialGazebo/Rocky/material;
+  model/visual;
+  model  /geom:box;
+  model/body:box;
+  model  /model:physical;
+
+  factoryIface-Lock(1);
+  strcpy( (char*)factoryIface-data-newModel, model.str().c_str() );
+  factoryIface-Unlock();
+}
+
 int main(int argc, char **argv)
 {
   client = new gazebo::Client();
   simIface = new gazebo::SimulationIface();
+  factoryIface = new gazebo::FactoryIface();
 
   float vel = 1.0;
   if (argc  1)
@@ -59,6 +89,20 @@
 return -1;
   }
 
+  // Open the factory iface
+  try
+  {
+factoryIface-Open(client, default);
+  }
+  catch( std::string e)
+  {
+std::cerr  Gazebo error: Unable to connect to the factory Iface: 
+   e  \n;
+return -1;
+  }
+  spawn_box();
+
+  usleep(500);
   //FILE *out = fopen(data_filename.c_str(), w);
 
   /*if (!out)
@@ -72,12 +116,13 @@
   gazebo::Vec3 linearVel, angularVel, linearAccel, angularAccel;
   gazebo::Pose modelPose;
 
+
   bool done = false;
   while (!done)
   {
-simIface-SetAngularVel(box_model, gazebo::Vec3(0,0,vel));
+simIface-SetAngularVel(box, gazebo::Vec3(0,0,vel));
 
-simIface-GetState(box_model, modelPose, linearVel, angularVel, 
+simIface-GetState(box, modelPose, linearVel, angularVel, 
linearAccel, angularAccel);
 printf(Pos[%4.2f %4.2f %4.2f] RPY[%4.2f %4.2f %4.2f] , modelPose.pos.x, 
modelPose.pos.y, modelPose.pos.z, modelPose.roll, modelPose.pitch, 
modelPose.yaw);
 printf(LV[%4.2f %4.2f %4.2f] ,linearVel.x, linearVel.y, linearVel.z );


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

--

___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] SF.net SVN: playerstage:[8725] code/gazebo/branches/simpar/cmake

2010-05-28 Thread natepak
Revision: 8725
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8725view=rev
Author:   natepak
Date: 2010-05-28 16:58:40 + (Fri, 28 May 2010)

Log Message:
---
update the ode cmake

Modified Paths:
--
code/gazebo/branches/simpar/cmake/SearchForStuff.cmake

Removed Paths:
-
code/gazebo/branches/simpar/cmake/FindOde.cmake

Deleted: code/gazebo/branches/simpar/cmake/FindOde.cmake
===
--- code/gazebo/branches/simpar/cmake/FindOde.cmake 2010-05-28 16:30:17 UTC 
(rev 8724)
+++ code/gazebo/branches/simpar/cmake/FindOde.cmake 2010-05-28 16:58:40 UTC 
(rev 8725)
@@ -1,76 +0,0 @@
-include (${gazebo_cmake_dir}/GazeboUtils.cmake)
-include (FindPkgConfig)
-
-SET(REQUIRED_ODE_VERSION ${ODE_VERSION})
-
-# John - ode version with joint damping
-SET(ODE_JOINT_DAMPING_VERSION 0.11.1.1 CACHE INTERNAL ODE version with joint 
damping FORCE)
-
-
-# Find packages
-IF (PKG_CONFIG_FOUND)
-  pkg_check_modules(ODE ode=${ODE_VERSION})
-  pkg_check_modules(ODE_JOINT_DAMPING ode=${ODE_JOINT_DAMPING_VERSION})
-ENDIF (PKG_CONFIG_FOUND)
-
-IF (NOT ODE_JOINT_DAMPING_FOUND)
-  SET (INCLUDE_ODE_JOINT_DAMPING FALSE CACHE BOOL No support for ODE damping)
-ELSE (NOT ODE_JOINT_DAMPING_FOUND)
-  SET (INCLUDE_ODE_JOINT_DAMPING TRUE CACHE BOOL Include support for ODE 
damping)
-ENDIF (NOT ODE_JOINT_DAMPING_FOUND)
-
-# if we didnt find it in pkg-config try ode-config
-#IF (NOT ODE_FOUND)
-#  SET(ODE_CONFIG_PATH ode-config)
-#  EXEC_PROGRAM(${ODE_CONFIG_PATH} ARGS --version RETURN_VALUE 
ODE_CONFIG_RETURN OUTPUT_VARIABLE DETECTED_ODE_VERSION )
-#  STRING(REGEX REPLACE [\r\n]   ${DETECTED_ODE_VERSION} 
${${DETECTED_ODE_VERSION}})
-#
-#  # ode-config exists then get the details
-#  IF(NOT ODE_CONFIG_RETURN)
-#IF(NOT ${REQUIRED_ODE_VERSION} VERSION_LESS ${DETECTED_ODE_VERSION} )
-#  MESSAGE(STATUS   ode-config reports version ${DETECTED_ODE_VERSION})
-#  EXEC_PROGRAM(${ODE_CONFIG_PATH} ARGS --cflags RETURN_VALUE 
ODE_CONFIG_RETURN OUTPUT_VARIABLE ODE_INCLUDE_DIRS )
-#  STRING(REGEX REPLACE [\r\n]   ${ODE_INCLUDE_DIRS} 
${${ODE_INCLUDE_DIRS}})
-#
-#  # we want to extract -DdSINGLE or -DdDOUBLE to compile with the correct 
flag
-#  STRING(REGEX REPLACE .*-Dd([^ ]+).* -Dd\\1 ODE_CFLAGS_OTHER 
${ODE_INCLUDE_DIRS})
-#  MESSAGE(STATUS ${ODE_CFLAGS_OTHER} used to compile against the ODE 
library)
-#
-#  EXEC_PROGRAM(${ODE_CONFIG_PATH} ARGS --libs RETURN_VALUE 
ODE_CONFIG_RETURN OUTPUT_VARIABLE ODE_LDFLAGS )
-#  STRING(REGEX REPLACE [\r\n]   ${ODE_LDFLAGS} ${${ODE_LDFLAGS}})
-#
-#  SET(ODE_FOUND ${DETECTED_ODE_VERSION})
-#ELSE(NOT ${REQUIRED_ODE_VERSION} VERSION_LESS ${DETECTED_ODE_VERSION} )
-#  MESSAGE(STATUS ode-config reports wrong version 
(${DETECTED_ODE_VERSION}  ${REQUIRED_ODE_VERSION}))
-#ENDIF(NOT ${REQUIRED_ODE_VERSION} VERSION_LESS ${DETECTED_ODE_VERSION} )
-#  ELSE(NOT ODE_CONFIG_RETURN)
-#  MESSAGE(STATUS no ode-config found)
-#  ENDIF(NOT ODE_CONFIG_RETURN)
-#ENDIF (NOT ODE_FOUND)
-
-IF (NOT ODE_FOUND)
-  BUILD_ERROR (ODE and development files not found. See the following 
website: http://www.ode.org;)
-  SET (INCLUDE_ODE FALSE CACHE BOOL Include support for ODE)
-ELSE (NOT ODE_FOUND)
-  SET (INCLUDE_ODE TRUE CACHE BOOL Include support for ODE)
-
-  #APPEND_TO_CACHED_LIST(gazeboserver_cflags
-  #  ${gazeboserver_cflags_desc}
-  #  ${ODE_CFLAGS_OTHER})
-
-  APPEND_TO_CACHED_LIST(gazeboserver_include_dirs 
-${gazeboserver_include_dirs_desc} 
-${ODE_INCLUDE_DIRS})
-  APPEND_TO_CACHED_LIST(gazeboserver_link_dirs 
-${gazeboserver_link_dirs_desc} 
-${ODE_LIBRARY_DIRS})
-  APPEND_TO_CACHED_LIST(gazeboserver_link_libs 
-${gazeboserver_link_libs_desc} 
-${ODE_LINK_LIBS})
-  APPEND_TO_CACHED_LIST(gazeboserver_link_libs 
-${gazeboserver_link_libs_desc} 
-${ODE_LIBRARIES})
-  APPEND_TO_CACHED_LIST(gazeboserver_ldflags
-${gazeboserver_ldflags_desc} 
-${ODE_LDFLAGS})
-ENDIF (NOT ODE_FOUND)

Modified: code/gazebo/branches/simpar/cmake/SearchForStuff.cmake
===
--- code/gazebo/branches/simpar/cmake/SearchForStuff.cmake  2010-05-28 
16:30:17 UTC (rev 8724)
+++ code/gazebo/branches/simpar/cmake/SearchForStuff.cmake  2010-05-28 
16:58:40 UTC (rev 8725)
@@ -1,6 +1,9 @@
 include (${gazebo_cmake_dir}/GazeboUtils.cmake)
 include (CheckCXXSourceCompiles)
 
+# John - ode version with joint damping
+SET(ODE_JOINT_DAMPING_VERSION 0.11.1.1 CACHE INTERNAL ODE version with joint 
damping FORCE)
+
 set (use_internal_assimp OFF CACHE BOOL Use internal assimp FORCE)
 
 set (INCLUDE_WEBGAZEBO

[Playerstage-commit] SF.net SVN: playerstage:[8726] code/gazebo/branches/simpar

2010-05-28 Thread natepak
Revision: 8726
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8726view=rev
Author:   natepak
Date: 2010-05-28 17:24:13 + (Fri, 28 May 2010)

Log Message:
---
Added in a flag for enabling RT_SHADER

Modified Paths:
--
code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc
code/gazebo/branches/simpar/cmake/SearchForStuff.cmake
code/gazebo/branches/simpar/config.h.in
code/gazebo/branches/simpar/server/physics/ode/ODEJoint.cc
code/gazebo/branches/simpar/server/rendering/RTShaderSystem.cc

Modified: code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc
===
--- code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc  
2010-05-28 16:58:40 UTC (rev 8725)
+++ code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc  
2010-05-28 17:24:13 UTC (rev 8726)
@@ -173,7 +173,7 @@
   simIface-StartLogEntity(pioneer);
   simIface-Unpause();
 
-  double left = 1.0;
+  double left = 1.0/stepTime;
   double right = left*1.8;
 
   std::cout  Left[  left  ] Right[  right  ]\n;

Modified: code/gazebo/branches/simpar/cmake/SearchForStuff.cmake
===
--- code/gazebo/branches/simpar/cmake/SearchForStuff.cmake  2010-05-28 
16:58:40 UTC (rev 8725)
+++ code/gazebo/branches/simpar/cmake/SearchForStuff.cmake  2010-05-28 
17:24:13 UTC (rev 8726)
@@ -94,10 +94,12 @@
 set(ogre_libraries ${OGRE-RTShaderSystem_LIBRARIES})
 set(ogre_cflags ${OGRE-RTShaderSystem_CFLAGS})
 
-add_definitions(-DUSE_RTSHADER_SYSTEM)
+set (INCLUDE_RTSHADER ON CACHE BOOL Enable GPU shaders)
 
   else (OGRE-RTShaderSystem_FOUND)
 
+set (INCLUDE_RTSHADER OFF CACHE BOOL Enable GPU shaders)
+
 pkg_check_modules(OGRE OGRE=${MIN_OGRE_VERSION})
 if (NOT OGRE_FOUND)
   BUILD_ERROR(Ogre3d version =${MIN_OGRE_VERSION} and development files 
not found. See the following website for installation instructions: 
http://www.orge3d.org;)

Modified: code/gazebo/branches/simpar/config.h.in
===
--- code/gazebo/branches/simpar/config.h.in 2010-05-28 16:58:40 UTC (rev 
8725)
+++ code/gazebo/branches/simpar/config.h.in 2010-05-28 17:24:13 UTC (rev 
8726)
@@ -15,3 +15,4 @@
 #cmakedefine INCLUDE_BULLET 1
 #cmakedefine INCLUDE_ODE 1
 #cmakedefine INCLUDE_ODE_JOINT_DAMPING 1
+#cmakedefine INCLUDE_RTSHADER 1

Modified: code/gazebo/branches/simpar/server/physics/ode/ODEJoint.cc
===
--- code/gazebo/branches/simpar/server/physics/ode/ODEJoint.cc  2010-05-28 
16:58:40 UTC (rev 8725)
+++ code/gazebo/branches/simpar/server/physics/ode/ODEJoint.cc  2010-05-28 
17:24:13 UTC (rev 8726)
@@ -325,12 +325,13 @@
 case VEL:
   this-SetParam(dParamVel, value);
   break;
-case HI_STOP:
+/*case HI_STOP:
   this-SetParam(dParamHiStop, value);
   break;
 case LO_STOP:
   this-SetParam(dParamLoStop, value);
   break;
+  */
 default:
   gzerr(0)  Unable to handle joint attribute[  attr  ]\n;
   break;

Modified: code/gazebo/branches/simpar/server/rendering/RTShaderSystem.cc
===
--- code/gazebo/branches/simpar/server/rendering/RTShaderSystem.cc  
2010-05-28 16:58:40 UTC (rev 8725)
+++ code/gazebo/branches/simpar/server/rendering/RTShaderSystem.cc  
2010-05-28 17:24:13 UTC (rev 8726)
@@ -53,7 +53,7 @@
 /// Init the run time shader system
 void RTShaderSystem::Init()
 {
-#if OGRE_VERSION_MAJOR = 1  OGRE_VERSION_MINOR = MINOR_VERSION
+#if INCLUDE_RTSHADER  OGRE_VERSION_MAJOR = 1  OGRE_VERSION_MINOR = 
MINOR_VERSION
   if (Ogre::RTShader::ShaderGenerator::initialize())
   {
 Ogre::StringVector groupVector;
@@ -137,7 +137,7 @@
 
 void RTShaderSystem::Fini()
 {
-#if OGRE_VERSION_MAJOR = 1  OGRE_VERSION_MINOR = MINOR_VERSION
+#if INCLUDE_RTSHADER  OGRE_VERSION_MAJOR = 1  OGRE_VERSION_MINOR = 
MINOR_VERSION
   // Restore default scheme.
   
Ogre::MaterialManager::getSingleton().setActiveScheme(Ogre::MaterialManager::DEFAULT_SCHEME_NAME);
 
@@ -162,7 +162,7 @@
 // Set an Ogre::Entity to use RT shaders
 void RTShaderSystem::AttachEntity(OgreVisual *vis)
 {
-#if OGRE_VERSION_MAJOR = 1  OGRE_VERSION_MINOR = MINOR_VERSION
+#if INCLUDE_RTSHADER  OGRE_VERSION_MAJOR = 1  OGRE_VERSION_MINOR = 
MINOR_VERSION
   this-GenerateShaders(vis);
   this-entities.push_back(vis);
 #endif
@@ -172,7 +172,7 @@
 // Remove and entity
 void RTShaderSystem::DetachEntity(OgreVisual *vis)
 {
-#if OGRE_VERSION_MAJOR = 1  OGRE_VERSION_MINOR = MINOR_VERSION
+#if INCLUDE_RTSHADER  OGRE_VERSION_MAJOR = 1  OGRE_VERSION_MINOR = 
MINOR_VERSION
   this-entities.remove(vis);
 #endif
 }
@@ -181,7 +181,7 @@
 /// Update the shaders
 void RTShaderSystem::UpdateShaders()
 {
-#if OGRE_VERSION_MAJOR = 1  OGRE_VERSION_MINOR

[Playerstage-commit] SF.net SVN: playerstage:[8727] code/gazebo/branches/simpar/benchmarks

2010-05-28 Thread natepak
Revision: 8727
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8727view=rev
Author:   natepak
Date: 2010-05-28 21:22:39 + (Fri, 28 May 2010)

Log Message:
---
Update the sprial and circle benchmarks

Modified Paths:
--
code/gazebo/branches/simpar/benchmarks/CMakeLists.txt
code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc
code/gazebo/branches/simpar/benchmarks/pioneer_spiral_benchmark.cc

Modified: code/gazebo/branches/simpar/benchmarks/CMakeLists.txt
===
--- code/gazebo/branches/simpar/benchmarks/CMakeLists.txt   2010-05-28 
17:24:13 UTC (rev 8726)
+++ code/gazebo/branches/simpar/benchmarks/CMakeLists.txt   2010-05-28 
21:22:39 UTC (rev 8727)
@@ -31,6 +31,7 @@
 box_drop 
 table
 pioneer_circle
+pioneer_spiral
 )
 
 foreach (src ${benchmarks})

Modified: code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc
===
--- code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc  
2010-05-28 17:24:13 UTC (rev 8726)
+++ code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc  
2010-05-28 21:22:39 UTC (rev 8727)
@@ -4,7 +4,10 @@
 #include vector
 #include libgazebo/gz.h
 #include boost/lexical_cast.hpp
+#include math.h
 
+#define DTOR(x) ( (x) * M_PI / 180.0)
+
 gazebo::Client *client = NULL;
 gazebo::SimulationIface *simIface = NULL;
 gazebo::FactoryIface *factoryIface = NULL;
@@ -173,17 +176,36 @@
   simIface-StartLogEntity(pioneer);
   simIface-Unpause();
 
-  double left = 1.0/stepTime;
-  double right = left*1.8;
+  double angle = 10;
+  double speed = 0.2;
+  std::cout  Radians[  DTOR(angle)  ]\n;
+  double left = speed + DTOR(angle) * 0.39/2;
+  double right = speed - DTOR(angle) * 0.39/2;
 
-  std::cout  Left[  left  ] Right[  right  ]\n;
+  left = left / (.15 *0.5);
+  right = right / (.15 *0.5);
 
-  double time = simIface-data-simTime;
-  while(simIface-data-simTime - time  60)
+  //std::cout  Left[  left  ] Right[  right  ]\n;
+
+  gazebo::Pose pose;
+  double prevX = 0;
+  std::cout  X[  pose.pos.x  ] Y[  pose.pos.y  ]\n;
+
+  double time = simIface-data-realTime;
+  int circles = 0;
+
+  while (circles  4)
   {
 simIface-SetAngularVel(pioneer::left_wheel, gazebo::Vec3(0,0,left));
 simIface-SetAngularVel(pioneer::right_wheel, gazebo::Vec3(0,0, right));
-usleep(1);
+simIface-GetPose2d(pioneer, pose);
+
+if (simIface-data-realTime - time  5.0  fabs(pose.pos.x)  0.1 )
+{
+  time = simIface-data-realTime;
+  circles++;
+  std::cout  Found a circle[  circles  ]\n;
+}
   }
 
   simIface-StopLogEntity(pioneer);
@@ -251,8 +273,8 @@
   std::vectorstd::string  step_types;
   std::vectorstd::string ::iterator iter;
   //step_types.push_back(robust);
-  //step_types.push_back(world);
-  step_types.push_back(quick);
+  step_types.push_back(world);
+  //step_types.push_back(quick);
 
   for (iter = step_types.begin(); iter != step_types.end(); iter++)
   {
@@ -266,9 +288,9 @@
 int i = 0;
 
 simIface-SetStepType(*iter);
-for (double step=0.0001; step  1e-5; step *= 0.5)
+for (double step=0.001; step  1e-5; step *= 0.5)
 {
-  unsigned int iterations = 10;
+  unsigned int iterations = 100;
   if (*iter == world)
 iterations = 199;
   for (; iterations  200; iterations +=20, i++)

Modified: code/gazebo/branches/simpar/benchmarks/pioneer_spiral_benchmark.cc
===
--- code/gazebo/branches/simpar/benchmarks/pioneer_spiral_benchmark.cc  
2010-05-28 17:24:13 UTC (rev 8726)
+++ code/gazebo/branches/simpar/benchmarks/pioneer_spiral_benchmark.cc  
2010-05-28 21:22:39 UTC (rev 8727)
@@ -168,23 +168,16 @@
   factoryIface-Unlock();
 }
 
-void RunSim(double stepTime)
+void RunSim()
 {
   simIface-StartLogEntity(pioneer);
   simIface-Unpause();
 
-  double left = 0.1/stepTime;
-  if (left  5)
-left = 5.0;
-  double right = left * 0.5;
-
-  std::cout  Left[  left  ] Right[  right  ]\n;
-  
   double time = simIface-data-realTime;
   while(simIface-data-realTime - time  60)
   {
-simIface-ApplyTorque(pioneer::left_wheel,gazebo::Vec3(0,0,-50));
-usleep(10);
+simIface-ApplyTorque(pioneer::left_wheel,gazebo::Vec3(0,0,-30));
+usleep(2);
   }
 
   simIface-StopLogEntity(pioneer);
@@ -255,7 +248,7 @@
   //step_types.push_back(world);
   //step_types.push_back(quick);
 
-  for (iter = step_types.begin(); iter != step_types.end(); iter++)
+  /*for (iter = step_types.begin(); iter != step_types.end(); iter++)
   {
 std::string path = 
std::string(/home/nate/work/simpar/data/pioneer_spiral/) + *iter + /;
 system((std::string(mkdir -p )+path).c_str());
@@ -278,8 +271,9 @@
 
 fprintf(out,%d %f %d\n,i,step, iterations);
 std::cout

[Playerstage-commit] SF.net SVN: playerstage:[8728] code/gazebo/branches/simpar/server/physics/ ode/ODEPhysics.cc

2010-05-28 Thread natepak
Revision: 8728
  http://playerstage.svn.sourceforge.net/playerstage/?rev=8728view=rev
Author:   natepak
Date: 2010-05-28 23:08:03 + (Fri, 28 May 2010)

Log Message:
---
Hacked ODEPhysics for a test case

Modified Paths:
--
code/gazebo/branches/simpar/server/physics/ode/ODEPhysics.cc

Modified: code/gazebo/branches/simpar/server/physics/ode/ODEPhysics.cc
===
--- code/gazebo/branches/simpar/server/physics/ode/ODEPhysics.cc
2010-05-28 21:22:39 UTC (rev 8727)
+++ code/gazebo/branches/simpar/server/physics/ode/ODEPhysics.cc
2010-05-28 23:08:03 UTC (rev 8728)
@@ -222,12 +222,91 @@
 {
   std::vectorContactFeedback::iterator iter;
   std::vectordJointFeedback::iterator jiter;
- 
+
+  ODEBody *leftBody = 
(ODEBody*)World::Instance()-GetEntityByName(pioneer::left_wheel);
+  ODEBody *rightBody = 
(ODEBody*)World::Instance()-GetEntityByName(pioneer::right_wheel);
+  ODEBody *castorBody = 
(ODEBody*)World::Instance()-GetEntityByName(pioneer::castor_body);
+  ODEBody *planeBody = 
(ODEBody*)World::Instance()-GetEntityByName(plane1_model::plane1_body);
+
+  if (leftBody  rightBody  planeBody  castorBody)
+  {
+ODEGeom *leftGeom = (ODEGeom*)leftBody-GetGeom(left_wheel_geom);
+ODEGeom *rightGeom = (ODEGeom*)rightBody-GetGeom(right_wheel_geom);
+ODEGeom *castorGeom = (ODEGeom*)castorBody-GetGeom(castor_geom);
+ODEGeom *planeGeom = (ODEGeom*)planeBody-GetGeom(plane1_geom);
+
+dContactGeom geomLeft, geomRight, geomCastor;
+geomLeft.pos[0] = leftBody-GetAbsPose().pos.x;
+geomLeft.pos[1] = leftBody-GetAbsPose().pos.y;
+geomLeft.pos[2] = 0;
+geomLeft.normal[0] = 0;
+geomLeft.normal[1] = 0;
+geomLeft.normal[2] = 1;
+geomLeft.depth = .001;
+geomLeft.g1 = leftGeom-GetGeomId();
+geomLeft.g2 = planeGeom-GetGeomId();
+
+geomRight.pos[0] = rightBody-GetAbsPose().pos.x;
+geomRight.pos[1] = rightBody-GetAbsPose().pos.y;
+geomRight.pos[2] = 0;
+geomRight.normal[0] = 0;
+geomRight.normal[1] = 0;
+geomRight.normal[2] = 1;
+geomRight.depth = .001;
+geomRight.g1 = rightGeom-GetGeomId();
+geomRight.g2 = planeGeom-GetGeomId();
+
+geomCastor.pos[0] = castorBody-GetAbsPose().pos.x;
+geomCastor.pos[1] = castorBody-GetAbsPose().pos.y;
+geomCastor.pos[2] = 0;
+geomCastor.normal[0] = 0;
+geomCastor.normal[1] = 0;
+geomCastor.normal[2] = 1;
+geomCastor.depth = .001;
+geomCastor.g1 = castorGeom-GetGeomId();
+geomCastor.g2 = planeGeom-GetGeomId();
+
+dContact contact;
+contact.geom = geomLeft;
+contact.surface.mode = dContactSoftERP | dContactSoftCFM; 
+contact.surface.mu = 0; 
+contact.surface.mu2 = 0;
+contact.surface.slip1 = 0.1;
+contact.surface.slip2 = 0.1;
+contact.surface.bounce =  0;
+dJointID c = dJointCreateContact(this-worldId, this-contactGroup, 
contact);
+dJointAttach (c, leftBody-GetODEId(), planeBody-GetODEId());
+
+dContact contact2;
+contact2.geom = geomRight;
+contact2.surface.mode = dContactSoftERP | dContactSoftCFM; 
+contact2.surface.mu = 0; 
+contact2.surface.mu2 = 0;
+contact2.surface.slip1 = 0.1;
+contact2.surface.slip2 = 0.1;
+contact2.surface.bounce =  0;
+dJointID c2 = dJointCreateContact(this-worldId, this-contactGroup, 
contact2);
+dJointAttach (c2, rightBody-GetODEId(), planeBody-GetODEId());
+
+dContact contact3;
+contact3.geom = geomCastor;
+contact3.surface.mode = dContactSoftERP | dContactSoftCFM; 
+contact3.surface.mu = 0; 
+contact3.surface.mu2 = 0;
+contact3.surface.slip1 = 0.1;
+contact3.surface.slip2 = 0.1;
+contact3.surface.bounce =  0;
+dJointID c3 = dJointCreateContact(this-worldId, this-contactGroup, 
contact3);
+dJointAttach (c3, castorBody-GetODEId(), planeBody-GetODEId());
+
+  }
+
+
   // Do collision detection; this will add contacts to the contact group
   this-LockMutex(); 
   {
 //DiagnosticTimer timer(ODEPhysics Collision Update);
-dSpaceCollide( this-spaceId, this, CollisionCallback );
+//dSpaceCollide( this-spaceId, this, CollisionCallback );
   }
   this-UnlockMutex(); 
 
@@ -649,7 +728,7 @@
 //contact.surface.mode = dContactSlip1 | dContactSlip2 | 
 //   dContactSoftERP | dContactSoftCFM |  
 //   dContactBounce | dContactMu2 | 
dContactApprox1;
-contact.surface.mode = dContactSoftERP | dContactSoftCFM | 
dContactApprox1;
+contact.surface.mode = dContactSoftERP | dContactSoftCFM;// | 
dContactApprox1;
 // with dContactSoftERP | dContactSoftCFM the test_pr2_collision 
overshoots the cup
 
 // Compute the CFM and ERP by assuming the two bodies form a
@@ -660,7 +739,7 @@
 contact.surface.soft_erp = h * kp / (h * kp + kd);
 contact.surface.soft_cfm = 1.0 / (h * kp + kd);
 
-if (geom1-surface-enableFriction

  1   2   3   4   5   6   >