Revision: 6798
http://playerstage.svn.sourceforge.net/playerstage/?rev=6798&view=rev
Author: rtv
Date: 2008-07-07 19:50:39 -0700 (Mon, 07 Jul 2008)
Log Message:
-----------
cleaning up dead files
Modified Paths:
--------------
code/stage/trunk/libstage/CMakeLists.txt
code/stage/trunk/libstage/main.cc
Removed Paths:
-------------
code/stage/trunk/libstage/Makefile.fl
code/stage/trunk/libstage/Makefile.manual
code/stage/trunk/libstage/ctrl.cc
Modified: code/stage/trunk/libstage/CMakeLists.txt
===================================================================
--- code/stage/trunk/libstage/CMakeLists.txt 2008-07-08 01:27:11 UTC (rev
6797)
+++ code/stage/trunk/libstage/CMakeLists.txt 2008-07-08 02:50:39 UTC (rev
6798)
@@ -78,3 +78,5 @@
INSTALL(FILES stage.hh option.hh worldfile.hh
DESTINATION include/${PROJECT_NAME}-${V_MAJOR}.${V_MINOR})
+
+ADD_TEST( test1 ${EXECUTABLE_OUTPUT_PATH}stage ../worlds/fasr.world)
Deleted: code/stage/trunk/libstage/Makefile.fl
===================================================================
--- code/stage/trunk/libstage/Makefile.fl 2008-07-08 01:27:11 UTC (rev
6797)
+++ code/stage/trunk/libstage/Makefile.fl 2008-07-08 02:50:39 UTC (rev
6798)
@@ -1,40 +0,0 @@
-HEADERS = \
- ../config.h \
- colors.h \
- stage.hh \
- worldfile.hh
-
-CC = g++
-
-OBS = \
- ancestor.o \
- block.o \
- blockgrid.o \
- canvas.o \
- glcolorstack.o \
- model.o \
- model_callbacks.o \
- model_laser.o \
- model_load.o \
- model_position.o \
- model_props.o \
- model_ranger.o \
- stest.o \
- stage.o \
- typetable.o \
- world.o \
- worldfile.o \
- worldgui.o
-
-CPPFLAGS= -g -Wall -I.. -I../replace
-I/System/Library/Frameworks/OpenGL.framework/Headers `fltk-config --use-gl
--cflags` `pkg-config --cflags glib-2.0 gdk-pixbuf-2.0`
-LIBS= `fltk-config --use-gl --ldflags` `pkg-config --libs gdk-pixbuf-2.0`
-framework OpenGL
-
-
-all: stagefl
-
-stagefl: $(OBS) $(HEADERS)
- g++ -o $@ $(CPPFLAGS) $(OBS) $(LIBS)
-
-clean :
- rm -f *.o *.lo
-
Deleted: code/stage/trunk/libstage/Makefile.manual
===================================================================
--- code/stage/trunk/libstage/Makefile.manual 2008-07-08 01:27:11 UTC (rev
6797)
+++ code/stage/trunk/libstage/Makefile.manual 2008-07-08 02:50:39 UTC (rev
6798)
@@ -1,59 +0,0 @@
-
-HDR = \
- ../config.h \
- colors.h \
- stage.hh \
- stage_internalmake.hh \
- worldfile.hh
-
-SRC = \
- ancestor.cc \
- block.cc \
- canvas.cc \
- gl.cc \
- glcolorstack.cc \
- main.cc \
- model.cc \
- model_callbacks.cc \
- model_ranger.cc \
- model_blobfinder.cc \
- model_laser.cc \
- model_fiducial.cc \
- model_load.cc \
- model_position.cc \
- model_props.cc \
- stage.cc \
- typetable.cc \
- world.cc \
- worldfile.cc \
- worldgui.cc
-
-# blockgrid.cc
-# stest.cc
-
-
-
-CXXFLAGS+= -g -Wall -I.. -I../replace `fltk-config --use-gl --use-images
--cflags` `pkg-config --cflags glib-2.0 gdk-pixbuf-2.0`
-LIBS= `fltk-config --use-gl --use-images --ldflags` `pkg-config --libs
gdk-pixbuf-2.0`
-
-OBJ=$(SRC:.cc=.o)
-
-all: stage
-
-.cc.o:
- g++ $(CXXFLAGS) -c $<
-
-
-stage: $(OBJ)
- g++ $(OBJ) -o $@ $(LIBS)
-
-clean :
- rm -f *.o *.lo stage
-
-demo: gldemo.cc
- g++ gldemo.cc -o $@ $(LIBS)
-
-ctrl: ctrl.cc
- g++ $(CXXFLAGS) -fPIC -c ctrl.cc
- g++ -shared -o libctrl.so -fPIC ctrl.o
-
Deleted: code/stage/trunk/libstage/ctrl.cc
===================================================================
--- code/stage/trunk/libstage/ctrl.cc 2008-07-08 01:27:11 UTC (rev 6797)
+++ code/stage/trunk/libstage/ctrl.cc 2008-07-08 02:50:39 UTC (rev 6798)
@@ -1,121 +0,0 @@
-#include "stage.hh"
-using namespace Stg;
-
-const double cruisespeed = 0.4;
-const double avoidspeed = 0.05;
-const double avoidturn = 1.0;
-const double minfrontdistance = 0.8;
-const bool verbose = false;
-
-typedef struct
-{
- StgModelPosition* pos;
- StgModelLaser* laser;
- int avoidcount, randcount;
-} robot_t;
-
-int LaserUpdate( StgModel* mod, robot_t* robot );
-int PositionUpdate( StgModel* mod, robot_t* robot );
-
-// Stage calls this when the model starts up
-extern "C" int Init( StgModel* mod )
-{
- robot_t* robot = new robot_t;
-
- robot->pos = (StgModelPosition*)mod;
- robot->laser = (StgModelLaser*)mod->GetModel( "laser:0" );
- robot->avoidcount = 0;
- robot->randcount = 0;
-
- assert( robot->laser );
- robot->laser->Subscribe();
-
- robot->laser->AddUpdateCallback( (stg_model_callback_t)LaserUpdate,
robot );
- //robot->pos->AddUpdateCallback( (stg_model_callback_t)PositionUpdate,
robot );
- return 0; //ok
-}
-
-// inspect the laser data and decide what to do
-int LaserUpdate( StgModel* mod, robot_t* robot )
-{
- // get the data
- uint32_t sample_count=0;
- stg_laser_sample_t* scan = robot->laser->GetSamples( &sample_count );
- assert(scan);
-
- double newturnrate=0.0, newspeed=0.0;
- bool obstruction = false;
-
- // find the closest distance to the left and right and check if
- // there's anything in front
- double minleft = 1e6;
- double minright = 1e6;
-
- for (uint32_t i = 0; i < sample_count; i++)
- {
- if( scan[i].range < minfrontdistance)
- obstruction = true;
-
- if( i > sample_count/2 )
- minleft = MIN( minleft, scan[i].range );
- else
- minright = MIN( minright, scan[i].range );
- }
-
- if( obstruction || robot->avoidcount )
- {
- if( verbose ) puts( "Avoid" );
-
- robot->pos->SetXSpeed( avoidspeed );
-
- /* once we start avoiding, select a turn direction and stick
- with it for a few iterations */
- if( robot->avoidcount == 0 )
- {
- if( verbose ) puts( "Avoid START" );
- robot->avoidcount = 5;
-
- if( minleft < minright )
- robot->pos->SetTurnSpeed( -avoidturn );
- else
- robot->pos->SetTurnSpeed( +avoidturn );
- }
-
- robot->avoidcount--;
- }
- else
- {
- if( verbose ) puts( "Cruise" );
-
- robot->avoidcount = 0;
- robot->pos->SetXSpeed( cruisespeed );
-
- /* update turnrate every few updates */
- if( robot->randcount == 0 )
- {
- if( verbose )puts( "Random turn" );
-
- /* make random int tween -30 and 30 */
- //newturnrate = dtor( rand() % 61 - 30 );
-
- robot->randcount = 20;
-
- robot->pos->SetTurnSpeed( dtor( rand() % 11 - 5 ) );
- }
-
- robot->randcount--;
- }
-
- return 0;
-}
-
-int PositionUpdate( StgModel* mod, robot_t* robot )
-{
- stg_pose_t pose = robot->pos->GetPose();
-
- printf( "Pose: [%.2f %.2f %.2f %.2f]\n",
- pose.x, pose.y, pose.z, pose.a );
-
- return 0; // run again
-}
-
Modified: code/stage/trunk/libstage/main.cc
===================================================================
--- code/stage/trunk/libstage/main.cc 2008-07-08 01:27:11 UTC (rev 6797)
+++ code/stage/trunk/libstage/main.cc 2008-07-08 02:50:39 UTC (rev 6798)
@@ -7,6 +7,7 @@
#include <getopt.h>
#include "stage_internal.hh"
+#include "config.h"
/* options descriptor */
static struct option longopts[] = {
@@ -17,7 +18,7 @@
int main( int argc, char* argv[] )
{
- //printf( "%s %s ", PROJECT, VERSION );
+ printf( "%s %s ", PROJECT, VERSION );
int ch=0, optindex=0;
bool usegui = true;
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