CARLA 0.9.5 release

New WaypointAPI, the first rural town, new open source assets and more!

Posted by @wattsavolt, @germanros on April 03, 2019

We are proud to announce the new features included in CARLA 0.9.5!

Get CARLA 0.9.5

This release adds many important features and improvements to CARLA. Let’s take a detailed look at what’s new!

Overhauled Waypoints API

Description

Since we had a limited ASAN OpenDRIVE parser, there was a need to expand it.

  • Now the whole OpenDRIVE file is parsed and we extract and store all the data.
  • Our new data structures are now similar to OpenDRIVE, so the parser is more expandable and queries are easy.

Python API Changes

We always try to avoid changing the Python API where possible but in this case, it was necessary.

Additions:
  • carla.Waypoint.id: Unique identifier for a Waypoint based on the hash of it’s road_id, section_id, lane_id, and s.
  • carla.Waypoint.section_id: Refers to OpenDRIVE’s laneSection number used as an id.
  • carla.Waypoint.s: The s parameter of OpenDRIVE, it defines the position along the reference line, measured in meters from the beginning of the track, calculated in the XY-plane.~~ (already in master)
  • carla.LaneType: Define the type of lane. The most common are, NONE, Driving, Shoulder, Sidewalk, Bidirectional, and Parking although OpenDRIVE use more of them. These enums can be used as flags for queries.
  • Extended carla.LaneMarking:
    • type Defines the types.
    • color: Defines the color.
    • lane_change contains the lane change information of a single road mark, indicating from which side of it you are allowed to cross.
    • width: Width of the road mark.
  • carla.Waypoint.right_lane_marking / carla.Waypoint.left_lane_marking: Returns a carla.LaneMarking for the right or left Waypoint’s lane marking.
Changes:
  • carla.LaneMarking is not an enum anymore, but an object. The enum is now carla.LaneMarking.type.
  • carla.Waypoint.lane_type doesn’t work with strings anymore, now uses an enum carla.LaneType.
  • carla.Map.get_waypoint(location, project_to_road=True, lane_type=carla.LaneType.Driving): you can use it like before and will work as expected, but now accepts a carla.LaneType that can be used as a flag to filter lane types, for instance: carla.Map.get_waypoint(location, project_to_road=True, lane_type=(carla.LaneType.Driving | carla.LaneType.Sidewalk) will search for the nearest waypoint on the center of a Driving or Sidewalk lane.

Enhanced Global Route Planner

The GlobalRoutePlanner class can be used to dynamically compute trajectories from an origin to target waypoints, as shown below:

map = world.get_map()

hop_resolution = 2 #meters

dao = GlobalRoutePlannerDAO(map, hop_resolution)

grp = GlobalRoutePlanner(dao)

grp.setup()

route = grp.trace_route(start, end)

Where route would be a list of tuples, containing waypoints and topological commands. These topological commands serve to indicate the high-level actions that an actor should take in order to get to the next location, such as TURN_LEFT or TURN_RIGHT.

In this release, the global route planner has received the following updates:

  • Lane change connections for routing with lane changes
  • Basic agents can now perform lane changes in accordance with the planned route
  • Fully revamped to work with the updated Waypoint API

A Rural Town: Town07

It’s time to take a bucholic trip to the countryside! We have listened carefully to our users and we are proud to unveil Town07, the first rural setting for CARLA! This town brings new challenges to test your negotiation skills such as narrow roads, fewer traffic lights and lots of non-signalized crossings.

town07_a

town07_b

Open Source Assets

We all love assets, especially when they are FREE!! This is why we want to emphasize that all our assets are open source and freely available (under Creative Commons Atribution 4.0 International license). This empowers our users, enabling them to create their own environments and situations. And yes we want everyone to be aware of this so please spread the word! In this release we have added many new high-quality assets to our large growing library. We always continue to add new ones while polishing old ones.

Below are some of the new assets we’ve added in this release:

bus_stop

Figure 1. Bus Stop

ny_block_lods

Figure 2. New York Block LODs

hay_bale

Figure 3. Hay Bale

Content Migration to AWS

Our content has a new home! All our assets have been moved from Google Drive to AWS and our build scripts have been updated to address this change. Our assets are now a lot more accessible. Instead of depending on the scripts to download the assets programmatically, they can now be accessed manually with the AWS link. The link to the assets for each release can be found in the ContentVersions.txt file in the carla/Util folder.

No-rendering Mode Improvements

We have made a few significant additions to the no-rendering mode feature. Maps will now more accurately reflect the data from OpenDRIVE and there is now more information available to the user for debugging.

Here are the main updates:

  • Improved lane markings ( double Solids lane markings, solid and broken lane markings, etc.)
  • The map can now be changed using the option (–map map_name)
  • View the trigger boxes of traffic signs by using the flag (–show-triggers)
  • Shoulders, yield signs and parking lanes are now visible

nrm_hero_town07

Figure 1. No-rendering Mode Town07 (Hero mode on)

nrm_town07

Figure 2. No-rendering Mode Town07 (Hero mode off)

Carla Map Editor

In the previous release, we introduced a new GUI application for updating OpenDRIVE files with traffic sign information. This tool serves an important role in our process for creating a map outside of the Unreal Editor. Once the user has exported the FBX and XODR files from RoadRunner, they can load the map into this application, place the traffic signs and export the changes to the XODR file. They can then run our Python script to produce an Unreal Engine umap asset from the FBX and updated XODR (See here). This map is then ready for use with CARLA. We have plans to update this application in the future to do a lot more!

carla_map_editor

CARLA Map Editor

Download

Github

Full list of changes

  • New Town07, rural environment with narrow roads
  • Reworked OpenDRIVE parser and waypoints API
    • Fixed several situations in which the XODR was incorrectly parsed
    • Exposed more information: lane marking, lane type, lane section id, s
    • API change: waypoint’s lane_type is now an enum, carla.LaneType
    • API change: carla.LaneMarking is not an enum anymore, extended with color, type, lane change, and width
    • API extension: map.get_waypoint accepts an extra optional flag argument lane_type for filtering lane types
    • API extension: carla.Map can be constructed off-line out of XODR files, carla.Map(town_name, xodr_content)
    • API extension: id property to waypoints, uniquely identifying waypoints up to half centimetre precision
  • API change: Renamed “lane_invasion” to “lane_detector”, added too its server-side sensor to be visible to other clients
  • API extension: new carla.command.SpawnActor to spawn actors in batch
  • API extension: map.transform_to_geolocation to transform Location to GNSS GeoLocation
  • API extension: added timestamp (elapsed simulation seconds) to SensorData
  • API extension: method client.apply_batch_sync that sends commands in batch and waits for server response
  • API extension: optional argument “actor_ids” to world.get_actors to request only the actors with the ids provided
  • Migrated Content to AWS
  • Updated spawn_npc.py to spawn vehicles in batch
  • Added –rolename to “manual_control.py”
  • Added options to “no_rendering_mode.py” to draw extra road information
  • Added “scene_layout.py” to retrieve the whole information in the scene as Python dict
  • Basic agent integrated with global router
  • Allow usage of hostname for carla::Client and resolve them to IP addresses
  • Added new pack of assets
    • Windmill, different farm houses, silo
    • Plants corn, dandelion, poppy, and grass
    • Yield traffic sign
  • Added modular buildings New York style
  • Added marking lanes in Town03
  • Added command-line arguments to simulator to disable rendering and set the server timeout
  • Improved performance in Town01 and Town02
  • Changed yellow marking lane from Town01 and Town02 to dashed yellow marking lane
  • Improved lane cross detection to use the new Waypoint API
  • Enhanced stop triggers options
  • Fixed semantic segmentation tags in Town04, Town05, Town06
  • Fixed tree collision in Town01
  • Fixed VehicleSpawnPoint out of the road in Town01
  • Fixed geo-reference of Town01 and Town07
  • Fixed floating pillars in Town04
  • Fixed floating building in Town03
  • Fixed vehicles missing the route if autopilot enabled too late
  • Fixed division by zero in is_within_distance_ahead()
  • Fixed local planner to avoid premature route pruning at path overlaps
  • Fixed global router behavior to be consistent with new Waypoint API
  • Fixed clean up of local_planner when used by other modules
  • Fixed python client DLL error on Windows
  • Fixed wrong type returned by ActorList.Filter(…)
  • Fixed wheel’s tire friction affecting all vehicles from physics control parameters
  • Fixed obstacle detector not working
  • Fixed small float bug in misc.py
  • Made improvements to the CARLA Map Editor
    • Added scripts to automatically download assets and compile the editor
    • Added outlining to selected items using a post-processing material