节点之间通过ROS1消息进行通信,当然这还需要网络层。
ROS1会创建一个连接到所有进程的网络。在系统中的任何节点都可以访问此网络,并通过该网络与其他节点交互,获取其他节点发布的信息,并将自身数据发布到网络上。
ROS2使用DDS。
在这一层级中最基本的概念包括节点、节点管理器、参数服务器、消息、服务、主题和消息记录包,这些概念都以不同的方式向计算图级提供数据:
rosnode is a command-line tool for printing information about ROS Nodes.
Commands:
rosnode ping test connectivity to node
rosnode list list active nodes
rosnode info print information about node
rosnode machine list nodes running on a particular machine or list machines
rosnode kill kill a running node
rosnode cleanup purge registration information of unreachable nodes
Type rosnode <command> -h for more detailed usage, e.g. 'rosnode ping -h'
roscore
Usage: roscore [options]
roscore will start up a ROS Master, a ROS Parameter Server and a rosout
logging node
Options:
-h, --help show this help message and exit
-p PORT, --port=PORT master port. Only valid if master is launched
-v verbose printing
-w NUM_WORKERS, --numworkers=NUM_WORKERS
override number of worker threads
-t TIMEOUT, --timeout=TIMEOUT
override the socket connection timeout (in seconds).
See http://www.ros.org/wiki/roscore
rospara
rosparam is a command-line tool for getting, setting, and deleting parameters from the ROS Parameter Server.
Commands:
rosparam set set parameter
rosparam get get parameter
rosparam load load parameters from file
rosparam dump dump parameters to file
rosparam delete delete parameter
rosparam list list parameter names
rosmsg
rosparam is a command-line tool for getting, setting, and deleting parameters from the ROS Parameter Server.
Commands:
rosparam set set parameter
rosparam get get parameter
rosparam load load parameters from file
rosparam dump dump parameters to file
rosparam delete delete parameter
rosparam list list parameter names
rostopic
rostopic is a command-line tool for printing information about ROS Topics.
Commands:
rostopic bw display bandwidth used by topic
rostopic delay display delay of topic from timestamp in header
rostopic echo print messages to screen
rostopic find find topics by type
rostopic hz display publishing rate of topic
rostopic info print information about active topic
rostopic list list active topics
rostopic pub publish data to topic
rostopic type print topic or field type
Type rostopic <command> -h for more detailed usage, e.g. 'rostopic echo -h'
rosservie
Commands:
rosservice args print service arguments
rosservice call call the service with the provided args
rosservice find find services by service type
rosservice info print information about service
rosservice list list active services
rosservice type print service type
rosservice uri print service ROSRPC uri
Type rosservice <command> -h for more detailed usage, e.g. 'rosservice call -h'
rosbag
Usage: rosbag <subcommand> [options] [args]
A bag is a file format in ROS for storing ROS message data. The rosbag command can record, replay and manipulate bags.
Available subcommands:
check Determine whether a bag is playable in the current system, or if it can be migrated.
compress Compress one or more bag files.
decompress Decompress one or more bag files.
filter Filter the contents of the bag.
fix Repair the messages in a bag file so that it can be played in the current system.
help
info Summarize the contents of one or more bag files.
play Play back the contents of one or more bag files in a time-synchronized fashion.
record Record a bag file with the contents of specified topics.
reindex Reindexes one or more bag files.
For additional information, see http://wiki.ros.org/rosbag
在下图中可以看到计算图级的图形化表示(节点状态图)。它表示了真实机器人在真实条件下系统的工作状态。在图中,可以看到节点和主题,以及哪些节点订阅哪些主题等。此节点状态图中并没有消息、消息记录包、参数服务器和服务。这些内容需要使用其他工具进行图形化展示。用于创建该图表的工具是rqt_graph,在后续课程中学习到更多的相关知识。
这些概念在ros-comm库中实现。
导航案例:
图形化展示节点信息流工具: