Trying to implement (at least 10% hopefully, I just want the car to drive like 10 meters without crashing 😟 ) ChauffeurNet : Learning to Drive by Imitating the Best and Synthesizing the Worst.
Development will be divided in the following steps:
- Provide data generation tools:
-
Add Carla as depenency. This will provide accurate rendered data.
- Created my own simulator as I found carla to be too hard to use. This way I think I am more flexible as redering is done at train time based on recorded driving session.
- Provide preprocessing scripts for data and transform them into the required format for the network.
- Implement some parts of the neural network:
- Implement steering in order to keep the center of the lane (Given predicted waypoints, compute the required turn angle to reach the waypoint, next is to compute the required speed)
- Implement path following
- Implement speed control
- Implement road mask layer
- Implement agent box output layer
- Implement waypoint layer
- Implement waypoint offset regression layer
- Add other agents to input
- Implement perception box output
- Iterate from step 1 while adding more complexity
v 0.1 demo:
Basically, it is USELESS because the network only learned to predict waypoints along the desired path. Given a waypoint the car computes the desired angle to reach that waypoint. No speed control is involved. Thus, I could just give to the car a point from the desired path.
The utility of predicted waypoints (of a complete implementation of ChauffeurNet) is that it takes into account other agents actions and driving rules, where hand crafted driving models would become too complex.
v 0.1.1
The net was trained to stop at every intersection. Thus, I added the speed control based on distance from car to waypoint.
v 0.2
Added traffic-lights to environment. Still need to update rendering properly of the traffic lights. Also, a traffic light is active (coloured, not black) when the car is near the traffic light. Modified the speed control. Added offset regression for fine-grained prediction of waypoints.
How to run with pretrained model (will automatically download model from drive):
#For linux: sudo apt-get install python3-tk
pip3 install <torch config ex: https://download.pytorch.org/whl/cpu/torch-1.0.0-cp36-cp36m-linux_x86_64.whl>
pip3 install -r requirements.txt
python3 main.py