ROS commands summary

If you are communicating with ROS via the terminal window, it is possible to issue commands to ROS to explore or control nodes in a package from the command prompt, as listed in the following table:

Command

Action

Example usage and subcommand examples

roscore

This starts the Master

$ roscore

rosrun

This runs an executable program and creates nodes

$ rosrun [package name] [executable name]

rosnode

This shows information about nodes and lists the active nodes

$ rosnode info [node name]

$ rosnode <subcommand>

Subcommand: list

rostopic

This shows information about ROS topics

$ rostopic <subcommand> <topic name>

Subcommands: echo, info, and type

rosmsg

This shows information about the message types

$ rosmsg <subcommand> ...

Get ROS Robotics By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.