bradyz / 2020_CARLA_challenge

"Learning by Cheating" (CoRL 2019) submission for the 2020 CARLA Challenge
181 stars 49 forks source link

Agent only moves if there are other vehicles around #16

Closed cfcv closed 4 years ago

cfcv commented 4 years ago

Hi, I noticed that, at the beginning of the episode, if there is no vehicle passing close to the agent, the first two points of LBC output are always together. As the first two points are used to calculate the desired velocity for the PID controller, the vehicle keeps standing still until another vehicle passes close to it, if there is no other vehicle, the agent does not move at all.

This behavior can be observed by modifying the function _build_background_scenario of the class RouteScenario(route_scenario.py), assigning a small value to the "amount" variable in line 437(say amount=0 or amount=3). I observed this while using the first route of routes_devtest.xml or routes_training.xml and the epoch=24.ckpt as the model checkpoint.

Is there a reason for the occurrence of this behavior i.e. at the beginning, only moves if there is another vehicle around?

bradyz commented 4 years ago

i've noticed this as well -

I believe that the network has some issues with starting/stopping (see https://arxiv.org/abs/1904.08980)

and the network can infer the speed simply based off of the hood of the vehicle / motion in the current frame

one thing I was planning on trying was sampling based off of speed, which shows to be useful in https://wayve.ai/blog/learned-urban-driving

cfcv commented 4 years ago

Maybe you could try to use all the four points outputted by LBC instead of only using the first two as a temporary fix.

Thank you for the answer! I will read the references mentioned for better understanding.