Skip to content
Browse files

Merge remote branch 'upstream/master'

  • Loading branch information...
2 parents 017cde6 + 78720d1 commit 91979dbf2bac1bf78aa01e71e20c307261487e1f Rich Mattes committed Aug 6, 2010
Showing with 30 additions and 15 deletions.
  1. +1 −0 .gitignore
  2. +1 −1 CMakeLists.txt
  3. +1 −0 libstage/CMakeLists.txt
  4. +6 −6 libstage/model_fiducial.cc
  5. +8 −1 libstage/stage.hh
  6. +8 −2 stage.pc.in
  7. +5 −5 worlds/fasr.world
View
1 .gitignore
@@ -1,2 +1,3 @@
build
config.h
+*.swp
View
2 CMakeLists.txt
@@ -172,7 +172,7 @@ IF( PLAYER_FOUND )
# MESSAGE( STATUS " PLAYER_CFLAGS: ${PLAYER_CFLAGS}" )
# MESSAGE( STATUS " PLAYER_LDFLAGS: ${PLAYER_LDFLAGS}" )
ELSE( PLAYER_FOUND )
- MESSAGE( ${INDENT} "Player not detected. If Player is installed but not detected, check your PKG_CONFIG_PATH." )
+ MESSAGE(STATUS ${INDENT} "Player not detected. If Player is installed but not detected, check your PKG_CONFIG_PATH." )
ENDIF( PLAYER_FOUND )
View
1 libstage/CMakeLists.txt
@@ -61,6 +61,7 @@ set_target_properties( stage PROPERTIES
)
set( stagebinarySrcs main.cc )
+set_source_files_properties( ${stagebinarySrcs} PROPERTIES COMPILE_FLAGS "${FLTK_CFLAGS}" )
add_executable( stagebinary ${stagebinarySrcs} )
View
12 libstage/model_fiducial.cc
@@ -250,7 +250,7 @@ void ModelFiducial::Update( void )
edge.pose = Pose( gp.x-rng, gp.y, 0, 0 ); // LEFT
std::set<Model*,World::ltx>::iterator xmin =
- world->models_with_fiducials_byx.lower_bound( &edge );
+ world->models_with_fiducials_byx.lower_bound( &edge ); // O(log(n))
edge.pose = Pose( gp.x+rng, gp.y, 0, 0 ); // RIGHT
const std::set<Model*,World::ltx>::iterator xmax =
@@ -273,16 +273,16 @@ void ModelFiducial::Update( void )
for( ; ymin != ymax; ymin++ )
vert.insert( *ymin );
- // the intersection of the sets is all the fiducials closeby
- std::vector<Model*> candidates;
+ // the intersection of the sets is all the fiducials close by
+ std::vector<Model*> nearby;
std::set_intersection( horiz.begin(), horiz.end(),
vert.begin(), vert.end(),
- std::inserter( candidates, candidates.end() ) );
+ std::inserter( nearby, nearby.end() ) );
- // printf( "cand sz %lu\n", candidates.size() );
+ // printf( "cand sz %lu\n", nearby.size() );
// create sets sorted by x and y position
- FOR_EACH( it, candidates ) //world->models_with_fiducials )
+ FOR_EACH( it, nearby )
AddModelIfVisible( *it );
#else
// create sets sorted by x and y position
View
9 libstage/stage.hh
@@ -1137,6 +1137,9 @@ namespace Stg
/** Returns a pointer to the model identified by name, or NULL if
nonexistent */
Model* GetModel( const std::string& name ) const;
+
+ /** Returns a const reference to the set of models in the world. */
+ const std::set<Model*> GetAllModels() const { return models; };
/** Return the 3D bounding box of the world, in meters */
const stg_bounds3d_t& GetExtent() const { return extent; };
@@ -2477,6 +2480,8 @@ namespace Stg
return &blobs[0];
}
+ std::vector<Blob> GetBlobs() const { return blobs; }
+
/** Start finding blobs with this color.*/
void AddColor( Color col );
@@ -2893,7 +2898,7 @@ namespace Stg
///get a reference to camera depth buffer
const GLfloat* FrameDepth() const { return _frame_data; }
- ///get a reference to camera color image. 3 bytes (RGB) per pixel
+ ///get a reference to camera color image. 4 bytes (RGBA) per pixel
const GLubyte* FrameColor() const { return _frame_color_data; }
///change the pitch
@@ -3068,6 +3073,8 @@ namespace Stg
double GetMaxPosition() const {return max_position;};
double GetMinPosition() const {return min_position;};
+ ActuatorType GetType() const { return actuator_type; }
+ stg_point3_t GetAxis() const { return axis; }
};
View
10 stage.pc.in
@@ -1,8 +1,14 @@
prefix=@CMAKE_INSTALL_PREFIX@
Name: stage
-Description: Stage robot simulation program, C++ library and Player plugin - part of the Player/Stage Project
+Description: Stage robot simulation program, C++ library and Player plugin - part of the Player Project (http://playerstage.org)
+
Version: @VERSION@
-Requires: glu libpng
+
+# please don't add FLTK dependencies here, e.g. libpng, GLU, since
+# these vary by platform. Let FLTK figure this out for itself and thus
+# add the incantations to the flags and libs lines below
+Requires:
+
Libs: -L${prefix}/@PROJECT_LIB_DIR@ -lstage @FLTK_LDFLAGS_PKGCONFIG@
Cflags: -I${prefix}/include/Stage-@APIVERSION@ @FLTK_CFLAGS@
View
10 worlds/fasr.world
@@ -23,7 +23,7 @@ window
(
size [ 683.000 713.000 ]
- center [ -0.210 -0.945 ]
+ center [ 0.207 -1.094 ]
rotate [ 0 0 ]
scale 33.591
@@ -44,7 +44,7 @@ floorplan
zone
(
- size [ 2 2 0 ]
+ size [ 2.000 2.000 0 ]
color "green"
pose [ -7.000 -7.000 0 0 ]
name "source"
@@ -53,7 +53,7 @@ zone
zone
(
- size [ 2 2 0 ]
+ size [ 2.000 2.000 0 ]
color "red"
pose [ 7.000 7.000 0 0 ]
name "sink"
@@ -96,7 +96,7 @@ define charge_station model
charge_station( pose [ 7.908 -2.510 0 0 ] )
charge_station( pose [ 7.920 -3.847 0 0 ] )
charge_station( pose [ 7.449 -4.974 0 -40.107 ] )
-charge_station( pose [ 7.698 -1.432 0 31.513 ] )
+charge_station( pose [ 8.680 -1.432 0 31.513 ] )
charge_station( pose [ 5.162 -0.814 0 88.809 ] )
charge_station( pose [ 3.927 -0.693 0 88.808 ] )
@@ -107,7 +107,7 @@ charge_station( pose [ 6.427 -0.964 0 74.484 ] )
define autorob pioneer2dx
(
- sicklaser( samples 32 range_max 5 laser_return 2 watts 30 )
+ sicklaser( samples 64 range_max 5 laser_return 2 watts 30 )
ctrl "fasr"
kjoules 400
joules_capacity 400000

0 comments on commit 91979db

Please sign in to comment.
Something went wrong with that request. Please try again.