Add a sensor to a scene
Add a sensor component to a GameObject and configure it to publish simulation data.
The following procedure uses CameraSensor as an example. Refer to Sensor types reference for the properties other sensor types expose.
To add a camera sensor to a scene:
- Add a
Cameracomponent to a GameObject. - Add the
CameraSensorcomponent to the same GameObject. - In the Inspector, configure Update Rate, Horizontal FOV, Image Width, and Image Height.
- Set output topics on the Image Publisher, Depth Publisher, and Camera Info Publisher nodes.
Make sure a connector is reachable through ConnectorInjector so the sensor's publishers can send messages. Refer to Get started.