flow-project / flow

Computational framework for reinforcement learning in traffic control
MIT License
1.07k stars 376 forks source link

Using pedestrians along with vehicles #383

Closed ndeshp2s closed 1 year ago

ndeshp2s commented 5 years ago

Hello,

I have started using SUMO and FLOW for RL. I have a scenario consisting of pedestrians and vehicles. SO I wanted to know if its possible to create a new scenario with pedestrians as well in FLOW.

Thank you.

AboudyKreidieh commented 5 years ago

Hi @ndeshp2s we do not currently have functionality for adding pedestrians, and do not specifically plan on incorporating it some time in the near future. However, if you are interesting in contributing the codebase we would definitely be open to collaborating with you on this! Adding pedestrians will likely be something that needs to be added via the scenario class, similar to inflows and the nodes/edges of the graph. If you are open to looking into this I'd be happy to work through what needs to be done with you.

rohanchandra30 commented 5 years ago

Hi @AboudyKreidieh I have a related question: Suppose we have defined the dynamics for a new agent, say a motorbike, how can we add the visual graphics for its icon in the GUI?

To put it more generally, how can one visually differentiate between vehicles of different dynamics in the GUI?

Would appreciate any help :)

Thanks

AboudyKreidieh commented 5 years ago

hi @rohanchandra30 sumo let's you update the path to the image file used by the vehicles, which is not a feature that we currently support but is an easy addition if you are interested in us adding. As far as something more quick and dirty, you can set the colors of individual vehicles, as we do in many of the environments to distinguish between automated, visible to the agent, and unseen by the agent. You can do this from an environment by using the command self.k.vehicle.set_color (see here for the implementation)

rohanchandra30 commented 5 years ago

Thanks ! quick and dirty works for now ! :D

But I think its a useful addition. Especially since the research field is moving towards heterogeneous traffic involving pedestrians, two-wheelers, and cars.

I am currently working on the dynamics of such heterogeneous agents. These agents of course, do not follow standard car models due to differences in size, shape, speed, and maneuverability. I shall inform you once I have an implementation made and we can discuss ways of integrating it into FLOW !

Cheers and thanks for assistance and good work on the project !