Skip to content

Preparing the connection between AWSIM and scenario_simulator_v2

This tutorial describes: - how to modify scenario to work with AWSIM - how to prepare the AWSIM scene to work with scenario_simulator_v2

Scenario preparation to work with AWSIM

To prepare the scenario to work with AWSIM add model3d field to entity specification

It is utilized as an asset key to identify the proper prefab.

model_3d_added.png

Match the parameters of the configured vehicle to match the entities parameters in AWSIM as close as it is required. Especially the bounding box is crucial to validate the collisions correctly.

Default AWSIM asset catalog

AWSIM currently supports the following asset key values.

The list can be extended if required. Appropriate values should be added to asst key list in the ScenarioSimulatorConnector component and the vehicle parameters in scenario simulator should match them.

Ego Vehicle Entity (with sensor)

model3d boundingbox size (m) wheel base(m) front tread(m) rear tread(m) tier diameter(m) max steer(deg)
lexus_rx450h width : 1.920
height : 1.700
length : 4.890
2.105 1.640 1.630 0.766 35

NPC Vehicle Entity

model3d boundingbox size (m) wheel base(m) front tread(m) rear tread(m) tier diameter(m) max steer(deg)
taxi width : 1.695
height : 1.515
length : 4.590
2.680 1.460 1.400 0.635 35
truck_2t width : 1.695
height : 1.960
length : 4.685
2.490 1.395 1.240 0.673 40
hatchback width : 1.695
height 1.515
length : 3.940
2.550 1.480 1.475 0.600 35
van width : 1.880
height : 2.285
length : 4.695
2.570 1.655 1.650 0.600 35
small_car width : 1.475
height 1.800
length : 3.395
2.520 1.305 1.305 0.557 35

NPC Pedestrian Entity

model3d boundingbox size (m)
human width : 0.400
height : 1.800
length : 0.300

Misc Object Entity

model3d boundingbox size (m)
sign_board width : 0.31
height : 0.58
length : 0.21

Scenarios limitations

Vast majority of features supported by scenario_simulator_v2 are supported with AWSIM as well. Currently supported features are described in the scenario_simulator_v2's documentation.

Features which are not supported when connected with AWSIM are listed below.

  1. Controller properties used by attach_*_sensor
    • pointcloudPublishingDelay
    • isClairvoyant
    • detectedObjectPublishingDelay
    • detectedObjectPositionStandardDeviation
    • detectedObjectMissingProbability
    • randomSeed

If those features are curcial for the scenario's execution, the scenario might not work properly.

AWSIM scene preparation to work with scenario_simulator_v2

  1. Disable random traffic and any pre-spawned NPCs
  2. Disable V2I traffic lights publishing
  3. Remove EgoVehicle object in the scene
  4. Remove TimeScaleSettingsUI, VehicleSettingsUI and TrafficSettingsUI from Canvas -> RightScrollView -> Viewport -> Content

removed_objects.png

  1. Disable the Clock Publisher script component in the ClockPublisher object

clock_publisher_disable.png

  1. Add ScenarioSimulatorConnector prefab to the scene - located in Assets/ScenarioSimulatorConnector

scene_tree.png

  1. Configure Ego Follow Camera field in ScenarioSimulatorConnector - most likely Main Camera object from the scene

follow_camera.png

  1. Configure Vehicle Information UI field in ScenarioSimulatorConnector - most likely VehicleInformationUI object from the scene

vehicle_information_ui.png

  1. If necessary update the asset_id to prefab mapping - key in the map can be used in the scenario

entities.png

  1. Configure Type in the TimeSourceSelector component to SS2

time_selector_ss2.png