Main Content

发布ers and Subscribers

Create, send, and receive messages, topics, and network information

ROS shares information usingmessages。Messages are a simple data structure for sharing data. To receive or subscribe to a message, userossubscriber。To send or publish a message userospublisher。看Exchange Data with ROS Publishers and Subscribersfor more information on sending messages.

Functions

expand all

rosmessage Create ROS messages
rosmsg Retrieve information about ROS messages and message types
rosShowDetails Display all ROS message contents
rostopic 检索有关ROS主题的信息
rospublisher 发布message on a topic
rossubscriber Subscribe to messages on a topic
receive Wait for new ROS message
send 发布ROS message to topic
rosrate Execute loop at fixed frequency
ros2message Create ROS 2 message structures
ros2 Retrieve information about ROS 2 network
rosShowDetails Display all ROS message contents
ROS2Publisher 发布messages on a topic
send 发布ROS 2 message to topic
ros2subscriber Subscribe to messages on a topic
receive 等待新消息
ros2message Create ROS 2 message structures

Blocks

expand all

Blank Message 使用指定消息类型创建空白消息
Blank Message Create blank ROS 2 message using specified message type
Current Time Retrieve current ROS time or system time
发布 Send messages to ROS network
Subscribe Receive messages from ROS network
Blank Message Create blank ROS 2 message using specified message type
发布 Send messages to ROS 2 network
Subscribe Receive messages from ROS 2 network

Topics

ROS

ROS 2