Ask Your Question
0

"rosbag play" pauses while it shouldn't

asked 2017-02-07 19:04:53 -0500

130s gravatar image

updated 2017-02-07 19:17:24 -0500

Are these expected behavior of rosbag?

Behavior-1

$ wget http://download.ros.org/data/rosbag/clock_alive.bag
$ rosbag info clock_alive.bag 
path:         clock_alive.bag
version:      2.0
duration:     40.0s
start:        Jun 03 2015 05:27:52.30 (1433334472.30)
end:          Jun 03 2015 05:28:32.29 (1433334512.29)
size:         14.5 MB
messages:     40000
compression:  bz2 [40000/40000 chunks; 0.01%]
uncompressed: 55.9 GB @   1.4 GB/s
compressed:    5.7 MB @ 145.5 KB/s (0.01%)
types:        std_msgs/String [992ce8a1687cec8c8bd883ec73ca41d1]
topics:       /blabla   40000 msgs    : std_msgs/String
$ rosbag play -l --clock clock_alive.bag 
[RUNNING]  Bag Time: 1433334474.755216   Duration: 2.453124 / 39.990000

The time elapses as expected. Then on another terminal,

$ rostopic hz /blabla 
subscribed to [/blabla]
WARNING: may be using simulated time
average rate: 0.000
        min: 0.000s max: 0.000s std dev: 0.00000s window: 59
no new messages
no new messages
no new messages
no new messages
no new messages
no new messages

Issues are 1) the topic /blabla is being published throughout the entire bag file as you see the screenshot from rqt_bag below, but rostopic is capturing only occasionally as above, 2) Bag time pauses elapsing. Once rostopic command gets terminated it resumes without jump (i.e. Bag time was paused).

Behavior-2

Then setting false to /use_sim_time,

term-1$ rosbag play clock_alive.bag 
term-2$ rostopic hz /blabla 
subscribed to [/blabla]
average rate: 804.263
        min: 0.001s max: 0.005s std dev: 0.00109s window: 12
average rate: 22.330
        min: 0.001s max: 1.040s std dev: 0.18831s window: 35
average rate: 26.260
        min: 0.001s max: 1.040s std dev: 0.15480s window: 59
average rate: 19.355
        min: 0.001s max: 1.040s std dev: 0.19223s window: 63
average rate: 24.224
        min: 0.001s max: 1.040s std dev: 0.16041s window: 106
average rate: 30.743
        min: 0.001s max: 1.040s std dev: 0.14531s window: 165

This time it looks much like as expected. But still "Bag time" pauses while rostopic runs.

Particularly in my case, I'm writing tests using .bag files so use_sim_time is really in need.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04
Codename:       trusty
$ more /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 60
model name      : Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz
stepping        : 3
microcode       : 0x17
cpu MHz         : 3356.250
cache size      : 6144 KB
physical id     : 0
siblings        : 8
core id         : 0
cpu cores       : 4
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-02-08 12:57:28 -0500

130s gravatar image

I found a ticket in ros_comm repo where the reported behavior from others look very similar. Might as well keep discussing there.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-02-07 19:04:53 -0500

Seen: 408 times

Last updated: Feb 08 '17