Skip to content

AIS-Bonn/nimbro_utils

Repository files navigation

NimbRo Utilities

A diverse collection of ROS2 and robotics-related utilities designed for the ROS2 Jazzy distribution.

Overview

Python Utilities

Features provided with all utilities include:

  • Detailed docstrings throughout.
  • Jupyter Notebooks with examples for easy prototyping.
  • Extensive logging with options to attach and configure custom loggers.
  • Assertions for checking the types and values of function arguments.
  • Flexible input handling (e.g., images can be passed as path, URL, NumPy, or ROS2 message).
  • Robust handling of failure cases (e.g. by employing timeouts, or returning success flags and logs).
  • Minimal dependencies and fallbacks to standard library if faster modules are unavailable.

Categories

Utilities are organized into the following categories:

  • Color (.py/.ipynb): Common color palettes and format conversions.
  • Geometry (.py/.ipynb): Conversions between rotation formalisms and related ROS2 messages.
  • Image (.py/.ipynb): Standard image handling (read, save, download, convert, resize) and visualization.
  • Misc. (.py/.ipynb): General utilities including JSON I/O, assertions, and timestamp conversions.
  • Node (.py/.ipynb): Tools for ROS2 node instantiation, spinning, context management, and executors.
  • String (.py/.ipynb): String normalization, analysis, and JSON extraction.

Node Extensions

Node extensions are classes that augment ROS2 nodes with specific functionalities, abstracting away underlying ROS2 interface complexities (managing and using interfaces, logging, etc.):

  • DepthConverter (.py/.ipynb): Projects depth images to pointclouds, supporting various camera models.
  • Logger (.py/.ipynb): Wraps RcutilsLogger with easier configuration and severity/prefix coupling.
  • ParameterHandler (.py/.ipynb): Handles node parameters, including declaration, validation, and updates.
  • SensorInterface (.py/.ipynb): Manages sensor subscriptions and allows synchronized data retrieval.
  • TfOracle (.py/.ipynb): Provides methods for tf2 queries, transformations, and interpolations.

Import Mechanisms

For convenience, a central import mechanism is provided:

  • To import all available utilities:
    from nimbro_utils import *
  • To selectively import utilities and minimize dependencies:
    from nimbro_utils.lazy import start_and_spin_node, stop_node

Nodes

A few utility nodes are provided for testing purposes:

  • DepthImageToPointcloud (.py): Publishes a pointcloud from a depth image and camera info.
  • TestImagePublisher (.py): Publishes a configurable test image.

To launch these node:

ros2 run nimbro_utils <node_name>

Citation

If you utilize this package in your research, please cite one of our relevant publications.

  • Leveraging Vision-Language Models for Open-Vocabulary Instance Segmentation and Tracking
    [arXiv:2503.16538]

    @article{paetzold25vlmgist,
        author={Bastian P{\"a}tzold and Jan Nogga and Sven Behnke},
        title={Leveraging Vision-Language Models for Open-Vocabulary Instance Segmentation and Tracking},
        journal={IEEE Robotics and Automation Letters (RA-L)},
        volume={10},
        number={11},
        pages={11578-11585},
        year={2025}
    }
  • A Comparison of Prompt Engineering Techniques for Task Planning and Execution in Service Robotics
    [arXiv:2410.22997]

    @article{bode24prompt,
        author={Jonas Bode and Bastian P{\"a}tzold and Raphael Memmesheimer and Sven Behnke},
        title={A Comparison of Prompt Engineering Techniques for Task Planning and Execution in Service Robotics},
        journal={IEEE-RAS International Conference on Humanoid Robots (Humanoids)},
        pages={309-314},
        year={2024}
    }
  • RoboCup@Home 2024 OPL Winner NimbRo: Anthropomorphic Service Robots using Foundation Models for Perception and Planning
    [arXiv:2412.14989]

    @article{memmesheimer25robocup,
        author={Raphael Memmesheimer and Jan Nogga and Bastian P{\"a}tzold and Evgenii Kruzhkov and Simon Bultmann and Michael Schreiber and Jonas Bode and Bertan Karacora and Juhui Park and Alena Savinykh and Sven Behnke},
        title={{RoboCup@Home 2024 OPL Winner NimbRo}: Anthropomorphic Service Robots using Foundation Models for Perception and Planning},
        journal={RoboCup 2024: RoboCup World Cup XXVII},
        volume={15570},
        pages={515-527},
        year={2025}
    }

License

nimbro_utils is licensed under the BSD-3-Clause License.

Author

Bastian Pätzold paetzold@ais.uni-bonn.de

About

A diverse collection of ROS2 and robotics-related utilities.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published