当前位置:网站首页>[ROS] (05) ROS Communication - Node, Nodes & Master
[ROS] (05) ROS Communication - Node, Nodes & Master
2022-08-02 14:19:00 【CynalFly】
The article is just a study note in the personal learning process, the main reference is ROS tutorial1a>.
1. Concepts
Nodes: A node is an executable file that can communicate with other nodes through ROS.
Node Manager (Master): ROS's naming service, eg to help nodes discover each other.
2, Nodes
A node (Node) is actually just an executable file in the ROS package (executable file generated by C++ compilation, python script), and the executable file becomes a process after running,This process is called node in ROS..ROS nodes use the ROS client library to communicate with other nodes.Nodes can publish or subscribe to topics, and can also provide or consume services.A ROS control system includes many nodes, such as unmanned vehicles, one node (Node) controls the wheel motor of the unmanned vehicle, one node (Node) obtains positioning information through inertial navigation, one node (Node) obtains image information through the camera, and one node (Node) obtains image information through the camera.Node (Node) integrates various information to execute path planning and so on.
ROS client libraries allow nodes written in different languages to communicate with each other:
- roscpp=C++ client
- rospy=python client
3, Master
The robot is a systematic implementation with many components, huge functions and high complexity.In practical applications, the robot may integrate various sensors such as lidar, inertial navigation, millimeter-wave radar, camera, GPS, and motion control devices to be responsible for functions such as perception, control, decision-making, and calculation. Each function point is aIndividual Nodes.So how to manage, allocate and control these nodes?This uses the ROS Master, which provides naming and registration services for the rest of the nodes in the ROS system.The role of the Master is to enable each ROS node (Nodes) to locate each other, and then to carry out point-to-point communication.
4, rosnode
rosnode is a command line tool for displaying information about ROS nodes.The commands are:
| Command | Features |
|---|---|
| rosnode ping | Test the connection to the node |
| rosnode list | List active nodes |
| rosnode info | Print information about the node |
| rosnode machine | List nodes on the specified device |
| rosnode kill | kill a running node |
| rosnode cleanup | Clear unconnectable nodes |
When using ctrl+C to stop the node, the node is not completely cleared, you can use
rosnode cleanupto clear the node.
5. Example test
#Step 1: (ROS primary operation) Run the roscore command to start the master, which is responsible for ros node registration, parameter server, topic communication management, etc.
#Step 2: Runrosnode related commands.
/rosoutThis node is used to collect and log debug output from the node, which is always running.
ROS.otg. ROS Tutorial[EB/OL]. 2020-12-22[2022-7-5].
http://wiki.ros.org/en/ROS/Tutorials. ︎
边栏推荐
猜你喜欢

logback源码阅读(一)获取ILoggerFactory、Logger

paddleocr window10初体验

Configure zabbix auto-discovery and auto-registration.

微信小程序-最近动态滚动实现

Deep learning framework pytorch rapid development and actual combat chapter4

第五单元 保持状态

Object detection scene SSD-Mobilenetv1-FPN

专访|带着问题去学习,Apache DolphinScheduler 王福政

The world's largest Apache open source foundation is how it works?

shell脚本“画画”
随机推荐
第八单元 中间件
AWVS工具介绍[通俗易懂]
第十四单元 视图集及路由
chapter6可视化(不想看版)
Unit 3 view layer
8581 线性链表逆置
jwt(json web token)
【VCU】详解S19文件(S-record)
Swagger 的使用
第七单元 ORM表关系及操作
Raft协议图解,缺陷以及优化
关于市场后市的发展预测? 2021-05-23
drf序列化器-Serializer
Flask项目的完整创建 七牛云与容联云
Chapter6 visualization (don't want to see the version)
paddleocr window10 first experience
How to solve mysql service cannot start 1069
深度学习框架pytorch快速开发与实战chapter4
Sentinel源码(四)(滑动窗口流量统计)
How to solve 1045 cannot log in to mysql server