Revision: 8714
http://playerstage.svn.sourceforge.net/playerstage/?rev=8714&view=rev
Author: natepak
Date: 2010-05-26 01:00:17 +0000 (Wed, 26 May 2010)
Log Message:
-----------
Update the box_drop benchmark
Modified Paths:
--------------
code/gazebo/branches/simpar/benchmarks/box_drop_benchmark.cc
code/gazebo/branches/simpar/libgazebo/gz.h
code/gazebo/branches/simpar/server/World.cc
code/gazebo/branches/simpar/worlds/empty.world
Modified: code/gazebo/branches/simpar/benchmarks/box_drop_benchmark.cc
===================================================================
--- code/gazebo/branches/simpar/benchmarks/box_drop_benchmark.cc
2010-05-25 22:16:16 UTC (rev 8713)
+++ code/gazebo/branches/simpar/benchmarks/box_drop_benchmark.cc
2010-05-26 01:00:17 UTC (rev 8714)
@@ -9,7 +9,7 @@
gazebo::FactoryIface *factoryIface = NULL;
int laser_count = 0;
-std::string test_name="Box Pile Benchmark";
+std::string test_name="Box Drop Benchmark";
std::string xlabel = "Box Count";
std::string ylabel = "Simtime / Realtime";
std::string data_filename = "/tmp/" + test_name + ".data";
@@ -42,6 +42,12 @@
model << " <geom:box name='geom'>";
model << " <size>0.5 0.5 0.5</size>";
model << " <mass>1</mass>";
+ model << " <kp>100000000.0</kp>";
+ model << " <kd>1.0</kd>";
+ model << " <bounce>0</bounce>";
+ model << " <bounceVel>0</bounceVel>";
+ model << " <slip1>0.01</slip1>";
+ model << " <slip2>0.01</slip2>";
model << " <visual>";
model << " <size>0.5 0.5 0.5</size>";
model << " <mesh>unit_box</mesh>";
@@ -98,15 +104,24 @@
FILE *out = fopen(data_filename.c_str(), "w");
- spawn_box(0, 0);
+ double prev_z = 5;
+ spawn_box(0, 0, prev_z);
+ simIface->Unpause();
+
gazebo::Vec3 linearVel, angularVel, linearAccel, angularAccel;
gazebo::Pose modelPose;
- for (unsigned int j=0; j < 400; j++)
+ double time = simIface->data->realTime;
+ while ( simIface->data->realTime - time < 2.0 )
{
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);
+ fprintf(out,"%f %f %f %f %f %f %f %f\n", simIface->data->simTime,
simIface->data->realTime, modelPose.pos.x, modelPose.pos.y, modelPose.pos.z,
modelPose.roll, modelPose.pitch, modelPose.yaw );
+
+ if ( fabs(prev_z - modelPose.pos.z) >= 1e-5)
+ time = simIface->data->realTime;
+
+ prev_z = modelPose.pos.z;
}
fclose(out);
Modified: code/gazebo/branches/simpar/libgazebo/gz.h
===================================================================
--- code/gazebo/branches/simpar/libgazebo/gz.h 2010-05-25 22:16:16 UTC (rev
8713)
+++ code/gazebo/branches/simpar/libgazebo/gz.h 2010-05-26 01:00:17 UTC (rev
8714)
@@ -482,6 +482,9 @@
/// Elapsed real time since start of simulation (from system clock)
public: double realTime;
+ /// Size of a simulation step
+ public: double stepTime;
+
/// state of the simulation : 0 paused, 1 running -1 not_started/exiting
public: int state;
Modified: code/gazebo/branches/simpar/server/World.cc
===================================================================
--- code/gazebo/branches/simpar/server/World.cc 2010-05-25 22:16:16 UTC (rev
8713)
+++ code/gazebo/branches/simpar/server/World.cc 2010-05-26 01:00:17 UTC (rev
8714)
@@ -787,6 +787,7 @@
this->simIface->data->simTime = Simulator::Instance()->GetSimTime().Double();
this->simIface->data->pauseTime =
Simulator::Instance()->GetPauseTime().Double();
this->simIface->data->realTime =
Simulator::Instance()->GetRealTime().Double();
+ this->simIface->data->stepTime = this->physicsEngine->GetStepTime().Double();
this->simIface->data->state = !Simulator::Instance()->IsPaused();
unsigned int requestCount = this->simIface->data->requestCount;
Modified: code/gazebo/branches/simpar/worlds/empty.world
===================================================================
--- code/gazebo/branches/simpar/worlds/empty.world 2010-05-25 22:16:16 UTC
(rev 8713)
+++ code/gazebo/branches/simpar/worlds/empty.world 2010-05-26 01:00:17 UTC
(rev 8714)
@@ -15,12 +15,12 @@
<verbosity>4</verbosity>
<physics:ode>
- <stepTime>0.001</stepTime>
+ <stepTime>0.00001</stepTime>
<gravity>0 0 -9.8</gravity>
<cfm>0.0000000001</cfm>
<erp>0.2</erp>
- <stepType>quick</stepType>
+ <stepType>robust</stepType>
<stepIters>10</stepIters>
<stepW>1.3</stepW>
<contactMaxCorrectingVel>100.0</contactMaxCorrectingVel>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit