roswtf
roswtf用于检查 ros的安装运行
通过以下方式检查roscore是否在运行
$ ps -ef | grep -i rosmaster
00:00:00 /usr/bin/python /opt/ros/kinetic/bin/rosmaster
安装检查
roswtf可以检查你的系统并尝试发现问题
会输出各种详细信息
$ roscd rosmaster
$ roswtf
Package: rosmaster
================================================================================
Static checks summary:
No errors or warnings
================================================================================
ROS Master does not appear to be running.
Online graph checks will not be run.
ROS_MASTER_URI is [http://localhost:11311]
Package: rosmaster:roswtf使用当前目录中的内容来确定其执行检查的内容,这个输出告诉我们是在rosmaster的目录中启动了roswtf
Static checks summary:它会报告任何关于文件系统或非运行时(比如无需roscore的场景)的问题。本例显示我们没有错误。
ROS Master does not appear to be running.:roscore未在运行。roswtf不会做任何ROS在线检查。
在线检查
$ roscd
$ roswtf
No package or stack in context
======================================================
Static checks summary:
No errors or warnings
======================================================
Beginning tests of your ROS graph. These may take awhile...
analyzing graph...
... done analyzing graph
running graph rules...
... done running graph rules
Online checks summary:
Found 1 warning(s).
Warnings are things that may be just fine, but are sometimes at fault
WARNING The following node subscriptions are unconnected:
* /rosout:
* /rosout
roscore已经运行,roswtf做了一些ROS图的在线检查。根据运行的ROS节点的数量,这可能需要很长时间才能完成。
这一次它产生了一个警告,roscd在没有参数的情况下运行,这可能会产生没有ROS包的目录文件
错误
$ roscd
$ ROS_PACKAGE_PATH=bad:$ROS_PACKAGE_PATH roswtf
Stack: ros
================================================================================
Static checks summary:
Found 1 error(s).
ERROR Not all paths in ROS_PACKAGE_PATH [bad] point to an existing directory:
* bad
================================================================================
Cannot communicate with master, ignoring graph checks
roswtf发现了一个有关ROS_PACKAGE_PATH设置的错误