Ask Your Question
0

Process died whilst exporting bag to jpeg

asked 2019-08-30 06:12:42 -0500

mun gravatar image

updated 2019-08-30 06:13:51 -0500

Hi

I'm trying to export a bag file to jpegs by running:

roslaunch export.launch

where

export.launch:

<launch>
  <node pkg="rosbag" type="play" name="rosbag" required="true" args="/path/catkin_ws/test.bag"/>
  <node name="extract" pkg="image_view" type="extract_images" respawn="false" required="true" output="screen" cwd="ROS_HOME">
    <remap from="image" to="/camera/rgb/image_raw"/>
  </node>
</launch>

The bag is 2s long (60 messages), but I get the following message after frame0015.jpg is saved:

REQUIRED process [rosbag-2] has died!
process has finished cleanly
log file: /path/.ros/log/2723c992-cb16-11e9-8dca-001c42b1c2c9/rosbag-2*.log
Initiating shutdown!

I'd expect 60 images to be exported as 60 messages were captured. Does anyone know why rosbag crashes as described?

Here's a more complete output:

setting /run_id to 2723c992-cb16-11e9-8dca-001c42b1c2c9
process[rosout-1]: started with pid [964]
started core service [/rosout]
process[rosbag-2]: started with pid [970]
process[extract-3]: started with pid [973]
[ INFO] [1567163162.419827776]: Initialized sec per frame to 0.100000
[ INFO] [1567163162.682550707]: Saved image frame0000.jpg
[ INFO] [1567163162.813832567]: Saved image frame0001.jpg
[ INFO] [1567163162.913869500]: Saved image frame0002.jpg
[ INFO] [1567163163.014113532]: Saved image frame0003.jpg
[ INFO] [1567163163.145443605]: Saved image frame0004.jpg
[ INFO] [1567163163.245991123]: Saved image frame0005.jpg
[ INFO] [1567163163.381262565]: Saved image frame0006.jpg
[ INFO] [1567163163.481461543]: Saved image frame0007.jpg
[ INFO] [1567163163.581605202]: Saved image frame0008.jpg
[ INFO] [1567163163.714315667]: Saved image frame0009.jpg
[ INFO] [1567163163.845826862]: Saved image frame0010.jpg
[ INFO] [1567163163.945990088]: Saved image frame0011.jpg
[ INFO] [1567163164.077795395]: Saved image frame0012.jpg
[ INFO] [1567163164.213862555]: Saved image frame0013.jpg
[ INFO] [1567163164.345490987]: Saved image frame0014.jpg
[ INFO] [1567163164.477983058]: Saved image frame0015.jpg
================================================================================REQUIRED process [rosbag-2] has died!
process has finished cleanly
log file: /path/.ros/log/2723c992-cb16-11e9-8dca-001c42b1c2c9/rosbag-2*.log
Initiating shutdown!
================================================================================
[extract-3] killing on exit
[rosbag-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
edit retag flag offensive close merge delete

Comments

Are you sure it's not simply reaching the end of the bag file and shutting down?

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2019-08-30 06:27:17 -0500 )edit

@PeteBlackerThe3rd How do I tell? Shouldn't 60 images be expected if 60 messages were captured?

mun gravatar imagemun ( 2019-08-30 06:28:44 -0500 )edit

rosbag info gives the following:

path:        test.bag
version:     2.0
duration:    2.1s
start:       Aug 30 2019 21:05:39.08 (1567163139.08)
end:         Aug 30 2019 21:05:41.23 (1567163141.23)
size:        123.2 MB
messages:    240
compression: none [120/120 chunks]
types:       sensor_msgs/CameraInfo [c9a58c1b0b154e0e6da7578cb991d214]
             sensor_msgs/Image      [060021388200f6f0f447d0fcd9c64743]
topics:      camera/depth_registered/camera_info   60 msgs    : sensor_msgs/CameraInfo
             camera/depth_registered/image_raw     60 msgs    : sensor_msgs/Image     
             camera/rgb/camera_info                60 msgs    : sensor_msgs/CameraInfo
             camera/rgb/image_raw                  60 msgs    : sensor_msgs/Image
mun gravatar imagemun ( 2019-08-30 06:31:12 -0500 )edit

I think you're right! I've set sec_per_frame to 0.03 and I'm getting almost all of the frames. Thanks.

mun gravatar imagemun ( 2019-08-30 07:58:19 -0500 )edit

Great. Glad you've got this working.

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2019-08-30 08:31:22 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-08-30 07:18:37 -0500

If you look at the documentation here extract_images defaults to 10 frames per second, you can see that on your terminal too. If the images in your bag file are higher frame rate than this then some of them will be dropped.

Your bag file has 60 frames in 2.1 seconds so is approximately 30 frames per second. Add in the startup delay and the 15 images you're getting sounds about right.

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: 2019-08-30 06:12:42 -0500

Seen: 23 times

Last updated: Aug 30