Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Hello (real) World with ROS Cheat Sheet

Filesystem Command-line Tools Roslaunch Rosservice


roscd Changes directories to a package or roslaunch starts ROS nodes both locally and remotely via rosservice is a tool for listing and querying ROS services.
stack SSH, as well as setting parameters on the parameter server.
rosls Lists package or stack information Commands:
roscreate-pkg Creates a new ROS package Example - Launch the turtlebot simulation:
roswtf Displays errors and warnings rosservice list Print a list of active services
$ roslaunch turtlebot gazebo turtlebot world.launch
about a running ROS system or rosservice node Print the name of the node provid-
launch file ing a service
Rosnode rosservice call Call the service with the given args
Usage: rosservice args List the arguments of a service
rosnode displays debugging information about ROS nodes, rosservice type Print the service type
$ roscd [ package [/ subdir ]]
including publications, subscriptions, and connections. rosservice find Find services by service type
$ rosls [ package [/ subdir ]]
$ roscreate - pkg [ package ]
Commands: tf Command-line Tools
$ roswtf
$ roswtf [ file ] rosnode ping Test connectivity to node
tf echo is a tool that prints information about a particular
rosnode list List active nodes
rosnode info Print information about a node transformation between a source frame and a target frame.
Roscore rosnode kill Kills a running node
Usage:
roscore is a collection of nodes and programs that are $ rosrun tf tf echo <source frame> <target frame>
pre-requisites of a ROS-based system. You must have a Rostopic
roscore running in order for ROS nodes to communicate. rostopic is a tool for displaying debug information about Example - Echo transform between /map and /odom:
ROS topics, including publishers, subscribers, publishing $ rosrun tf tf echo /map /odom
roscore is currently defined as: rate, and messages.
master view frames is a tool for visualizing the full tree of coordi-
parameter server Commands: nate transforms.
rosout
rostopic echo Print messages to screen
rostopic hz Display publishing rate of topic Usage:
Usage: rostopic list List active topics $ rosrun tf view frames
$ roscore rostopic pub Publish data to topic $ evince frames.pdf
rostopic type Print topic type
rostopic find Find topics by type
Rosrun
rosrun allows you to run an executable in an arbitrary
Rosparam
package without having to cd (or roscd) there first.
rosparam is a tool for getting and setting ROS parameters
Usage: on the parameter server, using YAML-encoded files.
$ rosrun package executable
Commands:
Example - Run turtlesim: rosparam set Set a parameter
$ rosrun turtlesim turtlesim node rosparam get Get a parameter
rosparam list List parameter names

You might also like