How can I add bicycle assets to RoadRunner and make them work in a Carla simulation?

7 views (last 30 days)
I need to place a bicycle in a RoadRunner scenario and make it work in a Carla simulation, but there are no bicycle assets in the Road Runner Asset Library.
So I imported a 3D model of my own bicycle according to the following site [1], assigned it the carla behavior, and ran the simulation, but the “no actor mapping” warning appeared and the bicycle was displayed as a separate vehicle.
How can I add a bicycle asset?
Or is there a way to make a custom vehicle work in a Carla simulation or to set up actor mapping?
Thank you in advance.

Answers (1)

Abhishek
Abhishek on 4 Sep 2025
Hi @遼,
I understand the issue you are facing with adding Bicycle assets into RoadRunner.
This is a common issue when exporting scenarios with actors that do not have a direct high-fidelity equivalent in the default RoadRunner Asset Library. The "no actor mapping" warning from CARLA is the key indication of this. The problem originates from how the “startRoadRunnerForScenario” function interprets the “ClassID” of the actor.
As per the official documentation found here: https://www.mathworks.com/help/driving/ug/export-driving-scenario-to-roadrunner-scenario-simulation.html#mw_643c3950-9e70-4b0d-8817-9b82c447158c, the exporter is hard-coded to map ClassID=3 to a generic placeholder asset: Assets/Vehicles/Cuboid.rrvehicle.
When RoadRunner co-simulates with CARLA, it tells CARLA to spawn this "cuboid," but CARLA has no corresponding blueprint for such an object, hence leading to the mapping error.
To resolve this issue, you need to do the following:
  • In your MATLAB code, correctly define the bicycle using “ClassID=3”:
bicycle = actor(scenario, ClassID=3, Position=[83.51 30.5 0.01], Name='Bicycle');
  • Create RoadRunner Vehicle Asset: Convert your 3D model into a RoadRunner Vehicle Asset. This file will have a “.rrvehicle” extension. This can be done by importing the 3D model in RoadRunner, right clicking right on the model, and selecting “Create Vehicle from Static Mesh”
  • Configure CARLA Behavior: Select your new “.rrvehicle” asset in the Asset Browser. In the “Attributes Editor panel, find the Actor section. Check the Simulate box. Change the “Behavior” dropdown to CARLA Behavior.
  • Replace the placeholder in the scenario: Open the scenario exported from MATLAB. In the 3D view, click on the cuboid representing the bicycle. In the Attribute Editor, there will be a “Actor” property pointing out to “Cuboid.rrvehicle”. Now, drag the configured “.rrvehicle asset that was created in the last step from the Asset Browser and drop it directly onto that Actor property slot.
When you run the co-simulation now, RoadRunner will instruct CARLA to spawn the correct bicycle blueprint, and the simulation will work as expected.
For further reference, you can refer to the following official MATLAB documentation for more information:
I hope this helps.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!