The SENSUS SDK supports various builds and runtime configurations. To facilitate this process more easily, dockerfiles have been provided for the various supported platforms and architectures, enabling you to get started with integrating your Pulse device quickly and avoid dependency errors during set-up.
Building Applications with SENSUS SDK #
The SDK currently requires certain system dependencies to be met, such as a relatively recent OS (Ubuntu 22.04 or later) and a C++20 compatible compiler. By providing Dockerfiles for multiple configurations, we aim to make building applications with the SDK as smooth as possible, while working on increasing portability in future releases.
Build Configurations #
C++ Application Builds #
1. Basic (CPU Only) Build #
Use this configuration if you do not need GPU acceleration.
Dockerfile: Dockerfile-cpu
Build and Run Commands:
# Navigate to the directory containing the Dockerfile
cd path/to/sdk/example-cpp-app
# Build the Docker image
docker build -f Dockerfile-cpu -t cpp-app-cpu .
# Run the Docker container
docker run --rm -it cpp-app-cpu
This setup will build and launch the C++ application in a container using only CPU resources.
2. CUDA (GPU) Build #
Use this configuration if you want to leverage GPU acceleration.
Dockerfile: Dockerfile-cuda
Requirements:
- NVIDIA Docker runtime and drivers must be installed on the host system.
Build and Run Commands:
# Navigate to the directory containing the Dockerfile
cd path/to/sdk/example-cpp-app
# Build the Docker image
docker build -f Dockerfile-cuda -t cpp-app-cuda .
# Run the Docker container with GPU access
docker run --rm --gpus all -it cpp-app-cuda
This setup will run the C++ application in a container with CUDA support, utilizing the GPU for acceleration.
ROS2 Node Builds #
3. ROS2 Node (CPU Only) Build #
For deploying the ROS2 node without GPU support, use the following configuration.
Dockerfile: Dockerfile-ros2-cpu
Build and Run Commands:
# Navigate to the directory containing the Dockerfile
cd path/to/sdk/example-ros2-node
# Build the Docker image
docker build -f Dockerfile-ros2-cpu -t ros2-node-cpu .
# Run the Docker container
docker run --rm -it ros2-node-cpu
This configuration builds and runs the ROS2 node on CPU only, which is suitable for systems without a GPU.
4. ROS2 Node (CUDA) Build #
Use this configuration for a ROS2 node with GPU support.
Dockerfile: Dockerfile-ros2-cuda
Requirements:
- NVIDIA Docker runtime and drivers must be installed on the host system.
Build and Run Commands:
# Navigate to the directory containing the Dockerfile
cd path/to/sdk/example-ros2-node
# Build the Docker image
docker build -f Dockerfile-ros2-cuda -t ros2-node-cuda .
# Run the Docker container with GPU access
docker run --rm --gpus all -it ros2-node-cuda
This configuration enables the ROS2 node to run with CUDA support, leveraging the GPU.
Jetson Orin Nano Build #
For running the applications on an NVIDIA Jetson Orin Nano, refer to the relevant Dockerfile and follow any specific setup instructions for the Jetson platform. Ensure that the Jetson device is properly set up with the required NVIDIA libraries and drivers.
Dockerfile: Dockerfile-jetson-ros2
Requirements:
- Jetpack up to date, and Jetson Containers installed
# Navigate to the directory containing the Dockerfile
cd path/to/sdk/example-ros2-node
# Build the Docker image
docker build -f Dockerfile-ros2-cuda -t ros2-node-cuda .
# Run the Docker container with GPU access
docker run --rm --gpus all -it ros2-node-cuda
This configuration enables the ROS2 node to run with CUDA support, leveraging the GPU.