1 节点
节点的理解
每个节点都可以通过 topic,service,action,param 向其他节点发送和接受数据。
常用命令
ros2 node list
ros2 node info
输入rqt 直接回车可以看到当前ROS系统中的节点关系图,还可以参看很多节点相关信息
2 主题
ros2 topic bw 主题名
ros2 topic bw Display bandwidth used by topic
ros2 topic delay Display delay of topic from timestamp in header
ros2 topic echo Output messages from a topic
ros2 topic hz Print the average publishing rate to screen
ros2 topic info Print information about a topic
ros2 topic list Output a list of available topics
ros2 topic pub Publish a message to a topic
小乌龟控制demo
安装:sudo apt install ros-dashing-turtlesim
ros2 run turtlesim turtlesim_node
ros2 run turtlesim turtle_teleop_key
自带 demo运行
ros2 run demo_nodes_cpp talker
ros2 run demo_nodes_cpp listener
来源:CSDN
作者:wangwang的博客
链接:https://blog.csdn.net/weixin_37532614/article/details/104719249