Skip to content

Commit 519da99

Browse files
authored
Merge pull request #28 from SoroushMazloum/develop_issues
self.effort and wm.see_time
2 parents f03bb4c + 80e7a14 commit 519da99

File tree

5 files changed

+30
-6
lines changed

5 files changed

+30
-6
lines changed

ChangeLog.md

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

3+
## [1.0.4] - 2024-10-8
4+
5+
### Added
6+
- self.effort and wm.see_time are added
7+
8+
### Fixed
9+
-
10+
11+
### Changed
12+
-
13+
14+
### Engineers
15+
- [NaderZare](https://github.com/naderzare)
16+
- [SadraKhanjari](https://github.com/SK2iP)
17+
- [SoroushMazloum](https://github.com/SoroushMazloum)
18+
19+
=======
20+
321
## [1.0.3] - 2024-10-7
422

523
### Added

idl/grpc/service.proto

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

33
syntax = "proto3";
44

@@ -186,6 +186,7 @@ message Self {
186186
float stamina_capacity = 38;
187187
CardType card = 39;
188188
int32 catch_time = 40;
189+
float effort = 41;
189190
}
190191

191192
enum InterceptActionType {
@@ -296,6 +297,7 @@ message WorldModel {
296297
bool kickable_teammate_existance = 36;
297298
bool kickable_opponent_existance = 37;
298299
PenaltyKickState penalty_kick_state = 38;
300+
int32 see_time = 39;
299301
}
300302

301303
message State {

idl/thrift/soccer_service.thrift

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

33
namespace cpp soccer
44
namespace py soccer
@@ -188,7 +188,8 @@ struct Self {
188188
37: double recovery,
189189
38: double stamina_capacity,
190190
39: CardType card,
191-
40: i32 catch_time
191+
40: i32 catch_time,
192+
41: double effort
192193
}
193194

194195
enum InterceptActionType {
@@ -298,7 +299,8 @@ struct WorldModel {
298299
35: double their_defense_player_line_x,
299300
36: bool kickable_teammate_existance,
300301
37: bool kickable_opponent_existance,
301-
38: PenaltyKickState penalty_kick_state
302+
38: PenaltyKickState penalty_kick_state,
303+
39: i32 see_time
302304
}
303305

304306
struct State {

src/grpc-client/state_generator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ protos::Self *StateGenerator::convertSelf(const rcsc::SelfObject &self, const rc
173173
res->set_stamina_capacity(static_cast<float>(self.staminaCapacity()));
174174
res->set_card(convertCardType(self.card()));
175175
res->set_catch_time(self.catchTime().cycle());
176-
176+
res->set_effort(static_cast<float>(self.effort()));
177177
return res;
178178
}
179179

@@ -532,6 +532,7 @@ protos::WorldModel *StateGenerator::convertWorldModel(const rcsc::WorldModel &wm
532532
{
533533
res->set_allocated_penalty_kick_state(convertPenaltyKickState(wm, wm.penaltyKickState()));
534534
}
535+
res->set_see_time(wm.seeTime().cycle());
535536
return res;
536537
}
537538

src/thrift-client/thrift_state_generator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ soccer::Self ThriftStateGenerator::convertSelf(const rcsc::SelfObject &self, con
178178
res.stamina_capacity = static_cast<float>(self.staminaCapacity());
179179
res.card = convertCardType(self.card());
180180
res.catch_time = self.catchTime().cycle();
181-
181+
res.effort = static_cast<float>(self.effort());
182182
return res;
183183
}
184184

@@ -560,6 +560,7 @@ soccer::WorldModel ThriftStateGenerator::convertWorldModel(const rcsc::WorldMode
560560
{
561561
res.penalty_kick_state = convertPenaltyKickState(wm, wm.penaltyKickState());
562562
}
563+
res.see_time = wm.seeTime().cycle();
563564
return res;
564565
}
565566

0 commit comments

Comments
 (0)