Build and inspect the POSIM sonar backend

Use the POSIM workspace described in POSIM Native Installation and check POSIM Multibeam Sonar — CUDA & WGPU before selecting a sonar-equipped world. These notes replace the old standalone Jazzy package-install snippet.

CUDA targets

The source detects CUDAToolkit in both the sensor and system packages. If the toolkit is absent, CMake reports CUDA Toolkit not found: Skipping CUDA-specific targets. A successful workspace build in that case does not provide a working CUDA sonar.

The sensor target uses the Jetty libraries, CUDA/cuFFT and cuBLAS. Check the source's CUDA_ARCHITECTURE setting against your GPU before a CUDA build; the checked source defaults to 60. Do not copy a toolkit or architecture setting from a different machine without checking compatibility.

Inspect the installed result

In a terminal sourced for the native POSIM workspace:

source /opt/ros/lyrical/setup.bash
source ~/posim_ws/install/setup.bash
ros2 pkg prefix multibeam_sonar
ros2 pkg prefix multibeam_sonar_system
find "$(ros2 pkg prefix multibeam_sonar)/lib/multibeam_sonar" -maxdepth 1 -type f -name '*multibeam*'
find "$(ros2 pkg prefix multibeam_sonar_system)/lib/multibeam_sonar_system" -maxdepth 1 -type f -name '*multibeam*'

A package prefix can exist even when its CUDA targets were skipped. The libraries, resource hooks and runtime backend must all be present. If find reports a missing directory, return to the build output rather than declaring a pass. For a Docker shell, source the workspace identified in POSIM Docker Guide instead of the native path above.

Common failure points

Verification scope

These instructions were checked against the POSIM source on 2026-10-01. No new CUDA or WGPU execution was performed for this documentation edit. The published headless Quickstart results do not certify CUDA sonar.