ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

How to properly write about "bag" files?

Every time I’m writing a scientific article about ROS, I’m indecisive about how the write about “bag” files. What do you think? Is there some some authoritative source for the correct “spelling”?

  1. bag
  2. Bag
  3. BAG
  4. rosbag
  5. ROS bag
  6. ROS Bag
  8. bag (in italics)
  9. .bag

Bags wiki says:

A bag is a file format in ROS for storing ROS message data. Bags – so named because of their .bag extension – have an important role in ROS, …

My comments on these are:

  1. Looks like what the Bags wiki entry points to, but it can be confused with a backpack by a reader who is not familiar with ROS.
  2. Correctly points towards a proper noun, but is different from what the Bags wiki says.
  3. Incorrectly points towards an acronym, which BAG isn’t. But is might be the result of the same process that results in TXT files (although they are actually .txt). This isn’t uncommon (and maybe in the MS-DOS days, they actually were .TXT files).
  4. It’s name of the tool, not the data format.
  5. Looks pretty specific, maybe a bit lengthy to be used multiple times.
  6. Like 5., looks okay but lengthy.
  7. ??? (but I saw this in other papers)
  8. Tiresome to write (and remember to put it in italics), but correctly points towards a special term and not a backpack. It is the way it is used on Bags wiki.
  9. Looks weird in written text.

Thanks for you opinions (or authoritative answers :slight_smile: ).

I’m no authoritative source, but when I’m working on/with ROS 2 bags, I tend to do the following…

Towards the beginning of the discussion, I’ll use 5 or 6 a few times. Usually the main difference (for me) between the two is how formal I want to be (I think of 6 as being a bit more formal), and how stiff my pinky is at any particular moment (it gets cold, and sometimes won’t let go of the shift key when I want it to).

Once I feel that the reader knows that I’m not going to be talking about backpacks or groceries, I will transition into 1 or 2.

I use 7 when talking about the bagging system a a whole, not just the file. And I use 4 when talking about the command (though I’m not sure why, since in Ros 2, the command is ros2 bag).

I never use 8.

I decided on “rosbag” for my own usage; it doesn’t carry the typographic heaviness of “ROS bag,” which seems slightly more correct. When I speak, I say it as one word, without a pause, like “beanbag” or “handbag.”

If I’m discussing the command, it would be typeset in monospace: rosbag.

If I’m specifically referring to the actual filesystem entry, rather than the concept of a sequence of recorded ROS messages, I might consider “bag file” (as in “text file”) or “.bag file” (as in “.txt file”).

When talking about rosbag2, I try to avoid this usage. In ROS 2, a bag is really a directory, potentially containing several files. So I talk about a rosbag as a specific entity, but a “bag file” for only one of these subfiles.


To me, this seems the best way to talk about it in an unambiguous “proper noun” sense.