Update of /cvsroot/playerstage/code/gazebo/server/models/Pioneer2DX
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11506/models/Pioneer2DX

Modified Files:
      Tag: ogre
        Pioneer2DX.cc 
Log Message:
Updates to ogre integration

Index: Pioneer2DX.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/gazebo/server/models/Pioneer2DX/Pioneer2DX.cc,v
retrieving revision 1.36
retrieving revision 1.36.2.1
diff -C2 -d -r1.36 -r1.36.2.1
*** Pioneer2DX.cc       2 Dec 2005 16:26:51 -0000       1.36
--- Pioneer2DX.cc       11 Aug 2006 00:29:46 -0000      1.36.2.1
***************
*** 223,242 ****
    double casterMass = 5.0;
  
!   GzVector bodySize = GzVectorSet(0.380, 0.270, 0.170);
!   GzVector bodyPos = GzVectorSet(-0.050, 0, -0.170/2);
  
!   GzVector topSize = GzVectorSet(0.450, 0.380, 0.005);
!   GzVector topPos = GzVectorSet(-0.050, 0, 0);
  
!   GzVector wheelSize = GzVectorSet(this->wheelDiam, this->wheelDiam, 0.05);
!   GzVector wheelPos = GzVectorSet(0, this->wheelSep/2, -0.145);
  
    GzVector casterSize = GzVectorSet(0.08, 0.08, 0.08);
!   GzVector casterPos = GzVectorSet(-0.220, 0, wheelPos.z - wheelSize.x/2 + 
casterSize.x/2);
    
    // Create the main chassis of the robot
    this->chassis = new Body( this->world );
  
    geom = new BoxGeom(this->chassis, this->modelSpaceId, bodySize.x, 
bodySize.y, bodySize.z);
    geom->SetRelativePosition( GzVectorSet(bodyPos.x, bodyPos.y, bodyPos.z) );
    geom->SetMass( mass );
--- 223,245 ----
    double casterMass = 5.0;
  
!   GzVector bodySize = GzVectorSet(0.380, 0.170, 0.270);
!   GzVector bodyPos = GzVectorSet(-0.050, 0, 0);
  
!   GzVector topSize = GzVectorSet(0.450,0.005, 0.380);
!   GzVector topPos = GzVectorSet(-0.050, 0.170, 0);
  
!   GzVector wheelSize = GzVectorSet(this->wheelDiam, this->wheelDiam, 0.2);
!   GzVector wheelPos = GzVectorSet(0,-0.145,this->wheelSep/2);
  
    GzVector casterSize = GzVectorSet(0.08, 0.08, 0.08);
!   GzVector casterPos = GzVectorSet(-0.220, wheelPos.z - wheelSize.x/2 + 
casterSize.x/2, 0);
    
    // Create the main chassis of the robot
    this->chassis = new Body( this->world );
+   this->AddBody( this->chassis, true );
+ 
  
    geom = new BoxGeom(this->chassis, this->modelSpaceId, bodySize.x, 
bodySize.y, bodySize.z);
+ 
    geom->SetRelativePosition( GzVectorSet(bodyPos.x, bodyPos.y, bodyPos.z) );
    geom->SetMass( mass );
***************
*** 248,252 ****
    geom->SetColor( GzColor(0, 0, 0) );  
  
-   this->AddBody( this->chassis, true );
  
    // Create the wheels
--- 251,254 ----
***************
*** 254,270 ****
    {
      this->wheels[i] = new Body( this->world );
  
!     geom = new WheelGeom(this->wheels[i], this->modelSpaceId, 0.5 * 
wheelSize.x, wheelSize.z);
      geom->SetRelativePosition( GzVectorSet(0, 0, 0) );
      geom->SetMass( 0.5 );
      geom->SetColor( GzColor(0.1, 0.1, 0.1) );
-     this->AddBody( this->wheels[i] );
    }
! 
    // Set the wheel positions
!   this->wheels[0]->SetPosition(GzVectorSet(wheelPos.x, +wheelPos.y, 
wheelPos.z));
!   this->wheels[0]->SetRotation(GzQuaternFromAxis(1, 0, 0, -M_PI / 2));
!   this->wheels[1]->SetPosition(GzVectorSet(wheelPos.x, -wheelPos.y, 
wheelPos.z));
!   this->wheels[1]->SetRotation(GzQuaternFromAxis(1, 0, 0, +M_PI / 2));
  
    // Attach the wheels to the chassis at their current positions
--- 256,272 ----
    {
      this->wheels[i] = new Body( this->world );
+     this->AddBody( this->wheels[i] );
  
!     geom = new WheelGeom(this->wheels[i], this->modelSpaceId, wheelSize.x, 
wheelSize.z );
      geom->SetRelativePosition( GzVectorSet(0, 0, 0) );
      geom->SetMass( 0.5 );
      geom->SetColor( GzColor(0.1, 0.1, 0.1) );
    }
!   
    // Set the wheel positions
!   this->wheels[0]->SetPosition(GzVectorSet(wheelPos.x, +wheelPos.z, 
wheelPos.y));
!   //this->wheels[0]->SetRotation(GzQuaternFromAxis(1, 0, 0, -M_PI / 2));
!   this->wheels[1]->SetPosition(GzVectorSet(wheelPos.x, -wheelPos.z, 
wheelPos.y));
!   //this->wheels[1]->SetRotation(GzQuaternFromAxis(1, 0, 0, +M_PI / 2));
  
    // Attach the wheels to the chassis at their current positions
***************
*** 275,279 ****
      a = wheels[i]->GetPosition();
      this->wheelJoints[i]->SetAnchor( a );
!     this->wheelJoints[i]->SetAxis( GzVectorSet(0, 1, 0) );
      this->wheelJoints[i]->SetParam( dParamSuspensionERP, 0.4 );
      this->wheelJoints[i]->SetParam( dParamSuspensionCFM, 0.8 );
--- 277,281 ----
      a = wheels[i]->GetPosition();
      this->wheelJoints[i]->SetAnchor( a );
!     this->wheelJoints[i]->SetAxis( GzVectorSet(0, 0, 1) );
      this->wheelJoints[i]->SetParam( dParamSuspensionERP, 0.4 );
      this->wheelJoints[i]->SetParam( dParamSuspensionCFM, 0.8 );
***************
*** 282,285 ****
--- 284,289 ----
    // Create the castor wheel
    this->castorWheel = new Body(this->world);
+   this->AddBody(this->castorWheel);
+ 
    geom = new SphereGeom(this->castorWheel, this->modelSpaceId, 
casterSize.x/2);
    geom->SetRelativePosition( GzVectorSet(0, 0, 0) );
***************
*** 289,293 ****
    this->castorWheel->SetPosition(casterPos);
    this->castorWheel->SetRotation(GzQuaternFromEuler(M_PI / 2, 0, 0));
-   this->AddBody(this->castorWheel);
  
    // Attach the castor to the chassis
--- 293,296 ----


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to