Launch the node

Launch the camera node (assuming you are in ~/colcon_ws/):

$ source install/setup.bash
$ ros2 launch ifm3d_ros2 camera.launch.py

This will launch the /ifm3d/camera/ node with default arguments, using the default YAML configuration file camera_default_parameters.yaml. Depending on the specified pcic_port, the node will initialize either a 3D camera (if the port corresponds to a 3D camera) or a 2D camera.

The respective node information should look like this:

$ ros2 node info /ifm3d/camera

/ifm3d/camera
  Subscribers:
    /parameter_events: rcl_interfaces/msg/ParameterEvent
  Publishers:
    /diagnostics: diagnostic_msgs/msg/DiagnosticArray
    /ifm3d/camera/amplitude: sensor_msgs/msg/Image
    /ifm3d/camera/camera_info: sensor_msgs/msg/CameraInfo
    /ifm3d/camera/cloud: sensor_msgs/msg/PointCloud2
    /ifm3d/camera/confidence: sensor_msgs/msg/Image
    /ifm3d/camera/distance: sensor_msgs/msg/Image
    /ifm3d/camera/distance_noise: sensor_msgs/msg/Image
    /ifm3d/camera/extrinsics: ifm3d_ros2/msg/Extrinsics
    /ifm3d/camera/intrinsic_calib: ifm3d_ros2/msg/Intrinsics
    /ifm3d/camera/inverse_intrinsic_calibration: ifm3d_ros2/msg/InverseIntrinsics
    /ifm3d/camera/reflectivity: sensor_msgs/msg/Image
    /ifm3d/camera/tof_info: ifm3d_ros2/msg/TOFInfo
    /ifm3d/camera/transition_event: lifecycle_msgs/msg/TransitionEvent
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /rosout: rcl_interfaces/msg/Log
    /tf_static: tf2_msgs/msg/TFMessage
  Service Servers:
    /ifm3d/camera/Config: ifm3d_ros2/srv/Config
    /ifm3d/camera/Dump: ifm3d_ros2/srv/Dump
    /ifm3d/camera/GetDiag: ifm3d_ros2/srv/GetDiag
    /ifm3d/camera/Softoff: ifm3d_ros2/srv/Softoff
    /ifm3d/camera/Softon: ifm3d_ros2/srv/Softon
    /ifm3d/camera/change_state: lifecycle_msgs/srv/ChangeState
    /ifm3d/camera/describe_parameters: rcl_interfaces/srv/DescribeParameters
    /ifm3d/camera/get_available_states: lifecycle_msgs/srv/GetAvailableStates
    /ifm3d/camera/get_available_transitions: lifecycle_msgs/srv/GetAvailableTransitions
    /ifm3d/camera/get_parameter_types: rcl_interfaces/srv/GetParameterTypes
    /ifm3d/camera/get_parameters: rcl_interfaces/srv/GetParameters
    /ifm3d/camera/get_state: lifecycle_msgs/srv/GetState
    /ifm3d/camera/get_transition_graph: lifecycle_msgs/srv/GetAvailableTransitions
    /ifm3d/camera/list_parameters: rcl_interfaces/srv/ListParameters
    /ifm3d/camera/set_parameters: rcl_interfaces/srv/SetParameters
    /ifm3d/camera/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically
  Service Clients:

  Action Servers:

  Action Clients:

Optional uncompressed RGB topic

For visualization purposes, the camera launch file can optionally provide uncompressed RGB images. For detailed information on configuring and using uncompressed RGB topics, see the Visualization documentation.

By default the camera node publishes an RGB stream only as a sensor_msgs/CompressedImage on:

/<camera_namespace>/<camera_name>/rgb

If you enable the optional republish step, a sensor_msgs/Image is provided as:

/<camera_namespace>/<camera_name>/rgb_uncompressed

Enable it via either:

  1. YAML (set under the camera’s ros__parameters):

/ifm3d/camera:
  ros__parameters:
    publish_uncompressed: true
  1. Launch argument override (takes precedence over YAML):

ros2 launch ifm3d_ros2 camera.launch.py publish_uncompressed:=true

Precedence and defaults:

  • Launch arg empty (default “”) -> defer to YAML.

  • Launch arg explicit true/false -> overrides YAML.

  • Neither provided -> feature disabled.

When active, an image_transport republish compressed raw helper process is started; the core node still only publishes compressed, keeping CPU use low when the raw topic is not needed.

Note

We also provide a helper launch file to start multiple camera nodes. See the documentation here.

To visualize the data with RViz, set the visualization argument of the launch script to true:

$ ros2 launch ifm3d_ros2 camera.launch.py visualization:=true

rviz1

Congratulations! You can now have complete control over the O3R perception platform from inside ROS2.