Ask Your Question

jrvanwhy's profile - activity

2018-11-21 10:42:41 -0500 received badge  Student (source)
2014-11-14 17:46:41 -0500 received badge  Famous Question (source)
2013-06-24 10:30:18 -0500 received badge  Notable Question (source)
2013-05-22 09:55:00 -0500 received badge  Popular Question (source)
2013-05-22 08:41:45 -0500 commented question Rosbag not recording every message

I've posted information on the system load above. I'm unable to provide a sample that drops messages while sending a minimal amount of data. However, the system load is far from 100% and is stable, so I do not think that is the issue.

2013-05-15 10:32:22 -0500 received badge  Famous Question (source)
2013-05-15 10:30:54 -0500 asked a question Rosbag not recording every message

We are trying to log data using rosbag, but are finding that it is falling behind. A realtime system is spitting out messages at 1kHz on various topics (using Orocos's ROS integration), which we are bagging on the same machine via rosbag record. We are recording around 400KB/s total.

We'll often see skips in the data (skipped messages). This is reflected both in the (custom) timestamps in the headers as well as the sequence numbers skipping. These skips can vary from a few messages to several hundred messages.

The machine on which this is occurring is not under particularly high system load, and rosbag is recording to the local hard drive. I've noted that rosbag does not output any messages about falling behind.

Is there any way we can fix/further debug this issue?

EDIT: This is running on a quad core Intel i7-based system with an SSD hard drive. I'm slightly mystified by the contradictory load results I'm getting from various sources (likely an artifact of the (periodic?) sampling used to calculate processor usage), so I'll list them all.

According to htop, rosbag is using approximately 120% of one core, with one thread using 42% of a core and another using 37%. The other threads are mostly idle.

Also according to htop, our node (which is publishing the messages) is using approximately 20% of the CPU.

htop reports that all CPU cores are nearly idle or completely idle, with less than 5% usage each, and often 0.0% usage (?!)

The load average floats between 0.7 and 2.0 (this also seems incorrect).

Xenomai (the realtime OS we use) reports that our code uses a total of 19% of the CPU, matching the 20% number reported by htop.

2013-02-12 01:09:34 -0500 received badge  Notable Question (source)
2012-12-24 17:45:58 -0500 received badge  Popular Question (source)
2012-12-24 06:17:38 -0500 commented question ROSBag C++ API -- reading message Header

Thank you, Lorenz -- I was afraid that that was the answer. (I couldn't find the button to comment on an answer, so I'm doing it here).

2012-12-24 06:14:46 -0500 received badge  Supporter (source)
2012-12-23 07:02:46 -0500 received badge  Editor (source)
2012-12-23 07:02:24 -0500 asked a question ROSBag C++ API -- reading message Header

I am writing a C++ (*) program that reads in a bagfile, and needs to be able to access a message's header timestamp (not the one rosbag records itself), if it has one.

How can I do this using ROSBag's API?

  • I'm rewriting an existing Python script that's really slow.