Monitor communication v3/v4 documentation

Hi everybody. I’m trying to get started in 2D simulation. I want to build some cool stuff in Go on my M1 mac. Sadly I fail to get the monitor started (seems to be related to some incompatibility with the ARM processor), so I thought I start by writing my own web based monitor (which would then also be able to run in a docker container).

I manage to get connection to rcssserver (v16) via UDP and get a lot of data. Sadly, I cannot find any documentation on what the communication contains. If I connect using (dispinit version 2) (or even 1) I don’t get any data at all. With version 3 and 4, my UDP is flooded with stuff. First I get server params, then player params and then player types. Thats fine, I can work with that. But then I just get a lot of messages looking like this:

(show 6000 (pm 2) (tm Player null 0 0) ((b) 0 0 0 0) ((l 1) 0 0 -3 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((l 2) 0 0 -6 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((l 3) 0 0x1 -9 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((l 4) 0 0 -12 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((l 5) 0 0 -15 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((l 6) 0 0 -18 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((l 7) 0 0 -21 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((l 8) 0 0 -24 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((l 9) 0 0 -27 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((l 10) 0 0 -30 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((l 11) 0 0 -33 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((r 1) 0 0 3 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((r 2) 0 0 6 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((r 3) 0 0 9 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((r 4) 0 0 12 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((r 5) 0 0 15 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((r 6) 0 0 18 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((r 7) 0 0 21 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((r 8) 0 0 24 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((r 9) 0 0 27 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((r 10) 0 0 30 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)) ((r 11) 0 0 33 -37 0 0 0 0 (v h 90) (s 8000 1 1 130600) (c 0 0 0 0 0 0 0 0 0 0 0)))

I assume this is the current positions of the players with directions, velocities, and so on.

Is there any kind of documentation on what to expect here and what other things will be sent?

Thanks in advance!

Addition: I already found some documentation, sadly it’s not very helpful. Things seem to have changed a bit. :slight_smile:

I found:

Based on the type definitions I can assume most of the contained parameters/values. Still, some up to date documentation would be helpful.

Unfortunately, no up-to-date documentation about the monitor. Below is a quick reference of the show protocol. You can find an example implementation of the monitor parser in rcssmonitor/src/rcsslogplayer/parser.cpp. Parser::parseShowLine() is a parser for show message.

(show TIME PLAYMODE TEAM_INFO BALL PLAYERS)

PLAYMODE := (pm PLAYMODE_ID)

TEAM_INFO := (tm LEFT_TEAMNAME RIGHT_TEAMNAME LEFT_SCORE RIGHT_SCORE[ LEFT_PENALTY_SCORE LEFT_PENALTY_MISS RIGHT_PENALTY_SCORE RIGHT_PENALTY_MISS])

BALL := ((b) X Y VEL_X VEL_Y)

PLAYERS := PLAYER PLAYERS | PLAYER
PLAYER := ((SIDE UNUM) TYPE STATE X Y VEL_X VEL_Y BODY_DIR NECK_DIR [POINT_X POINT_Y] (v VIEW_QUALITY VIEW_WIDTH) (s STAMINA EFFORT RECOVERY[ STAMINA_CAPACITY][ (f FOCUS_SIDE FOCUS_UNUM)] (c KICK DASH TURN CATCH MOVE TURN_NECK CHANGE_VIEW SAY TACKLE POINTTO ATTENTIONTO))

1 Like

Great, thanks you very much. Your help is very much appreciated.

Do the other commands still exist? There seems to still be this dedicated socket for the commands and at least (dispstart) seems to still work. Are there any other things I need to keep in mind? How much can I rely on the documentation for the monitor?

You can use all commands described in the documentation. No major change on the communication from monitor to server.

Great, thanks. I’ll get back with questions if I encounter any… :wink:

现在进展怎么样了,我的是m1 芯片的,也没法安装显示器