The RoboCup Soccer Simulator documentation

Soccer Server 足球服务器(上)

导读

在实际运用中建议直接跳至足球服务器(中)开始看,协议用于深挖底层。

Objects 物体

_images/objects.png

物体名称
物体参数

Protocols 协议

球员命令协议

连接

From player to server From server to client
(init TeamName [(version VerNum )] [(goalie)])
TeamName ::= [-_a-zA-Z0-9]+
VerNum ::= the protocol version (e.g. 15)
(init Side Unum PlayMode)
Side ::= l \
r
Unum ::= 1~11
PlayMode ::= one of play modes
(error no_more_team_or_player)
(error reconnect)
(reconnect …)
TeamName :=
(bye)

如果您的客户端使用 >= 7.0 的协议版本成功连接或重新连接,服务器将另外发送以下消息: server_param(包含服务器参数的消息),player_param(包含播放器参数的消息)和 player_type(包含播放器类型的消息)。最后,玩家将收到有关已更改玩家的消息(请参阅 Sec. Heterogeneous Players)。

初始化设置

From player to server From server to player
(compression Level)
Level ::= zlib compression
level [0,9]or negative number
(ok compression Level)
(warning compression_unsupported)
(clang (ver MinVer MaxVer))
MinVer ::= integer
MaxVer ::= integer
(ok clang (ver MinVer MaxVer))
(ear (OnOff [Team] [Type]))
OnOff ::= on \
off
Team ::= our \
opp \ left \ right \ l \ r \ TeamName no response if succeeded
(error no team with name TeamName)
(synch_see) (ok synch_see)

球员控制

From player to server Only once per cycle
(turn Moment)
Moment ::= minmoment ~ maxmoment
degrees
Yes
(dash Power [Direction])
Power ::= min_dash_power ~ max_dash_power
Direction ::= min_dash_angle ~ max_dash_angle degrees
Note: backward dash (negative power) consumes double stamina.
Yes
(kick Power Direction)
Power ::= minpower ~ maxpower
Direction ::= minmoment ~ maxmoment degrees
Yes
(tackle PowerOrAngle [Foul])
PowerOrAngle ::= minmoment ~ maxmoment
degrees : if client version >= 12
PowerOrAngle ::= -max_back_tackle_power ~ max_tackle_power : if client version < 12
Foul ::= true
false on off Yes
(catch Direction)Direction ::= minmoment ~ maxmoment degrees Yes
(move X Y)X ::= real numberY ::= real number Yes
(change_view Width Quality)
Width ::= narrow
normal wide
Quality ::= high
low No
(say “Message”)
Message ::= [-0-9a-zA-Z ().+/?<>_]\
No
(pointto Distance Direction)
(pointto Off)
Distance ::= real number
Direction ::= real number degree
Off ::= false
off No
(attentionto Team Unum)
(attentionto Off)
Team ::= our
opp left right l r TeamName
Unum ::= integerOff ::= false
off No
(done) Yes

Others

From player to server From server to player
(sense_body) sense_body message
(score) (score Time Our Opp)
Time ::= simulation cycle of rcssserver
Our ::= sender’s team score
Opp ::= opponent team score

球员感官协议

From Server to player

(hear Time SenderMessage”) (hear Time OnlineCoach CoachLanguageMessage) Time ::= simulation cycle of rcssserver Sender ::= online_coach_left | online_coach_right | coach | referee | self | Direction Direction ::= -180 ~ 180 degrees Message ::= string OnlineCoach ::= online_coach_left | online_coach_right CoachLanguageMessage ::= see the standard coach language section

(see Time ObjInfo+) Time ::= simulation cycle of rcssserver ObjInfo ::= (ObjName Distance Direction DistChange DirChange BodyFacingDir HeadFacingDir [PointDir] [t] [k]]) | (ObjName Distance Direction DistChange DirChange [PointDir] [{t|k}]) | (ObjName Distance Direction [t] [k]) | (ObjName Diretion) ObjName ::= (p [”TeamName” [UniformNumber [goalie]]]) | (b) | (g {l|r}) | (f c) | (f {l|c|r} {t|b}) | (f p {l|r} {t|c|b}) | (f g {l|r} {t|b}) | (f {l|r|t|b} 0) | (f {t|b} {l|r} {10|20|30|40|50}) | (f {l|r} {t|b} {10|20|30}) | (l {l|r|t|b} 0) | (P)| (B)| (G)| (F) Distance ::= positive real number Direction ::= -180 ~ 180 degrees DistChange ::= real number DirChange ::= real number BodyFacingDir ::= -180 ~ 180 degrees HeadFacingDir ::= -180 ~ 180 degrees PointDir ::= -180 ~ 180 degrees TeamName ::= string UniformNumber ::= 1 ~ 11

(sense_body Time (view_mode {high|low} {narrow|normal|wide}) (stamina Stamina Effort Capacity) (speed AmountOfSpeed DirectionOfSpeed) (head_angle HeadAngle) (kick KickCount) (dash DashCount) (turn TurnCount) (say SayCount) (turn_neck TurnNeckCount) (catch CatchCount) (move MoveCount) (change_view ChangeViewCount) (arm (movable MovableCycles) (expires ExpireCycles) (count PointtoCount)) (focus (target {none|{l|r} Unum}) (count AttentiontoCount)) (tackle (expires ExpireCycles) (count TackleCount)) (collision {none|[(ball)] [(player)] [(post)]}) (foul (charged FoulCycles) (card {red|yellow|none})))

(fullstate Time (pmode {goaliecatch_ball{l|r}|PlayMode}) (vmode {high|low} {narrow|normal|wide}) (count KickCount DashCount TurnCount CatchCount MoveCount TurnNeckCount ChangeViewCount SayCount) (arm (movable MovableCycles) (expires ExpireCycles)) (target Distance Direction) (count PointtoCount) (score Time Our Opp) ((b) X Y VelX VelY) Players+) Players ::= ((p {l|r} UniformNumber [g] PlayerType) X Y VelX VelY BodyDir NeckDir [PointtoDist PointtoDir] (stamina Stamina Effort Recovery Capacity) [k|t|f] [r|y]))

Copyright@Njupt-Apollo-2d-2021 all right reserved,powered by Gitbook该文件最新修订时间: 2022-02-26 09:05:41

results matching ""

    No results matching ""