Search code examples
pythonpython-2.7rossimulatorcarla

Creating overtaking (hardcoded) scenario with Carla


I have spawned two cars right behind. When I start the autopilot, the cars drive around, but the car behind does not overtake the car in front. I have already asked for that in the CARLA discord channel, but without answer so far.

I know that the car follows some way-points provided by the map Town01. The scenarios provided from carla itself does not help so far.

Can I hardcode the overtaking, and where the car can drive? I don't searching for the ultimate solution. I am open to any ideas.


Solution

  • Hi have a look at this hardcoded parking solution for carla within ros it might give you some hints on how to over take. https://github.com/vignif/carla_parking I would probably use the PythonAPI of carla in order to seek for the available space on the left line and afterwards control the vehicle in order to overtake. A thumb rule for overtaking can also be with conditions on relative position of the vehicles! Good luck