ROS Command Line Tools

ROSarrow-up-right/CommandLineToolsarrow-up-right

Common user tools

rosbag

rosbagarrow-up-right is a command-line tool for performing various operations on ROS bag filesarrow-up-right, including playing, recording, and validating.

ros_readbagfile

See [ROS/Tutorials/reading msgs from a bag file](http://wiki.ros.org/ROS/Tutorials/reading msgs from a bag file) for help and a tutorial on how to use the 3rd-party ros_readbagfile command-line tool.

rosbash

rosbasharrow-up-right is not a command, but rather a suite of commands and functionality. It requires that you source the contents of the rosbash file

source $ROS_ROOT/tools/rosbash/rosbash

which, if you followed the installation guide, should already be done by your bashrc file.

rosbash provides the commands roscd and rosed, in addition to adding correct tab-completion functionality to roscd, rosed, rosmake, and rosrun.

roscd

roscd is part of the rosbasharrow-up-right suite. It allows you to cd directly to a package, stack, or common location by name rather than having to know the package path.

Usage:

Example:

roscd without an argument will take you $ROS_ROOT. In addition to your packages and stacks, there are some common locations, "log", and "test_results" which will take you directly to those locations.

For advanced users, you can extend roscd with your own keywords by modifying the $ROS_LOCATIONS environment variable to contain a colon-separated list of keys and locations that will be included in the roscd path. For example,

Prior to ROS-0.8, you could roscd to the first directory on your $ROS_PACKAGE_PATH using the pkg keyword. This functionality can be restored with:

rosclean

New in C Turtle

Cleanup filesystem resources (e.g. log files) created by ROS. See roscleanarrow-up-right.

roscore

roscorearrow-up-right runs the ROS Core Stack (Masterarrow-up-right, [Parameter Server](http://wiki.ros.org/Parameter Server), rosoutarrow-up-right, etc...).

rosdep

Documented at rosdeparrow-up-right, this installs system dependencies

Usage:

rosed

rosed is part of the rosbasharrow-up-right suite. It allows you to directly edit a file within a package by package name rather than having to know the package path.

Usage:

Example:

If the filename is not uniquely defined within the package, a menu will prompt you to choose which of the possible files you want to edit.

rosed will open the editor defined in your $EDITOR environmental variable, or else default to vim.

roscreate-pkg

roscreate-pkg creates common Manifestarrow-up-right, CMakeListsarrow-up-right, Doxygenarrow-up-right and other files necessary for a new ROS package. It is part of the roscreatearrow-up-right package.

roscreate-stack

roscreate-stack creates common [Stack Manifest](http://wiki.ros.org/Stack Manifest), CMakeListsarrow-up-right and other files necessary for a new ROS stack. It is part of the roscreatearrow-up-right package.

rosrun

rosrun allows you to run an executable in an arbitrary package without having to cd (or roscd) there first.

Usage:

Example:

roslaunch

roslauncharrow-up-right launches a set of nodes from an XML configuration file and includes support for launching on remote machines. More documentation is available on the roslaunch pagearrow-up-right.

roslocate

Removed in ROS 1.4: this is now part of the rosinstallarrow-up-right tool

roslocatearrow-up-right finds the repository that a ROS package is stored in, e.g. roslocate svn tf. It makes it easy to quickly checkout the source of a package: svn co roslocate svn tf``. More documentation is available on the roslocate pagearrow-up-right.

rosmake

See the rosmakearrow-up-right page.

rosmsg

rosmsgarrow-up-right displays Messagearrow-up-right data structure definitions. More documentation is available on the rosmsg pagearrow-up-right.

rosnode

rosnodearrow-up-right displays runtime node information and lets you ping nodes to check connectivity. More documentation is available on the rosnode pagearrow-up-right.

rospack

See the rospackarrow-up-right page.

rosparam

rosparamarrow-up-right enables getting and setting parameter server values from the command-line using YAML-encoded text.

rossrv

rossrvarrow-up-right displays Service srvarrow-up-right data structure definitions. More documentation is available on the rossrv pagearrow-up-right.

rosservice

rosservicearrow-up-right displays run-time information about Servicesarrow-up-right and also lets you print out messages being sent to a topic. More documentation is available on the rosservice pagearrow-up-right.

rosstack

See the rosstackarrow-up-right page.

rostopic

rostopicarrow-up-right displays run-time information about Topicsarrow-up-right and also lets you print out messages being sent to a topic. More documentation is available on the rostopic pagearrow-up-right.

rosversion

Graphical tools

The ROS graphical tools often require additional dependencies before they can be used, such as graphviz and Python GTK. You can use bash <(rosdep satisfy PACKAGE_NAME) to quickly install the dependencies for these tools.

rqt_bag

rqt_bagarrow-up-right is a graphical tool for viewing data in ROS bag filesarrow-up-right.

rqt_deps

rqt_depsarrow-up-right generates a PDF of ROS dependencies.

rqt_graph

rqt_graph displays an interactive graph of ROS nodes and topics. See the rosgrapharrow-up-right package for documentation.

如果工具未安装,可以使用以下命令安装:

在节点运行后,在命令行输入rqt_graphrosrun rqt_graph rqt_graph,即可看到表示各节点之间关系的网络拓扑图。

image-20220705185125331

rqt_plot

rqt_plotarrow-up-right plots numerical data on a ROS topic over time.

Less-used tools

The following tools may be commonly used by internal tools, but aren't often used by end users.

gendeps

See the roslibarrow-up-right page

Last updated