11 lines
513 B
Python
Executable File
11 lines
513 B
Python
Executable File
|
|
# This recipe attaches different camera / sensors to a vehicle with different attachments.
|
|
|
|
# ...
|
|
camera = world.spawn_actor(rgb_camera_bp, transform, attach_to=vehicle, attachment_type=Attachment.Rigid)
|
|
# Default attachment: Attachment.Rigid
|
|
gnss_sensor = world.spawn_actor(sensor_gnss_bp, transform, attach_to=vehicle)
|
|
collision_sensor = world.spawn_actor(sensor_collision_bp, transform, attach_to=vehicle)
|
|
lane_invasion_sensor = world.spawn_actor(sensor_lane_invasion_bp, transform, attach_to=vehicle)
|
|
# ...
|