JdeRobot / BehaviorMetrics

Autonomous driving neural network comparison tool
https://jderobot.github.io/BehaviorMetrics/
GNU General Public License v3.0
56 stars 49 forks source link

Generate traffic using CARLA Python API #625

Closed Qi-Zha0 closed 1 year ago

Qi-Zha0 commented 1 year ago

Issue Currently the obstacles, i.e. vehicles and pedestrians, are spawned using the ROS Bridge carla_spawn_objects package in the launch file, each obstacle configured individually with a hard-coded spawn point. This method can be cumbersome when trying to populate the town with a large number of obstacles. Instead, we can use CARLA traffic manager to spawn and manage the traffic.

Desired outcome

Update: Spawning pedestrians will cause carla-birdeye-view to crash. I have reported the bug at carla-birdeye-view's Github issue page.

Update: Opened pull request #626 @sergiopaniego Can you take a look at it? How to run:

  1. Use a modified version of carla-birdeye-view from https://github.com/Qi-Zha0/carla-birdeye-view, copy the carla_birdeye_view folder into BehaviorMetrics. You probably also need to change behavior_metrics/birdview_v2_cache to birdview_v3_cache
  2. Run python3 driver_carla.py -c configs/default_carla_traffic.yml -g
Qi-Zha0 commented 1 year ago

PR #626 merged