[Documentation] [TitleIndex] [WordIndex


rosmsg and rossrv are handy command-line tools that provide reference information for developers and also serve as a powerful introspection tool for learning more about data being transmitted in ROS.

For example, if you are using a message in your code, you can type rosmsg show at the command-line to look up its fields:

$ rosmsg show sensor_msgs/CameraInfo
Header header
  uint32 seq
  time stamp
  string frame_id
uint32 height
uint32 width
RegionOfInterest roi
  uint32 x_offset
  uint32 y_offset
  uint32 height
  uint32 width
float64[5] D
float64[9] K
float64[9] R
float64[12] P

For even quicker typing, you can omit "my_pkg", and rosmsg will search all packages for a matching message.

You can also use this in an online system with tools like rostopic. For example, rostopic type will tell you the message type of a topic:

$ rostopic type rosout

You can pass this to rosmsg to quickly see the fields of the message:

rostopic type rosout | rosmsg show
byte DEBUG=1
byte INFO=2
byte WARN=4
byte ERROR=8
byte FATAL=16
Header header
  uint32 seq
  time stamp
  string frame_id
byte level
string name
string msg
string file
string function
uint32 line
string[] topics

Once you know more about the fields of a particular message, you can then listen them at the command-line, e.g.

$ rostopic echo rosout/msg

Command-Line Tools


The rosmsg command-line tool displays information about ROS Message types. The following sections describe the commands that are available.

rosmsg show

rosmsg list

New in Fuerte

Note that messages in a subfolder may not be listed as of March 2017 (open ticket).

rosmsg package

rosmsg packages

rosmsg users

Only available in ROS Electric and earlier

rosmsg md5

NOTE: The md5 command is meant for expert users only.


The rossrv command-line tool displays information about ROS services. It has the exact same usage as rosmsg (see what it offers when it runs without sub-command below):

$ rossrv
rossrv is a command-line tool for displaying information about ROS Service types.

        rossrv show     Show service description
        rossrv list     List all services
        rossrv md5      Display service md5sum
        rossrv package  List services in a package
        rossrv packages List packages that contain services

Type rossrv <command> -h for more detailed usage

Syntax highlighting


rosmsg and rossrv are stable tools. There is currently no plan to add new features to them.

2024-06-15 13:46