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.
시리즈: ROS 2
업데이트 2026-03-28
· 1 분 소요
Minimal "subscriber" cookbook recipes
이 페이지의 원문은 다른 언어로 작성되었습니다.
한국어로 자동 번역 →
관련 글
ROS 2
EN
업데이트 2026-03-28
resource index
package_resource_indexer ========================
글 읽기 →
ROS 2
EN
업데이트 2026-03-28
ament_cmake_google_benchmark
This package contains logic for invoking Google Benchmark tests and is comprised of three main parts
글 읽기 →
ROS 2
EN
업데이트 2026-03-28
usage
To use this package do the following things. add a test dependency to your packages.xml: <test_depend>ament_cmake_gtest</test_depend> Write a gtest executable: Use #include <gtest/gtest.h> and standard gtest methods. Fin
글 읽기 →
ROS 2
EN
업데이트 2026-03-28
ament_cmake_python
This package adds functions for installing Python packages and modules in CMake.
글 읽기 →
ROS 2
EN
업데이트 2026-03-28
ament_index_cpp Quality Declaration
This document is a declaration of software quality for the ament_index_cpp package, based on the guidelines in REP-2004.
글 읽기 →
ROS 2
EN
업데이트 2026-03-28
ament_index_cpp
ament_index_cpp is a C++ API to access the ament resource index.
글 읽기 →