-
Notifications
You must be signed in to change notification settings - Fork 20
Steps to get the simulator up and running
Sohan Rudra edited this page Dec 12, 2018
·
2 revisions
The following steps assume that the simulator has been installed by following the installation steps.
- Open a new terminal window and run
torcs
. - Select
Race
->Quick Race
->Configure Race
.
This opens the torcs quick race config window.
NOTE:(After each tab press accept
to save the settings)
- Select the desired track
- Select Driver (NOTE: Any number of drivers can be selected but you must select
scr-server1
as it is where the agent will connect to the simulator. The final selected roster will be shown in the selected table) - Finally select the number of laps.
When you are satisfied with the final selection close torcs
.
This part can be completely skipped if you are satisfied with the default config.
- The file init.py contains
max_episode_steps
which can be changed if required. - The reward structure is present in the file gym_torcs.py
- During running in headless mode i.e. without visualization, in order to maximize the simulators performance make sure to play with the
timeout_value
declared inside these files gym_madras.py, gym_torcs.py & snakeoil3_gym.py. Thetimeout_value
specifies the speed of the simulator. The value is given in nanoseconds. (NOTE: the default value invisual
mode the value is 10 millisecond.)
The Env
has two options for changing the running modes.
- Toggle the variable
visualise
in gym_madras.py to switch visual modes.
- Toggle the variable
pid_assist
in gym_madras.py to switch between the two action spaces. (False
:[acceleration,steer,brake]
,True
:[velocity,lane_pose]
)
Now the simulator is ready to run experiments 👍.