Skip to content

Commit 1fdfc2d

Browse files
committed
merged codefinder2 fork
2 parents 3ab37c4 + 4cf334a commit 1fdfc2d

File tree

113 files changed

+17889
-19547
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+17889
-19547
lines changed

.clang-format

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
BasedOnStyle: WebKit
2+
AccessModifierOffset: -2
3+
AlignAfterOpenBracket: Align
4+
AlignConsecutiveAssignments: false
5+
AlignConsecutiveDeclarations: false
6+
AlignOperands: true
7+
AlignTrailingComments: false
8+
AllowAllParametersOfDeclarationOnNextLine: false
9+
AllowShortBlocksOnASingleLine: false
10+
AllowShortCaseLabelsOnASingleLine: true
11+
AllowShortFunctionsOnASingleLine: Inline
12+
AllowShortIfStatementsOnASingleLine: false
13+
AllowShortLoopsOnASingleLine: false
14+
AlwaysBreakAfterDefinitionReturnType: None
15+
AlwaysBreakAfterReturnType: None
16+
AlwaysBreakBeforeMultilineStrings: false
17+
AlwaysBreakTemplateDeclarations: false
18+
BinPackArguments: true
19+
BinPackParameters: true
20+
BreakBeforeBinaryOperators: NonAssignment
21+
BreakBeforeBraces: WebKit
22+
BreakConstructorInitializersBeforeComma: false
23+
# BreakStringLiterals: true
24+
ColumnLimit: 100
25+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
26+
DerivePointerAlignment: false
27+
ForEachMacros: [RANGES_FOR, FOREACH, Q_FOREACH, FOR_EACH, foreach, BOOST_FOREACH, BOOST_REVERSE_FOREACH]
28+
IndentCaseLabels: false
29+
IndentWidth: 2
30+
KeepEmptyLinesAtTheStartOfBlocks: false
31+
Language: Cpp
32+
MaxEmptyLinesToKeep: 1
33+
NamespaceIndentation: None
34+
PenaltyReturnTypeOnItsOwnLine: 1000000
35+
PointerAlignment: Right
36+
ReflowComments: true
37+
SortIncludes: false
38+
SpaceAfterCStyleCast: false
39+
SpaceBeforeAssignmentOperators: true
40+
SpaceBeforeParens: ControlStatements
41+
SpaceInEmptyParentheses: false
42+
SpacesInAngles: false
43+
SpacesInCStyleCastParentheses: false
44+
SpacesInParentheses: false
45+
SpacesInSquareBrackets: false
46+
Standard: Cpp03
47+
TabWidth: 2
48+
UseTab: Never
49+

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ config.h
44
*~
55
*#
66
.DS_Store
7-
docsrc/stage
7+
docsrc/stage
8+
*.txt.user

.travis.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
language: cpp
2+
compiler:
3+
- gcc
4+
- clang
5+
6+
# Install all of the dependencies:
7+
install:
8+
- sudo apt-get -qq update
9+
- sudo apt-get install -y libfltk1.1-dev
10+
11+
# Execute all of the commands which should make the build pass or fail
12+
script:
13+
- mkdir build
14+
- cd build
15+
- cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_PLAYER_PLUGIN=OFF -DCMAKE_INSTALL_PREFIX=$(pwd)/install ..
16+
- make
17+
- make install

AUTHORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ terms of the GNU General Public License version 2 or later:
1616
- Geoff Biggs ([email protected])
1717
- Rich Mattes ([email protected])
1818
- Abbas Sadat ([email protected])
19+
- Adrian Böckenkamp ([email protected])
1920

2021
Many patches and bug reports have been contributed by users around the
2122
world. Stage is part of the Player Project (http://playerstage.org),

CMakeLists.txt

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
cmake_minimum_required( VERSION 2.8.7 FATAL_ERROR )
12
PROJECT(Stage)
23

34
SET( V_MAJOR 4 )
4-
SET( V_MINOR 1 )
5+
SET( V_MINOR 2 )
56
SET( V_BUGFIX 1 )
67

78
SET( VERSION ${V_MAJOR}.${V_MINOR}.${V_BUGFIX} )
@@ -17,8 +18,6 @@ OPTION (CPACK_CFG "[release building] generate CPack configuration files" ON)
1718
# todo - this doesn't work yet. Run Stage headless with -g.
1819
# OPTION (BUILD_GUI "Build FLTK-based GUI. If OFF, build a gui-less Stage useful e.g. for headless compute clusters." ON )
1920

20-
cmake_minimum_required( VERSION 2.4 FATAL_ERROR )
21-
2221
IF (CMAKE_MAJOR_VERSION EQUAL 2 AND NOT CMAKE_MINOR_VERSION LESS 6)
2322
cmake_policy( SET CMP0003 NEW )
2423
cmake_policy( SET CMP0005 OLD )
@@ -53,9 +52,9 @@ endif( PROJECT_OS_OSX)
5352
# Build type cflags
5453
SET (OPTIMIZE "-O2")
5554

56-
SET (CMAKE_CXX_FLAGS_RELEASE " ${FORCE_ARCH} ${OPTIMIZE} -DNDEBUG ${WALL} " CACHE INTERNAL "C Flags for release" FORCE)
57-
SET (CMAKE_CXX_FLAGS_DEBUG " -ggdb ${FORCE_ARCH} ${WALL} -DDEBUG" CACHE INTERNAL "C Flags for debug" FORCE)
58-
SET (CMAKE_CXX_FLAGS_PROFILE " -ggdb -pg ${FORCE_ARCH} ${WALL} " CACHE INTERNAL "C Flags for profile" FORCE)
55+
SET (CMAKE_CXX_FLAGS_RELEASE "${FORCE_ARCH} ${OPTIMIZE} -DNDEBUG ${WALL}" CACHE INTERNAL "CXX Flags for release" FORCE)
56+
SET (CMAKE_CXX_FLAGS_DEBUG "-ggdb ${FORCE_ARCH} ${WALL} -DDEBUG" CACHE INTERNAL "CXX Flags for debug" FORCE)
57+
SET (CMAKE_CXX_FLAGS_PROFILE "-ggdb -pg ${FORCE_ARCH} ${WALL}" CACHE INTERNAL "CXX Flags for profile" FORCE)
5958

6059
#####################################
6160
# Set the default build type
@@ -118,19 +117,6 @@ SET( INDENT " * " )
118117

119118
MESSAGE( STATUS "Checking for optional libraries..." )
120119

121-
# Player does not have a CMake package, but does provide pkgconfig info
122-
123-
include(FindPkgConfig)
124-
125-
pkg_search_module( PLAYER playercore>=2.1.0 )
126-
IF( PLAYER_FOUND )
127-
MESSAGE( STATUS ${INDENT} "Player version ${PLAYER_VERSION} detected at ${PLAYER_PREFIX}" )
128-
MESSAGE( STATUS " PLAYER_CFLAGS: ${PLAYER_CFLAGS}" )
129-
MESSAGE( STATUS " PLAYER_LDFLAGS: ${PLAYER_LDFLAGS}" )
130-
ELSE( PLAYER_FOUND )
131-
MESSAGE(STATUS ${INDENT} "Player not detected. If Player is installed but not detected, check your PKG_CONFIG_PATH." )
132-
ENDIF( PLAYER_FOUND )
133-
134120
# Format the fltk libraries for inclusion in stage.pc
135121
SET(PC_LIBRARIES ${FLTK_LIBRARIES} ${OPENGL_LIBRARIES})
136122
SET(PC_INCLUDE_DIRS ${FLTK_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
@@ -176,18 +162,31 @@ ADD_SUBDIRECTORY(assets)
176162
ADD_SUBDIRECTORY(worlds)
177163
#ADD_SUBDIRECTORY(avonstage)
178164

179-
IF ( BUILD_PLAYER_PLUGIN AND PLAYER_FOUND )
180-
ADD_SUBDIRECTORY(libstageplugin)
181-
ENDIF ( BUILD_PLAYER_PLUGIN AND PLAYER_FOUND )
165+
IF ( BUILD_PLAYER_PLUGIN )
166+
# Player does not have a CMake package, but does provide pkgconfig info
167+
include(FindPkgConfig)
168+
pkg_search_module( PLAYER playercore>=2.1.0 )
169+
IF( PLAYER_FOUND )
170+
MESSAGE( STATUS ${INDENT} "Player version ${PLAYER_VERSION} detected at ${PLAYER_PREFIX}" )
171+
MESSAGE( STATUS " PLAYER_CFLAGS: ${PLAYER_CFLAGS}" )
172+
MESSAGE( STATUS " PLAYER_LDFLAGS: ${PLAYER_LDFLAGS}" )
173+
ELSE( PLAYER_FOUND )
174+
MESSAGE(STATUS ${INDENT} "Player not detected. If Player is installed but not detected, check your PKG_CONFIG_PATH." )
175+
ENDIF( PLAYER_FOUND )
176+
177+
IF ( PLAYER_FOUND )
178+
ADD_SUBDIRECTORY(libstageplugin)
179+
ENDIF ( PLAYER_FOUND )
180+
ENDIF ( BUILD_PLAYER_PLUGIN )
182181

183182

184183
# generate a cpack config file used to create packaged tarballs
185184
IF ( CPACK_CFG )
186185
INCLUDE(InstallRequiredSystemLibraries)
187186
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME}: A Multiple Robot Simulator")
188187
SET(CPACK_PACKAGE_VENDOR "The Player Project")
189-
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.txt")
190-
SET(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.txt")
188+
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
189+
SET(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
191190
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.txt")
192191
SET(CPACK_PACKAGE_VERSION_MAJOR "${V_MAJOR}")
193192
SET(CPACK_PACKAGE_VERSION_MINOR "${V_MINOR}")
Lines changed: 23 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
Stage README.txt
2-
================
3-
4-
This is the Stage README file, containing an introduction, license and
5-
citation information.
1+
# The Stage Simulator
2+
This is the Stage README file, containing an introduction, license and citation information. Stage is a 2(.5)D robotics standalone simulator and can also be used as a C++ library to build your own simulation environment. Up-to-date **documentation can be found [here](https://codedocs.xyz/CodeFinder2/Stage/)**.
63

74
For release notes see RELEASE.txt
85
For installation notes see INSTALL.txt
96

107
Copyright Richard Vaughan and contributors 1998-2011
118
Part of the Player Project (http://playerstage.org)
129

13-
License
14-
-------
10+
[![Build Status](https://travis-ci.org/CodeFinder2/Stage.svg?branch=master)](https://travis-ci.org/CodeFinder2/Stage)
11+
12+
# License
1513
This program is free software; you can redistribute it and/or modify
1614
it under the terms of the GNU General Public License version 2 as
1715
published by the Free Software Foundation.
18-
16+
1917
This program is distributed in the hope that it will be useful, but
2018
WITHOUT ANY WARRANTY; without even the implied warranty of
2119
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -26,36 +24,30 @@ A copy of the license is included with the sourcecode in the file
2624
terms of the license.
2725

2826

29-
Introduction
30-
------------
27+
# Introduction
3128
Stage is a robot simulator. It provides a virtual world populated by
3229
mobile robots and sensors, along with various objects for the robots
3330
to sense and manipulate.
3431

35-
There are three ways to use Stage:
36-
37-
1. The "stage" program: a standalone robot simulation program
32+
There are three ways to use Stage:
33+
1. The "stage" program: a standalone robot simulation program
3834
that loads your robot control program from a library that you provide.
39-
40-
2. The Stage plugin for Player (libstageplugin) - provides a
35+
2. The Stage plugin for Player (libstageplugin) - provides a
4136
population of virtual robots for the popular Player networked robot
4237
interface system.
43-
44-
3. Write your own simulator: the "libstage" C++ library makes it
38+
3. Write your own simulator: the "libstage" C++ library makes it
4539
easy to create, run and customize a Stage simulation from inside your
4640
own programs.
4741

4842

49-
Models
50-
------
43+
# Models
5144
Stage provides several sensor and actuator models, including sonar
5245
or infrared rangers, scanning laser rangefinder, color-blob tracking,
5346
fiducial tracking, bumpers, grippers and mobile robot bases with
5447
odometric or global localization.
5548

5649

57-
Design
58-
------
50+
# Design
5951
Stage was designed with multi-agent systems in mind, so it provides
6052
fairly simple, computationally cheap models of lots of devices rather
6153
than attempting to emulate any device with great fidelity. This design
@@ -67,31 +59,19 @@ controllers between Stage robots and real robots, while still being
6759
fast enough to simulate large populations. We also intend Stage to be
6860
comprehensible to undergraduate students, yet sophisticated enough for
6961
professional reseachers.
70-
62+
7163
Player also contains several useful 'virtual devices'; including
7264
some sensor pre-processing or sensor-integration algorithms that help
7365
you to rapidly build powerful robot controllers. These are easy to use
7466
with Stage.
7567

7668

77-
Citations
78-
---------
79-
If you use Stage in your work, we'd appreciate a citation. At the time
80-
of writing, the most suitable reference is either:
81-
82-
Richard Vaughan. "Massively Multiple Robot Simulations in Stage", Swarm
83-
Intelligence 2(2-4):189-208, 2008. Springer.
69+
# Citations
70+
If you use Stage in your work, we'd appreciate a citation. At the time of writing, the most suitable reference is either:
71+
- Richard Vaughan. "Massively Multiple Robot Simulations in Stage", Swarm Intelligence 2(2-4):189-208, 2008. Springer, [download PDF](http://autonomylab.org/doc/vaughan_si08.pdf)
8472

8573
Or, if you are using Player/Stage:
86-
87-
Brian Gerkey, Richard T. Vaughan and Andrew Howard. "The Player/Stage
88-
Project: Tools for Multi-Robot and Distributed Sensor Systems"
89-
Proceedings of the 11th International Conference on Advanced Robotics,
90-
pages 317-323, Coimbra, Portugal, June 2003 (ICAR'03)
91-
http://www.isr.uc.pt/icar03/ .
92-
93-
[gzipped postscript](http://robotics.stanford.edu/~gerkey/research/final_papers/icar03-player.ps.gz),
94-
[pdf](http://robotics.stanford.edu/~gerkey/research/final_papers/icar03-player.pdf)
74+
- Brian Gerkey, Richard T. Vaughan and Andrew Howard. "The Player/Stage Project: Tools for Multi-Robot and Distributed Sensor Systems" Proceedings of the 11th International Conference on Advanced Robotics, pages 317-323, Coimbra, Portugal, June 2003 (ICAR'03), [download PDF](http://robotics.stanford.edu/~gerkey/research/final_papers/icar03-player.pdf)
9575

9676
Please help us keep track of what's being used out there by correctly
9777
naming the Player/Stage components you use. Player used on its own is
@@ -100,12 +80,9 @@ called "Player". Player and Stage used together are referred to as
10080
without Player, it's just called "Stage". When the Stage library is
10181
used to create your own custom simulator, it's called "libstage" or
10282
"the Stage library". When Player is used with its 3D ODE-based
103-
simulation backend, Gazebo, it's called Player/Gazebo. Gazebo without
104-
Player is just "Gazebo". All this software is part of the "Player
105-
Project".
83+
simulation backend, Gazebo, it's called Player/Gazebo. Gazebo without Player is just "Gazebo". All this software is part of the "Player Project".
10684

107-
Support
108-
-------
85+
# Support
10986
Funding for Stage has been provided in part by:
11087

11188
- DARPA (USA)
@@ -119,8 +96,8 @@ Names
11996
-----
12097
The names "Player" and "Stage" were inspired by the lines:
12198

122-
"All the world's a stage,
123-
And all the men and women merely players"
99+
> All the world's a stage,
100+
> And all the men and women merely players
124101
125102
from "As You Like It" by William Shakespeare.
126103

@@ -130,7 +107,7 @@ References
130107
[4] Nick Jakobi (1997) "Evolutionary Robotics and the Radical Envelope
131108
of Noise Hypothesis", Adaptive Behavior Volume 6, Issue 2. pp.325 -
132109
368.
133-
110+
134111
[5] Stuart Wilson (1985) "Knowledge Growth in an Artificial Animal",
135112
Proceedings of the First International Conference on Genetic Agorithms
136113
and Their Applications. Hillsdale, New Jersey. pp.16-23.

RELEASE.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@ For introduction and license see README.txt
77
For installation notes see INSTALL.txt
88

99

10+
Version 4.2.1
11+
-------------
12+
* add 'confirm_on_quit' option to world section to skip confirmation dialog on exit
13+
* add continuous integration support by Travis CI
14+
* fix segfault in ranger visualization
15+
* fix segfault in blockgroup.cc:236 (gluTessEndPolygon()) when model size (x,y,z) is 0.0
16+
* minor UI improvments (allow changing Stage's caption, allow centering the window)
17+
* add ability to load worlds/models from std::istream for more flexibility
18+
* fix compiler errors in debug build
19+
* make odom integration error publicly accessible (see #67)
20+
* don't crash/segfault in ctrl/wander when there's only 1 range sensor (see #59)
21+
* fix errors reported by the most recent gcc 6.3.1 (on Debian 9 SID), #63 in particular
22+
* improve/unify coding style (strip trailing spaces, use clang-format)
23+
* fix compiler error reported with strict flags (-Wall -Wextra -pedantic -Werror)
24+
* fix issues reported by cppcheck v1.72
25+
* minor updates in docs (cosmetics, make comments visible in doxygen)
26+
27+
Adrian Böckenkamp (CodeFinder2) [email protected] - 2017.3.23
28+
1029
Version 4.1.1
1130
-------------
1231
* fixed bugs in libstageplugin/p_ranger.cc that prevented the plugin from building

assets/stall-old.png

20.9 KB
Loading

assets/stall.png

9.37 KB
Loading

0 commit comments

Comments
 (0)