roswtf will examine your ROS setup, such as your environment variables, and look for configuration issues. If you have a ROS system online, it will look at it and check for any potential issues.
$ roscd rosmaster $ roswtf 输出如下: Package: rosmaster //说明roswtf是在rosmaster包目录下启动的 ================================================================================ Static checks summary: //this is a report on any filesystem or any non-runtime (i.e. no roscore required to run) issues. 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]
$ roscd $ roswtf //没在任何一个package目录内启动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 //roswtf is warning you that the rosout node is subscribed to a topic that no one is publishing to. WARNING The following node subscriptions are unconnected: * /rosout: * /rosout
$ 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