Home » ROS2入门教程 » ROS2入门教程-ros2doctor简介

ROS2入门教程-ros2doctor简介

ROS2入门教程-ros2doctor简介

说明:

  • 介绍ros2 ros2doctor

概念:

  • 当ROS 2安装程序未按预期运行时,可以使用ros2doctor工具检查其设置。
  • ros2doctor检查ROS 2的所有方面,包括平台,版本,网络,环境,正在运行的系统等,并警告您可能的错误和问题原因。

使用:

  • 执行命令
$ ros2 doctor
/opt/ros/foxy/lib/python3.8/site-packages/ros2doctor/api/package.py: 112: UserWarning: cv_bridge has been updated to a new version. local: 2.2.0 < required: 2.2.1
/opt/ros/foxy/lib/python3.8/site-packages/ros2doctor/api/package.py: 119: UserWarning: Cannot find required versions of packages: turtlebot3_simulations turtlebot3_gazebo turtlebot3 turtlebot3_teleop turtlebot3_bringup [...] Use `ros2 doctor --report` to see full list.
/opt/ros/foxy/lib/python3.8/site-packages/ros2doctor/api/topic.py: 53: UserWarning: Publisher without subscriber detected on /turtle1/color_sensor.
/opt/ros/foxy/lib/python3.8/site-packages/ros2doctor/api/topic.py: 53: UserWarning: Publisher without subscriber detected on /turtle1/pose.

All 4 checks passed
  • 检测通过会有 All (N) checks passed这一行

  • 生产检测报告

ros2 doctor --report
  • 包含如下的内容:
  NETWORK CONFIGURATION
inet         : 192.168.0.102
inet4        : ['192.168.0.102']
ether        : 1c:69:7a:61:92:df
inet6        : ['fe80::79a9:5fed:b280:5b85']
netmask      : 255.255.255.0
device       : eno1
flags        : 4163<UP,BROADCAST,RUNNING,MULTICAST>
mtu          : 1500
broadcast    : 192.168.0.255
inet         : 127.0.0.1
......................

  PACKAGE VERSIONS
turtlebot3_simulations                    : required=, local=2.1.0
turtlebot3_gazebo                         : required=, local=2.1.0
turtlebot3                                : required=, local=2.1.0
turtlebot3_teleop                         : required=, local=2.1.0
turtlebot3_bringup                        : required=, local=2.1
......................

  PLATFORM INFORMATION
system           : Linux
platform info    : Linux-5.4.0-40-generic-x86_64-with-glibc2.29
release          : 5.4.0-40-generic
processor        : x86_64

   RMW MIDDLEWARE
middleware name    : rmw_fastrtps_cpp

   ROS 2 INFORMATION
distribution name      : foxy
distribution type      : ros2
distribution status    : active
release platforms      : {'ubuntu': ['focal']}

  TOPIC LIST
topic               : /turtle1/cmd_vel
publisher count     : 1
subscriber count    : 1
topic               : /turtle1/color_sensor
publisher count     : 1
subscriber count    : 0
topic               : /turtle1/pose
publisher count     : 1
subscriber count    : 0
topic               : /turtle1/rotate_absolute/_action/feedback
publisher count     : 1
subscriber count    : 1
topic               : /turtle1/rotate_absolute/_action/status
publisher count     : 1
subscriber count    : 1
                    

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: ros2入门教程