Revision: 6842
http://playerstage.svn.sourceforge.net/playerstage/?rev=6842&view=rev
Author: rtv
Date: 2008-07-11 00:06:09 -0700 (Fri, 11 Jul 2008)
Log Message:
-----------
fixed worldfile regression
Modified Paths:
--------------
code/stage/trunk/libstage/canvas.cc
code/stage/trunk/libstage/model.cc
code/stage/trunk/libstage/model_load.cc
code/stage/trunk/libstage/world.cc
code/stage/trunk/worlds/benchmark/cave.world
code/stage/trunk/worlds/benchmark/expand.cc
code/stage/trunk/worlds/benchmark/hospital.world
code/stage/trunk/worlds/simple.world
Modified: code/stage/trunk/libstage/canvas.cc
===================================================================
--- code/stage/trunk/libstage/canvas.cc 2008-07-11 06:31:47 UTC (rev 6841)
+++ code/stage/trunk/libstage/canvas.cc 2008-07-11 07:06:09 UTC (rev 6842)
@@ -71,8 +71,6 @@
setDirtyBuffer();
startx = starty = -1;
- //panx = pany = stheta = sphi = 0.0;
- //scale = 15.0;
interval = 50; //msec between redraws
graphics = true;
@@ -410,12 +408,15 @@
world->TogglePause();
break;
case ' ': // space bar
+
+ // if the worldfile doesn't have the fields you need, you get
+ // a weird view. need to think this through a bit before
+ // eliminating the old behaviour - rtv
- //current_camera->reset();
- if ( wf )
- current_camera->Load( wf, wf->LookupEntity(
"window" ) );
- else
- current_camera->reset();
+ //if ( wf )
+ //current_camera->Load( wf, wf->LookupEntity( "window" ) );
+ //else
+ current_camera->reset();
//invalidate();
if( Fl::event_state( FL_CTRL ) ) {
@@ -867,9 +868,9 @@
pCamOn.createMenuItem( menu, path );
pCamOn.menuCallback( perspectiveCb, this );
showOccupancy.createMenuItem( menu, path );
- showTrailArrows.createMenuItem( menu, path );
- showTrails.createMenuItem( menu, path );
- showTrailRise.createMenuItem( menu, path );
+ //showTrailArrows.createMenuItem( menu, path ); // broken
+ showTrails.createMenuItem( menu, path );
+ // showTrailRise.createMenuItem( menu, path ); // broken
showTree.createMenuItem( menu, path );
showScreenshots.createMenuItem( menu, path );
}
Modified: code/stage/trunk/libstage/model.cc
===================================================================
--- code/stage/trunk/libstage/model.cc 2008-07-11 06:31:47 UTC (rev 6841)
+++ code/stage/trunk/libstage/model.cc 2008-07-11 07:06:09 UTC (rev 6842)
@@ -811,7 +811,7 @@
pose.z = (world->sim_time - checkpoint->time) * timescale;
PushLocalCoords();
- glCallList( blocks_dl);
+ DrawBlocks();
PopCoords();
}
}
@@ -927,7 +927,6 @@
LISTMETHOD( children, StgModel*, DrawBlocksTree );
- gl_pose_shift( &geom.pose );
DrawBlocks();
PopCoords();
@@ -959,15 +958,19 @@
// TODO - fix this!
//if( rebuild_displaylist )
- //{
- //rebuild_displaylist = false;
+ {
+ rebuild_displaylist = false;
- //glNewList( blocks_dl, GL_COMPILE );
- LISTMETHOD( this->blocks, StgBlock*, Draw );
- //glEndList();
- //}
+ glNewList( blocks_dl, GL_COMPILE );
- //glCallList( blocks_dl );
+ gl_pose_shift( &geom.pose );
+
+ LISTMETHOD( this->blocks, StgBlock*, Draw );
+ glEndList();
+ }
+
+ //printf( "calling list for %s\n", token );
+ glCallList( blocks_dl );
}
// move into this model's local coordinate frame
@@ -979,8 +982,8 @@
glTranslatef( 0,0, parent->geom.size.z );
gl_pose_shift( &pose );
- //gl_pose_shift( &geom.pose );
+
// useful debug - draw a point at the local origin
// PushColor( color );
// glPointSize( 5.0 );
@@ -1323,7 +1326,7 @@
this->pose = pose;
this->pose.a = normalize(this->pose.a);
- //this->NeedRedraw();
+ this->NeedRedraw();
this->GPoseDirtyTree(); // global pose may have changed
MapWithChildren();
Modified: code/stage/trunk/libstage/model_load.cc
===================================================================
--- code/stage/trunk/libstage/model_load.cc 2008-07-11 06:31:47 UTC (rev
6841)
+++ code/stage/trunk/libstage/model_load.cc 2008-07-11 07:06:09 UTC (rev
6842)
@@ -31,7 +31,7 @@
char *name = (char*)wf->ReadString(wf_entity, "name", NULL );
if( name )
{
- printf( "adding name %s to %s\n", name, this->token );
+ //printf( "adding name %s to %s\n", name, this->token
);
this->token = strdup( name );
world->AddModel( this ); // add this name to the
world's table
}
Modified: code/stage/trunk/libstage/world.cc
===================================================================
--- code/stage/trunk/libstage/world.cc 2008-07-11 06:31:47 UTC (rev 6841)
+++ code/stage/trunk/libstage/world.cc 2008-07-11 07:06:09 UTC (rev 6842)
@@ -303,7 +303,7 @@
stg_usec_t load_end_time = RealTimeNow();
- printf( "[Load time %.3fsec]",
+ printf( "[Load time %.3fsec]\n",
(load_end_time - load_start_time) / 1000000.0 );
}
Modified: code/stage/trunk/worlds/benchmark/cave.world
===================================================================
--- code/stage/trunk/worlds/benchmark/cave.world 2008-07-11 06:31:47 UTC
(rev 6841)
+++ code/stage/trunk/worlds/benchmark/cave.world 2008-07-11 07:06:09 UTC
(rev 6842)
@@ -32,10 +32,11 @@
define rob pioneer2dx
#define rob fancypioneer2dx # alternative with more complex polygons
(
+ origin [ 0 0 0 0 ]
- sicklaser( pose [ 0.040 0 0 0 ] samples 180 )
+ sicklaser( samples 180 )
# alternative laser with more complex polygons
- # fancysicklaser( pose [ 0.040 0 0 0 ] samples 180 )
+ # fancysicklaser( samples 180 )
ranger( pose [ 0 0 -0.050 0 ] )
@@ -55,13 +56,13 @@
define darkredrob rob( color "DarkRed" )
redrob( pose [-5.285 4.915 0 150.459] )
-redrob( pose [-4.432 5.655 0 -85.494] )
+redrob( pose [-4.458 5.785 0 -85.494] )
redrob( pose [-5.518 4.157 0 -10.236] )
redrob( pose [-6.007 5.008 0 144.441] )
redrob( pose [-5.599 3.365 0 -172.038] )
redrob( pose [-6.852 3.655 0 4.679] )
redrob( pose [-7.483 4.049 0 -12.199] )
-redrob( pose [-4.393 4.938 0 114.269] )
+redrob( pose [-4.341 4.938 0 5.407] )
redrob( pose [-6.277 4.252 0 -97.494] )
redrob( pose [-5.202 5.566 0 -89.743] )
@@ -83,20 +84,20 @@
greenrob( pose [-2.462 7.492 0 -65.482] )
greenrob( pose [-1.836 6.835 0 -59.739] )
greenrob( pose [-1.654 6.043 0 -171.672] )
-greenrob( pose [-0.519 7.392 0 -67.052] )
-greenrob( pose [-0.563 6.815 0 -106.072] )
+greenrob( pose [-0.389 7.392 0 -67.052] )
+greenrob( pose [-1.107 6.737 0 -106.072] )
greenrob( pose [-1.404 7.436 0 -110.338] )
-magentarob( pose [1.731 7.249 0 -92.107] )
+magentarob( pose [1.731 7.042 0 -92.107] )
magentarob( pose [2.586 6.521 0 -100.329] )
magentarob( pose [3.001 5.447 0 -46.977] )
magentarob( pose [3.611 7.214 0 -116.841] )
magentarob( pose [2.625 7.473 0 -48.982] )
magentarob( pose [3.660 6.559 0 -74.307] )
magentarob( pose [3.434 5.808 0 -83.857] )
-magentarob( pose [0.624 7.277 0 -40.753] )
+magentarob( pose [0.857 7.458 0 -29.294] )
magentarob( pose [2.017 6.083 0 -52.575] )
-magentarob( pose [0.561 6.752 0 4.367] )
+magentarob( pose [0.483 6.752 0 4.367] )
yellowrob( pose [-7.548 3.117 0 12.515] )
yellowrob( pose [-6.811 2.501 0 83.166] )
@@ -122,14 +123,14 @@
darkredrob( pose [-7.630 0.425 0 -15.747] )
darkredrob( pose [-7.571 1.112 0 1.397] )
-darkredrob( pose [-6.158 1.168 0 32.866] )
+darkredrob( pose [-6.028 1.220 0 32.866] )
darkredrob( pose [-4.509 0.635 0 4.689] )
darkredrob( pose [-7.549 -0.240 0 1.000 1.423] )
darkredrob( pose [-6.728 0.180 0 -22.542] )
darkredrob( pose [-6.824 0.826 0 -11.285] )
-darkredrob( pose [-6.015 0.257 0 -2.367] )
+darkredrob( pose [-5.963 0.335 0 -42.474] )
darkredrob( pose [-5.195 0.771 0 -64.592] )
-darkredrob( pose [-5.483 -0.245 0 70.044] )
+darkredrob( pose [-5.379 -0.115 0 70.044] )
cyanrob( pose [-2.544 4.684 0 -134.461] )
cyanrob( pose [-0.366 3.260 0 -44.509] )
@@ -143,12 +144,12 @@
cyanrob( pose [-1.483 5.050 0 8.818] )
orangerob( pose [-7.652 -2.012 0 -0.754] )
-orangerob( pose [-6.934 -2.155 0 -40.701] )
+orangerob( pose [-6.675 -2.544 0 -40.701] )
orangerob( pose [-6.798 -1.520 0 -93.732] )
orangerob( pose [-7.525 -0.994 0 -9.450] )
orangerob( pose [-6.679 -0.670 0 -70.140] )
-orangerob( pose [-7.611 -3.107 0 -51.626] )
-orangerob( pose [-6.656 -3.665 0 -70.493] )
+orangerob( pose [-7.481 -2.952 0 -51.626] )
+orangerob( pose [-6.967 -3.691 0 -104.870] )
orangerob( pose [-6.139 -3.326 0 -90.309] )
orangerob( pose [-6.163 -1.853 0 -115.649] )
orangerob( pose [-6.026 -0.817 0 -11.811] )
Modified: code/stage/trunk/worlds/benchmark/expand.cc
===================================================================
--- code/stage/trunk/worlds/benchmark/expand.cc 2008-07-11 06:31:47 UTC (rev
6841)
+++ code/stage/trunk/worlds/benchmark/expand.cc 2008-07-11 07:06:09 UTC (rev
6842)
@@ -21,7 +21,7 @@
StgModelRanger* ranger;
} robot_t;
-#define VSPEED 0.5 // meters per second
+#define VSPEED 0.4 // meters per second
#define WGAIN 1.5 // turn speed gain
#define SAFE_DIST 0.6 // meters
#define SAFE_ANGLE 1 // radians
Modified: code/stage/trunk/worlds/benchmark/hospital.world
===================================================================
--- code/stage/trunk/worlds/benchmark/hospital.world 2008-07-11 06:31:47 UTC
(rev 6841)
+++ code/stage/trunk/worlds/benchmark/hospital.world 2008-07-11 07:06:09 UTC
(rev 6842)
@@ -2,8 +2,8 @@
# Authors: Richard Vaughan
# $Id$
-include "inc/map.inc"
-include "inc/pioneer.inc"
+include "../map.inc"
+include "../pioneer.inc"
# set the resolution of the underlying raytrace model in meters
resolution 0.02
Modified: code/stage/trunk/worlds/simple.world
===================================================================
--- code/stage/trunk/worlds/simple.world 2008-07-11 06:31:47 UTC (rev
6841)
+++ code/stage/trunk/worlds/simple.world 2008-07-11 07:06:09 UTC (rev
6842)
@@ -7,7 +7,7 @@
include "sick.inc" # defines sick laser
interval_sim 100 # simulation timestep in milliseconds
-interval_real 20 # real-time interval between simulation updates in
milliseconds
+interval_real 1 # real-time interval between simulation updates in
milliseconds
paused 0
@@ -33,7 +33,7 @@
name "r0"
pose [ -6.5 -6.5 0 45 ]
- sicklaser( pose [0.04 0 0 0] )
+ sicklaser()
# remove this if you're using Player to control the robot
ctrl "wander"
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit