Skip to content

Software

trackdlo_perception

From github.com/HayatoShimada/trackdlo_perception (opens in a new tab)

  • Perception
  • Tool
  • BSD-3-Clause

A ROS2 package that tracks deformable linear objects, such as cables or ropes, in real time from Intel RealSense RGB-D camera data.

Facts

GitHub stars
0read on 29 Nov 2026
Last update
14 May 2026Newest commit on master
Maintenance
Maintaineda commit in the last 12 months
Difficulty
Advanced
Hardware it needs, as the project states it
An Intel RealSense D415, D435, or D455 camera is needed for the launch example.

Checked on GitHub on 29 Nov 2026.

Licenses

Code
BSD-3-Clause (opens in a new tab)

Read by Robotheca from LICENSE (opens in a new tab) (BSD-3-Clause) at commit 70dda1c (opens in a new tab), on 16 Oct 2026.

Commercial use
Yes

At a glance

What it is
  • Tracks a deformable linear object's node positions in real time using the CPD-LLE algorithm, based on TrackDLO.
  • Offers pluggable segmentation: HSV thresholding by default, with YOLO and DeepLab named as options, and an HSV tuner GUI.
  • Publishes tracked node positions as a standard PointCloud2 topic, so other ROS2 nodes can subscribe without custom messages.
  • Shows a 4-panel preview window with camera feed, segmentation mask, overlay, and tracking results.
  • Can be run in Docker with automatic GPU detection, or built natively with colcon.
  • Custom segmentation backends can be added by subclassing a segmentation base class that outputs a binary mask.

Robotheca's summary of the project's documents, not the creator's words.

Robots on Robotheca
No robot on Robotheca uses it yet.
Licence
BSD-3-Clause. Commercial use: Yes. Where it was read
Install
In the creator's words: The project's README (opens in a new tab)
Maintenance
Maintained, last commit on 14 May 2026.

Use it

How to install it, in the creator's words: The project's README (opens in a new tab)

Robotheca doesn't review code. Read it before running it.

Files and versions

Facts read at commit 70dda1c

Robotheca never hosts the code: each link goes to the creator's own page.

The README

The creator's own README, copied as written: README.md by @HayatoShimada, at commit 70dda1c, under BSD-3-Clause (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

trackdlo_perception

Real-time tracking of Deformable Linear Objects (DLO) using ROS2 and Intel RealSense RGB-D cameras.

日本語版はこちら (opens in a new tab)

Based on TrackDLO (opens in a new tab) by RMDLO.

Features
  • Real-time DLO tracking via CPD-LLE algorithm
  • Pluggable segmentation: HSV / YOLO / DeepLab (extensible via SegmentationNodeBase)
  • 4-panel preview window: camera feed, mask, overlay, and tracking results
  • Docker-based: single command launch with automatic GPU detection
  • ROS2 Humble / Jazzy: switch via ROS_DISTRO build argument
Package Structure
trackdlo_perception/
├── trackdlo_core/           CPD-LLE tracking algorithm (C++17 + Python)
├── trackdlo_segmentation/   Segmentation base class + HSV implementation
├── trackdlo_utils/          Composite view, parameter tuner
├── trackdlo_bringup/        Launch files, YAML params, RViz config
├── trackdlo_msgs/           Custom messages (reserved for future use)
└── docker/                  Docker Compose + GPU configuration
Installation
From apt (ROS2 Humble)
echo "deb [trusted=yes] https://hayatoshimada.github.io/trackdlo_perception/humble /" \
  | sudo tee /etc/apt/sources.list.d/trackdlo.list
sudo apt update
sudo apt install ros-humble-trackdlo-core ros-humble-trackdlo-segmentation
From Source
cd ~/ros2_ws/src
git clone https://github.com/HayatoShimada/trackdlo_perception.git
cd ~/ros2_ws
rosdep install --from-paths src --ignore-src -y
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
source install/setup.bash
Quick Start
Docker Build
cd docker/

# Build all images
bash build.sh

# Build core only
bash build.sh core

# Build for Jazzy
ROS_DISTRO=jazzy bash build.sh
Docker Run
xhost +local:docker
cd docker/

# HSV segmentation (default)
./run.sh

# HSV tuner GUI
./run.sh hsv_tuner

# Background mode
./run.sh hsv -d
Native Build
# Build
colcon build --packages-select trackdlo_msgs trackdlo_segmentation trackdlo_core trackdlo_utils trackdlo_bringup --cmake-args -DCMAKE_BUILD_TYPE=Release
source install/setup.bash

# Launch
ros2 launch trackdlo_bringup trackdlo.launch.py
ros2 launch trackdlo_bringup trackdlo.launch.py segmentation:=hsv_tuner
ros2 launch trackdlo_bringup trackdlo.launch.py rviz:=false
Segmentation Modes
ModeDescriptionUse Case
hsv (default)HSV thresholdingDLO color is known, parameters tuned
hsv_tunerReal-time slider GUIFinding HSV values for a new DLO
Architecture
Docker
trackdlo-core container
┌─────────────────────┐
│ RealSense driver    │
│ trackdlo_node (C++) │
│ init_tracker (Py)   │
│ HSV segmentation    │
│ composite_view      │
│ param_tuner         │
│ RViz2               │
└─────────────────────┘
    host network (CycloneDDS, ROS_DOMAIN_ID=42)
Processing Pipeline
[RealSense D435/D415]
    |
    +-- /camera/color/image_raw
    +-- /camera/aligned_depth_to_color/image_raw
    |
    v
[Segmentation]  <- HSV / YOLO / DeepLab (swappable)
    |
    v /trackdlo/segmentation_mask
    |
[trackdlo_node (CPD-LLE)]
    |
    +-- /trackdlo/results_pc      (tracked DLO node positions)
    +-- /trackdlo/results_img     (tracking result visualization)
    |
    v
[composite_view]  <- 4-panel preview window
Usage
1. Launch with RealSense Camera

Connect an Intel RealSense D415/D435/D455 and run:

# Default HSV segmentation
ros2 launch trackdlo_bringup trackdlo.launch.py

# With HSV tuner GUI (adjust thresholds interactively)
ros2 launch trackdlo_bringup trackdlo.launch.py segmentation:=hsv_tuner

# Without RViz
ros2 launch trackdlo_bringup trackdlo.launch.py rviz:=false

The 4-panel preview window opens automatically showing camera feed, segmentation mask, overlay, and tracking results.

2. Subscribe to Tracking Results

From your own ROS2 node, subscribe to the tracked DLO positions:

from sensor_msgs.msg import PointCloud2
from sensor_msgs_py import point_cloud2

class MyNode(Node):
    def __init__(self):
        super().__init__('my_node')
        self.create_subscription(
            PointCloud2, '/trackdlo/results_pc', self.on_tracking, 10)

    def on_tracking(self, msg):
        # Each point is a tracked DLO node (x, y, z in camera frame)
        points = list(point_cloud2.read_points(msg, field_names=('x', 'y', 'z')))
        # points[0] = first endpoint, points[-1] = last endpoint
3. Use as a Dependency in Your Package

Add to your package.xml:

<exec_depend>trackdlo_core</exec_depend>
Available Topics
TopicTypeDescription
/trackdlo/results_pcPointCloud2Tracked DLO node positions (main output)
/trackdlo/results_imgImageTracking result visualization
/trackdlo/segmentation_maskImageSegmentation mask (mono8)
/trackdlo/init_nodesPointCloud2Initial nodes (published once)
4. Add Custom Segmentation

Create a new segmentation backend by subclassing SegmentationNodeBase:

from trackdlo_segmentation import SegmentationNodeBase
import numpy as np

class YoloSegmentationNode(SegmentationNodeBase):
    def __init__(self):
        super().__init__('yolo_segmentation')
        # Initialize your model here

    def segment(self, cv_image: np.ndarray) -> np.ndarray:
        # Input: BGR image (H, W, 3), dtype uint8
        # Output: binary mask (H, W), dtype uint8, values 0 or 255
        mask = your_model.predict(cv_image)
        return mask

Run your node alongside trackdlo with external mask mode:

# Terminal 1: launch trackdlo with external mask
ros2 launch trackdlo_bringup trackdlo.launch.py segmentation:=hsv_tuner

# Terminal 2: run your segmentation node (replaces HSV)
ros2 run your_package yolo_segmentation

All segmentation nodes publish to /trackdlo/segmentation_mask (mono8).

Integration with Other ROS2 Projects

trackdlo_perception uses only standard ROS2 message types. Any ROS2 node sharing the same ROS_DOMAIN_ID can subscribe to tracking results — no custom messages needed.

Key Parameters

Configured in trackdlo_bringup/config/realsense_params.yaml:

ParameterDefaultDescription
beta0.35Shape rigidity (smaller = more flexible)
lambda50000.0Global smoothness strength
alpha3.0Conformity to initial shape
mu0.1Noise ratio
max_iter20Maximum EM iterations
k_vis50.0Visibility term weight
d_vis0.06Max geodesic distance for gap interpolation (m)
visibility_threshold0.008Visibility distance threshold (m)
downsample_leaf_size0.02Voxel size (m)
num_of_nodes30Number of tracking nodes
Dependencies
  • ROS2 Humble or Jazzy
  • Intel RealSense SDK 2.0 (realsense2_camera)
  • OpenCV, PCL, Eigen3
  • scikit-image, scipy, Open3D
Citation

If you use this software in your research, please cite the original TrackDLO paper:

@article{trackdlo2023,
  title={TrackDLO: Tracking Deformable Linear Objects Under Occlusion with Motion Coherence},
  author={Lai, Jingyi and Lu, Biao and Liu, Yuhong and Sundaresan, Priya and Bhatt, Kaushik and Goldberg, Ken},
  journal={IEEE Robotics and Automation Letters},
  year={2023},
  publisher={IEEE}
}
Documentation
License

BSD-3-Clause

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.