Attaching Sensors

Positional Sensors:

Positional sensors (Camera, LiDAR, Ultrasonic, RADAR, IMU, and GPS) are attached with the mouse. First, the user should ensure that the selected vehicle is on screen (use the ‘Go To Vehicle’ button, if required). This is because the mouse cursor will only appear for the selected vehicle.

The user can select one of the positional sensors, then hovering the mouse over the vehicle should reveal a coloured sphere. Note that if the user moves the mouse away from the vehicle, this sphere will disappear. The image below shows the sphere when hovering over different parts of a vehicle.

Hovering Over Vehicle Hovering Over Vehicle

Left-clicking the mouse will ‘place’ the sensor at that point on the vehicle. At this point, the sensor should appear on the vehicle as a graphical representation (a camera-like box) along with the three axes of the sensor’s local frame of reference. It should also appear on the Attached Sensors Window list box.

The image below of a placed sensor highlights the sensor box and the three orthonormal axes of its local frame of reference.

Sensor Representation Sensor Representation

To change the sensor position, the world editor gimbals can be used. These are found in the top bar of the World Editor:

Gimbals Gimbals

Position:

The ‘Translate’ gimbal will allow the position to be edited (in world space). The user can hover over an individual axis and translate (move) the sensor along that axis, or a plane can be selected to allow 2D translation. The image below shows the result of a translation along the sensor ‘dir’ axis using the gimbal.

Translate Translate

Rotation:

The ‘Rotate’ gimbal will allow the user to change the sensor direction. This can work either in ‘World Coordinates’ or ‘Local Coordinates’ (changeable from a toggle button which is also in the top bar of the world editor).

In Local Coordinates, after a rotational change, the rotational axes on the gimbal are updated to reflect the change - the axes always remain relative to the reference space of the sensor, ie the ‘dir’ axis will always point in the sensor forward direction, ‘up’ will always point in the sensor upwards direction etc.

Local Frame Rotation Local Frame Rotation

In World Coordinates, the rotational axes on the gimbal always snap back to the world space frame on release (ie the global X-axis, Y-axis, and Z-axis). The user should be aware of this when making rotational changes - rotations using the local coordinate system will likely be the most useful.

World-Space Rotation World-Space Rotation

Protrusion:

The sensors are always attached to some point on the vehicle, even if the user moves the sensor far away from the vehicle. For example, if the translation gimbal is used to move the sensor seven meters upwards and then the vehicle is driven, the sensor still moves with the car (as if it was attached to some invisible rod connecting the vehicle and the sensor). This is the desired behaviour.

Protruded Sensor Protruded Sensor

The point at which the sensor is actually attached is determined when the sensor is created. It will usually be the closest mesh triangle to the sensor. This is important, since if the vehicle becomes damaged (eg after a collision), then we wish the sensor to reflect that damage. For example, if a sensor was attached to the front bumper of a vehicle and set to point straight forward, then the vehicle crashes into a wall and the front bumper becomes deformed, then the sensor pose will inherit this damage and thus point in a different direction. This is similar to what would happen in the real case.

This is why the actual triangle to which the sensor is attached is important - it is the orientation of that triangle which will be inherited by the sensor. The user cannot set this, however. We point this out for informative reasons, for when/if the user creates a sensor which is quite far away from the vehicle mesh.

Last modified: May 17, 2024

Any further questions?

Join our discord
Our documentation is currently incomplete and undergoing active development. If you have any questions or feedback, please visit this forum thread.