diff --git a/ChangeLog.md b/ChangeLog.md index 4416994b..33a0e22b 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,39 @@ # ChangeLog +## [1.0.6] - 2024-10-19 + +### Added +- ServerParam.center_circle_r, ServerParam.goal_post_radius, WorldModel.game_mode_side + +### Fixed +- + +### Changed +- + +### Engineers +- [ErfanFathi](https://github.com/ErfanFathii) + +======= + +## [1.0.5] - 2024-10-16 + +### Added +- wm.time_stopped, wm.set_play_count, serverParams.goal_area_width/length + +### Fixed +- + +### Changed +- + +### Engineers +- [NaderZare](https://github.com/naderzare) +- [SadraKhanjari](https://github.com/SK2iP) +- [SoroushMazloum](https://github.com/SoroushMazloum) + +======= + ## [1.0.4] - 2024-10-8 ### Added diff --git a/idl/grpc/service.proto b/idl/grpc/service.proto index 6d836fba..6f9cc5b1 100644 --- a/idl/grpc/service.proto +++ b/idl/grpc/service.proto @@ -1,4 +1,4 @@ -// version 1.4 +// version 1.6 syntax = "proto3"; @@ -313,7 +313,7 @@ message WorldModel { repeated Player unknowns = 10; map our_players_dict = 11; map their_players_dict = 12; - int32 our_goalie_uniform_number = 13; // The uniform number of our goalie. + int32 our_goalie_uniform_number = 13; // The uniform number of our goalie. int32 their_goalie_uniform_number = 14; // The uniform number of their goalie. float offside_line_x = 15; // The x-coordinate of the offside line of opponent team. int32 ofside_line_x_count = 16; // How many cycles ago the agent has seen (calculated) the offside line. @@ -340,6 +340,9 @@ message WorldModel { bool kickable_opponent_existance = 37; // Whether the kickable opponent exists or not. PenaltyKickState penalty_kick_state = 38; // The penalty kick state. int32 see_time = 39; // The time that the agent has seen the world model. + int32 time_stopped = 40; + int32 set_play_count = 41; + Side game_mode_side = 42; } /** @@ -1249,6 +1252,10 @@ message ServerParam { float penalty_area_half_width = 220; float penalty_area_length = 221; float goal_width = 222; + float goal_area_width = 223; + float goal_area_length = 224; + float center_circle_r = 225; + float goal_post_radius = 226; } message PlayerParam { diff --git a/idl/thrift/soccer_service.thrift b/idl/thrift/soccer_service.thrift index 541e92b7..4377a5e0 100644 --- a/idl/thrift/soccer_service.thrift +++ b/idl/thrift/soccer_service.thrift @@ -1,4 +1,4 @@ -// version 1.4 +// version 1.6 namespace cpp soccer namespace py soccer @@ -300,7 +300,10 @@ struct WorldModel { 36: bool kickable_teammate_existance, 37: bool kickable_opponent_existance, 38: PenaltyKickState penalty_kick_state, - 39: i32 see_time + 39: i32 see_time, + 40: i32 time_stopped, + 41: i32 set_play_count, + 42: Side game_mode_side } struct State { @@ -1142,7 +1145,11 @@ struct ServerParam { 219: double their_penalty_area_line_x, 220: double penalty_area_half_width, 221: double penalty_area_length, - 222: double goal_width + 222: double goal_width, + 223: double goal_area_width, + 224: double goal_area_length, + 225: double center_circle_r, + 226: double goal_post_radius } struct PlayerParam { diff --git a/src/grpc-client/grpc_client.cpp b/src/grpc-client/grpc_client.cpp index 9f36ca6f..4cb07185 100644 --- a/src/grpc-client/grpc_client.cpp +++ b/src/grpc-client/grpc_client.cpp @@ -277,7 +277,10 @@ void GrpcClient::sendServerParam() const serverParam.set_their_penalty_area_line_x(SP.theirPenaltyAreaLineX()); serverParam.set_penalty_area_half_width(SP.penaltyAreaHalfWidth()); serverParam.set_penalty_area_length(SP.penaltyAreaLength()); - + serverParam.set_goal_area_width(SP.goalAreaWidth()); + serverParam.set_goal_area_length(SP.goalAreaLength()); + serverParam.set_center_circle_r(SP.centerCircleR()); + serverParam.set_goal_post_radius(SP.goalPostRadius()); ClientContext context; protos::Empty empty; protos::RegisterResponse* response = new protos::RegisterResponse(*M_register_response); diff --git a/src/grpc-client/state_generator.cpp b/src/grpc-client/state_generator.cpp index 61ccb7f5..ea35bf4b 100644 --- a/src/grpc-client/state_generator.cpp +++ b/src/grpc-client/state_generator.cpp @@ -533,6 +533,9 @@ protos::WorldModel *StateGenerator::convertWorldModel(const rcsc::WorldModel &wm res->set_allocated_penalty_kick_state(convertPenaltyKickState(wm, wm.penaltyKickState())); } res->set_see_time(wm.seeTime().cycle()); + res->set_time_stopped(wm.time().stopped()); + res->set_set_play_count(wm.getSetPlayCount()); + res->set_game_mode_side(convertSide(wm.gameMode().side())); return res; } diff --git a/src/thrift-client/thrift_client.cpp b/src/thrift-client/thrift_client.cpp index 495c63ca..f2e7b0a4 100644 --- a/src/thrift-client/thrift_client.cpp +++ b/src/thrift-client/thrift_client.cpp @@ -258,7 +258,10 @@ void ThriftAgent::sendServerParam() const serverParam.their_penalty_area_line_x = SP.theirPenaltyAreaLineX(); serverParam.penalty_area_half_width = SP.penaltyAreaHalfWidth(); serverParam.penalty_area_length = SP.penaltyAreaLength(); - + serverParam.goal_area_width = SP.goalAreaWidth(); + serverParam.goal_area_length = SP.goalAreaLength(); + serverParam.center_circle_r = SP.centerCircleR(); + serverParam.goal_post_radius = SP.goalPostRadius(); try{ soccer::Empty empty; serverParam.register_response = M_register_response; diff --git a/src/thrift-client/thrift_state_generator.cpp b/src/thrift-client/thrift_state_generator.cpp index 08b79214..49e800cd 100644 --- a/src/thrift-client/thrift_state_generator.cpp +++ b/src/thrift-client/thrift_state_generator.cpp @@ -561,6 +561,9 @@ soccer::WorldModel ThriftStateGenerator::convertWorldModel(const rcsc::WorldMode res.penalty_kick_state = convertPenaltyKickState(wm, wm.penaltyKickState()); } res.see_time = wm.seeTime().cycle(); + res.time_stopped = wm.time().stopped(); + res.set_play_count = wm.getSetPlayCount(); + res.game_mode_side = convertSide(wm.gameMode().side()); return res; }