Revision: 7953
http://playerstage.svn.sourceforge.net/playerstage/?rev=7953&view=rev
Author: rtv
Date: 2009-07-04 00:10:50 +0000 (Sat, 04 Jul 2009)
Log Message:
-----------
tweaking demos
Modified Paths:
--------------
code/stage/trunk/libstage/model_ranger.cc
code/stage/trunk/worlds/benchmark/cave.world
code/stage/trunk/worlds/benchmark/expand_pioneer.cc
Modified: code/stage/trunk/libstage/model_ranger.cc
===================================================================
--- code/stage/trunk/libstage/model_ranger.cc 2009-07-03 23:56:10 UTC (rev
7952)
+++ code/stage/trunk/libstage/model_ranger.cc 2009-07-04 00:10:50 UTC (rev
7953)
@@ -305,18 +305,19 @@
{
Sensor& rngr = sensors[s];
- if( rngr.range > 0.0 )
- {
-
- glPointSize( 4 );
- glBegin( GL_POINTS );
- glVertex3f( rngr.pose.x, rngr.pose.y,
rngr.pose.z );
- glEnd();
- }
+ glPointSize( 4 );
+ glBegin( GL_POINTS );
+ glVertex3f( rngr.pose.x, rngr.pose.y, rngr.pose.z );
+ glEnd();
+
+ char buf[8];
+ snprintf( buf, 8, "%d", s );
+ Gl::draw_string( rngr.pose.x, rngr.pose.y,
rngr.pose.z, buf );
+
}
PopColor();
}
-
+
if ( !showRangerData )
return;
Modified: code/stage/trunk/worlds/benchmark/cave.world
===================================================================
--- code/stage/trunk/worlds/benchmark/cave.world 2009-07-03 23:56:10 UTC
(rev 7952)
+++ code/stage/trunk/worlds/benchmark/cave.world 2009-07-04 00:10:50 UTC
(rev 7953)
@@ -14,10 +14,10 @@
# configure the GUI window
window
(
- size [ 701.000 694.000 ]
- center [0.068 -0.129]
- rotate [ 0 0 ]
- scale 38.592
+ size [ 1076.000 585.000 ]
+ center [-0.464 1.570]
+ rotate [ 58.500 17.500 ]
+ scale 53.439
interval 50
)
@@ -29,14 +29,14 @@
bitmap "../bitmaps/cave.png"
)
-define rob pioneer2dx
-#define rob fancypioneer2dx # alternative with more complex polygons
+#define rob pioneer2dx
+define rob fancypioneer2dx # alternative with more complex polygons
(
# origin [ 0 0 0 0 ]
# sicklaser( samples 180 )
# alternative laser with more complex polygons
- #fancysicklaser( samples 180 )
+ fancysicklaser( samples 180 )
ctrl "expand_pioneer"
)
Modified: code/stage/trunk/worlds/benchmark/expand_pioneer.cc
===================================================================
--- code/stage/trunk/worlds/benchmark/expand_pioneer.cc 2009-07-03 23:56:10 UTC
(rev 7952)
+++ code/stage/trunk/worlds/benchmark/expand_pioneer.cc 2009-07-04 00:10:50 UTC
(rev 7953)
@@ -24,8 +24,8 @@
const double VSPEED = 0.2; // meters per second
const double WGAIN = 1.0; // turn speed gain
-const double SAFE_DIST = 0.5; // meters
-const double SAFE_ANGLE = 1.0; // radians
+const double SAFE_DIST = 0.75; // meters
+const double SAFE_ANGLE = 0.5; // radians
// forward declare
@@ -76,14 +76,14 @@
double turn_speed = WGAIN * resultant_angle;
//printf( "resultant %.2f turn_speed %.2f\n", resultant_angle, turn_speed );
-
+
// if the front is clear, drive forwards
if( (rgr->sensors[3].range > SAFE_DIST) && // forwards
(rgr->sensors[4].range > SAFE_DIST) &&
(rgr->sensors[5].range > SAFE_DIST/2.0) && //
- (rgr->sensors[6].range > SAFE_DIST/5.0) &&
+ (rgr->sensors[6].range > SAFE_DIST/4.0) &&
(rgr->sensors[2].range > SAFE_DIST/2.0) &&
- (rgr->sensors[1].range > SAFE_DIST/5.0) &&
+ (rgr->sensors[1].range > SAFE_DIST/4.0) &&
(fabs( resultant_angle ) < SAFE_ANGLE) )
{
forward_speed = VSPEED;
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