-
modify
./torcs-1.3.6/src/libs/raceengineclient/raceengine.cpp: 683
sprintf(filename, "/home/users/TORCS/data/%d.tga", img_num);
by which directory you want to put the images, e.g., if you want to place the images into
/home/name/Desktop/balabala
, you should modify this intosprintf(filename, "/home/name/Desktop/balabala/%d.tga", img_num);
-
modify
./torcs-1.3.6/src/libs/raceengineclient/racestate.cpp: 113
data_out.open("/home/users/TORCS/data/data.txt");
by which directory you want to put the steerangle information, e.g., if you want to place the information into
/home/name/Desktop/balabala
, you should modify this intodata_out.open("/home/name/Desktop/balabala/data.txt");
-
Make sure you uninstall previous installed TORCS and its dependencies by
sudo rm -rf /usr/local/share/games/torcs sudo rm -rf /usr/local/lib/torcs sudo apt-get remove --auto-remove torcs sudo apt-get purge --auto-remove torcs
Just ./install.sh
, it will need you enter password in the middle. Then the torcs will be compiled in the current directory and installed.
- type
torcs
in command line Race
->quickrace
->Configure Race
-> choose a track, click accept -> click thePlayer
in the right column, click(De)Select
, click accept -> click acceptNewrace
and the race will begin, drive the car useup, down, left, right
.- It will automatically begin to collect data. Enter
f2
to switch from different view point. - exit with
esc
- you will find corresponding data in the directory you modified in Before installation section
- images are stored in
.tga
format, and named with a number - steerangles are stored in file
data.txt
, each line is composed ofimageNumber, steerangle
. Steer angle is stored in rad.
-
if you change anything in the source code (
./torcs-1.3.6/
) and want to make this take effect, you need to reinstall torcs. -
In case any stuck happens when you click
Configure Race
while initialization, put the quickrace.xml under TORCS root folder./torcs/config/raceman/