lgsvl / simulator

A ROS/ROS2 Multi-robot Simulator for Autonomous Vehicles
Other
2.29k stars 780 forks source link

Enable traffic in customized map #579

Closed pushkar4501 closed 4 years ago

pushkar4501 commented 4 years ago

Hi, for one of my projects i created customized highway in the Unity and using LGSVL for the simulation and thankfully its working fine. I am wondering how to add traffic in the customized map similar to San Francisco map. Please help me with the possible solution. Thanks

martins-mozeiko commented 4 years ago

To have other vehicles on them map and have them driving around you need to have map annotations. You can do it either manually: https://www.lgsvlsimulator.com/docs/map-annotation/ Or by importing existing hd map from OpenDrive, Lanelet2 or other formats: https://www.lgsvlsimulator.com/docs/map-annotation/#import-map-annotations

Once you have annotations NPC vehicles will be automatically created and will randomly drive around.

Another option is to use PythonAPI to make NPC vehicles follow waypoints. This way there is no need for map annotations.