Skip to content

Software

mini_tof

By UW Graphics Group, United States (checked on github.com/uwgraphics (opens in a new tab)), from github.com/uwgraphics/mini_tof (opens in a new tab)

  • Perception
  • Driver or SDK
  • Apache-2.0

A ROS 2 package that passes readings from miniature time-of-flight sensors to ROS 2 topics, including raw histogram data, without requiring sensor or firmware expertise.

  • Stale. No commit in 12 months: the newest is from 18 Nov 2025.

Facts

GitHub stars
4read on 28 Nov 2026
Last update
18 Nov 2025Newest commit on main
Maintenance
Staleno commit in 12 months
Difficulty
Intermediate

Checked on GitHub on 28 Nov 2026.

Licenses

Code
Apache-2.0 (opens in a new tab)

Read by Robotheca from LICENSE (opens in a new tab) (Apache-2.0) at commit 827b3a3 (opens in a new tab), on 16 Oct 2026.

Commercial use
Yes

At a glance

What it is
  • Supports the AMS TMF882X family (TMF8820, TMF8821, TMF8828) and the ST VL53L8CH sensor.
  • A publisher node sends sensor data such as distance, ambient light and histograms to ROS 2 topics.
  • A visualizer node shows the sensor data in real time using PyQtGraph.
  • Raw histogram capture is intended for applications like object detection, 3D reconstruction and seeing around corners.
  • Launchable from the command line or from ROS 2 launch files, with the microcontroller port and sensor model set as parameters.
  • Requires a microcontroller connected to the sensor, running firmware from the companion mini_tof_firmware repository.

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

Robots on Robotheca
No robot on Robotheca uses it yet.
Licence
Apache-2.0. Commercial use: Yes. Where it was read
Install
In the creator's words: The project's README (opens in a new tab)
Maintenance
Stale, last commit on 18 Nov 2025.

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 827b3a3

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 UW Graphics Group, at commit 827b3a3, under Apache-2.0 (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

Mini ToF

ROS 2 package for interfacing with miniature ToF sensors without any hardware or firmware expertise required. This package includes support for capturing raw histogram data from the sensors, which has been studied in academic work for many applications like object detection [1 (opens in a new tab)], 3D reconstruction[2 (opens in a new tab), 3 (opens in a new tab), 4 (opens in a new tab)], and even seeing around corners[5 (opens in a new tab), 6 (opens in a new tab)].

Currently supported sensors:

  • AMS TMF882X (TMF8820, TMF8821, TMF8828)
  • ST VL53L8CH

See the mini_tof_firmware (opens in a new tab) repository for information about supported hardware (sensors and microcontollers).

Related Packages

mini_tof_interfaces (opens in a new tab) is a ROS 2 package containing the ROS 2 interface definitions for this package.

mini_tof_firmware (opens in a new tab) is a GitHub repository containing microcontroller firmware necessary for using this package.

Installation
Install ROS Package
Option 1: Install pre-built binary from command line

This option is coming soon. For now, you must build from source.

Option 2: Build from Source
  1. Clone this repo and the interfaces package to the src directory of your ROS 2 workspace:

    cd ~/ros2_ws/src
    git clone git@github.com:uwgraphics/mini_tof.git
    git clone git@github.com:uwgraphics/mini_tof_interfaces.git
    
  2. Install python dependencies using rosdep:

    cd ~/ros2_ws
    rosdep install --from-paths src --ignore-src -r -y
    

    Note: If you encounter issues with rosdep, you can also install packages manually. Refer to the package.xml files in the mini_tof and mini_tof_interfaces packages for a list of dependencies.

  3. Build the workspace

    cd ~/ros2_ws
    colcon build --symlink-install
    
Hardware, Microcontroller Setup, and Firmware

To use this package, a microcontroller must be connected to the ToF sensor and run firmware that communicates with the sensor and ROS 2. Follow the steps in the README for the mini_tof_firmware (opens in a new tab) repository to set up the microcontroller and upload the firmware.

Usage

The mini_tof package is meant to be a simple, lightweight package which passes along information reported by miniature time-of-flight sensors to ROS 2 topics. There are only two nodes in the package:

  1. tof_publisher: Publishes data reported by the sensor (e.g. distance, ambient light, histograms) to ROS 2 topics.
  2. tof_visualizer: Visualizes the data reported by the sensor in real time using PyQtGraph.
Command line

Launch a publisher node for the TMF882X sensor with:

ros2 run mini_tof tof_publisher --ros-args -p mcu_port:=/dev/ttyACM0 -p sensor_model:=TMF882X

Or launch a publisher node for the VL53L8CH sensor with:

ros2 run mini_tof tof_publisher --ros-args -p mcu_port:=/dev/ttyUSB0 -p sensor_model:=VL53L8CH -p num_zones:=16

Check that messages are getting published to the mini_tof_data topic with:

ros2 topic echo /mini_tof_data

Visualize the reported data in real time with:

ros2 run mini_tof tof_visualizer
Launch files

Like any ROS node, the publisher and visualizer can also be launched via launch files. An example launch file for the VL53L8CH sensor looks like:

from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
    return LaunchDescription([
        Node(
            package='mini_tof',
            name='tof_publisher',
            executable='tof_publisher',
            output='screen',
            parameters=[{
                'mcu_port': '/dev/ttyUSB0',
                'sensor_model': 'VL53L8CH',
                'num_zones': 16
            }]
        ),
        Node(
            package='mini_tof',
            name='tof_visualizer',
            executable='tof_visualizer',
            output='screen'
        ),
    ])

Troubleshooting

If you run into any problems, please open an issue (opens in a new tab) on this repository and an author will help you out.

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