Skip to content

Commit dcbd50f

Browse files
authored
Merge pull request #36 from CLSFramework/develop
Develop
2 parents 3903a0a + 7616cd7 commit dcbd50f

File tree

7 files changed

+67
-7
lines changed

7 files changed

+67
-7
lines changed

ChangeLog.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# ChangeLog
22

3+
## [1.0.6] - 2024-10-19
4+
5+
### Added
6+
- ServerParam.center_circle_r, ServerParam.goal_post_radius, WorldModel.game_mode_side
7+
8+
### Fixed
9+
-
10+
11+
### Changed
12+
-
13+
14+
### Engineers
15+
- [ErfanFathi](https://github.com/ErfanFathii)
16+
17+
=======
18+
19+
## [1.0.5] - 2024-10-16
20+
21+
### Added
22+
- wm.time_stopped, wm.set_play_count, serverParams.goal_area_width/length
23+
24+
### Fixed
25+
-
26+
27+
### Changed
28+
-
29+
30+
### Engineers
31+
- [NaderZare](https://github.com/naderzare)
32+
- [SadraKhanjari](https://github.com/SK2iP)
33+
- [SoroushMazloum](https://github.com/SoroushMazloum)
34+
35+
=======
36+
337
## [1.0.4] - 2024-10-8
438

539
### Added

idl/grpc/service.proto

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// version 1.4
1+
// version 1.6
22

33
syntax = "proto3";
44

@@ -313,7 +313,7 @@ message WorldModel {
313313
repeated Player unknowns = 10;
314314
map<int32, Player> our_players_dict = 11;
315315
map<int32, Player> their_players_dict = 12;
316-
int32 our_goalie_uniform_number = 13; // The uniform number of our goalie.
316+
int32 our_goalie_uniform_number = 13; // The uniform number of our goalie.
317317
int32 their_goalie_uniform_number = 14; // The uniform number of their goalie.
318318
float offside_line_x = 15; // The x-coordinate of the offside line of opponent team.
319319
int32 ofside_line_x_count = 16; // How many cycles ago the agent has seen (calculated) the offside line.
@@ -340,6 +340,9 @@ message WorldModel {
340340
bool kickable_opponent_existance = 37; // Whether the kickable opponent exists or not.
341341
PenaltyKickState penalty_kick_state = 38; // The penalty kick state.
342342
int32 see_time = 39; // The time that the agent has seen the world model.
343+
int32 time_stopped = 40;
344+
int32 set_play_count = 41;
345+
Side game_mode_side = 42;
343346
}
344347

345348
/**
@@ -1249,6 +1252,10 @@ message ServerParam {
12491252
float penalty_area_half_width = 220;
12501253
float penalty_area_length = 221;
12511254
float goal_width = 222;
1255+
float goal_area_width = 223;
1256+
float goal_area_length = 224;
1257+
float center_circle_r = 225;
1258+
float goal_post_radius = 226;
12521259
}
12531260

12541261
message PlayerParam {

idl/thrift/soccer_service.thrift

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// version 1.4
1+
// version 1.6
22

33
namespace cpp soccer
44
namespace py soccer
@@ -300,7 +300,10 @@ struct WorldModel {
300300
36: bool kickable_teammate_existance,
301301
37: bool kickable_opponent_existance,
302302
38: PenaltyKickState penalty_kick_state,
303-
39: i32 see_time
303+
39: i32 see_time,
304+
40: i32 time_stopped,
305+
41: i32 set_play_count,
306+
42: Side game_mode_side
304307
}
305308

306309
struct State {
@@ -1142,7 +1145,11 @@ struct ServerParam {
11421145
219: double their_penalty_area_line_x,
11431146
220: double penalty_area_half_width,
11441147
221: double penalty_area_length,
1145-
222: double goal_width
1148+
222: double goal_width,
1149+
223: double goal_area_width,
1150+
224: double goal_area_length,
1151+
225: double center_circle_r,
1152+
226: double goal_post_radius
11461153
}
11471154

11481155
struct PlayerParam {

src/grpc-client/grpc_client.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,10 @@ void GrpcClient::sendServerParam() const
277277
serverParam.set_their_penalty_area_line_x(SP.theirPenaltyAreaLineX());
278278
serverParam.set_penalty_area_half_width(SP.penaltyAreaHalfWidth());
279279
serverParam.set_penalty_area_length(SP.penaltyAreaLength());
280-
280+
serverParam.set_goal_area_width(SP.goalAreaWidth());
281+
serverParam.set_goal_area_length(SP.goalAreaLength());
282+
serverParam.set_center_circle_r(SP.centerCircleR());
283+
serverParam.set_goal_post_radius(SP.goalPostRadius());
281284
ClientContext context;
282285
protos::Empty empty;
283286
protos::RegisterResponse* response = new protos::RegisterResponse(*M_register_response);

src/grpc-client/state_generator.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,9 @@ protos::WorldModel *StateGenerator::convertWorldModel(const rcsc::WorldModel &wm
533533
res->set_allocated_penalty_kick_state(convertPenaltyKickState(wm, wm.penaltyKickState()));
534534
}
535535
res->set_see_time(wm.seeTime().cycle());
536+
res->set_time_stopped(wm.time().stopped());
537+
res->set_set_play_count(wm.getSetPlayCount());
538+
res->set_game_mode_side(convertSide(wm.gameMode().side()));
536539
return res;
537540
}
538541

src/thrift-client/thrift_client.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,10 @@ void ThriftAgent::sendServerParam() const
258258
serverParam.their_penalty_area_line_x = SP.theirPenaltyAreaLineX();
259259
serverParam.penalty_area_half_width = SP.penaltyAreaHalfWidth();
260260
serverParam.penalty_area_length = SP.penaltyAreaLength();
261-
261+
serverParam.goal_area_width = SP.goalAreaWidth();
262+
serverParam.goal_area_length = SP.goalAreaLength();
263+
serverParam.center_circle_r = SP.centerCircleR();
264+
serverParam.goal_post_radius = SP.goalPostRadius();
262265
try{
263266
soccer::Empty empty;
264267
serverParam.register_response = M_register_response;

src/thrift-client/thrift_state_generator.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,9 @@ soccer::WorldModel ThriftStateGenerator::convertWorldModel(const rcsc::WorldMode
561561
res.penalty_kick_state = convertPenaltyKickState(wm, wm.penaltyKickState());
562562
}
563563
res.see_time = wm.seeTime().cycle();
564+
res.time_stopped = wm.time().stopped();
565+
res.set_play_count = wm.getSetPlayCount();
566+
res.game_mode_side = convertSide(wm.gameMode().side());
564567
return res;
565568
}
566569

0 commit comments

Comments
 (0)