ucla-mobility / OpenCDA

A generalized framework for prototyping full-stack cooperative driving automation applications under CARLA+SUMO.
Other
1k stars 198 forks source link

Feature/rl framework v2 #158

Closed xuhan417 closed 2 years ago

xuhan417 commented 2 years ago

This is the new version of the RL framework. It uses rl_env(gym.env) as an RL interface. The rl_env uses scenario manager and vehicle manager to manage simulation data.

DerrickXuNu commented 2 years ago

Another important comment: I saw you made a lot of changes to the default behavior agent. Please avoid it. We want to keep default behavior agent as it is. You can create a behavior agent named rl_behavior_agent, and the users can set the flag to use the default behavior agent or the rl_behavior_agent. For example, in the original code, users can give a list named application to the vehicle manager. If platoon is inside the list, the opencda will select PlatoonBehaviorAgent instead of BehaviorAgent. And your rl_manager can be used to collect those states for your RL_Behavior_Agent (actually, you can make rl_manager as a member of RLBehaviorAgent if it is just used for the behavior planning)