ROS Learning
  • 简介
  • Related Links
  • ROS Overview
  • ROS Env Configuration
    • Kinetic Installation
    • Noetic Installation
    • IDE & Tools Configuration
  • My Notes
    • Getting Start
    • ROS Concepts
      • ROS Topic 理论模型
      • ROS Service 理论模型
    • ROS Tutorials
      • ROS 文件系统 & 命令行工具
      • ROS Topic 通信简单示例
      • ROS Service 通信简单示例
      • ROS 参数服务器
      • ROS 分布式通信
    • Rotors Simulator
      • RotorS Simulator Installation
      • RotorS with virtual joystick
      • Rotors Simulator Usage
      • RotorS 分布式通信综合案例
  • ROS Official Docs
    • ROS Official Tutorials
      • Beginner Level
        • Installing and Configuring Your ROS Environment
        • Navigating the ROS Filesystem
        • Creating a ROS Package
        • Building a ROS Package
        • Understanding ROS Nodes
        • Understanding ROS Topics
        • Understanding ROS Services and Parameters
    • ROS Concepts
    • ROS Command Line Tools
  • ROS 2
    • Action
Powered by GitBook
On this page
  • Common user tools
  • rosbag
  • ros_readbagfile
  • rosbash
  • roscd
  • rosclean
  • roscore
  • rosdep
  • rosed
  • roscreate-pkg
  • roscreate-stack
  • rosrun
  • roslaunch
  • roslocate
  • rosmake
  • rosmsg
  • rosnode
  • rospack
  • rosparam
  • rossrv
  • rosservice
  • rosstack
  • rostopic
  • rosversion
  • Graphical tools
  • rqt_bag
  • rqt_deps
  • rqt_graph
  • rqt_plot
  • Less-used tools
  • gendeps
  1. ROS Official Docs

ROS Command Line Tools

PreviousROS ConceptsNextAction

Last updated 2 years ago

Common user tools

rosbag

is a command-line tool for performing various operations on ROS , 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

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 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:

roscd locationname[/subdir]

Example:

roscd roscpp/include

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,

export $ROS_LOCATIONS="rospkg=/path/to/rospkg:stairpkg=/path/to/stairpkg"

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:

export $ROS_LOCATIONS="pkg=$ROS_PACKAGE_PATH"

rosclean

New in C Turtle

roscore

rosdep

Usage:

rosdep install PACKAGE_NAME

rosed

Usage:

rosed packagename filename

Example:

rosed roscpp ros.h

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-stack

rosrun

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

Usage:

rosrun package executable

Example:

rosrun roscpp_tutorials talker

roslaunch

roslocate

rosmake

rosmsg

rosnode

rospack

rosparam

rossrv

rosservice

rosstack

rostopic

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_deps

rqt_graph

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

# <distro>替换为对应的ROS版本,如:kinetic
$ sudo apt install ros-<distro>-rqt
$ sudo apt install ros-<distro>-rqt-common-plugins

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

$ rqt_graph
# 或者
$ rosrun rqt_graph rqt_graph

rqt_plot

Less-used tools

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

gendeps

Cleanup filesystem resources (e.g. log files) created by ROS. See .

runs the ROS Core Stack (, [Parameter Server](http://wiki.ros.org/Parameter Server), , etc...).

Documented at , this installs system dependencies

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

roscreate-pkg creates common , , and other files necessary for a new ROS package. It is part of the package.

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

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

Removed in ROS 1.4: this is now part of the tool

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 .

See the page.

displays data structure definitions. More documentation is available on the .

displays runtime node information and lets you ping nodes to check connectivity. More documentation is available on the .

See the page.

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

displays Service data structure definitions. More documentation is available on the .

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

See the page.

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

is a graphical tool for viewing data in ROS .

generates a PDF of ROS dependencies.

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

plots numerical data on a ROS topic over time.

See the page

ROS
/CommandLineTools
rosbag
bag files
rosbash
rosbash
rosclean
roscore
Master
rosout
rosdep
rosbash
Manifest
CMakeLists
Doxygen
roscreate
CMakeLists
roscreate
roslaunch
roslaunch page
rosinstall
roslocate
roslocate page
rosmake
rosmsg
Message
rosmsg page
rosnode
rosnode page
rospack
rosparam
rossrv
srv
rossrv page
rosservice
Services
rosservice page
rosstack
rostopic
Topics
rostopic page
rqt_bag
bag files
rqt_deps
rosgraph
rqt_plot
roslib
image-20220705185125331