Revision: 8613
http://playerstage.svn.sourceforge.net/playerstage/?rev=8613&view=rev
Author: rtv
Date: 2010-04-19 13:40:13 +0000 (Mon, 19 Apr 2010)
Log Message:
-----------
fixed OpenGL init bug reported and fixed by Daniel Dube
Modified Paths:
--------------
code/stage/trunk/examples/ctrl/fasr2.cc
code/stage/trunk/libstage/canvas.cc
code/stage/trunk/webstage/CMakeLists.txt
code/stage/trunk/worlds/fasr.world
code/stage/trunk/worlds/fasr2.world
Modified: code/stage/trunk/examples/ctrl/fasr2.cc
===================================================================
--- code/stage/trunk/examples/ctrl/fasr2.cc 2010-04-12 15:33:09 UTC (rev
8612)
+++ code/stage/trunk/examples/ctrl/fasr2.cc 2010-04-19 13:40:13 UTC (rev
8613)
@@ -113,7 +113,7 @@
double cost;
Edge( Node* to, double cost=1.0 )
- : to(to), cost(cost) {}
+ : to(to), cost(cost) {}
};
class Node
@@ -168,7 +168,7 @@
bool GoodDirection( const Pose& pose, stg_meters_t range, stg_radians_t&
heading_result )
{
// find the node with the lowest value within range of the given
- // pose and return the absolute heading from pose that node
+ // pose and return the absolute heading from pose to that node
if( nodes.empty() )
return 0; // a null guess
@@ -184,7 +184,7 @@
// if it's in range, and either its the first we have found,
// or it has a lower value than the current best
- if( dist < range &&
+ if( dist < range &&
( best_node == NULL || node->value <
best_node->value ))
{
best_node = node;
@@ -196,7 +196,7 @@
printf( "FASR warning: no nodes in range" );
return false;
}
-
+
//else
heading_result = atan2( best_node->pose.y - pose.y,
best_node->pose.x - pose.x );
@@ -250,14 +250,14 @@
//glBegin( GL_POINTS );
//glVertex2f( pose.x, pose.y );
//glEnd();
-
- glBegin( GL_LINES );
- FOR_EACH( it, edges )
- {
- glVertex2f( pose.x, pose.y );
- glVertex2f( (*it)->to->pose.x, (*it)->to->pose.y );
- }
- glEnd();
+
+ glBegin( GL_LINES );
+ FOR_EACH( it, edges )
+ {
+ glVertex2f( pose.x, pose.y );
+ glVertex2f( (*it)->to->pose.x, (*it)->to->pose.y );
+ }
+ glEnd();
}
unsigned int MetersToCell( stg_meters_t m, stg_meters_t size_m, unsigned int
size_c )
@@ -344,8 +344,6 @@
ranger( (ModelRanger*)pos->GetUnusedModelOfType( "ranger" )),
fiducial( (ModelFiducial*)pos->GetUnusedModelOfType( "fiducial" )),
task(random() % tasks.size() ), // choose a task at random
- //source( tasks[task].source ),
- //sink( tasks[task].sink ),
fuel_zone(fuel),
pool_zone(pool),
avoidcount(0),
Modified: code/stage/trunk/libstage/canvas.cc
===================================================================
--- code/stage/trunk/libstage/canvas.cc 2010-04-12 15:33:09 UTC (rev 8612)
+++ code/stage/trunk/libstage/canvas.cc 2010-04-19 13:40:13 UTC (rev 8613)
@@ -1285,6 +1285,10 @@
void Canvas::resize(int X,int Y,int W,int H)
{
Fl_Gl_Window::resize(X,Y,W,H);
- FixViewport(W,H);
+
+ if( ! init_done ) // hack - should capture a create event to do this
rather thann have it in multiple places
+ InitGl();
+
+ FixViewport(W,H);
invalidate();
}
Modified: code/stage/trunk/webstage/CMakeLists.txt
===================================================================
--- code/stage/trunk/webstage/CMakeLists.txt 2010-04-12 15:33:09 UTC (rev
8612)
+++ code/stage/trunk/webstage/CMakeLists.txt 2010-04-19 13:40:13 UTC (rev
8613)
@@ -16,7 +16,7 @@
INSTALL(TARGETS webstage RUNTIME DESTINATION bin )
ELSE( WEBSIM_FOUND )
- MESSAGE( ${INDENT} "WebSim not detected." )
+ MESSAGE( ${INDENT} "WebSim not detected. If WebSim is installed but not
detected, check your PKG_CONFIG_PATH." )
ENDIF( WEBSIM_FOUND )
Modified: code/stage/trunk/worlds/fasr.world
===================================================================
--- code/stage/trunk/worlds/fasr.world 2010-04-12 15:33:09 UTC (rev 8612)
+++ code/stage/trunk/worlds/fasr.world 2010-04-19 13:40:13 UTC (rev 8613)
@@ -23,9 +23,9 @@
(
size [ 683.000 713.000 ]
- center [ 1.477 -5.626 ]
+ center [ -0.210 -0.945 ]
rotate [ 0 0 ]
- scale 19.306
+ scale 33.591
show_data 1
show_flags 1
@@ -109,7 +109,7 @@
(
sicklaser( samples 32 range_max 5 laser_return 2 watts 30 )
ctrl "fasr"
- joules 100000
+ kjoules 400
joules_capacity 400000
fiducial_return 0
charging_bump( fiducial( range_max 5 pose [ 0 0 -0.100 0 ] ) )
@@ -118,20 +118,20 @@
# trail_length 0
)
-autorob( pose [5.967 -3.269 0 152.684] joules 300000 name "r0" )
-autorob( pose [-7.444 -7.348 0 125.831] joules 100000 name "r1" )
-autorob( pose [5.043 3.459 0 174.453] joules 200000 )
-autorob( pose [-3.501 -3.827 0 -117.456] joules 400000 )
-autorob( pose [-1.782 7.123 0 44.991] joules 100000 )
+autorob( pose [5.880 4.141 0 152.684] kjoules 300 name "r0" )
+autorob( pose [4.542 5.641 0 125.831] kjoules 100 name "r1" )
+autorob( pose [5.043 3.459 0 174.453] kjoules 200 )
+autorob( pose [5.173 4.759 0 -117.456] kjoules 400 )
+autorob( pose [3.230 7.036 0 44.991] kjoules 100 )
-autorob( pose [-6.224 4.313 0 35.145] joules 200000 )
-autorob( pose [-4.373 -4.515 0 -143.181] joules 300000 )
-autorob( pose [3.975 7.410 0 0] joules 400000 )
-autorob( pose [6.796 4.223 0 -89.994] joules 100000 )
-autorob( pose [-6.679 -4.488 0 90.003] joules 200000 )
+autorob( pose [3.757 6.187 0 35.145] kjoules 200 )
+autorob( pose [2.688 4.115 0 -143.181] kjoules 300 )
+autorob( pose [3.975 7.410 0 0] kjoules 400 )
+autorob( pose [6.796 4.223 0 -89.994] kjoules 100 )
+autorob( pose [3.084 5.145 0 90.003] kjoules 200 )
-autorob( pose [-5.333 -7.515 0 -1.811] )
-autorob( pose [-1.496 1.724 0 -116.317] )
+autorob( pose [3.907 4.602 0 -1.811] )
+autorob( pose [2.558 6.649 0 -116.317] )
autorob( pose [7.462 3.892 0 -31.440] )
autorob( pose [5.944 6.951 0 2.937] )
autorob( pose [6.405 5.291 0 -103.060] )
@@ -142,17 +142,17 @@
autorob( pose [6.959 3.268 0 34.450] )
autorob( pose [4.617 6.811 0 134.717] )
-autorob( pose [6.545 7.366 0 2.937] )
-autorob( pose [7.237 7.533 0 34.450] )
-autorob( pose [3.875 6.533 0 134.717] )
-autorob( pose [3.944 4.674 0 -103.060] )
-autorob( pose [4.776 5.792 0 -103.060] )
+#autorob( pose [6.545 7.366 0 2.937] )
+#autorob( pose [7.237 7.533 0 34.450] )
+#autorob( pose [3.875 6.533 0 134.717] )
+#autorob( pose [3.944 4.674 0 -103.060] )
+#autorob( pose [4.776 5.792 0 -103.060] )
-autorob( pose [3.212 3.779 0 -103.060] )
-autorob( pose [2.982 6.577 0 -103.060] )
-autorob( pose [3.189 5.168 0 -103.060] )
-autorob( pose [2.027 6.472 0 -103.060] )
-autorob( pose [3.897 5.537 0 -103.060] )
+#autorob( pose [3.212 3.779 0 -103.060] )
+#autorob( pose [2.982 6.577 0 -103.060] )
+#autorob( pose [3.189 5.168 0 -103.060] )
+#autorob( pose [2.027 6.472 0 -103.060] )
+#autorob( pose [3.897 5.537 0 -103.060] )
#autorob( pose [4.974 4.800 0 -103.060] )
#autorob( pose [2.225 7.350 0 -103.060] )
Modified: code/stage/trunk/worlds/fasr2.world
===================================================================
--- code/stage/trunk/worlds/fasr2.world 2010-04-12 15:33:09 UTC (rev 8612)
+++ code/stage/trunk/worlds/fasr2.world 2010-04-19 13:40:13 UTC (rev 8613)
@@ -21,11 +21,11 @@
# configure the GUI window
window
(
- size [ 935.000 868.000 ]
+ size [ 657.000 724.000 ]
- center [ -3.025 -8.459 ]
+ center [ 1.180 -7.280 ]
rotate [ 0 0 ]
- scale 6.445
+ scale 5.859
show_data 1
show_flags 1
@@ -45,26 +45,26 @@
zone( color "red"
- pose [ 18 43 0 0 ]
+ pose [ 18.000 43.000 0 0 ]
name "red_source"
ctrl "source 100 10"
)
zone( color "DarkRed"
- pose [ 42 43 0 0 ]
+ pose [ 42.000 43.000 0 0 ]
name "red_sink"
ctrl "sink"
)
zone
(
color "green"
- pose [ 18 30 0 0 ]
+ pose [ 18.000 30.000 0 0 ]
name "green_source"
ctrl "source 200 10"
)
zone( color "DarkGreen"
- pose [ 42 30 0 0 ]
+ pose [ 42.000 30.000 0 0 ]
name "green_sink"
ctrl "sink"
)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit