Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

preparing package for release 4.0.0

  • Loading branch information...
commit 552aa07c392e518ea1a38ac0318f69ad418ea9a6 1 parent 2e189e6
@rtv authored
View
5 AUTHORS.txt
@@ -15,6 +15,7 @@ terms of the GNU General Public License version 2 or later:
- Alex Couture-Beil (asc17@sfu.ca)
- Geoff Biggs (git@killbots.net)
- Rich Mattes (jpgr87@github.com)
+- Abbas Sadat (abbas.sadat@gmail.com)
Many patches and bug reports have been contributed by users around the
world. Stage is part of the Player Project (http://playerstage.org),
@@ -23,5 +24,5 @@ a community effort to develop free Software tools for robotics research.
Project Lead / Maintainer
------------------------
-- Stage v3. : Richard Vaughan (vaughan@sfu.ca)
-- Stage v2. : Toby Collett (tcollett+player@plan9.net.nz)
+- Stage v4. : Richard Vaughan (vaughan@sfu.ca)
+- Stage v2,3. : Toby Collett (tcollett+player@plan9.net.nz)
View
4 INSTALL.txt
@@ -17,7 +17,9 @@ Building Stage requires the following tools and libraries:
- libpng
- ltdl (Libtool)
-(Since 3.1.0, Stage no longer depends on GLib-2)
+The optional Player plugin requires Player >= 2.1.
+
+The optional Avonstage web-enabled binary requires Avon >= 0.1.
Configuring the build
---------------------
View
2  README.txt
@@ -1,5 +1,5 @@
-Copyright Richard Vaughan and contributors 1998-2009.
+Copyright Richard Vaughan and contributors 1998-2010
Part of the Player Project (http://playerstage.org)
License
View
7 RELEASE.txt
@@ -5,7 +5,12 @@ Major new release since worldfile syntax and API have both changed due
to a new unified ranger model. Laser model is now deprecated in favour
of the ranger. This follows a similar change in Player 3, where laser
interface support was deprecated but still in place due to lack of
-Stage support. This release fixes that.
+Stage support. This release fixes that.
+
+Also includes many bugfixes, a much improved build system and some
+performance enhancements and documentation improvements.
+
+Richard Vaughan (rtv) vaughan@sfu.ca - 2010.11.25
Version 3.2.2
-------------
View
0  docsrc/Markdown.pl 100644 → 100755
File mode changed
View
0  docsrc/sourcedocs.sh 100644 → 100755
File mode changed
View
15 docsrc/stage.dox
@@ -23,7 +23,7 @@ PROJECT_NAME = Stage
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = 3.2.2
+PROJECT_NUMBER = 4.0.0
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
@@ -450,10 +450,10 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = sourced.txt \
- stage.txt \
- ../libstage \
- ../libstageplugin
+INPUT = sourced.txt \
+ stage.txt \
+ ../libstage \
+ ../libstageplugin
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
@@ -462,10 +462,7 @@ INPUT = sourced.txt \
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
-FILE_PATTERNS = *.c \
- *.cc \
- *.hh \
- *.h
+FILE_PATTERNS = *.c *.cc *.hh *.h
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.
View
379 libstage/model_laser.cc
@@ -1,379 +0,0 @@
-// file: model_laser.c
-// Author: Richard Vaughan
-// Date: 10 June 2004
-//
-// CVS info:
-// $Source: /home/tcollett/stagecvs/playerstage-cvs/code/stage/libstage/model_laser.cc,v $
-// $Author: rtv $
-// $Revision$
-//
-///////////////////////////////////////////////////////////////////////////
-
-//#define DEBUG
-
-#include <sys/time.h>
-
-#include "stage.hh"
-#include "worldfile.hh"
-#include "option.hh"
-using namespace Stg;
-
-// DEFAULT PARAMETERS FOR LASER MODEL
-static const bool DEFAULT_FILLED = true;
-static const watts_t DEFAULT_WATTS = 17.5;
-static const Size DEFAULT_SIZE( 0.15, 0.15, 0.2 );
-static const meters_t DEFAULT_MAXRANGE = 8.0;
-static const radians_t DEFAULT_FOV = M_PI;
-static const unsigned int DEFAULT_SAMPLES = 180;
-static const unsigned int DEFAULT_RESOLUTION = 1;
-static const char* DEFAULT_COLOR = "blue";
-
-Option ModelLaser::Vis::showArea( "Laser scans", "show_laser", "", true, NULL );
-Option ModelLaser::Vis::showStrikes( "Laser strikes", "show_laser_strikes", "", false, NULL );
-Option ModelLaser::Vis::showFov( "Laser FOV", "show_laser_fov", "", false, NULL );
-Option ModelLaser::Vis::showBeams( "Laser beams", "show_laser_beams", "", false, NULL );
-
-/**
- @ingroup model
- @defgroup model_laser Laser model
- The laser model simulates a scanning laser rangefinder
-
- API: Stg::ModelLaser
-
- <h2>Worldfile properties</h2>
-
- @par Summary and default values
-
- @verbatim
- laser
- (
- # laser properties
- samples 180
- range_max 8.0
- fov 3.14159
- resolution 1
-
- # model properties
- size [ 0.15 0.15 0.2 ]
- color "blue"
- )
- @endverbatim
-
- @par Details
-
- - samples <int>\n
- the number of laser samples per scan
- - range_max <float>\n
- the maximum range reported by the scanner, in meters. The scanner will not detect objects beyond this range.
- - fov <float>\n
- the angular field of view of the scanner, in radians.
- - resolution <int>\n
- Only calculate the true range of every nth laser sample. The missing samples are filled in with a linear interpolation. Generally it would be better to use fewer samples, but some (poorly implemented!) programs expect a fixed number of samples. Setting this number > 1 allows you to reduce the amount of computation required for your fixed-size laser vector.
-*/
-
-
-ModelLaser::ModelLaser( World* world,
- Model* parent,
- const std::string& type ) :
- Model( world, parent, type ),
- vis( world ),
- sample_count( DEFAULT_SAMPLES ),
- samples(),
- range_max( DEFAULT_MAXRANGE ),
- fov( DEFAULT_FOV ),
- resolution( DEFAULT_RESOLUTION )
-{
- PRINT_DEBUG2( "Constructing ModelLaser %d (%s)\n",
- id, typestr );
-
- SetGeom( Geom( Pose(0,0,0,0), DEFAULT_SIZE) );
-
- // assert that Update() is reentrant for this derived model
- thread_safe = true;
-
- SetColor( Color(DEFAULT_COLOR));
-
- // set up our data buffers and raytracing
- SampleConfig();
-
- // start consuming power
- watts = DEFAULT_WATTS;
-
- AddVisualizer( &vis, true );
-}
-
-
-ModelLaser::~ModelLaser( void )
-{
-}
-
-void ModelLaser::Load( void )
-{
- sample_count = wf->ReadInt( wf_entity, "samples", sample_count );
- range_max = wf->ReadLength( wf_entity, "range_max", range_max );
- fov = wf->ReadAngle( wf_entity, "fov", fov );
- resolution = wf->ReadInt( wf_entity, "resolution", resolution );
-
- if( resolution < 1 )
- {
- PRINT_WARN( "laser resolution set < 1. Forcing to 1" );
- resolution = 1;
- }
-
- Model::Load();
-
- SampleConfig();
-}
-
-ModelLaser::Config ModelLaser::GetConfig() const
-{
- Config cfg;
- cfg.sample_count = sample_count;
- cfg.range_bounds.max = range_max;
- cfg.fov = fov;
- cfg.resolution = resolution;
- cfg.interval = interval;
- return cfg;
-}
-
-void ModelLaser::SetConfig( Config& cfg )
-{
- range_max = cfg.range_bounds.max;
- fov = cfg.fov;
- resolution = cfg.resolution;
- interval = cfg.interval;
- sample_count = cfg.sample_count;
-
- SampleConfig();
-}
-
-static bool laser_raytrace_match( Model* hit,
- Model* finder,
- const void* dummy )
-{
- (void)dummy; // avoid warning about unused var
-
- // Ignore the model that's looking and things that are invisible to
- // lasers
- return( (hit != finder) && (hit->vis.laser_return > 0 ) );
-}
-
-void ModelLaser::SampleConfig()
-{
- samples.resize( sample_count );
-}
-
-void ModelLaser::Update( void )
-{
- // removed UnMapFromRoot() optimization - though neat, it breaks
- // thread-safety by messing with the Cell contents - rtv.
-
- assert( samples.size() == sample_count );
-
- double bearing( -fov/2.0 );
- // make the first and last rays exactly at the extremes of the FOV
- double sample_incr( fov / std::max(sample_count-1, (unsigned int)1) );
-
- // find the global origin of our first emmitted ray
- Pose rayorg( geom.pose );
- rayorg.z += geom.size.z/2.0;
- rayorg.a = bearing;
- rayorg = LocalToGlobal(rayorg);
-
- // set up a ray to trace
- Ray ray( this, rayorg, range_max, laser_raytrace_match, NULL, true );
-
- // trace the ray, incrementing its heading for each sample
- for( unsigned int t(0); t<sample_count; t += resolution )
- {
- RaytraceResult r( world->Raytrace( ray ) );
- samples[t].range = r.range;
-
- // if we hit a model and it reflects brightly, we set
- // reflectance high, else low
- if( r.mod && ( r.mod->vis.laser_return >= LaserBright ) )
- samples[t].reflectance = 1.0;
- else
- samples[t].reflectance = 0.0;
-
- // point the ray to the next angle
- ray.origin.a += sample_incr;
-
-
- }
-
- // we may need to interpolate the samples we skipped
- if( resolution > 1 )
- {
- for( unsigned int t( resolution); t<sample_count; t+=resolution )
- for( unsigned int g(1); g<resolution; g++ )
- {
- if( t >= sample_count )
- break;
-
- // copy the rightmost sample data into this point
- samples[t-g] = samples[t-resolution];
-
- double left( samples[t].range );
- double right( samples[t-resolution].range );
-
- // linear range interpolation between the left and right samples
- samples[t-g].range = (left-g*(left-right)/resolution);
- }
- }
-
- // removed MapFromRoot() optimization - though neat, it breaks
- // thread-safety by messing with the Cell contents - rtv
-
- Model::Update();
-}
-
-
-void ModelLaser::Startup( void )
-{
- Model::Startup();
- PRINT_DEBUG( "laser startup" );
-}
-
-void ModelLaser::Shutdown( void )
-{
- PRINT_DEBUG( "laser shutdown" );
- Model::Shutdown();
-}
-
-void ModelLaser::Print( char* prefix ) const
-{
- Model::Print( prefix );
-
- printf( "\tRanges[ " );
- for( unsigned int i=0; i<sample_count; i++ )
- printf( "%.2f ", samples[i].range );
- puts( " ]" );
-
- printf( "\tReflectance[ " );
- for( unsigned int i=0; i<sample_count; i++ )
- printf( "%.2f ", samples[i].reflectance );
- puts( " ]" );
-}
-
-const std::vector<ModelLaser::Sample>& ModelLaser::GetSamples() const
-{
- return samples;
-}
-
-std::vector<ModelLaser::Sample>& ModelLaser::GetSamples()
-{
- return samples;
-}
-
-
-// VIS -------------------------------------------------------------------
-
-ModelLaser::Vis::Vis( World* world )
- : Visualizer( "Laser", "laser_vis" )
-{
- world->RegisterOption( &showArea );
- world->RegisterOption( &showStrikes );
- world->RegisterOption( &showFov );
- world->RegisterOption( &showBeams );
-}
-
-void ModelLaser::Vis::Visualize( Model* mod, Camera* cam )
-{
- (void)cam; // avoid warning about unused var
-
- ModelLaser* laser( dynamic_cast<ModelLaser*>(mod) );
-
- const std::vector<Sample>& samples( laser->GetSamples() );
- const size_t sample_count( samples.size() );
-
- glPushMatrix();
- glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
-
- glTranslatef( 0,0, laser->GetGeom().size.z/2.0 ); // shoot the laser beam out at the right height
-
- // pack the laser hit points into a vertex array for fast rendering
- static std::vector<GLfloat> pts;
- pts.resize( 2 * (sample_count+1) );
-
- pts[0] = 0.0;
- pts[1] = 0.0;
-
- laser->PushColor( 1, 0, 0, 0.5 );
- glDepthMask( GL_FALSE );
- glPointSize( 2 );
-
- for( unsigned int s(0); s<sample_count; s++ )
- {
- double ray_angle = (s * (laser->fov / (sample_count-1))) - laser->fov/2.0;
- pts[2*s+2] = (float)(samples[s].range * cos(ray_angle) );
- pts[2*s+3] = (float)(samples[s].range * sin(ray_angle) );
-
- // if the sample is unusually bright, draw a little blob
- if( samples[s].reflectance > 0 )
- {
- // this happens rarely so we can do it in immediate mode
- glBegin( GL_POINTS );
- glVertex2f( pts[2*s+2], pts[2*s+3] );
- glEnd();
- }
- }
-
- glVertexPointer( 2, GL_FLOAT, 0, &pts[0] );
-
- laser->PopColor();
-
- if( showArea )
- {
- // draw the filled polygon in transparent blue
- laser->PushColor( 0, 0, 1, 0.1 );
- glDrawArrays( GL_POLYGON, 0, sample_count+1 );
- laser->PopColor();
- }
-
- glDepthMask( GL_TRUE );
-
- if( showStrikes )
- {
- // draw the beam strike points
- laser->PushColor( 0, 0, 1, 0.8 );
- glDrawArrays( GL_POINTS, 0, sample_count+1 );
- laser->PopColor();
- }
-
- if( showFov )
- {
- for( unsigned int s(0); s<sample_count; s++ )
- {
- double ray_angle((s * (laser->fov / (sample_count-1))) - laser->fov/2.0);
- pts[2*s+2] = (float)(laser->range_max * cos(ray_angle) );
- pts[2*s+3] = (float)(laser->range_max * sin(ray_angle) );
- }
-
- glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
- laser->PushColor( 0, 0, 1, 0.5 );
- glDrawArrays( GL_POLYGON, 0, sample_count+1 );
- laser->PopColor();
- }
-
- if( showBeams )
- {
- laser->PushColor( 0, 0, 1, 0.5 );
- glBegin( GL_LINES );
-
- for( unsigned int s(0); s<sample_count; s++ )
- {
-
- glVertex2f( 0,0 );
- double ray_angle((s * (laser->fov / (sample_count-1))) - laser->fov/2.0);
- glVertex2f( samples[s].range * cos(ray_angle),
- samples[s].range * sin(ray_angle) );
-
- }
- glEnd();
- laser->PopColor();
- }
-
- glPopMatrix();
-}
-
View
0  libstageplugin/p_bumper.cc → libstageplugin/p_bumper.cc.TODO
File renamed without changes
View
20 libstageplugin/p_graphics.cc
@@ -25,6 +25,26 @@
* CVS: $Id$
*/
+// DOCUMENTATION ------------------------------------------------------------
+
+/** @addtogroup player
+@par Graphics2D interface
+- PLAYER_GRAPHICS2D_CMD_POINTS
+- PLAYER_GRAPHICS2D_CMD_POLYGON
+- PLAYER_GRAPHICS2D_CMD_POLYLINE
+- PLAYER_GRAPHICS2D_CMD_CLEAR
+
+@par Graphics3D interface
+- PLAYER_GRAPHICS3D_CMD_DRAW
+- PLAYER_GRAPHICS3D_CMD_PUSH
+- PLAYER_GRAPHICS3D_CMD_POP
+- PLAYER_GRAPHICS3D_CMD_CLEAR
+- PLAYER_GRAPHICS3D_CMD_TRANSLATE
+- PLAYER_GRAPHICS3D_CMD_ROTATE
+
+*/
+
+
#include "p_driver.h"
#include <iostream>
View
0  libstageplugin/p_localize.cc → libstageplugin/p_localize.cc.TODO
File renamed without changes
View
0  libstageplugin/p_map.cc → libstageplugin/p_map.cc.TODO
File renamed without changes
View
0  libstageplugin/p_power.cc → libstageplugin/p_power.cc.TODO
File renamed without changes
View
0  libstageplugin/p_ptz.cc → libstageplugin/p_ptz.cc.TODO
File renamed without changes
View
39 libstageplugin/p_simulation.cc
@@ -30,18 +30,17 @@
/** @addtogroup player
@par Simulation interface
-- PLAYER_SIMULATION_REQ_SET_POSE2D
-- PLAYER_SIMULATION_REQ_GET_POSE2D
-- PLAYER_SIMULATION_REQ_SET_PROPERTY_INT
- - "fiducial_return" 0-32767
- - "laser_return" 0-2
- - "gripper_return" 0-1
- - "ranger_return" 0-1
- - "obstacle_return" 0-1
- - "color" 0xRRGGBB
-- PLAYER_SIMULATION_REQ_SET_PROPERTY_FLOAT
- - "mass" 0 <= N
- - "watts" 0 <= N
+- PLAYER_SIMULATION_REQ_GET_POSE2D player_simulation_pose2d_req_t
+- PLAYER_SIMULATION_REQ_SET_POSE2D player_simulation_pose2d_req_t
+- PLAYER_SIMULATION_REQ_GET_POSE3D player_simulation_pose3d_req_t
+- PLAYER_SIMULATION_REQ_SET_POSE3D player_simulation_pose3d_req_t
+- PLAYER_SIMULATION_REQ_SET_PROPERTY player_simulation_property_req_t
+ - (name) (prop) (value) (description)
+ - model "color" float[4] [0]=R, [1]=G, [2]=B, [3]=A
+- PLAYER_SIMULATION_REQ_GET_PROPERTY player_simulation_property_req_t
+ - (name) (prop) (value) (description)
+ - model "color" float[4] [0]=R, [1]=G, [2]=B, [3]=A
+ - <unused> "time" uint64_t simulation time in usec
*/
// CODE ------------------------------------------------------------
@@ -331,11 +330,9 @@ int InterfaceSimulation::ProcessMessage(QueuePointer &resp_queue,
* then that's too bad for them. */
//strncmp returns 0 if the strings match
- if( strncmp(req->prop, "color", (size_t)req->prop_count) &&
- strncmp(req->prop, "_mp_color", (size_t)req->prop_count) &&
- strncmp(req->prop, "colour", (size_t)req->prop_count) )
+ if( strncmp(req->prop, "color", (size_t)req->prop_count) )
{
- PRINT_WARN1("Property \"%s\" is not accessible. Options are \"color\", \"_mp_color\", or \"colour\"", req->prop);
+ PRINT_WARN1("Property \"%s\" can not be set. Options are \"color\"", req->prop);
return(-1);
}
@@ -384,12 +381,10 @@ int InterfaceSimulation::ProcessMessage(QueuePointer &resp_queue,
// check they want to set the colour.
//strncmp returns 0 if the strings match
- if( !(strncmp(req->prop, "color", (size_t)req->prop_count) &&
- strncmp(req->prop, "_mp_color", (size_t)req->prop_count) &&
- strncmp(req->prop, "colour", (size_t)req->prop_count)))
- {
- // check the value given is an array of four floats
- if(req->value_count != sizeof(float)*4)
+ if( !(strncmp(req->prop, "color", (size_t)req->prop_count) ))
+ {
+ // check the value given is an array of four floats
+ if(req->value_count != sizeof(float)*4)
{
PRINT_WARN("Colour requires an array of 4 floats to store\n");
return(-1);
View
0  libstageplugin/p_wifi.cc → libstageplugin/p_wifi.cc.TODO
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.