web
You’re offline. This is a read only version of the page.
close
Support Portal

picoScan100: Connect to MATLAB via Native ROS 2

Connect picoScan100's native ROS 2 node to MATLAB ROS Toolbox via DDS. No SICK driver needed.
Related Products
picoScan100

Table of Contents

Key message: picoScan100 publishes point cloud data as native ROS 2 messages. MATLAB ROS Toolbox can subscribe directly to /cloud/all_points without any SICK-specific ROS driver or bridge.
Overview

System topology

picoScan100 runs an internal ROS 2 node and publishes point cloud data via DDS. MATLAB creates its own ROS 2 node and subscribes directly to the published topic. picoScan100 always operates on ROS_DOMAIN_ID=0.

picoScan100 (Native ROS 2)
├─ ROS 2 node
├─ /cloud/all_points
└─ Message type: sensor_msgs/PointCloud2
MATLAB ROS Toolbox
├─ ros2node
├─ ros2subscriber
└─ Callback processing

Test environment

Validated setup

Component Version / Setting
Operating system Windows 11
MATLAB R2025b with ROS Toolbox
ROS 2 / DDS Kilted, CycloneDDS
picoScan100 firmware V2.2.1
Python version 3.10
ROS Domain ID 0 (fixed by picoScan100)

MATLAB

Receiving PointCloud2 data via script

The MATLAB script below creates a ROS 2 node, lists all visible topics, and subscribes to /cloud/all_points. The callback prints the number of received points per message.

MATLAB
% Create ROS 2 node (Domain ID 0 is used automatically)
node = ros2node("/matlab_cloud_counter");

% List all available ROS 2 topics
disp("Available ROS 2 topics:");
disp(ros2("topic","list"));

% Create subscriber for picoScan100 point cloud
sub = ros2subscriber( ...
    node, ...
    "/cloud/all_points", ...
    "sensor_msgs/PointCloud2", ...
    @onPointCloud);

disp("Subscribed to /cloud/all_points");

% Process callbacks for 10 seconds
t0 = tic;
while toc(t0) < 10
    pause(0.1);
end

% Clean up
clear sub node
disp("Finished.");

function onPointCloud(msg)
    pointCount = double(msg.width) * double(msg.height);
    fprintf("PointCloud received: %d points\n", pointCount);
end
Visualization

Using MATLAB ROS 2 Data Analyzer

Live visualization of the picoScan100 point cloud is possible using the MATLAB ROS 2 Data Analyzer app. No additional configuration is required when MATLAB is running in ROS Domain 0.

Step Action
1 Apps → ROS 2 Data Analyzer
2 Open → Live Network Data
3 Select Live ROS 2 network data
4 ROS Domain ID: 0
5 Create a PointCloud Visualizer, select /cloud/all_points and press Start
MATLAB ROS 2 Data Analyzer showing picoScan100 point cloud on /cloud/all_points
MATLAB ROS 2 Data Analyzer — live point cloud from picoScan100 on /cloud/all_points

Verification

Connectivity check using ROS 2 CLI

Independent of MATLAB, the ROS 2 CLI can be used to verify that picoScan100 publishes point cloud data.

CLI
ros2 topic echo /cloud/all_points
NOTE:

If no data is visible, check interface settings (private), check firewall settings and DDS compatibility. The ROS Domain ID cannot be changed on picoScan100 and must be 0 on all participants.

Keywords:
picoScan100, picoScan120, picoScan150, Native ROS 2, MATLAB