ROS学习笔记(十六)- roswtf工具

roswtf工具的基本介绍

1 检查你的安装

roswft可以检查你的系统是不是有什么错误:

$ roscd
$ roswtf

你会看到如下信息:

Stack: ros
======================================================
Static checks summary:

No errors or warnings
======================================================

Cannot communicate with master, ignoring graph checks

如果你的安装是正确的,你就会看到类似上面的东西:
-“Stack:ros”:rosetf从你当前的目录来决定你想让它检查什么东西。这一句就是告诉你,它是从ros stack启动的。
-“Static checks summary”:静态检查总结。这是一个文件系统问题报告,它告诉我们这里不存在任何error。
-“Cannot communicate with master, ignoring graph checks”:这个是说肉score没有运行,所以没有进行在线检查。
我的运行出来是这样的:

Loaded plugin tf.tfwtf
No package or stack in context
================================================================================
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]

2 尝试在线检查

首先启动ROS:
roscore
打开一个新窗口,重复刚才的步骤:

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

我的显示的是下面这样的:

Loaded plugin tf.tfwtf
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

roswtf在你rosscore运行的情况下做了一些在线检测,它要运行多长时间才能完成取决于你运行了多少ROS node,它有时候是可以花费很长很长时间的。在这次检查中,它提示了一个warning:

WARNING The following node subscriptions are unconnected:
 * /rosout:
   * /rosout

这个是提示我们rosout订阅了一个根本没有人发布东西的topic。这是因为现在还没有别的东西在运行,我们可以忽略这个warning。

3 Errors

roswtf会警告你那些看起来可疑但是可能在你的系统里是正常的东西。它还会把它知道是错误的东西通过error报告给你。
这部分,我们会把 ROS_PACKAGE_PATH设置成一个错误的值,我们还要关掉roscore,这样能使检查结果精简一点。
然后输入:

$ 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 设置的error提示。它还可以检查出许多别的错误,如果你被编译或者通讯的问题困扰住了,可以试一下它能不能指出问题在哪里。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 错误:1000 SQLSTATE: HY000 (ER_HASHCHK)消息:hashchk 错误:1001 SQ...
    灼灼2015阅读 23,677评论 0 6
  • error code(错误代码)=2000是无效的像素格式。error code(错误代码)=2001是指定的驱动...
    Heikki_阅读 1,874评论 0 4
  • 创建一个ROS Package 这个教程包括使用roscreate-pkg或者catkin去创建一个新的packa...
    铁熊玩创客阅读 5,006评论 0 7
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,991评论 19 139
  • 下周要到长沙, 现在就在车上。 离开家中宝宝, 实属无奈之举。 托管武术钢琴, 考试比赛作业, 鼻涕咳嗽感冒, 降...
    奔跑的马齿苋阅读 146评论 0 0