MATLAB¶
MATLAB ROS Toolbox can subscribe directly to the picoScan100 native ROS 2 node through DDS. No SICK ROS driver or bridge is required. The picoScan100 publishes point-cloud data on /cloud/all_points as sensor_msgs/PointCloud2 and always uses ROS domain ID 0.
Validated setup¶
| Component | Version / setting |
|---|---|
| Operating system | Windows 11 |
| MATLAB | R2025b with ROS Toolbox |
| ROS 2 / DDS | Kilted with CycloneDDS |
| ROS domain ID | 0 (fixed by picoScan100) |
All DDS participants must use domain ID 0. Ensure that the sensor's native ROS 2 interface is enabled and that the computer firewall allows DDS traffic. See Native ROS 2 for sensor-side setup.
Receive PointCloud2 data¶
The following script creates a MATLAB ROS 2 node, lists visible topics, and prints the number of points received on /cloud/all_points.
node = ros2node("/matlab_cloud_counter");
disp("Available ROS 2 topics:");
disp(ros2("topic", "list"));
sub = ros2subscriber( ...
node, ...
"/cloud/all_points", ...
"sensor_msgs/PointCloud2", ...
@onPointCloud);
disp("Subscribed to /cloud/all_points");
t0 = tic;
while toc(t0) < 10
pause(0.1);
end
clear sub node
disp("Finished.");
function onPointCloud(msg)
pointCount = double(msg.width) * double(msg.height);
fprintf("PointCloud received: %d points\n", pointCount);
end
Visualize live data¶
Open Apps > ROS 2 Data Analyzer, choose Open > Live Network Data, select Live ROS 2 network data, and set the ROS domain ID to 0. Create a PointCloud Visualizer, choose /cloud/all_points, then select Start.
Verify connectivity¶
Use the ROS 2 CLI independently of MATLAB to verify that DDS data is present:
If no data is visible, confirm the native ROS 2 interface configuration, firewall rules, DDS compatibility, and ROS domain ID. The picoScan100 domain ID cannot be changed.