Configure a Join Point Clouds View

The join_pointclouds model combines the point clouds from multiple camera sources and projects them to be from the point of view of target_frame.

Navigate to the Config tab of your machine’s page in the Viam app. Click on the Components subtab and click Create component. Select the camera type, then select the join_pointclouds model. Enter a name for your camera and click Create.

Configuration of a Join Point Clouds view in the Viam App config builder.

Copy and paste the following attribute template into your camera’s Attributes box. Then remove and fill in the attributes as applicable to your camera, according to the table below.

{
  "target_frame": "<target-frame-name>",
  "source_cameras": ["<cam-name-1>", "<cam-name-2>", ... ],
  "proximity_threshold_mm": <int>,
  "merge_method": "<naive|icp>",
  "intrinsic_parameters": {
    "width_px": <int>,
    "height_px": <int>,
    "fx": <float>,
    "fy": <float>,
    "ppx": <float>,
    "ppy": <float>
  },
  "debug": <boolean>
}
{
  "name": "<your-camera-name>",
  "model": "join_pointclouds",
  "type": "camera",
  "namespace": "rdk",
  "attributes": {
    "target_frame": "<target-frame-name>",
    "source_cameras": ["<cam-name-1>", "<cam-name-2>", ... ],
    "proximity_threshold_mm": <int>,
    "merge_method": "<naive|icp>",
    "intrinsic_parameters": {
      "width_px": <int>,
      "height_px": <int>,
      "fx": <float>,
      "fy": <float>,
      "ppx": <float>,
      "ppy": <float>
    },
    "debug": <boolean>
  }
}

The following attributes are available for join_pointclouds views:

NameTypeInclusionDescription
target_framestringRequiredThe frame of reference for the points in the merged point cloud.
source_camerasarrayRequiredThe name of each of the camera sources to combine.
proximity_threshold_mmintOptionalDefines the largest distance 2 points can have in millimeters to be considered the same point when merged.
merge_methodstringOptionalnaive or icp.
Default: naive
intrinsic_parametersobjectOptionalThe intrinsic parameters to project the joined point cloud to 2D:
  • width_px: The expected width of the aligned image in pixels.
  • height_px: The expected height of the aligned image in pixels.
  • fx: The image center x point.
  • fy: The image center y point.
  • ppx: The image focal x.
  • ppy: The image focal y.
debugbooleanOptionalEnables the debug outputs from the camera if true.
Default: false

View the camera stream

Once your camera is configured and connected, go to the Control tab, and click on the camera’s dropdown menu. Then toggle the camera or the Point Cloud Data view to ON. If everything is configured correctly, you will see the live video feed from your camera. You can change the refresh frequency as needed to change bandwidth.

Example Camera view inside Viam app

Next steps



Have questions, or want to meet other people working on robots? Join our Community Discord.

If you notice any issues with the documentation, feel free to file an issue or edit this file.