Skip to content

Commit

Permalink
Add README.md (helios-base#19)
Browse files Browse the repository at this point in the history
* fix cmake configurations.

* replace CheckSymbolExists with CheckCXXSymbolExists

* fix a cmake problem. add a missing header file.

* デフォルトのインストール先を~/localへ変更

* formationファイルフォーマットv2のパーサを復帰 (helios-base#13)

* support a large value of synch_see_offset (helios-base#15)

* SeeState::canChangeViewToをcanSendChangeViewへリネーム.スタイルを一部修正.

* コード整理

* synch_see時の最大待ち時間を79msから30msへ変更

* TimeStampに<,>演算子を追加

* synch_see_offsetが大きい場合に部分的に対応。seeのタイミングを正確に判断するためにTimeStampを導入

Co-authored-by: Hidehisa Akiyama <[email protected]>

* replace some implementations with C++11/14  (helios-base#16)

* replace deprecated function adapters with lamda expressions

* 一部を範囲for文へ置き換え

* 一部を範囲for文、nullptrへ置換。

* 行動クラス群を範囲for文へ置換

* ann内の実装を範囲for文で置換

* clang内の実装を範囲for文で置換

* coach内の実装を範囲for文へ置換

* 範囲for文でiteratorを整理

* BallObjectの代入演算子を追加し、defaultとして定義

* boostのスマートポインタ、cstdintを標準へ置換

* boost::randomをstd::randomへ置換

* コンストラクタ・デストラクタのdefault,deleteを設定

* 自己位置推定の冗長コードを整理し、サンプリング動作を確認

* 一部のpush_backをemplace_backへ置き換え

* ヌルポインタとしての0キャストをnullptrへ置き換え

* 一部のstd::mapをstd::unordered_mapへ置き換え

* 一部のlexical_castを標準の変換関数へ置き換え

* 時間計測関係をstd::chronoで再実装

* TimeStamp::msecFromをelapsedSinceへリネーム

* 未使用のフォーメーションクラスをobsoleteへ移動

* 未使用コードを削除

* 一部の仮想メンバ関数にoverrideキーワードを追加

* add README.md

* add .clang-format

Co-authored-by: Hidehisa Akiyama <[email protected]>
  • Loading branch information
hidehisaakiyama and hidehisaakiyama authored Feb 28, 2022
1 parent bf71940 commit 9aa84d5
Show file tree
Hide file tree
Showing 2 changed files with 306 additions and 0 deletions.
211 changes: 211 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
---
# clang-format 13.0.0
Language: Cpp
# BasedOnStyle: GNU
#AccessModifierOffset: -2
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
#AlignArrayOfStructures: None
AlignArrayOfStructures: Right
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
#AlignOperands: Align
AlignOperands: AlignAfterOperator
#AlignOperands: BreakBeforeBinaryOperators
#AlignTrailingComments: true
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
#AllowShortFunctionsOnASingleLine: All
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortLambdasOnASingleLine: All
#AllowShortIfStatementsOnASingleLine: Never
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: All
#AlwaysBreakAfterReturnType: AllDefinitions
AlwaysBreakAfterReturnType: TopLevelDefinitions
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: true
# AfterClass: true
AfterClass: false
AfterControlStatement: Always
# AfterEnum: true
AfterEnum: false
AfterFunction: true
# AfterNamespace: true
AfterNamespace: false
AfterObjCDeclaration: true
# AfterStruct: true
AfterStruct: false
# AfterUnion: true
AfterUnion: false
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
# BeforeLambdaBody: false
BeforeLambdaBody: true
BeforeWhile: true
# IndentBraces: true
IndentBraces: false
# SplitEmptyFunction: true
SplitEmptyFunction: false
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: All
BreakBeforeConceptDeclarations: true
#BreakBeforeBraces: GNU
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
#ColumnLimit: 79
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
#EmptyLineAfterAccessModifier: Never
EmptyLineAfterAccessModifier: Leave
#EmptyLineBeforeAccessModifier: LogicalBlock
EmptyLineBeforeAccessModifier: Always
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
#IndentWidth: 2
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
#PointerAlignment: Right
PointerAlignment: Middle
PPIndentWidth: -1
ReferenceAlignment: Pointer
#ReflowComments: true
ReflowComments: false
ShortNamespaceLines: 1
#SortIncludes: CaseSensitive
SortIncludes: Never
SortJavaStaticImport: Before
#SortUsingDeclarations: true
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
#SpaceAfterLogicalNot: false
SpaceAfterLogicalNot: true
#SpaceAfterTemplateKeyword: true
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
#SpaceBeforeParens: Always
SpaceBeforeParens: ControlStatements
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
#SpaceInEmptyBlock: false
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
#SpacesInAngles: false
SpacesInAngles: true
#SpacesInConditionalStatement: false
SpacesInConditionalStatement: true
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
#SpacesInParentheses: false
SpacesInParentheses: true
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
#Standard: c++03
Standard: c++14
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
...
95 changes: 95 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@

# Librcsc

librcsc is a basic library to develop a simulated soccer team and related tools for the RoboCup Soccer Simulation.
All programs can work with rcssserver-16.

- The RoboCup Soccer Simulator: https://rcsoccersim.github.io/
- RoboCup Official Homepage: https://www.robocup.org/

## Quick Start

The latest librcsc depends on the following libraries:
- Boost 1.38 or later https://www.boost.org/
- (optional) Doxygen
- (optional) Graphviz

In the case of Ubuntu 16.04 or later, execute the following commands for installing a basic development environment:
```
sudo apt update
sudo apt install build-essential libboost-all-dev autoconf automake libtool
```

To build the library, execute commands from the root of source directory:
```
./bootstrap
./configure --disable-unit-test
make
```

Once successfully built, you can install the library file and header files to the default installation directory (``/usr/local``):
```
sudo make install
```
It is recommended to change the installation directory to the under of your home directory.
See the next section in detail.

You can generate documetation files using Doxygen and Graphviz.
```
sudo apt install doxygen graphviz
make doc
```


## Configuring

If you do not have an administration privilege, you may need to install the library under your home directory and configure some environment variables.
You can change the installation directory by passing ``--prefix`` option to the configure script:
```
./configure --prefix=/path/to/installation
```
For example, if you'd like to install under the ``~/local``, type the following:
```
./configure --prefix=$HOME/local
```

See `./configure --help` for other options.


### Configuring Environment Variables

``~/local`` is supported by the configure script of helios-base, soccerwindow2, fedit2 by default.
However, if you change the installation directory, you need to modify the followng two environment variables:

- ``LD_LIBRARY_PATH`` (in ``~/.bashrc``)
- ``PATH`` (in ``~/.profile``)

The following instructions assume that librcsc was installed under ``~/local``.

Add the following lines at the end of ``~/.bashrc``:
```
LD_LIBRARY_PATH=$HOME/local/lib:$LD_LIBRARY_PATH
export EDITOR RCSSMONITOR LD_LIBRARY_PATH
```
This setting is enabled by opening a new terminal or executing ``source ~/.bashrc``.

You can find the existing ``PATH`` variable at the end of ``~/.profile``.
Add the following at the end of the file, then log out and log in again.
```
PATH="$HOME/local/bin:$PATH"
```

## Uninstall

librcsc can also be easily removed by entering the distribution directory and running:
```
make uninstall
```
This will remove all the files that where installed, but not any directories that were created during the installation process.


## References

- Hidehisa Akiyama, Tomoharu Nakashima, HELIOS Base: An Open Source Package for the RoboCup Soccer 2D Simulation, In Sven Behnke, Manuela Veloso, Arnoud Visser, and Rong Xiong editors, RoboCup2013: Robot World XVII, Lecture Notes in Artificial Intelligence, Springer Verlag, Berlin, 2014. http://dx.doi.org/10.1007/978-3-662-44468-9_46
- Hidehisa Akiyama, Itsuki Noda, Multi-Agent Positioning Mechanism in the Dynamic Environment, In Ubbo Visser, Fernando Ribeiro, Takeshi Ohashi, and Frank Dellaert, editors, RoboCup 2007: Robot Soccer World Cup XI Lecture Notes in Artificial Intelligence, vol. 5001, Springer, pp.377-384, July 2008. https://doi.org/10.1007/978-3-540-68847-1_38

0 comments on commit 9aa84d5

Please sign in to comment.