The main function of the Qb2 ROS2 driver is to convert the point cloud data from the Qb2 into a ROS PointCloud2 msg.
Two nodes are available:
-
Qb2Driver: The live node connects to one Qb2 and publishes the point cloud based on the scan pattern frequency set on the device.
-
Qb2SnapshotDriver: The snapshot node can connect to multiple Qb2s and request single frames from all connected Qb2s based on the frequency configured for the node. The driver sequentially requests the point clouds from each device and publishes all point clouds onto their respective topics simultaneously and with the same timestamp.
The Blickfeld Qb2 ROS2 driver supports the following ROS2 distributions:
-
Foxy Fitzroy
-
Humble Hawksbill
Before proceeding, make sure to install the following dependencies on your system:
-
ROS2:
-
ROS Foxy Installation: Compatible with Ubuntu 20.04
-
ROS Humble Installation: Compatible with Ubuntu 22.04
-
-
Diagnostic Updater: Use debian package on Ubuntu 20.04 and greater
-
Colcon: Required for building the ROS workspace
-
Protobuf: >= v3.6.1, use debian package on Ubuntu 20.04 and greater
-
gRPC: >= v1.16.1, use debian package on Ubuntu 20.04 and greater
sudo apt update sudo apt install ros-${ROS_DISTRO}-diagnostic-updater libgrpc++-dev protobuf-compiler-grpc libprotobuf-dev
Before proceeding with the build, ensure that you source
your ROS2 distribution. ROS2 must be sourced in every shell to access ROS2 commands. Use the following command to source ROS2:
source /opt/ros/${ROS_DISTRO}/setup.bash
Next, follow these steps to create your colcon workspace:
-
Create the colcon workspace:
mkdir -p ${colcon_workspace}/src
Replace ${colcon_workspace} with your custom directory path.
-
Move or clone the blickfeld_qb2_ros2_driver package into the
{colcon_workspace}/src
directory -
Build your workspace:
cd ${colcon_workspace} colcon build --symlink-install --cmake-clean-first --packages-up-to blickfeld_qb2_ros2_driver
Important
|
Make sure to replace ${colcon_workspace} with your actual workspace path and follow these steps to successfully build the package. |
The driver can be executed through several methods:
-
Using ROS2 component CLI to integrate it into an existing container named
/ComponentManager
(ROS2 component). -
Utilizing ROS2 component CLI to operate it in standalone mode (ROS2 standalone component).
-
Employing ROS2 launch CLI (ROS2 launch).
Below are examples to commence the live or snapshot nodes:
-
ROS2 component
ros2 component load /ComponentManager blickfeld_qb2_ros2_driver blickfeld::ros_interop::Qb2Driver -p fqdn:="qb2"
-
ROS2 standalone component
ros2 component standalone blickfeld_qb2_ros2_driver blickfeld::ros_interop::Qb2Driver -p fqdn:="qb2"
-
ROS2 launch
ros2 launch blickfeld_qb2_ros2_driver blickfeld_qb2_ros2_driver.launch.py
-
ROS2 component
ros2 component load /ComponentManager blickfeld_qb2_ros2_driver blickfeld::ros_interop::Qb2SnapshotDriver -p fqdns:="[qb2-1, qb2-2]" -p fqdn_frame_ids:="[qb2-1, qb2-2]" -p fqdn_point_cloud_topics:="[/bf/points_raw_1, /bf/points_raw_2]"
-
ROS2 standalone component
ros2 component standalone blickfeld_qb2_ros2_driver blickfeld::ros_interop::Qb2SnapshotDriver -p fqdns:="[qb2-1, qb2-2]" -p fqdn_frame_ids:="[qb2-1, qb2-2]" -p fqdn_point_cloud_topics:="[/bf/points_raw_1, /bf/points_raw_2]"
-
ROS2 launch
ros2 launch blickfeld_qb2_ros2_driver blickfeld_qb2_ros2_snapshot_driver.launch.py
Note
|
The point cloud contains cartesian coordinates represented as individual FLOAT32 values for x, y, and z. |
Important
|
The user is required to provide a valid address for connection, as no default value is available. |
Argument | Default | Note |
---|---|---|
fqdn |
`` |
Fully qualified domain name: IP-address or host name of the Qb2 device which is to publish its point cloud. |
frame_id |
|
The name of the TF frame (coordinate system) which is to be added to the point cloud message. |
point_cloud_topic |
|
The topic for publishing the point cloud. |
use_measurement_timestamp |
|
Select either the device timestamp or the ROS timestamp. By default, the setting is "false," which corresponds to the ROS timestamp. |
publish_intensity |
|
Select to publish the |
publish_point_id |
|
Select to publish the |
Important
|
To establish a connection to the device in snapshot mode, the user must provide at least one valid 'fqdn', 'frame_id' and 'point_cloud_topic'. No default value are available for these parameters. |
Important
|
The entry list for 'fqdns', 'fqdn_frame_ids' and 'fqdn_point_cloud_topics' should be the same size otherwise the driver will not start. |
Argument | Default | Note |
---|---|---|
fqdns |
|
Fully qualified domain name: IP-address or host name of the Qb2 device which is to publish its point cloud. |
fqdn_frame_ids |
|
The name of the TF frame (coordinate system) which is to be added to the point cloud message. |
fqdn_point_cloud_topics |
|
The list of topics for publishing the point cloud of each fqdn. |
snapshot_frequency |
|
The frequency (hz) to snapshot a point cloud from the Qb2s, this value should be something between [0, 0.1]. Use 0 to disable the snapshot frequency (the service call can still be used to manually trigger a snapshot). |
use_measurement_timestamp |
|
Select either the device timestamp or the ROS timestamp. By default, the setting is "false," which corresponds to the ROS timestamp. |
publish_intensity |
|
Select to publish the |
publish_point_id |
|
Select to publish the |
max_retries |
|
The number or retries for getting point cloud from each Qb2 in case of failure during the snapshot trigger. |
The snapshot driver offers a service call to manually trigger snapshots, in addition to the time based snapshots that can be configured using the 'snapshot_frequency' parameter. To manually trigger the snapshot, utilize the ROS2 service:
ros2 service call /trigger_snapshot std_srvs/srv/Trigger
Field | Note |
---|---|
device_fqdn |
The fqdn of the Qb2. |
connection_status |
True if the driver is connected to the Qb2, otherwise False. |
failed_connection_attempts |
The number of failed connection attempts to Qb2 since the start of the driver. |
connection_attempts_since_last_connection |
The number of connection attempts to Qb2 since the last successful connection. |
stream_status |
True if the point cloud stream channel is created between the driver and the Qb2, otherwise False. The snapshot driver does not open a stream. |
failed_opening_stream_attempts |
The number of failed attempts to open a point cloud stream to Qb2 since the start of the driver. |
opening_stream_attempts_since_last_opened_stream |
The number of attempts to open a point cloud stream to Qb2 since the last successful opened stream. |
last_frame_success |
True if the last frame was read successfully from the Qb2, otherwise False. |
last_frame_duration |
The time duration for reading the last frame from the Qb2. |
total_frames_published |
The total number of published point cloud frames by the driver since the start. |
total_frames_dropped |
The total number of frames that has been dropped since the start of the driver. |
total_reboots |
The total number of reboots of Qb2 since the start of the driver. |
This package is released under a BSD 3-Clause License (see also https://opensource.org/licenses/BSD-3-Clause)