carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.04k stars 3.55k forks source link

Some question about Autopilot control mode #67

Closed syinari0123 closed 6 years ago

syinari0123 commented 6 years ago

Hi, I have a question. I'm measuring the data from driving car under autopilot_control. But I found autopilot_control_car sometimes drive recklessly. Please tell me does this case often happen in your environment, too?

In addition, I want to analyze this bag, so, I also want to know "how autopilot_control decides the way to act." I infer this is the result of reinforcement learning of your paper's experiment, which cause some reckless driving...

[P.S.] I found https://github.com/carla-simulator/carla/issues/36 and this AIpilot system is hard-coded AI inside the game. So this problem may be from Unreal Engine...

nsubiron commented 6 years ago

Hi @syinari0123, Yes, exactly. You can find the autopilot code here. It is the same AI that use all the other non-player vehicles to drive too.

What I'm guessing is happening is that you have the synchronous mode disabled and your client code is slower than the server. If that's the case, the server should be printing "Warning: No control received from the client this frame!". In asynchronous mode, the server won't wait for the control message, so if the client sends the autopilot control back too late, it will be applied to the vehicle some frames later than desired. This can cause the car to brake or steer too late.

syinari0123 commented 6 years ago

Thank you for your prompt response! As your guessing, I found "Warning: No control received from the client this frame!" in server printing. I changed synchronous mode enable, which made my autopilot-control-car drive carefully! :) Thanks!