Skip to content

Software

libhri

By ROS4HRI, from github.com/ros4hri/libhri (opens in a new tab)

  • Perception
  • Library
  • Apache-2.0

A helper library for the ROS4HRI framework that makes it easier to read a robot's perception of nearby humans, in C++ and Python.

Facts

GitHub stars
6read on 28 Nov 2026
Last update
25 Aug 2026Newest commit on humble-devel
Maintenance
Maintaineda commit in the last 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 3687094 (opens in a new tab), on 16 Oct 2026.

Commercial use
Yes

At a glance

What it is
  • Wraps ROS4HRI human perception topics behind a simpler API.
  • Provides the hri C++ package and the pyhri Python package, which wraps the C++ one with Pybind11.
  • HRIListener is the main entry point for using the library.
  • Python documentation is available through help() after importing hri.
  • Includes an example program in both C++ and Python.
  • This repository covers ROS 2 only; ROS 1 support lives on another branch.

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
Maintained, last commit on 25 Aug 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 3687094

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 ROS4HRI, at commit 3687094, under Apache-2.0 (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

ROS4HRI helper library

A wrapper library for the ROS4HRI (opens in a new tab) framework, significantly easing accessing the robot's perceptions of surrounding humans.

It contains two packages:

  • hri: the C++ implementation package
  • pyhri: the Python implementation package, wrapping the C++ one with Pybind11

Note: this branch only contains ROS 2 support. For ROS 1, check the main branch. Note: this repository only contains pyhri ROS 2 support. For ROS 1, check the pyhri repository.

Documentation

For the pyhri documentation, first import hri, then use help(hri.<class>).

The main entry point for using the library is the HRIListener class.

Example

For an example of usage, you can check the example:

They are installed by default and can be tested by executing:

  • In a separate terminal:
    1. apt install ros-humble-usb-cam
    2. ros2 run usb_cam usb_cam_node_exe
  • In a separate terminal:
    1. install hri-face-detect (opens in a new tab)
    2. ros2 launch hri_face_detect face_detect.launch.py
  • In a separate terminal, either:
    • C++: ros2 run hri hri_example or
    • Python: ros2 run hri pyhri_example

Note that the Python implementation actually spawns two nodes.

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