Skip to content

Commit

Permalink
Merge pull request #147 from rcsoccersim/develop
Browse files Browse the repository at this point in the history
Official Release 19.0.0
  • Loading branch information
hidehisaakiyama authored Mar 25, 2024
2 parents f99d594 + 93992d7 commit ce87001
Show file tree
Hide file tree
Showing 38 changed files with 1,244 additions and 645 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)

project(RCSSServer VERSION 18.1.3)
project(RCSSServer VERSION 19.0.0)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand All @@ -19,7 +19,7 @@ endif()
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)
#find_package(Boost COMPONENTS system filesystem REQUIRED)
find_package(Boost COMPONENTS system REQUIRED)
find_package(Boost 1.44.0 COMPONENTS system REQUIRED)

include(GNUInstallDirs)
include(CheckIncludeFileCXX)
Expand Down
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2024-03-25 Hidehisa Akiyama <[email protected]>

* CMakeLists.txt:
* NEWS:
* configure.ac:
- update a major version number. Official release 19.0.0
- introduce a bipedal dash model.
- introduce a new gaussian observation noise model.
- reformat JSON monitor protocol and game log.

2023-04-29 Hidehisa Akiyama <[email protected]>

* CMakeLists.txt:
Expand Down
88 changes: 84 additions & 4 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,13 +1,93 @@
[19.0.0]
* New prameters:
- server::dist_noise_rate (default value: 0.0125)
- server::focus_dist_noise_rate (default value: 0.0125)
- server::land_dist_noise_rate (default value: 0.00125)
- server::land_focus_dist_noise_rate (default value: 0.00125)

* New command:
- "(dash (l POWER DIR) (r POWER DIR))"
This is an extension of the dash command. All version players
can use this format. If the command is accepted, players can
perform acceleration and direction change simultaneously based
on the bipedal dash model.

- "(gaussian_see)"
All version players can use this command. If the command is
accepted, rcssserver sent a reply message, "(ok gaussian_see)".
This command is used for a gaussian noise mode describing below.

* Introduce a bipedal dash model. Players can now independently
issue dash commands to the left and right legs. This means that
players can now apply different accelerations to each leg. With
the bipedal dash model, players can perform acceleration and
direction changes simultaneously, governed by differential drive
kinematics.

The rotation is calculated as:

rotation = (left_leg_vel.bx - right_leg_vel.bx)/(player_size*2)

where bx is the x-component of the vector with the player's
body direction as the x-axis.

The player's result velocity is calculated as:

vel = (left_leg_vel + right_leg_vel)/2

Stamina is consumed independently on the left and right legs,
and the total consumption is the sum of half of each leg:

stamina = stamina - (left_consumed/2 + right_consumed/2)

* Introduce a new gaussian observation noise model. This model is
activated by "(gaussian_see)" command and replaces the previous
quantization model. In this model, In this model, the noised
distance in the player's observation is determined by a
Gaussian distribution:

stddev = actual_dist * noise_rate + focus_dist * focus_noise_rate
noised_dist = max(0.0, normal_distribution(actual_dist, stddev))

where normal_distribution(mean, stddev) is a random number
generator based on a Gaussian distribution with given mean and
standard deviation. actual_dist represents the actual distance
between the observed object and the player, while focus_dist is
the distance between the observed object and the player's focus
point. noise_rate and focus_noise_rate are determined by
heterogeneous parameters, with default values defined as new
server parameters, uniformly set for all player types in the
current version. For ball and player observation,
server::dist_noise_rate and server::focus_dist_noise_rate are
applied, while for flags (landmark objects), server::land_dist_noise_rate
and server::focus_dist_noise_rate are applied.

The velocity noise formula is similar to the previous one.
The formula of dir_chg remains unchanged, while dist_chg is
calculated as:

dist_chg = actual_dist_chg * noised_dist / actual_dist

where actual_dist_chg represents the x-component of the velocity
vector with the direction from the player to the observed object
as the x-axis. The resulting dist_chg value is rounded to two
decimal places before being sent.

* Improve the JSON game log format. The format of each data has
been reviewed to make it easier to parse and the JSON rcg is
now recorded as a pure JSON file. The parser library is bundled
in rcssmonitor.

[18.1.3]
* Fix an issue in the penalty shootouts referee. If both teams
score the same when finishing all extended trials, the penalty
shootouts referee will not end the game and the simulator will
get stuck. Thanks go to Omid Amini for providing the patch.
score the same when finishing all extended trials, the penalty
shootouts referee will not end the game and the simulator will
get stuck. Thanks go to Omid Amini for providing the patch.

[18.1.2]
* Fix a problem of v18 observation noise model. Quantized distance
values affected by the focus point are now rounded to one decimal
place.
place.

[18.1.1]
* Fix a problem in which the focus point is sometimes not updated.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ For further reading, please check [the user's manual](https://rcsoccersim.readth
rcssserver is implemented by C++14 and depends some libraries.
Make sure you have the required dependencies installed on your system:

- g++ (which supports C++14)
- g++ (which supports C++17)
- 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:
In the case of Ubuntu 20.04 or 22.04, the following commands will resolve all dependencies:

```
sudo apt update
Expand Down
14 changes: 4 additions & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

AC_PREREQ([2.69])
LT_PREREQ([2.2])
AC_INIT([RCSSServer],[18.1.3],[https://github.com/rcsoccersim/],[rcssserver])
AC_INIT([RCSSServer],[19.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 @@ -47,7 +47,7 @@ AX_CHECK_ZLIB([],
##################################################

AC_FUNC_ALLOCA
AC_HEADER_STDC
#AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h])
AC_CHECK_HEADERS([inttypes.h libintl.h libintl.h malloc.h netdb.h])
AC_CHECK_HEADERS([netinet/in.h poll.h pwd.h stddef.h stdlib.h sys/param.h])
Expand All @@ -65,7 +65,7 @@ AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT8_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
#AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
Expand Down Expand Up @@ -98,12 +98,6 @@ AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type
(`int' or `void').])

AC_FUNC_STRFTIME
AC_CHECK_FUNCS([memset], [], [
echo "************** ERROR ****************"
echo "Could not find memset function."
echo "Please upgrade you system"
exit 1
])
AC_CHECK_FUNCS([floor gethostbyname gettimeofday inet_ntoa memset mkdir pow rint])
AC_CHECK_FUNCS([select socket sqrt strdup strerror])

Expand Down Expand Up @@ -194,7 +188,7 @@ AX_CXX_COMPILE_STDCXX_17(noext)
# check boost
##################################################

AX_BOOST_BASE([1.32.0])
AX_BOOST_BASE([1.44.0])
AX_BOOST_SYSTEM
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
Expand Down
4 changes: 2 additions & 2 deletions m4/ax_boost_base.m4
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# Test for the Boost C++ libraries of a particular version (or newer)
#
# If no path to the installed boost library is given the macro searchs
# If no path to the installed boost library is given the macro searches
# under /usr, /usr/local, /opt, /opt/local and /opt/homebrew and evaluates
# the $BOOST_ROOT environment variable. Further documentation is available
# at <http://randspringer.de/boost/index.html>.
Expand All @@ -33,7 +33,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 52
#serial 54

# example boost program (need to pass version)
m4_define([_AX_BOOST_BASE_PROGRAM],
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ add_executable(RCSSServer
initsenderonlinecoach.cpp
initsenderplayer.cpp
landmarkreader.cpp
leg.cpp
logger.cpp
main.cpp
monitor.cpp
Expand Down Expand Up @@ -94,7 +95,6 @@ target_link_libraries(RCSSServer
RCSS::ConfParser
RCSS::Net
RCSS::GZ
# Boost::filesystem
ZLIB::ZLIB
)

Expand Down
2 changes: 2 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ rcssserver_SOURCES = \
initsenderonlinecoach.cpp \
initsenderplayer.cpp \
landmarkreader.cpp \
leg.cpp \
logger.cpp \
main.cpp \
monitor.cpp \
Expand Down Expand Up @@ -90,6 +91,7 @@ noinst_HEADERS = \
initsenderonlinecoach.h \
initsenderplayer.h \
landmarkreader.h \
leg.h \
logger.h \
monitor.h \
observer.h \
Expand Down
3 changes: 3 additions & 0 deletions src/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ RegHolder vp15 = AudioSenderPlayer::factory().autoReg( &create< AudioSenderPlaye
RegHolder vp16 = AudioSenderPlayer::factory().autoReg( &create< AudioSenderPlayerv8 >, 16 );
RegHolder vp17 = AudioSenderPlayer::factory().autoReg( &create< AudioSenderPlayerv8 >, 17 );
RegHolder vp18 = AudioSenderPlayer::factory().autoReg( &create< AudioSenderPlayerv8 >, 18 );
RegHolder vp19 = AudioSenderPlayer::factory().autoReg( &create< AudioSenderPlayerv8 >, 19 );

template< typename Sender >
AudioSender::Ptr
Expand All @@ -1011,6 +1012,7 @@ RegHolder vc15 = AudioSenderCoach::factory().autoReg( &create< AudioSenderCoachv
RegHolder vc16 = AudioSenderCoach::factory().autoReg( &create< AudioSenderCoachv7 >, 16 );
RegHolder vc17 = AudioSenderCoach::factory().autoReg( &create< AudioSenderCoachv7 >, 17 );
RegHolder vc18 = AudioSenderCoach::factory().autoReg( &create< AudioSenderCoachv7 >, 18 );
RegHolder vc19 = AudioSenderCoach::factory().autoReg( &create< AudioSenderCoachv7 >, 19 );

template< typename Sender >
AudioSender::Ptr
Expand All @@ -1037,5 +1039,6 @@ RegHolder voc15 = AudioSenderOnlineCoach::factory().autoReg( &create< AudioSende
RegHolder voc16 = AudioSenderOnlineCoach::factory().autoReg( &create< AudioSenderOnlineCoachv7 >, 16 );
RegHolder voc17 = AudioSenderOnlineCoach::factory().autoReg( &create< AudioSenderOnlineCoachv7 >, 17 );
RegHolder voc18 = AudioSenderOnlineCoach::factory().autoReg( &create< AudioSenderOnlineCoachv7 >, 18 );
RegHolder voc19 = AudioSenderOnlineCoach::factory().autoReg( &create< AudioSenderOnlineCoachv7 >, 19 );
}
}
1 change: 1 addition & 0 deletions src/bodysender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ RegHolder vp15 = BodySenderPlayer::factory().autoReg( &create< BodySenderPlayerV
RegHolder vp16 = BodySenderPlayer::factory().autoReg( &create< BodySenderPlayerV14 >, 16 );
RegHolder vp17 = BodySenderPlayer::factory().autoReg( &create< BodySenderPlayerV14 >, 17 );
RegHolder vp18 = BodySenderPlayer::factory().autoReg( &create< BodySenderPlayerV18 >, 18 );
RegHolder vp19 = BodySenderPlayer::factory().autoReg( &create< BodySenderPlayerV18 >, 19 );
}

}
1 change: 1 addition & 0 deletions src/fullstatesender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ RegHolder vp15 = FullStateSenderPlayer::factory().autoReg( &create< FullStateSen
RegHolder vp16 = FullStateSenderPlayer::factory().autoReg( &create< FullStateSenderPlayerV13 >, 16 );
RegHolder vp17 = FullStateSenderPlayer::factory().autoReg( &create< FullStateSenderPlayerV13 >, 17 );
RegHolder vp18 = FullStateSenderPlayer::factory().autoReg( &create< FullStateSenderPlayerV18 >, 18 );
RegHolder vp19 = FullStateSenderPlayer::factory().autoReg( &create< FullStateSenderPlayerV18 >, 19 );
}

}
Loading

0 comments on commit ce87001

Please sign in to comment.