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.
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.