Support Portal

picoScan100: native ROS2 (Linux/Windows)

This tutorial explains how to run native ROS2 on a picoScan150 within a ROS2 environment.
Related Products
picoScan100

Table of Contents

Preconditions

picoScan150

picoScan150 PRO version (PN: 1134610) or any picoScan150 variant with installed native ROS2 license.

picoScan150 with firmware version > V1.2.0. The latest device firmware with update instructions can be found here: https://www.sick.com/de/en/downloads/media/swp680096

picoScan150 with installed native ROS2 License (License name: PICOSCAN RosConnect)

If you have a picoScan150 without the required license please get in contact with SICK. A license can be installed on the picoScan150 via: http://192.168.0.1/#/license. Make sure to reboot the device after the transfer of a license to make it active.

ROS2 environment

  1. Installed ROS2 environment. In this tutorial we use ROS2 Humble (https://docs.ros.org/en/humble/Installation.html).
  2. Installed ROS Middleware (RMW) Eclipse Cyclone DDS (https://docs.ros.org/en/humble/Installation/DDS-Implementations/Working-with-Eclipse-CycloneDDS.html)

Preparation Operating System (Windows only)

Use these commands in your Windows Powershell terminal to read the interface number and to set the interface to "Private". This shows an example for interface 5.

Get-NetConnectionProfile

Set-NetConnectionProfile -InterfaceIndex 5 -NetworkCategory Private

Enabling native ROS2

Disabled measurement streaming

Enable native ROS2 via SOPAS ET by using this command script (This script only works with default Service password).

 

 

$C Log-In
$A sMN SetAccessMode 4 81BE23AA
$W 100

 

$C enable native ROS2
$A sWN RosConnectEnable 1
$W 100

 

$C Log-Out
$A sMN Run
$W 100

Visualizing the point cloud

Linux

Use the following commands in your prefered terminal.

Create a CycloneDDS config file where you set the IP address of your used interface. In this example 192.168.0.100 is used. More details can be found here: https://cyclonedds.io/docs/cyclonedds/latest/config/index.html

<?xml version="1.0" encoding="utf-8"?>
<CycloneDDS
  xmlns="https://cdds.io/config"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/master/etc/cyclonedds.xsd"
>
  <Domain>
    <General>
      <NetworkInterfaceAddress>192.168.0.100</NetworkInterfaceAddress>
    </General>
    <Tracing>
      <Verbosity>config</Verbosity>
      <OutputFile>
        cdds.log
      </OutputFile>
    </Tracing>
  </Domain>
</CycloneDDS>

 

Source ROS2 (this example can vary from your setup).

Set the ROS Middleware (RMW)

Set the CycloneDDS config file (this example can vary from your setup).

Start rviz2 to show the point cloud

. ~/ros2_humble/install/local_setup.bash
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export CYCLONEDDS_URI="file://$HOME/CycloneDDS/my-config.xml"
rviz2
 

Change "Fixed Frame" to world

There are two ROS data types available (Laserscan, PointCloud2). There are multiple options to receive full scans, scan segments or reflector beams only.

Point cloud example:

List all topics

ros2 topic list

Echo the a specific topic

ros2 topic echo /picoScan_24130021/cloud/all_points

Windows

Use the following commands in your Windows cmd terminal.

Create a CycloneDDS config file where you set the IP address of your interface. In this example 192.168.0.100 is used. More details can be found here: https://cyclonedds.io/docs/cyclonedds/latest/config/index.html

<?xml version="1.0" encoding="utf-8"?>
<CycloneDDS
  xmlns="https://cdds.io/config"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/master/etc/cyclonedds.xsd"
>
  <Domain>
    <General>
      <NetworkInterfaceAddress>192.168.0.100</NetworkInterfaceAddress>
    </General>
    <Tracing>
      <Verbosity>config</Verbosity>
      <OutputFile>
        cdds.log
      </OutputFile>
    </Tracing>
  </Domain>
</CycloneDDS>

 

Source ROS2 (this example can vary from your setup).

Set the ROS Middleware (RMW)

Set the CycloneDDS config file (this example can vary from your setup).

Start rviz2 to show the point cloud

call C:\dev\ros2_humble\local_setup.bat
set RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
set  CYCLONEDDS_URI=file://%USERPROFILE%/cyclonedds.xml
rviz2
 

Change "Fxed frame" to world

There are two ROS data types available (Laserscan, PointCloud2). There are multiple options to receive full scans, scan segments or reflector beams only.

Point cloud example

List all topics

ros2 topic list

Echo the a specific topic

ros2 topic echo /picoScan_24130021/cloud/all_points

FAQ and Troubleshooting

How to check if native ROS2 is enabled?

Open http://192.168.0.1/api/RosConnectEnable. If native ROS2 is activ you will receive the answer shown on the right.

{"header":{"status":0,"message":"Ok"},"data":{"RosConnectEnable":true}}

Keywords:
picoScan, pico, picoScan150, ROS, native ROS2, ROS, ROS2, RosConnect