roswtf的基本介绍
1.1检查你的安装
roswtf会尝试发现你的系统问题:
$ roscd
$ roswtf
你应该看到:
Stack: ros
========================================================= =======================
Static checks summary:
No errors or warnings
========================================================= =======================
Cannot communicate with master, ignoring graph checks
如果你你的安装正确英爱看到和上面类似的输出。
这些输出告诉你:"Stack: ros":你的当前目录是什么决定着roswtf会做什么。
这是告诉我们roswtf 从ros stack启动。
"Static checks summary":这是所有文件系统问题的报告。
它告诉我们这里没有错误。
"Cannot communicate with master, ignoring graph checks":roscore内核没有运行,所以roswtf不做任何在线检查。
1.2尝试在线运行
这里我们先运行roscore,激活Master:
再运行相同的序列:
$ roscd
$ roswtf
你应该看到:
Stack: ros
========================================================= =======================
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对你的graph进行了一些在线检查。
取决于有多少ROS nodes正在运行,这可能会花费很长时间才能完成。
正如你所见到的一样:产生了一个警告:
WARNING The following node subscriptions are unconnected: * /rosout:
* /rosout
roswtf警告说rosout node没有订阅了一个没有任何人发布的topic,这个警告是正常的,可以忽略,因为iexianzai没有东西在运行。
1.3错误roswtf会警告你系统中正常的东西看起来可疑。
也可能报告出它知道有错误的问题。
$ 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设置的错误
roswtf可以发现许多类型的错误。
如果你被一个编译或者通信难住了,可以试试这个命令看看它能否给你制定正确的方向。