Revision: 6920
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6920&view=rev
Author:   natepak
Date:     2008-07-24 15:27:54 +0000 (Thu, 24 Jul 2008)

Log Message:
-----------
Updates to geom and body.

Modified Paths:
--------------
    code/gazebo/trunk/server/Entity.cc
    code/gazebo/trunk/server/Entity.hh
    code/gazebo/trunk/server/Simulator.cc
    code/gazebo/trunk/server/physics/Body.cc
    code/gazebo/trunk/server/physics/Body.hh
    code/gazebo/trunk/server/physics/ContactParams.cc
    code/gazebo/trunk/server/physics/Geom.cc
    code/gazebo/trunk/server/physics/Geom.hh
    code/gazebo/trunk/server/physics/MapGeom.cc
    code/gazebo/trunk/server/physics/MapGeom.hh
    code/gazebo/trunk/server/physics/ode/ODEPhysics.cc
    code/gazebo/trunk/worlds/map.world
    code/gazebo/trunk/worlds/pioneer2dx.world
    code/gazebo/trunk/worlds/simpleshapes.world

Modified: code/gazebo/trunk/server/Entity.cc
===================================================================
--- code/gazebo/trunk/server/Entity.cc  2008-07-24 00:03:46 UTC (rev 6919)
+++ code/gazebo/trunk/server/Entity.cc  2008-07-24 15:27:54 UTC (rev 6920)
@@ -44,6 +44,8 @@
   visualNode(0)
 {
  
+  this->selected = false;
+
   if (this->parent)
   {
     this->parent->AddChild(this);
@@ -159,6 +161,31 @@
 }
 
 
////////////////////////////////////////////////////////////////////////////////
+/// Set whether this entity has been selected by the user through the gui
+bool Entity::SetSelected( bool s )
+{
+  std::vector< Entity *>::iterator iter;
+  Body *body = NULL;
+
+  this->selected = s;
+
+  for (iter = this->children.begin(); iter != this->children.end(); iter++)
+  {
+    (*iter)->SetSelected(s);
+    body = dynamic_cast<Body*>(*iter);
+    if (body)
+      body->SetEnabled(!s);
+  }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// True if the entity is selected by the user
+bool Entity::IsSelected() const
+{
+  return this->selected;
+}
+
+////////////////////////////////////////////////////////////////////////////////
 /// Returns true if the entities are the same. Checks only the name
 bool Entity::operator==(const Entity &ent) const 
 {

Modified: code/gazebo/trunk/server/Entity.hh
===================================================================
--- code/gazebo/trunk/server/Entity.hh  2008-07-24 00:03:46 UTC (rev 6919)
+++ code/gazebo/trunk/server/Entity.hh  2008-07-24 15:27:54 UTC (rev 6920)
@@ -101,6 +101,13 @@
   /// \return bool True = static
   public: bool IsStatic() const;
 
+  /// \brief Set whether this entity has been selected by the user through 
+  //         the gui
+  public: bool SetSelected( bool s );
+
+  /// \brief True if the entity is selected by the user
+  public: bool IsSelected() const;
+
   /// \brief Returns true if the entities are the same. Checks only the name
   public: bool operator==(const Entity &ent) const;
 
@@ -128,6 +135,8 @@
   /// \brief Name of the entity
   private: std::string name;
 
+  private: bool selected;
+
 };
 
 /// \}

Modified: code/gazebo/trunk/server/Simulator.cc
===================================================================
--- code/gazebo/trunk/server/Simulator.cc       2008-07-24 00:03:46 UTC (rev 
6919)
+++ code/gazebo/trunk/server/Simulator.cc       2008-07-24 15:27:54 UTC (rev 
6920)
@@ -464,14 +464,14 @@
   if (this->selectedEntity)
   {
     this->selectedEntity->GetVisualNode()->ShowSelectionBox(false);
-    this->selectedEntity->SetStatic(false);
+    this->selectedEntity->SetSelected(false);
   }
 
   if (this->selectedEntity != ent)
   {
     this->selectedEntity = ent;
     this->selectedEntity->GetVisualNode()->ShowSelectionBox(true);
-    this->selectedEntity->SetStatic(true);
+    this->selectedEntity->SetSelected(true);
   }
   else
     this->selectedEntity = NULL;

Modified: code/gazebo/trunk/server/physics/Body.cc
===================================================================
--- code/gazebo/trunk/server/physics/Body.cc    2008-07-24 00:03:46 UTC (rev 
6919)
+++ code/gazebo/trunk/server/physics/Body.cc    2008-07-24 15:27:54 UTC (rev 
6920)
@@ -51,11 +51,17 @@
 Body::Body(Entity *parent, dWorldID worldId)
     : Entity(parent)
 {
-  this->bodyId = dBodyCreate(worldId);
 
-  dMassSetZero( &this->mass );
+  if ( !this->IsStatic() )
+  {
+    this->bodyId = dBodyCreate(worldId);
 
-  this->SetEnabled(!this->IsStatic());
+    dMassSetZero( &this->mass );
+  }
+  else
+  {
+    this->bodyId = NULL;
+  }
 }
 
 
@@ -158,7 +164,8 @@
 // Set whether gravity affects this body
 void Body::SetGravityMode(bool mode)
 {
-  dBodySetGravityMode(this->bodyId, mode);
+  if (this->bodyId)
+    dBodySetGravityMode(this->bodyId, mode);
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -185,21 +192,20 @@
 
   if (!this->IsStatic())
   {
-    //this->SetEnabled(true);
     Pose3d pose = this->GetPose();
 
     // Set the pose of the scene node
     this->visualNode->SetPose(pose);
   }
-  else
-  {
-    this->SetEnabled(false);
-  }
 
   for (geomIter=this->geoms.begin();
        geomIter!=this->geoms.end(); geomIter++)
   {
     (*geomIter)->Update();
+    if ((*geomIter)->GetName() == "sphere1_geom")
+    {
+      std::cout << "Geom pose[" << (*geomIter)->GetPose() << "]\n";
+    }
   }
 
   for (sensorIter=this->sensors.begin();
@@ -213,7 +219,7 @@
 // Attach a geom to this body
 void Body::AttachGeom( Geom *geom )
 {
-  //if (this->bodyId)
+  if ( this->bodyId )
   {
     if (geom->IsPlaceable())
     {
@@ -233,11 +239,38 @@
 {
   Pose3d localPose;
 
-  // Compute pose of CoM
-  localPose = this->comPose + pose;
+  if (this->IsStatic())
+  {
+    Pose3d oldPose = this->staticPose;
+    Pose3d newPose;
+    this->staticPose = pose;
 
-  this->SetPosition(localPose.pos);
-  this->SetRotation(localPose.rot);
+    std::vector<Geom*>::iterator iter;
+
+    //this->SetPosition(this->staticPose.pos);
+    //this->SetRotation(this->staticPose.rot);
+   
+    if (this->GetName() == "map_body")
+    {
+      std::cout << "Set new pose[" << pose << "]\n";
+      std::cout << "Old Pose[ " << oldPose << "]\n";
+    }
+
+    for (iter = this->geoms.begin(); iter != this->geoms.end(); iter++)
+    {
+      newPose = (*iter)->GetPose() - oldPose;
+      newPose += this->staticPose;
+      (*iter)->SetPose(newPose);
+    }
+  }
+  else
+  {
+    // Compute pose of CoM
+    localPose = this->comPose + pose;
+
+    this->SetPosition(localPose.pos);
+    this->SetRotation(localPose.rot);
+  }
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -246,10 +279,17 @@
 {
   Pose3d pose;
 
-  pose.pos = this->GetPosition();
-  pose.rot = this->GetRotation();
+  if (this->IsStatic())
+  {
+    pose = this->staticPose;
+  }
+  else
+  {
+    pose.pos = this->GetPosition();
+    pose.rot = this->GetRotation();
 
-  pose = this->comPose.CoordPoseSolve(pose);
+    pose = this->comPose.CoordPoseSolve(pose);
+  }
 
   return pose;
 }
@@ -258,7 +298,8 @@
 // Set the position of the body
 void Body::SetPosition(const Vector3 &pos)
 {
-  dBodySetPosition(this->bodyId, pos.x, pos.y, pos.z);
+  if (this->bodyId)
+    dBodySetPosition(this->bodyId, pos.x, pos.y, pos.z);
 
   // Set the position of the scene node
   this->visualNode->SetPosition(pos);
@@ -268,15 +309,19 @@
 // Set the rotation of the body
 void Body::SetRotation(const Quatern &rot)
 {
-  dQuaternion q;
-  q[0] = rot.u;
-  q[1] = rot.x;
-  q[2] = rot.y;
-  q[3] = rot.z;
 
-  // Set the rotation of the ODE body
-  dBodySetQuaternion(this->bodyId, q);
+  if (this->bodyId)
+  {
+    dQuaternion q;
+    q[0] = rot.u;
+    q[1] = rot.x;
+    q[2] = rot.y;
+    q[3] = rot.z;
 
+    // Set the rotation of the ODE body
+    dBodySetQuaternion(this->bodyId, q);
+  }
+
   // Set the orientation of the scene node
   this->visualNode->SetRotation(rot);
 }
@@ -286,14 +331,22 @@
 Vector3 Body::GetPosition() const
 {
   Vector3 pos;
-  const dReal *p;
 
-  p = dBodyGetPosition(this->bodyId);
+  if (this->bodyId)
+  {
+    const dReal *p;
 
-  pos.x = p[0];
-  pos.y = p[1];
-  pos.z = p[2];
+    p = dBodyGetPosition(this->bodyId);
 
+    pos.x = p[0];
+    pos.y = p[1];
+    pos.z = p[2];
+  }
+  else
+  {
+    pos = this->staticPose.pos;
+  }
+
   return pos;
 }
 
@@ -303,15 +356,23 @@
 Quatern Body::GetRotation() const
 {
   Quatern rot;
-  const dReal *r;
 
-  r = dBodyGetQuaternion(this->bodyId);
+  if (this->bodyId)
+  {
+    const dReal *r;
 
-  rot.u = r[0];
-  rot.x = r[1];
-  rot.y = r[2];
-  rot.z = r[3];
+    r = dBodyGetQuaternion(this->bodyId);
 
+    rot.u = r[0];
+    rot.x = r[1];
+    rot.y = r[2];
+    rot.z = r[3];
+  }
+  else
+  {
+    rot = this->staticPose.rot;
+  }
+
   return rot;
 }
 
@@ -327,6 +388,9 @@
 // Set whether this body is enabled
 void Body::SetEnabled(bool enable) const
 {
+  if (!this->bodyId)
+    return;
+
   if (enable)
     dBodyEnable(this->bodyId);
   else
@@ -356,7 +420,7 @@
   }
   else if (node->GetName() == "map")
   {
-    this->SetStatic(true);
+    //this->SetStatic(true);
     geom = new MapGeom(this);
   }
   else
@@ -418,6 +482,9 @@
   Pose3d oldPose, newPose, pose;
   std::vector< Geom* >::iterator giter;
 
+  if (!this->bodyId)
+    return;
+
   // Construct the mass matrix by combining all the geoms
   dMassSetZero( &this->mass );
 
@@ -489,7 +556,8 @@
 /// Set the velocity of the body
 void Body::SetLinearVel(const Vector3 &vel)
 {
-  dBodySetLinearVel(this->bodyId, vel.x, vel.y, vel.z);
+  if (this->bodyId)
+    dBodySetLinearVel(this->bodyId, vel.x, vel.y, vel.z);
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -497,14 +565,18 @@
 Vector3 Body::GetLinearVel() const
 {
   Vector3 vel;
-  const dReal *dvel;
 
-  dvel = dBodyGetLinearVel(this->bodyId);
+  if (this->bodyId)
+  {
+    const dReal *dvel;
 
-  vel.x = dvel[0];
-  vel.y = dvel[1];
-  vel.z = dvel[2];
+    dvel = dBodyGetLinearVel(this->bodyId);
 
+    vel.x = dvel[0];
+    vel.y = dvel[1];
+    vel.z = dvel[2];
+  }
+
   return vel;
 }
 
@@ -512,7 +584,8 @@
 /// Set the velocity of the body
 void Body::SetAngularVel(const Vector3 &vel)
 {
-  dBodySetAngularVel(this->bodyId, vel.x, vel.y, vel.z);
+  if (this->bodyId)
+    dBodySetAngularVel(this->bodyId, vel.x, vel.y, vel.z);
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -520,21 +593,26 @@
 Vector3 Body::GetAngularVel() const
 {
   Vector3 vel;
-  const dReal *dvel;
 
-  dvel = dBodyGetAngularVel(this->bodyId);
+  if (this->bodyId)
+  {
+    const dReal *dvel;
 
-  vel.x = dvel[0];
-  vel.y = dvel[1];
-  vel.z = dvel[2];
+    dvel = dBodyGetAngularVel(this->bodyId);
 
+    vel.x = dvel[0];
+    vel.y = dvel[1];
+    vel.z = dvel[2];
+  }
+
   return vel;
 }
 
////////////////////////////////////////////////////////////////////////////////
 /// \brief Set the force applied to the body
 void Body::SetForce(const Vector3 &force)
 {
-  dBodySetForce(this->bodyId, force.x, force.y, force.z);
+  if (this->bodyId)
+    dBodySetForce(this->bodyId, force.x, force.y, force.z);
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -542,14 +620,18 @@
 Vector3 Body::GetForce() const
 {
   Vector3 force;
-  const dReal *dforce;
 
-  dforce = dBodyGetForce(this->bodyId);
+  if (this->bodyId)
+  {
+    const dReal *dforce;
 
-  force.x = dforce[0];
-  force.y = dforce[1];
-  force.z = dforce[2];
+    dforce = dBodyGetForce(this->bodyId);
 
+    force.x = dforce[0];
+    force.y = dforce[1];
+    force.z = dforce[2];
+  }
+
   return force;
 }
 
@@ -557,7 +639,8 @@
 /// \brief Set the torque applied to the body
 void Body::SetTorque(const Vector3 &torque)
 {
-  dBodySetTorque(this->bodyId, torque.x, torque.y, torque.z);
+  if (this->bodyId)
+    dBodySetTorque(this->bodyId, torque.x, torque.y, torque.z);
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -565,13 +648,16 @@
 Vector3 Body::GetTorque() const
 {
   Vector3 torque;
-  const dReal *dtorque;
+  if (this->bodyId)
+  {
+    const dReal *dtorque;
 
-  dtorque = dBodyGetTorque(this->bodyId);
+    dtorque = dBodyGetTorque(this->bodyId);
 
-  torque.x = dtorque[0];
-  torque.y = dtorque[1];
-  torque.z = dtorque[2];
+    torque.x = dtorque[0];
+    torque.y = dtorque[1];
+    torque.z = dtorque[2];
+  }
 
   return torque;
 }

Modified: code/gazebo/trunk/server/physics/Body.hh
===================================================================
--- code/gazebo/trunk/server/physics/Body.hh    2008-07-24 00:03:46 UTC (rev 
6919)
+++ code/gazebo/trunk/server/physics/Body.hh    2008-07-24 15:27:54 UTC (rev 
6920)
@@ -168,6 +168,7 @@
   private: bool isStatic;
 
   private: Pose3d comPose;
+  private: Pose3d staticPose;
 };
 
 /// \}

Modified: code/gazebo/trunk/server/physics/ContactParams.cc
===================================================================
--- code/gazebo/trunk/server/physics/ContactParams.cc   2008-07-24 00:03:46 UTC 
(rev 6919)
+++ code/gazebo/trunk/server/physics/ContactParams.cc   2008-07-24 15:27:54 UTC 
(rev 6920)
@@ -42,7 +42,7 @@
   this->softCfm = 0.01;
 
   this->mu1 = dInfinity;
-  this->mu2 = 0.0;
+  this->mu2 = dInfinity;
   this->slip1 = 0.01;
   this->slip2 = 0.01;
 }

Modified: code/gazebo/trunk/server/physics/Geom.cc
===================================================================
--- code/gazebo/trunk/server/physics/Geom.cc    2008-07-24 00:03:46 UTC (rev 
6919)
+++ code/gazebo/trunk/server/physics/Geom.cc    2008-07-24 15:27:54 UTC (rev 
6920)
@@ -215,6 +215,8 @@
   //this->SetName(stream.str());
 }
 
+////////////////////////////////////////////////////////////////////////////////
+// Update
 void Geom::Update()
 {
   this->UpdateChild();
@@ -251,34 +253,6 @@
   return this->placeable;
 }
 
-void Geom::PlaceImmovable()
-{
-  assert(IsStatic());
-  if (this->geomId == 0) return;
-
-  dQuaternion q;
-  Pose3d finalPose = immovableRelativePose + immovableBasePose;
-  q[0] = finalPose.rot.u;
-  q[1] = finalPose.rot.x;
-  q[2] = finalPose.rot.y;
-  q[3] = finalPose.rot.z;
-
-  // Set the pose of the encapsulated geom
-  dGeomSetPosition( this->geomId, finalPose.pos.x, finalPose.pos.y, 
finalPose.pos.z );
-  dGeomSetQuaternion( this->geomId, q);
-
-  return;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// Set base pose when body is immovable (static)
-void Geom::SetImmovableBasePose(const Pose3d & pose)
-{
-  immovableBasePose = pose;
-  this->PlaceImmovable();
-  return;
-}
-
 
////////////////////////////////////////////////////////////////////////////////
 // Set the pose relative to the body
 void Geom::SetPose(const Pose3d &pose, bool updateCoM)
@@ -299,18 +273,16 @@
 
     this->visualNode->SetPose(pose);
 
-    if (this->IsStatic())
-    {
-      immovableRelativePose = pose;
-      this->PlaceImmovable();
-      return;
-    }
-
     // Set the pose of the encapsulated geom; this is always relative
     // to the CoM
     dGeomSetPosition(this->geomId, localPose.pos.x, localPose.pos.y, 
localPose.pos.z);
     dGeomSetQuaternion(this->geomId, q);
 
+    if (this->GetName() == "sphere1_geom")
+    {
+      std::cout << "Geom set pose[" << this->GetPose() << "]\n";
+    }
+
     if (updateCoM)
     {
       this->body->UpdateCoM();

Modified: code/gazebo/trunk/server/physics/Geom.hh
===================================================================
--- code/gazebo/trunk/server/physics/Geom.hh    2008-07-24 00:03:46 UTC (rev 
6919)
+++ code/gazebo/trunk/server/physics/Geom.hh    2008-07-24 15:27:54 UTC (rev 
6920)
@@ -136,12 +136,6 @@
    /// \brief Set the visibility of the physical entity of this geom
     public: void ShowPhysics(bool);
 
-    /// @brief Place Geom when body is immovable (static)
-    private: void PlaceImmovable( );
-
-    /// @brief Set base pose when body is immovable (static)
-    public: virtual void SetImmovableBasePose( const Pose3d & pose );
-
     ///  Contact parameters
     public: ContactParams *contact; 
   
@@ -181,9 +175,6 @@
     ///our XML DATA
     private: XMLConfigNode *xmlNode;
 
-    private: Pose3d immovableBasePose;
-    private: Pose3d immovableRelativePose;
-
   };
 
   /// \}

Modified: code/gazebo/trunk/server/physics/MapGeom.cc
===================================================================
--- code/gazebo/trunk/server/physics/MapGeom.cc 2008-07-24 00:03:46 UTC (rev 
6919)
+++ code/gazebo/trunk/server/physics/MapGeom.cc 2008-07-24 15:27:54 UTC (rev 
6920)
@@ -110,11 +110,50 @@
     this->ReduceTree(this->root);
   }
 
-  this->CreateBoxes(this->root);
+  //this->CreateBoxes(this->root);
+  this->CreateBox();
 
   this->visualNode->MakeStatic();
 }
 
+void MapGeom::CreateBox()
+{
+  std::ostringstream stream;
+
+  // Create the box geometry
+  BoxGeom* newBox = new BoxGeom( this->body );
+
+  XMLConfig *boxConfig = new XMLConfig();
+
+  stream << "<gazebo:world 
xmlns:gazebo=\"http://playerstage.sourceforge.net/gazebo/xmlschema/#gz\"; 
xmlns:geom=\"http://playerstage.sourceforge.net/gazebo/xmlschema/#geom\";>"; 
+
+  float x = 2;
+  float y = 2;
+  float z = 0.5;
+  float xSize = 1.0;
+  float ySize = 1.0;
+  float zSize = 1.0;
+
+  stream << "<geom:box name='map_geom_box'>";
+  stream << "  <mass>0.0</mass>";
+  stream << "  <xyz>" << x << " " << y << " " << z << "</xyz>";
+  stream << "  <rpy>0 0 0</rpy>";
+  stream << "  <size>" << xSize << " " << ySize << " " << zSize << "</size>";
+  stream << "  <mass>0.01</mass>";
+  stream << "  <visual>";
+  stream << "    <mesh>unit_box</mesh>";
+  stream << "    <material>" << this->material << "</material>";
+  stream << "  <size>" << xSize << " " << ySize << " " << zSize << "</size>";
+  stream << "  </visual>";
+  stream << "</geom:box>";
+  stream << "</gazebo:world>";
+
+  boxConfig->LoadString( stream.str() );
+
+  newBox->Load( boxConfig->GetRootNode()->GetChild() );
+  delete boxConfig;
+}
+
 void MapGeom::CreateBoxes(QuadNode *node)
 {
   if (node->leaf)
@@ -125,7 +164,7 @@
     std::ostringstream stream;
 
     // Create the box geometry
-    BoxGeom* newBox = new BoxGeom( body );
+    BoxGeom* newBox = new BoxGeom( this->body );
 
     XMLConfig *boxConfig = new XMLConfig();
 

Modified: code/gazebo/trunk/server/physics/MapGeom.hh
===================================================================
--- code/gazebo/trunk/server/physics/MapGeom.hh 2008-07-24 00:03:46 UTC (rev 
6919)
+++ code/gazebo/trunk/server/physics/MapGeom.hh 2008-07-24 15:27:54 UTC (rev 
6920)
@@ -115,6 +115,8 @@
     /// \brief Try to merge to nodes
     private: void Merge(QuadNode *nodeA, QuadNode *nodeB);
 
+    private: void CreateBox();
+
     /// \brief Create the boxes for the map
     private: void CreateBoxes(QuadNode *node);
 

Modified: code/gazebo/trunk/server/physics/ode/ODEPhysics.cc
===================================================================
--- code/gazebo/trunk/server/physics/ode/ODEPhysics.cc  2008-07-24 00:03:46 UTC 
(rev 6919)
+++ code/gazebo/trunk/server/physics/ode/ODEPhysics.cc  2008-07-24 15:27:54 UTC 
(rev 6920)
@@ -259,8 +259,7 @@
         double h, kp, kd;
 
         contact.geom = contactGeoms[i];
-        contact.surface.mode = dContactSoftERP | dContactSoftCFM | 
-                               dContactBounce | dContactMu2;
+        contact.surface.mode = dContactSoftERP |  dContactBounce | dContactMu2;
 
 
         // Compute the CFM and ERP by assuming the two bodies form a
@@ -276,7 +275,7 @@
         contact.surface.mu2 = MIN(geom1->contact->mu2, geom2->contact->mu2);
         contact.surface.bounce = 0.1;
         contact.surface.bounce_vel = 0.1;
-        contact.surface.soft_cfm = 0.01;
+        //contact.surface.soft_cfm = 0.01;
 
         dJointID c = dJointCreateContact (self->worldId,
                                           self->contactGroup, &contact);

Modified: code/gazebo/trunk/worlds/map.world
===================================================================
--- code/gazebo/trunk/worlds/map.world  2008-07-24 00:03:46 UTC (rev 6919)
+++ code/gazebo/trunk/worlds/map.world  2008-07-24 15:27:54 UTC (rev 6920)
@@ -22,7 +22,7 @@
     <stepTime>0.03</stepTime>
     <gravity>0 0 -9.8</gravity>
     <cfm>10e-5</cfm>
-    <erp>0.8</erp>
+    <erp>0.3</erp>
     <maxUpdateRate>0</maxUpdateRate>
   </physics:ode>
 
@@ -63,6 +63,7 @@
 
 
   <model:physical name="map">
+    <static>true</static>
     <body:map name="map_body">
       <geom:map name="map_geom">
         <image>willowMap.png</image>
@@ -85,5 +86,36 @@
     </light>
   </model:renderable>
 
+  <model:physical name="pioneer2dx_model1">
+    <xyz>0 0 0.145</xyz>
+    <rpy>0.0 0.0 0.0</rpy>
 
+    <controller:differential_position2d name="controller1">
+      <leftJoint>left_wheel_hinge</leftJoint>
+      <rightJoint>right_wheel_hinge</rightJoint>
+      <wheelSeparation>0.39</wheelSeparation>
+      <wheelDiameter>0.15</wheelDiameter>
+      <torque>5</torque>
+      <interface:position name="position_iface_0"/>
+    </controller:differential_position2d>
+
+    <model:physical name="laser">
+      <xyz>0.15 0 0.18</xyz>
+
+      <attach>
+        <parentBody>chassis_body</parentBody>
+        <myBody>laser_body</myBody>
+      </attach>
+
+      <include embedded="true">
+        <xi:include href="models/sicklms200.model" />
+      </include>
+    </model:physical>
+
+    <include embedded="true">
+      <xi:include href="models/pioneer2dx.model" />
+    </include>
+  </model:physical>
+
+
 </gazebo:world>

Modified: code/gazebo/trunk/worlds/pioneer2dx.world
===================================================================
--- code/gazebo/trunk/worlds/pioneer2dx.world   2008-07-24 00:03:46 UTC (rev 
6919)
+++ code/gazebo/trunk/worlds/pioneer2dx.world   2008-07-24 15:27:54 UTC (rev 
6920)
@@ -64,9 +64,9 @@
   </model:physical>
 
   <model:physical name="sphere1_model">
-    <xyz>2.15 -1.68 .7</xyz>
+    <xyz>2.15 -1.68 .3</xyz>
     <rpy>0.0 0.0 0.0</rpy>
-    <static>false</static>
+    <static>true</static>
 
     <body:sphere name="sphere1_body">
       <geom:sphere name="sphere1_geom">
@@ -117,10 +117,6 @@
       </include>
     </model:physical>
 
-    <!-- 
-    The include should be last within a model. All previous statements
-    will override those in the included file 
-    -->
     <include embedded="true">
       <xi:include href="models/pioneer2dx.model" />
     </include>

Modified: code/gazebo/trunk/worlds/simpleshapes.world
===================================================================
--- code/gazebo/trunk/worlds/simpleshapes.world 2008-07-24 00:03:46 UTC (rev 
6919)
+++ code/gazebo/trunk/worlds/simpleshapes.world 2008-07-24 15:27:54 UTC (rev 
6920)
@@ -38,7 +38,7 @@
   <model:physical name="sphere1_model">
     <xyz>1 0 0.25</xyz>
     <rpy>0.0 0.0 0.0</rpy>
-    <static>false</static>
+    <static>true</static>
 
     <body:sphere name="sphere1_body">
       <geom:sphere name="sphere1_geom">


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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to