This package contains a few different strategies for creating short nodes that display received messages.
The subscriber_old_school recipe creates a listener node very similar to how it would be done in ROS 1 using rospy.
The subscriber_lambda recipe shows how to embed the callback functions inside your main.
The subscriber_member_function recipe creates a class MinimalSubscriber that contains the callback, keeping the main simple.
Serie: ROS 2
Actualizado 2026-03-28
· 1 min de lectura
Minimal "subscriber" cookbook recipes
Artículos relacionados
ROS 2
Actualizado 2026-03-28
registerpackageresource<packagename <resourcetype CONTENT <content
packageresourceindexer ========================
Leer artículo →
ROS 2
Actualizado 2026-03-28
ament\cmake\google\benchmark
This package contains logic for invoking Google Benchmarkhttps://github.com/google/benchmarkreadme tests and is comprised of three main parts:
Leer artículo →
ROS 2
Actualizado 2026-03-28
usage
To use this package do the following things. add a test dependency to your packages.xml: <testdependamentcmakegtest</testdepend Write a gtest executable: Use include <gtest/gtest.h and standard gtest methods. Find packag
Leer artículo →
ROS 2
Actualizado 2026-03-28
amentcmakepython
This package adds functions for installing Python packages and modules in CMake.
Leer artículo →
ROS 2
Actualizado 2026-03-28
amentindexcpp Quality Declaration
This document is a declaration of software quality for the amentindexcpp package, based on the guidelines in REP2004https://www.ros.org/reps/rep2004.html.
Leer artículo →
ROS 2
Actualizado 2026-03-28
amentindexcpp
amentindexcpp is a C++ API to access the ament resource index.
Leer artículo →