Skip to content

Commit 789ec5a

Browse files
committed
add more docs
1 parent 56fef53 commit 789ec5a

File tree

8 files changed

+483
-7
lines changed

8 files changed

+483
-7
lines changed

docs/definitions/index.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# Definitions
6+
7+
## Cross Language Soccer Framework
8+
9+
Cross Language Soccer Framework is a new approach to enhance the flexibility and interoperability of RoboCup Soccer Simulation 2D (SS2D). The Soccer Simulation Proxy is an extended version of the Helios base that can send decision-making information to the PlayMaker Server. It can receive high-level actions from the PlayMaker Server and send them to RoboCup Soccer Simulation Server and/or SoccerWindow2.
10+
On the other hand, the PlayMaker Server receives information from the client and selects the appropriate actions to be sent back to the client. We have implemented some sample servers in C\#, Python, and JavaScript, but it can also be implemented in other languages to make use of their features.
11+
12+
![image](https://github.com/Cross-Language-Soccer-Framework/cross-language-soccer-framework/assets/25696836/d152797b-53f0-490f-a8dd-b8c0ef667317)
13+
14+
## [RoboCup](https://www.robocup.org/)
15+
16+
RoboCup is an international robotics competition that focuses on promoting research and development in the field of autonomous robots. The competition aims to advance the state of the art in robotics and artificial intelligence by challenging teams to develop robots capable of playing soccer, rescue, and other tasks against other teams in a real-world or simulated environment.
17+
18+
## [RoboCup Soccer Simulation 2D](https://rcsoccersim.github.io/)
19+
20+
RoboCup Soccer Simulation 2D is a league in the RoboCup competition that focuses on developing autonomous soccer-playing agents. The goal of the league is to develop intelligent agents that can play soccer in a simulated environment. The agents must be able to perceive the game state, make decisions based on that information, and execute actions to play the game effectively.
21+
22+
![image](https://github.com/Cross-Language-Soccer-Framework/cross-language-soccer-framework/assets/25696836/7b0b1d49-7001-479c-889f-46a96a8802c4)
23+
24+
## [RoboCup Soccer Simulation Server](https://github.com/rcsoccersim/rcssserver)
25+
26+
The RCSSServer is a soccer server for the RoboCup Soccer Simulation 2D. It is a program that simulates a soccer game between two teams of eleven players and one coach each. The server provides a complete simulation of the game, including the physics of the ball, the field, and the players, as well as the dynamics of the game, such as the rules, the referee, and the game clock.
27+
28+
## [RoboCup Soccer Simulator Monitor](https://github.com/rcsoccersim/rcssmonitor)
29+
30+
RoboCup Soccer Simulator Monitor (rcssmonitor) is used to view the simulation as it takes place by connecting to the RoboCup Soccer Simulator Server (rcssserver) or to view the playback of a simulation by loading game log files.
31+
32+
## [Helios Base Code](https://github.com/helios-base/helios-base)
33+
34+
The Helios Base Code is a framework for the RoboCup Soccer Simulation 2D. It is a collection of software components that provide a common infrastructure for developing soccer simulation 2D teams. The base code is designed to be easy to use and extend, and it provides a number of features that make it easier to develop teams.
35+
36+
## [RPC](https://en.wikipedia.org/wiki/Remote_procedure_call)
37+
38+
A remote procedure call (RPC) is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space (commonly on another computer on a shared network) without the programmer explicitly coding the details for this remote interaction.
39+
40+
## [gRPC](https://grpc.io/docs/what-is-grpc/)
41+
42+
gRPC is a high-performance, open-source, general-purpose RPC framework that puts mobile and HTTP/2 first. gRPC is based on the HTTP/2 standard, which is the next generation of HTTP. HTTP/2 is a binary protocol that is more efficient than HTTP/1.1, which is the current version of HTTP. HTTP/2 is also more secure than HTTP/1.1, because it uses TLS encryption by default.
43+
44+
## [Thrift](https://thrift.apache.org/)
45+
46+
Apache Thrift is a software framework for scalable cross-language services development. It combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml, Delphi, and other languages.
47+
48+
## [Soccer Simulation Proxy](https://github.com/Cross-Language-Soccer-Framework/soccer-simulation-proxy)
49+
50+
We have modified the Helios base code to enhance its interaction capabilities with the gRPC server. Specifically, the base code now transmits detailed information about each game cycle to the server, which in response, sends back a series of potential actions. This bidirectional communication enables the PlayMaker Server to effectively process and make strategic decisions based on the incoming data.
51+
52+
To facilitate this enhanced functionality, the client is designed to serialize various data types—such as the WorldModel, FullState WorldModel, Server Parameters, Player Parameters, and Player Types—into gRPC messages during each game cycle. Conversely, it also deserializes incoming gRPC action messages back into Helios base actions.
53+
54+
These improvements ensure that the Helios base maintains its inherent efficiency and performance, while now being able to seamlessly interact with a diverse array of programming languages through gRPC. This modification not only preserves the robustness of the original system but also expands its utility and applicability in multi-language research environments.
55+
56+
## Playmaker Server
57+
58+
The Playmaker Server acts as the decision-making hub within our framework, receiving and processing messages from the Soccer Simulation Proxy. Based on the detailed information conveyed in these messages, it evaluates the current game state and strategically generates corresponding actions to be executed in the simulation.
59+
60+
To demonstrate the versatility and language-agnostic design of our framework, we have developed initial implementations of the Playmaker Server in three different programming languages: C#, Python, and JavaScript. These examples serve to showcase the server’s capability to operate effectively across diverse programming environments. Looking ahead, we aim to extend this functionality by developing additional server implementations in other languages, further broadening the framework's accessibility and appeal to a global research community.
61+
62+
- [Sample Playmaker Server - CSharp - gRPC](https://github.com/CLSFramework/playmaker-server-csharp)
63+
- [Sample Playmaker Server - Python - gRPC](https://github.com/CLSFramework/sample-playmaker-server-python-grpc)
64+
- [Sample Playmaker Server - Python - Thrift](https://github.com/CLSFramework/sample-playmaker-server-python-thrift)
65+
- [Sample Playmaker Server - NodeJs - gRPC](https://github.com/CLSFramework/playmaker-server-nodejs)
66+
67+
![image](https://github.com/Cross-Language-Soccer-Framework/cross-language-soccer-framework/assets/25696836/8ae17787-8bf8-4796-92f2-e20066e3175f)
68+
69+
![image](https://github.com/Cross-Language-Soccer-Framework/cross-language-soccer-framework/assets/25696836/a0bcb859-07d7-4555-93da-86410d53e6a9)
70+

docs/idls/Messages.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# RPC Messages
6+
7+
## Overview

docs/idls/Services.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# RPC Services
6+
7+
## gRPC Services
8+
9+
```proto
10+
service Game {
11+
rpc GetPlayerActions(State) returns (PlayerActions) {}
12+
rpc GetCoachActions(State) returns (CoachActions) {}
13+
rpc GetTrainerActions(State) returns (TrainerActions) {}
14+
rpc SendInitMessage(InitMessage) returns (Empty) {}
15+
rpc SendServerParams(ServerParam) returns (Empty) {}
16+
rpc SendPlayerParams(PlayerParam) returns (Empty) {}
17+
rpc SendPlayerType(PlayerType) returns (Empty) {} //should be PlayerTypes
18+
rpc Register(RegisterRequest) returns (RegisterResponse) {}
19+
rpc SendByeCommand(RegisterResponse) returns (Empty) {}
20+
rpc GetBestPlannerAction(BestPlannerActionRequest) returns (BestPlannerActionResponse) {}
21+
}
22+
```
23+
24+
## Thrift Services
25+
26+
```thrift
27+
service Game {
28+
PlayerActions GetPlayerActions(1: State state),
29+
CoachActions GetCoachActions(1: State state),
30+
TrainerActions GetTrainerActions(1: State state),
31+
Empty SendInitMessage(1: InitMessage init_message),
32+
Empty SendServerParams(1: ServerParam server_param),
33+
Empty SendPlayerParams(1: PlayerParam player_param),
34+
Empty SendPlayerType(1: PlayerType player_type),
35+
RegisterResponse Register(1: RegisterRequest request),
36+
Empty SendByeCommand(1: RegisterResponse register_response),
37+
BestPlannerActionResponse GetBestPlannerAction(1: BestPlannerActionRequest best_planner_action_request)
38+
}
39+
```
40+
41+
## Description

docs/idls/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
sidebar_position: 3
3+
---
4+
5+
# RPC Services and Messages
6+
7+
### TODO

docs/intro.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ This framework is designed to allow the development of RoboCup Soccer Simulation
99
The Soccer Simulation Proxy is an extended version of the Helios base that can send decision-making information to a PlayMaker Server. It can receive high-level/low-level actions from the PlayMaker Server and send them to the RoboCup Soccer Simulation Server and/or SoccerWindow2.
1010
On the other hand, the PlayMaker Server receives information from the client(Modified version of Helios base/Soccer Simulation Proxy) and selects the appropriate actions to be sent back to the client. We have implemented some sample servers in C\#, Python, and JavaScript, but it can also be implemented in other languages to make use of their features.
1111

12-
To learn more about the framework, how to build, and how to run it please check the [wiki pages](https://github.com/CLSFramework/cross-language-soccer-framework/wiki).
13-
14-
Also, you can check the following repositories to find sample playmaker servers in many programming languages:
12+
Yyou can check the following repositories to find sample playmaker servers in many programming languages:
1513
- [Soccer Simulation Proxy](https://github.com/CLSFramework/soccer-simulation-proxy)
1614
- [PlaymakerServer-CSharp](https://github.com/CLSFramework/playmaker-server-csharp)
1715
- [PlaymakerServer-Python](https://github.com/CLSFramework/playmaker-server-python)
@@ -20,7 +18,6 @@ Also, you can check the following repositories to find sample playmaker servers
2018
- - [Starter-PlaymakerServer-Python-THRIFT](https://github.com/CLSFramework/starter-playmaker-server-python-thrift)
2119
- [PlaymakerServer-NodeJs](https://github.com/CLSFramework/playmaker-server-nodejs)
2220

23-
2421
![image](https://github.com/user-attachments/assets/0c22d0e5-a1ad-4a43-8cba-a9fc70c6ed5b)
2522

2623
![image](https://github.com/Cross-Language-Soccer-Framework/cross-language-soccer-framework/assets/25696836/7b0b1d49-7001-479c-889f-46a96a8802c4)
@@ -29,9 +26,14 @@ Also, you can check the following repositories to find sample playmaker servers
2926

3027
![image](https://github.com/user-attachments/assets/bc1b9c86-f772-4df8-a420-438e363c59b5)
3128

32-
33-
# How To Use The Framework?
29+
## How To Use The Framework?
3430

3531
To run a normal soccer simulation 2D game without using the proxy, you need to run the Soccer Simulation Server (RCSSServer) and the Soccer Simulator Monitor (RCSSMonitor). The Soccer Simulation Server will host the game, and the Soccer Simulator Monitor will display the game. Also, you need to run two teams to play the game. Each team should have a coach and eleven players (and trainer for training proposes and controlling the server). All of the clients connect to the RCSSServer by using UDP to send action and receive information.
3632

37-
To run a game by using the framework, you need to run the Soccer Simulation Server to host a game, the Soccer Simulator Monitor, Soccer Simulation Proxy, and a Playmaker Server. We provide some different solution to build, install, and run these components on Linux(Ubuntu) [Build From Source, AppImage, Docker] and Windows[WSL, Docker]. Also, there are some solutions that you can run some of the components together.
33+
To run a game by using the framework, you need to run the Soccer Simulation Server to host a game, the Soccer Simulator Monitor, Soccer Simulation Proxy, and a Playmaker Server. We provide some different solution to build, install, and run these components on Linux(Ubuntu) [Build From Source, AppImage, Docker] and Windows[WSL, Docker]. Also, there are some solutions that you can run some of the components together.
34+
35+
## Why not develop a base code for each language?
36+
37+
Developing a base code for each language is a time-consuming task that requires a lot of effort. The RCSSServer sends noisy observations to players and receives low-level actions such as Dash, Turn, and Kick. Therefore, a sample base code should process the received information, denoise it, create a model, make a decision, convert high-level decisions like BodySmartKick and BodyGoToPoint to low-level actions, and send them to the RCSSServer. However, developing a base code for each language is a time-consuming task, and some languages may not have the high-performance capabilities of C++, which can perform all tasks within a cycle of 0.1 seconds.
38+
39+
To overcome these challenges, the CLSFramework can denoise information, create models, and send them to the PlayMaker-Server. The PlayMaker-Server can be developed in any language supported by gRPC and is responsible for making decisions and sending actions to the SoccerSimulationProxy, which then sends the actions to the RCSSServer. This approach simplifies the development process and allows for more efficient implementation of the required functionalities.

0 commit comments

Comments
 (0)