Skip to content

Commit

Permalink
Official Release 17.0.0: Merge pull request #83 from rcsoccersim/develop
Browse files Browse the repository at this point in the history
Official Release 17.0.0
  • Loading branch information
hidehisaakiyama authored Apr 2, 2022
2 parents e134e79 + 9745a25 commit 0f53d93
Show file tree
Hide file tree
Showing 214 changed files with 6,075 additions and 4,475 deletions.
40 changes: 40 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
cmake_minimum_required(VERSION 3.5.1)

project(RCSSServer VERSION 17.0.0)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()
set(CMAKE_CXX_FLAGS "-W -Wall")

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)

find_package(ZLIB REQUIRED)
if(ZLIB_FOUND)
set(HAVE_LIBZ TRUE)
endif()
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)
find_package(Boost COMPONENTS system filesystem REQUIRED)

include(GNUInstallDirs)
include(CheckIncludeFileCXX)

check_include_file_cxx("sys/socket.h" HAVE_SYS_SOCKET_H)
check_include_file_cxx("sys/param.h" HAVE_SYS_PARAM_H)
check_include_file_cxx("sys/time.h" HAVE_SYS_TIME_H)
check_include_file_cxx("netinet/in.h" HAVE_NETINET_IN_H)
check_include_file_cxx("arpa/inet.h" HAVE_ARPA_INET_H)
check_include_file_cxx("netdb.h" HAVE_NETDB_H)
check_include_file_cxx("unistd.h" HAVE_UNISTD_H)
check_include_file_cxx("poll.h" HAVE_POLL_H)
check_include_file_cxx("pwd.h" HAVE_PWD_H)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake config.h)

add_subdirectory(rcss)
add_subdirectory(src)
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2022-04-02 Hidehisa Akiyama <[email protected]>

* CMakeLists.txt:
* NEWS:
* configure.ac:
- update a major version number. Official release 17.0.0
- improve the dash model and the catch model
- support a JSON-based monitor protocol.

2021-07-20 Hidehisa Akiyama <[email protected]>

* NEWS:
Expand Down
6 changes: 4 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck

SUBDIRS = \
rcssbase \
rcss \
src \
.

EXTRA_DIST = \
README.md
README.md \
CMakeLists.txt \
config.h.cmake

CLEANFILES = \
*~ \
Expand Down
38 changes: 38 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
[17.0.0]
* New parameters:
- server::max_catch_angle (default value: 90.0)
- server::min_catch_angle (default value: -90.0)

* Changed parameters:
- server::min_dash_power (-100.0 -> 0)
- server::back_dash_rate (0.6 -> 0.7)

* Improvement of the catch model. The direction of goalie's catch
command has been restricted within [server::min_catch_angle,
server::max_catch_angle]. The default values are [-90.0, 90.0].
This setting means goalies cannot catch the ball behind them.

* Improvement of the dash model. server::min_dash_power is changed
from -100.0 to 0.0. This means players cannot use the negative
power in order for them to accelerate backward. If players would
like to accelerate backward, they need to use the omnidirectional
dash. In connection with the change of the dash power,
server::back_dash_rate has been changed.

* Support a JSON-based monitor protocol. If the monitor tries to
connect to the server by the client version 5, the received
messages will be JSON. The format of the game log file (.rcg) has
also followed the monitor protocol. If the value of
server::game_log_version is 6, the content of the recorded game
log is a JSON array except for the header line.

* The installation destination of the library header files has been
unified under PREFIX/include/rcss. The location of the clang
parser library has been moved to prefix/include/rcss/clang.

* Support CMake. Thanks to gikari for providing his great
contribution on GitHub.

* Support C++11/14. Some environment-dependent implementations have
been replaced by the C++ standard library.

[16.0.1]
* Fix a bug of the length of half time caused by slow_down_factor.

Expand Down
142 changes: 94 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,68 @@

The RoboCup Soccer Simulator Server (rcssserver) is a research and educational tool for multi-agent systems and artificial intelligence. It allows 11 simulated autonomous robotic players to play soccer (football).

## Quick Start
For further reading, please check [the user's manual](https://rcsoccersim.readthedocs.io/).

## :soccer: Quick Start

rcssserver is implemented by C++14 and depends some libraries.
Make sure you have the required dependencies installed on your system:

- g++
- make
- boost
- bison
- g++ (which supports C++14)
- autoconf
- automake
- libtool
- flex
- bison
- boost >= 1.44

In the case of Ubuntu 18.04 or 20.04, the following commands will resolve all dependencies:

```
sudo apt update
sudo apt install build-essential automake autoconf libtool flex bison libboost-all-dev
```

Download the latest rcssserver release in the [releases section](https://github.com/rcsoccersim/rcssserver/releases). Extract it and from the rcssserver directory execute:
Then, download the latest rcssserver tarball from the [releases section](https://github.com/rcsoccersim/rcssserver/releases).
Extract it and from the rcssserver directory execute:

```bash
tar xzvfp rcssserver-x.x.x.tar.gz
cd rcssserver-x.x.x
./configure
make
```

This will build the necessary binaries to get you up and running.
`rcssserver/src/rcssserver` is the binary for the simulator server.

`rcssserver/src/rcssserver` is the binary for the simulator server. The simulator
server manages the actual simulation and comunicates with client programs that
control the simulated robots. To be able to run, the binary needs to find shared
libraries which are created when you build rcssserver. This means you must either
install the server (make install) or run it from `rcssserver/src`.
The simulator server manages the actual simulation and comunicates with client programs that
control the simulated robots.
To be able to run, the binary needs to find shared libraries which are created when you build rcssserver.
This means you must either install the server (make install) or run it from `rcssserver/src`.

A sample client can be found at `rcssserver/src/rcssclient`.

To see what is actually happening in the simulator, you will need to start a
simulator monitor, which needs to be installed separately ([rcssmonitor](https://github.com/rcsoccersim/rcssmonitor),
rcssmonitor_classic, [soccerwindow2](https://osdn.net/projects/rctools/releases/p4886)
or any other third party monitor).
simulator monitor, which needs to be installed separately ([rcssmonitor](https://github.com/rcsoccersim/rcssmonitor), or any other third party monitor).

To playback games that that you have recorded or downloaded, you will need to
start the log player such as [rcsslogplayer](https://github.com/rcsoccersim/rcsslogplayer),
which must also be downloaded separately.
To playback games that you have recorded or downloaded, you will need to start the log player.
[rcssmonitor](https://github.com/rcsoccersim/rcssmonitor) can be used for this purpose.

## Configuring
The version 17.0.0 or later support [CMake](https://cmake.org/).
If CMake is prefered or problems with the above procedure, try the following commands at the top of the project directory:

Before you can build The RoboCup Soccer Simulator Server you will need to run
the `configure` script located in the root of the distribution directory.
```bash
cd rcssserver-x.x.x
mkdir build
cd build
cmake ..
make
```

## :gear: Configuring

Before building rcssserver, you will need to run the `configure` script located in the root of the distribution directory.
The default configuration will set up to install the server components in the
following location:

Expand All @@ -56,74 +77,99 @@ following location:
You may need administrator privileges to install the server into the default
location. This locations can be modified by using configure's `--prefix=DIR`
and related options. See `configure --help` for more details.
```bash
./configure --prefix=YOUR_INSTALLATION_DIR
```

The server has several features that can be enabled or disabled at configure time
by using the `--enable-FEATURE[=ARG]` or `--disable-FEATURE` parameters to
`configure`. `--disable-FEATURE` is equivalent to `--enable-FEATURE=no` and
`--enable-FEATURE` is equivalent to `--enable-FEATURE=yes`. The only valid values
for `ARG` are `yes` and `no`.

`--enable-fast_scanner=yes` will enable a fast building but (very) large
scanner for the coach language. You will need to have `lex` or `flex` installed
and you will need to manually remove the `coach_lang_tok.cc` file in the
`rcssserver/src` directory. This is disabled by default. I found the actual
speed of the parser show only minimal improvement when using this option on my
system, but this may not be true on your system. All I can suggest is to test it
on your system and decide for yourself if the speed increase justifies the
increase in size of the executable.
`--enable-fast_scanner=yes` will enable a fast building but (very) large scanner for the coach language.
You will need to have `flex` installed and you will need to manually remove the `coach_lang_tok.cpp` file in the `rcssserver/rcss/clang` directory.
This is disabled by default.
I found the actual speed of the parser show only minimal improvement when using this option on my system, but this may not be true on your system.
All I can suggest is to test it on your system and decide for yourself if the speed increase justifies the increase in size of the executable.

`--enable-rcssclient=yes` will enable the building of rcssclient, a sample
client program. This is enabled by default.

`--enable-debug=yes` will enable the building of the modules with debugging
information. This is disabled by default.

Once you have successfully configured the monitor, simply run `make` to build the sources.

## Building
If CMake is chosen, `ccmake` command is available for the configuration:
```bash
cd build
ccmake ..
```

## :hammer_and_wrench: Building

Once you have successfully configured the server, simply run `make` to build
the sources.

## Installing
## :package: Installing

When you have completed building the server, its components can be installed
into their default locations or the locations specified during configuring by
running `make install`. Depending on where you are installing the
server, you may need special permissions.
running
```bash
make install
```
Depending on where you are installing the server, you may need special permissions.

## Uninstalling
## :wastebasket: Uninstalling

The server can also be easily removed by entering the distribution directory and
running `make uninstall`. This will remove all the files that where installed,
running
```bash
make uninstall
```

This will remove all the files that where installed,
but not any directories that were created during the installation process.

## Using the Server
In the case of CMake, find `install_manifest.txt` under the build directory, then execute:
```bash
xargs rm < install_manifest.txt
```

To start only the server either type `./rcssserver` from the directory
containing the executable or `rcssserver` if you installed the executables
in your PATH. rcssserver will look in your home directory for the configuration files:
## :arrow_forward: Using the Server

To start only the server either type `./rcssserver` from the directory
containing the executable or `rcssserver` if you installed the executables
in your PATH.
```bash
~/.rcssserver/server.conf
~/.rcssserver/player.conf
~/.rcssserver-landmark.xml # (optional)
rcssserver
```
rcssserver will look in your home directory for the configuration files:

- ~/.rcssserver/server.conf
- ~/.rcssserver/player.conf
- ~/.rcssserver/CSVSaver.conf
- ~/.rcssserver-landmark.xml (optional)

If these files do not exist they will be created and populated with default values.

To start the sample client, type `./rcssclient` or `rcssclient` as above. Then type
`(init sample)`. This will connect the sample client to the server. You can then
type in client command to move the client around the field. You will also need a
To start the sample client, type `./rcssclient` or `rcssclient` as above. Then type
`(init sample)`. This will connect the sample client to the server. You can then
type in client command to move the client around the field. You will also need a
monitor to be able to see whats happening on the field.

If you installed the server and the monitor successfully, you can use the
`rcsoccersim` script. To start the simulator (server and monitor) either type:

`rcsoccersim`

```bash
rcsoccersim
```

## Contributing
## :incoming_envelope: Contributing

For bug reports, feature requests and latest updates, please open an issue or a pull request.
For bug reports, feature requests and latest updates, please goto
https://github.com/rcsoccersim/rcssserver and open an issue or a pull request.

> The RoboCup Soccer Server Maintainance Group
18 changes: 18 additions & 0 deletions config.h.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#define VERSION "${PROJECT_VERSION}"
#define PACKAGE "rcssserver"

#cmakedefine HAVE_LIBZ 1
#cmakedefine HAVE_SYS_SOCKET_H 1
#cmakedefine HAVE_NETINET_IN_H 1
#cmakedefine HAVE_ARPA_INET_H 1
#cmakedefine HAVE_POLL_H 1
#cmakedefine HAVE_NETDB_H 1
#cmakedefine HAVE_SYS_TIME_H 1
#cmakedefine HAVE_PWD_H 1
#cmakedefine HAVE_SYS_PARAM_H 1
#cmakedefine HAVE_UNISTD_H 1
#cmakedefine HAVE_SYS_TYPES_H 1
#cmakedefine HAVE_STDINT_H 1
#cmakedefine HAVE_STDDEF_H 1

#define HAVE_SOCKLEN_T 1
30 changes: 13 additions & 17 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

AC_PREREQ(2.61)
LT_PREREQ([2.2])
AC_INIT([RCSSServer],[16.0.1],[[email protected]],[rcssserver])
AC_INIT([RCSSServer],[17.0.0],[https://github.com/rcsoccersim/],[rcssserver])

#AM_INIT_AUTOMAKE([gnu 1.7.2 check-news dist-bzip2 dist-zip])
AM_INIT_AUTOMAKE([gnu 1.7.2 check-news foreign])
Expand Down Expand Up @@ -34,18 +34,13 @@ AC_PROG_MAKE_SET
AC_CHECK_LIB([m], [cos])
dnl AC_CHECK_LIB(expat, XML_Parse)
#AC_CHECK_LIB([z], [deflate])
AC_SUBST(GZ_LIBS)
AC_CHECK_LIB([z], [deflate],
[AC_DEFINE([HAVE_LIBZ], [1],
[Define to 1 if you have the `z' library (-lz).])
GZ_LIBS="-lz"])

AC_ARG_WITH(sstream,
AS_HELP_STRING(--with-sstream,use sstream instead of strstream (default=yes)),
use_sstream=$withval, use_sstream=yes)
if test "$use_sstream" = "yes"; then
AC_CXX_HAVE_SSTREAM
fi
#AC_SUBST(GZ_LIBS)
#AC_CHECK_LIB([z], [deflate],
# [AC_DEFINE([HAVE_LIBZ], [1],
# [Define to 1 if you have the `z' library (-lz).])
# GZ_LIBS="-lz"])
AX_CHECK_ZLIB([],
[AC_MSG_NOTICE(Zlib not found.)])

##################################################
# Checks for header files.
Expand Down Expand Up @@ -250,10 +245,11 @@ fi
##################################################

AC_CONFIG_FILES([Makefile
rcssbase/Makefile
rcssbase/net/Makefile
rcssbase/conf/Makefile
rcssbase/gzip/Makefile
rcss/Makefile
rcss/net/Makefile
rcss/conf/Makefile
rcss/gzip/Makefile
rcss/clang/Makefile
src/Makefile
src/rcsoccersim],
[test -f src/rcsoccersim && chmod +x src/rcsoccersim])
Expand Down
Loading

0 comments on commit 0f53d93

Please sign in to comment.