参考网址:
1,准备工作
开始前,情确定roscore没运行。
roswtf检测系统 try和find 问题。
$ roscd %这个命令不能使用,我这里,我是之间cd到该路径的
$roswtf
得到运行结果:
Loaded plugin tf.tfwtf
Stack: ros
================================================================================
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]
这告诉我们:
"Stack: ros" :roswtf 检测不管在什么路径下,都可以检测,这个告诉我们在rosstack开始roswtf。
"Stack checks summary":这是一个关于任何文件系统报告。这个告诉我们没有错误。
“ROS
Master does not appear to berunning.。。。。
”roscore没有运行,roswtf不做任何online检测。
2,当online时
紧接着,我们运行master,所以运行roscore
然后,执行下面的命令:
$roscd
$roswtf
得到运行结果:
Loaded plugin tf.tfwtf
Stack: ros
================================================================================
Static checks summary:
No errors or warnings
================================================================================
Beginning tests of your ROS graph. These may takeawhile...
analyzing graph...
... done analyzing graph
running graph rules...
... done running graph rules
Online checks summary:
No errors or warnings
3,错误
roswtf将会警告在系统中看似怀疑但正常的,也会报告已经知道发生错误的错误。
比如,我们设置 ROS_PACKAGE_PATH一个错误值,并且关闭roscore,执行下面命令
$roscd
$ROS_PACKAGE_PATH=bad roswtf
我们得到如下结果:
Loaded plugin tf.tfwtf
Stack: ros
================================================================================
Static checks summary:
No errors or warnings
================================================================================
Beginning tests of your ROS graph. These may takeawhile...
analyzing graph...
... done analyzing graph
running graph rules...
... done running graph rules
Online checks summary:
No errors or warnings
这个给出我们报告:ROS_PACKAGE_PATH设置错误。roswtf也会找出其他类型错误,如果我们编译或者通讯发生故障的时候,我们可以采用roswtf来定位哪里出错。