-
Notifications
You must be signed in to change notification settings - Fork 22
Home
MADRaS is a python project built on top of TORCS and gym_torcs, to provide platform for Reinforcement Learning with TORCS. TORCS is a widely used simulator for autonomous driving research. TORCS consists built-in AI cars and scr_server type cars. The scr_server are server cars which can be controlled by creating a custom client. We use snakeoil client for all our client usages in the codebase, for different purposes, the drive function(function which controls the steer, acceleration and brake values of the client) is only changed. The actions of any snakeoil client are: steer, acceleration, brake and the observations which it receives from the car server are : angle, curLapTime, damage, distFromStart, distRaced, focus, fuel, gear, lastLapTime, opponents, racePos, rpm, speedX, speedY, speedZ, track, trackPos, wheelSpinVel, z.
Details of scr_Server can be found here.
- MADRaS provides two type of controllers for the server cars: Behavior Reflex controller and PID controller.
Behavior Reflex maps the sensor values directly to the actions(steer, acceleration and brake), in an end-to-end fashion.
PID controller on the other hand outputs higher level decision variables : The Lane to stay in and the target velocity of the vehicle.
Examples of usage of the two controllers are in the folder named example_controllers.
- Traffic Simulation: Various agents have been derived from snakeoil’s drive function. (Constant velocity, randomly braking, lane changing). These traffic agents can be used to create dense traffic scenes, an example of the same is illustrated in example_usage.py