ROS Indigo Cheatsheet Introspection and Command Tools rosparam
rosnode A tool for getting and setting ROS parameters on the
Filesystem Management Tools parameter server using YAML-encoded files. Displays debugging information about ROS nodes, including Commands: rospack A tool for inspecting packages. publications, subscriptions and connections. rosparam set Set a parameter. rospack profile Fixes path and pluginlib problems. Commands: rosparam get Get a parameter. roscd Change directory to a package. rosnode ping Test connectivity to node. rosparam load Load parameters from a file. rospd/rosd Pushd equivalent for ROS. rosnode list List active nodes. rosparam dump Dump parameters to a file. rosls Lists package or stack information. rosnode info Print information about a node. rosparam delete Delete a parameter. rosed Open requested ROS file in a text editor. rosnode machine List nodes running on a machine. rosparam list List parameter names. roscp Copy a file from one place to another. rosnode kill Kill a running node. rosdep Installs package system dependencies. Examples: Examples: List all the parameters in a namespace: roswtf Displays a errors and warnings about a Kill all nodes: $ rosparam list /namespace running ROS system or launch file. $ rosnode kill -a Setting a list with one as a string, integer, and float: catkin create pkg Creates a new ROS stack. List nodes on a machine: $ rosparam set /foo "[’1’, 1, 1.0]" wstool Manage many repos in workspace. $ rosnode machine aqy.local Dump only the parameters in a specific namespace to file: catkin make Builds a ROS catkin workspace. Ping all nodes: $ rosparam dump dump.yaml /namespace rqt dep Displays package structure and depen- $ rosnode ping --all dencies. rosmsg/rossrv Usage: rostopic Displays Message/Service (msg/srv) data structure definitions. $ rospack find [package] A tool for displaying information about ROS topics, including Commands: $ roscd [package[/subdir]] publishers, subscribers, publishing rate, and messages. rosmsg show Display the fields in the msg/srv. $ rospd [package[/subdir] | +N | -N] Commands: rosmsg list Display names of all msg/srv. rostopic bw Display bandwidth used by topic. rosmsg md5 Display the msg/srv md5 sum. $ rosd rostopic echo Print messages to screen. rosmsg package List all the msg/srv in a package. $ rosls [package[/subdir]] rostopic find Find topics by type. rosmsg packages List all packages containing the msg/srv. $ rosed [package] [file] rostopic hz Display publishing rate of topic. Examples: $ roscp [package] [file] [destination] rostopic info Print information about an active topic. Display the Pose msg: $ rosdep install [package] rostopic list List all published topics. $ rosmsg show Pose $ roswtf or roswtf [file] rostopic pub Publish data to topic. List the messages in the nav msgs package: $ catkin create pkg [package name] [depend1]..[dependN] rostopic type Print topic type. $ rosmsg package nav msgs $ wstool [init | set | update] $ catkin make Examples: List the packages using sensor msgs/CameraInfo: $ rqt dep [options] Publish hello at 10 Hz: $ rosmsg packages sensor msgs/CameraInfo $ rostopic pub -r 10 /topic name std msgs/String hello Start-up and Process Launch Tools Clear the screen after each message is published: Logging Tools roscore $ rostopic echo -c /topic name rosbag The basis nodes and programs for ROS-based systems. A Display messages that match a given Python expression: A set of tools for recording and playing back of ROS topics. roscore must be running for ROS nodes to communicate. $ rostopic echo --filter "m.data==’foo’" /topic name Commands: Usage: Pipe the output of rostopic to rosmsg to view the msg type: rosbag record Record a bag file with specified topics. $ roscore $ rostopic type /topic name | rosmsg show rosbag play Play content of one or more bag files. rosrun rosservice rosbag compress Compress one or more bag files. Runs a ROS package’s executable with minimal typing. rosbag decompress Decompress one or more bag files. A tool for listing and querying ROS services. rosbag filter Filter the contents of the bag. Usage: Commands: rosservice list Print information about active services. Examples: $ rosrun package name executable name Example (runs turtlesim): rosservice node Print name of node providing a service. Record select topics: rosservice call Call the service with the given args. $ rosbag record topic1 topic2 $ rosrun turtlesim turtlesim node Replay all messages without waiting: rosservice args List the arguments of a service. rosservice type Print the service type. $ rosbag play -a demo log.bag roslaunch rosservice uri Print the service ROSRPC uri. Replay several bag files at once: Starts a roscore (if needed), local nodes, remote nodes via rosservice find Find services by service type. $ rosbag play demo1.bag demo2.bag SSH, and sets parameter server parameters. Examples: tf echo Examples: Call a service from the command-line: A tool that prints the information about a particular Launch a file in a package: $ rosservice call /add two ints 1 2 transformation between a source frame and a target frame. $ roslaunch package name file name.launch Pipe the output of rosservice to rossrv to view the srv type: Usage: Launch on a different port: $ rosservice type add two ints | rossrv show $ rosrun tf tf echo <source frame> <target frame> $ roslaunch -p 1234 package name file name.launch Display all services of a particular type: Examples: Launch on the local nodes: $ rosservice find rospy tutorials/AddTwoInts To echo the transform between /map and /odom: $ roslaunch --local package name file name.launch $ rosrun tf tf echo /map /odom rqt graph, and rqt dep Logging Tools Checkout an existing ROS package Tools for displaying graphs of running ROS nodes with rqt console connecting topics and package dependancies respectively. Get a local copy of the code for an existing package and keep A tool to display and filtering messages published on rosout. it up to date using wstool. Examples: $ cd ~/catkin ws/src $ wstool init $ wstool set tut --git git://github.com/ros/ros tutorials.git Usage: $ wstool update Usage: $ rqt console $ rqt graph Create a new catkin ROS package $ rqt dep rqt bag Create a new ROS catkin package in an existing workspace A tool for visualizing, inspecting, and replaying bag files. Development Environments with catkin create package. Usage: rqt shell, and rqt py console $ catkin create pkg <package name> [depend1] [depend2] Two tools for accessing an xterm shell and python console Example: respectively. $ cd ~/catkin ws/src Usage: $ catkin create pkg tutorials std msgs rospy roscpp $ rqt Usage, viewing: Plugin Menu->Miscellaneous Tools->Shell Build all packages in a workspace $ rqt bag bag file.bag Plugin Menu->Miscellaneous Tools->Python Console Use catkin make to build all the packages in the workspace Usage, bagging: $ rqt bag *press the big red record button.* Data Visualization Tools and then source the setup.bash to add the workspace to the ROS PACKAGE PATH. rqt logger level view frames Examples: A tool for visualizing the full tree of coordinate transforms. $ cd ~/catkin ws Change the logger level of ROS nodes. This will increase or Usage: decrease the information they log to the screen and rqt console. $ ~/catkin make $ rosrun tf2 tools view frames.py $ source devel/setup.bash Usage: $ evince frames.pdf viewing $ rqt logger level rqt plot CMakeLists.txt Introspection & Command Tools A tool for plotting data from ROS topic fields. Your CMakeLists.txt file MUST follow this format otherwise rqt topic your packages will not build correctly. cmake minimum required() Specify the name of the package A tool for viewing published topics in real time. project() Project name which can refer as ${PROJECT NAME} Usage: find package() Find other packages needed for build $ rqt catkin package() Specify package build info export Plugin Menu->Topic->Topic Monitor Examples: rqt msg, rqt srv, and rqt action Build Executables and Libraries: To graph the data in different plots: Use CMake function to build executable and library targets. A tool for viewing available msgs, srvs, and actions. $ rqt plot /topic1/field1 /topic2/field2 These macro should call after catkin package() to use Usage: To graph the data all on the same plot: catkin * variables. $ rqt $ rqt plot /topic1/field1,/topic2/field2 include directories(include ${catkin INCLUDE DIRS}) Plugin Menu->Topic->Message Type Browser To graph multiple fields of a message: add executable(hoge src/hoge.cpp) Plugin Menu->Service->Service Type Browser $ rqt plot /topic1/field1:field2:field3 add library(fuga src/fuga.cpp) Plugin Menu->Action->Action Type Browser rqt image view target link libraries(hoge fuga ${catkin LIBRARIES}) rqt top A tool to display image topics. Message generation: A tool for ROS specific process monitoring. There are add {message,service,action} files() macros to Usage: handle messages,services and actions respectively. They must $ rqt call before catkin package(). Plugin Menu->Introspection->Process Monitor find package(catkin COMPONENTS message generation std msgs) rqt publisher, and rqt service caller Usage: add message files(FILES Message1.msg) Tools for publishing messages and calling services. $ rqt image view generate messages(DEPENDENCIES std msgs) Usage: catkin package(CATKIN DEPENDS message runtime) $ rqt ROS Indigo Catkin Workspaces If your package builds messages as well as executables that use Plugin Menu->Topic->Message Publisher them, you need to create an explicit dependency. Plugin Menu->Service->Service Caller Create a catkin workspace add dependencies(hoge ${PROJECT NAME} generate messages cpp) Setup and use a new catkin workspace from scratch. rqt reconfigure Example: A tool for dynamically reconfiguring ROS parameters. $ source /opt/ros/indigo/setup.bash Copyright
c 2015 Open Source Robotics Foundation Usage: $ mkdir -p ~/catkin ws/src Copyright
c 2010 Willow Garage $ rqt $ cd ~/catkin ws/src Plugin Menu->Configuration->Dynamic Reconfigure $ catkin init workspace
Administrative Instruction 15 - Volume 1 Office of The Secretary of Defense (OSD) Records Management Program Administrative Procedures, Incorporating Change 1, April 18, 2008