ROS2 Nodes and Topics

ROS2 Nodes and Topics

Nodes

Nodes are the basic processing units in ROS that performs a specific task or function within a ROS 2 system. It is an executable computer programming file. Nodes can communicate with each other by sending and receiving messages through a middleware layer provided by ROS 2.


  • Nodes need not even be on the same physical computer, or robot.
  • Nodes receive data by subscribing to a topic
  • Nodes can make data available to other nodes by publishing to a topic
  • Nodes can provide or use a service.

A node may publish data to any number of topics and simultaneously have subscriptions to any number of topics.

Topics

Topics are best for unidirectional streaming. A request/response model is handled by a service. Fixed data is handled by a parameter server.

  • A topic is a communication bus over which nodes exchange messages.
  • It is a name for a data stream using Transmission Control Protocol (TCP) or User Datagram Protocol (UDP)
  • For example, “lidar” can be the topic to communicate its sensor data.
  • The data could be raw, or it could be pre-processed by the lidar ?sensor node.



Examples

A robot control node may have topics for sensor data, motor commands, and status updates.

A drone node may have topics for receiving sensor data such as GPS, IMU, and camera images. It may also have topics for publishing control commands such as velocity, position, and orientation.

A mobile robot node may have topics for receiving sensor data such as laser scans, camera images, and odometry. It may also have topics for publishing control commands such as velocity, position, and orientation.


要查看或添加评论,请登录

Vijay Kumar Jadon的更多文章

  • Curriculum Enrichment

    Curriculum Enrichment

    Enrichment describes activities which the institutions provide to extend students’ education beyond their main course…

  • Orientation Address

    Orientation Address

    Privledged to share the thoughts on engineering during the orientation of new batch of Mechanical, Civil, Electrical…

  • Faculty Responsibility and Evaluation

    Faculty Responsibility and Evaluation

    The professional responsibilities of a faculty are teaching, scholarly activity and service. All are important, but for…

社区洞察

其他会员也浏览了