Closed MehaKaushik closed 6 years ago
The scr_server
communicates with the agent over a UDP channel.1 The function drive()
in torcs-x.x.x/src/drivers/scr_server/scr_server.cpp
receives the action in the form of a string from the agent, which is then parsed into the action action inputs before being applied by the game engine to get the next state.
One way to extract the sensor data would be to get these action inputs via the keyboard, as is done in torcs-x.x.x/src/drivers/human/human.cpp
. You can copy-paste that keyboard/joystick input code in place of the UDP-string-parsing in scr_server.cpp
in order to manually collect data from the simulator.
Hope that answers your question.
1 SCR-manual (Pages 2-3)
Yes it does. Thanks.
Hey,
Is it possible to extract the sensor data(as mentioned here in section SENSOR ) of the inbuilt "player" agent of TORCS.