rizavelioglu / challenge-aido_RL-IL

Reinforcement Learning + Imitation Learning based approach to AI Driving Olympics
https://driving-olympics.ai/
MIT License
23 stars 1 forks source link

Confusion about the simulation environment #8

Open SHITIANYU-hue opened 3 years ago

SHITIANYU-hue commented 3 years ago

Hello,

I have a little confusion about the gym-duckietown simulator. My confusion is how does the robot moves forward and avoids obstacles?

For example, in the PID controller script, I didn't see the implementation of controlling the robot to move forward and avoid obstacles. But it can do this in the simulation after I run this script. According to my understanding, it is mainly for path tracking. Does the simulator has already provided the motion planning part?

rizavelioglu commented 3 years ago

Hi SHITIANYU,

The agent in PID controller script does not avoid obstacles, actually. It just tries to follow the lane (a.k.a. Lane Following).

All in all, the script is just trying to stay in the lane and to follow it, without avoiding obstacles.

SHITIANYU-hue commented 3 years ago

Thanks for your reply! Yes, this is as same as my understanding, is it in the simulator, they implement the obstacle avoidance function? (I saw in the simulation it could avoid static obstacles) And the above script is trying to stay in the lane and to follow it, why the robot can move forward rather than just stand still in the middle of the lane?

rizavelioglu commented 3 years ago

I guess they don't do obstacle avoidance, they just check if the agent collided with an object or not (see the function proximity penalty at Line#1206). In case the agent collides with an object they apply a penalty to the reward, see function compute_reward at Line#1419

Maybe they have another script for doing obstacle avoidance, not that I know of. In that regard, you can contact the creators of the simulator on their Slack channel or by their GitHub repo