We end 2018 realising CARLA 0.9.2! This release brings long-time awaited requests such as a new version of the ROS-bridge and new documentation and tutorials. It also introduces our new Scenario Runner, an engine to execute and evaluate agents in a variety of traffic situations. This is a critical piece in the development of CARLA towards achieving our goal of accelerating progress in Autonomous Driving R&D.
Time to have a look at the highlights of this release!
One of the key aspects of simulation in the field of Autonomous Driving is to explore and reproduce all those traffic situations that occur in real life, with the purpose of learning from them and at the same time to assess how AI algorithms cope with such situations.
Figure 1. Example of traffic scenario: Adversarial vehicle running a stop sign. Emergency brake needed.
Figure 2. Example of traffic scenario: Ego-vehicle losing control due to road bad conditions.
Figure 3. Example of traffic scenario: Adversarial vehicle running a red traffic light. Emergency brake needed.
To this end we have created Scenario_Runner, which serves as our new traffic scenarios engine built on top of the py_trees library. These scenarios are defined following templates in a way that it is possible to reuse general atomic behaviors that emerge in multiple situations. In this release we include some of the basic NHTSA pre-crash traffic scenarios:
Implementing a traffic scenario can be done by following a simple recipe:
timeout = 60 # Timeout of scenario in seconds
# ego vehicle parameters
_ego_vehicle_model = 'vehicle.carlamotors.carlacola'
_ego_vehicle_start = carla.Transform(
def __init__(self, world, debug_mode=False):
Setup all relevant parameters and create scenario
and instantiate scenario manager
A list of all test criteria will be created that is later used
in parallel behavior tree.
criteria = 
collision_criterion = CollisionTest(self.ego_vehicle)
These scenarios have some associated termination criteria that are used to automatic evaluate if the “hero” car performed as expected. Please, check out the examples to know more.
There is no doubt about ROS being the most used system to put together robotics solutions. Hundreds of teams use ROS around the world to create their autonomous agents. For this reason, we took very seriously the task of updating CARLA’s ROS bridge to be fully compatible with the new 0.9.X branch. From 0.9.2 CARLA’s ROS bridge will live in its own repository here.
New classes have been added to cope with vehicle navigation from client side in the form of agents. The first two of these agents are BasicAgent and RoamingAgent. BasicAgent is able to navigate to a point given location coordinates while dealing with other vehicles and traffic lights safely. RoamingAgent drives around making random choices when presented to multiple options.
agent = BasicAgent(world.vehicle)
spawn_point = world.world.get_map().get_spawn_points()
control = agent.run_step()
These agents serve to present the basic ideas on how to implement more complex agents that will come soon. Try these agents out by running:
Town03 has been upgraded to include a setup of traffic lights that is compatible with US standards. For the first time in CARLA we have also included unsignalized intersection, where agents negotiations needs to occur in order to safely cross the intersection.
Tutorials have been extended to cover relevant topics, such as how to use 0.9.X API or how to create new maps based on RoadRunner:
These functionalities will be added very soon. We will keep improving this API in the coming releases. If you find any issues or have suggestions that can be added, please do not hesitate to share it with the community at our GitHub or Discord chat. For the full list of methods available take a look at the Python API Reference.