ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I have a different answer for you :)

99% of the people use rosbag from the command line. This means that your message is:

1) Serialized on the publisher side. 2) Sent by TCP 3) received by the rosbag recorder, 4) Stored.

Very few people realize that instead of publishing it, you write the message inside your C++ application, avoiding the latency of point 2) and 3)

The only problem is that you have a single file per process, but you can merge this files later with a script...

Take a look to the C++ API or rosbag_storage https://docs.ros.org/api/rosbag_storage/html/c++/

I have a different answer for you :)

99% of the people use rosbag from the command line. This means that your message is:

1)

  • Serialized on the publisher side. 2) side.
  • Sent it by TCP 3) received by TCP
  • The rosbag recorder receive the rosbag recorder, 4) Stored.

    message,
  • Message is stored.

Very few people realize that instead of publishing it, you write the message inside your C++ application, avoiding the latency of point 2) and 3)

The only problem is that you have a single file per process, but you can merge this files later with a script...

Take a look to the C++ API or rosbag_storage https://docs.ros.org/api/rosbag_storage/html/c++/