duckietown / gym-duckietown

Self-driving car simulator for the Duckietown universe
http://duckietown.org
Other
44 stars 16 forks source link

Different Camera viewing position and keyboard control for different objects #174

Open pranoy-k opened 4 years ago

pranoy-k commented 4 years ago

We are planning to use this environment for a very different use case. We wish to control the pedestrian instead of the Car to make them cross the road while the autonomous car roams around. We would need two changes in order for this work-

Can you let us know some inputs for this

bhairavmehta95 commented 4 years ago

Cool. So basically, what you will need / want to do is quite simple.

You need to change the agent to be a pedestrian, rather than a Duckiebot. In actuality, we don't really "render" the agent itself, so all you would have to do is update the step() function (actually, even just the update_physics() call) and write your own pedestrian_agent_update_physics() kind of function.

Then, you can edit the agent placement code, and make sure you add moving Duckiebots in your map to spawn vehicles.