Sensor attachment type

Based on documentation of Sensor Settings, there appear to be two attributes for sensors - attachment_to and attachment_type. However, these are not documented in the Sensor Reference page. Also, the example shown in the settings page refers to attach_to attribute (see below). Is this a typo?

transform = carla.Transform(carla.Location(x=0.8, z=1.7))
sensor = world.spawn_actor(blueprint, transform, attach_to=my_vehicle)

I am primarily interested in physical / ground-truth sensors (rgb/depth, radar, lidar, gnss) - do these attributes apply to all these sensor types? Also, is the location specified in the example relative the vehicle origin - as the sensor is mounted on the vehicle?

Yes, it looks as if the documentation has a typo right there. The attributes name is attach_to NOT attachment_to.

For the documentation of the attachment type see the following two links:

Also, since I had troubles with the springArm connection, please take note of the warning in the documentation about the “weird behaviors when an actor is spawned with a relative translation in the Z-axis”.

Thanks Stephan. For now, all my connections are rigid.