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

How to extract images from *.bag after image_proc?

asked 2017-05-06 09:06:01 -0500

D3migod gravatar image

I an trying to create pipe in .launch file in the following way:

  1. Decompress image
  2. Apply image_proc
  3. Extract it

Contents of the .launch file is the following: https://pastebin.com/8qtJLK2w

As a result, some files are saved after image_proc and some are not. My guess is that nodes work simultaneusly and sometimes extraction executes before applying image_proc. However, I am just a novice in ros.

Could you please help me to fix my launch file to archive my goal?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-05-08 06:52:05 -0500

updated 2017-05-08 06:54:20 -0500

My guess is that nodes work simultaneusly and sometimes extraction executes before applying image_proc.

I guess your guess is halfway correct. :)

Probably rosbag is replaying the messages too fast, and one of the following nodes in your pipeline cannot process them fast enough, the internal queue of that node fills up and then messages are dropped.

You can easily test this theory by playing back the messages slower using the -r argument of rosbag play, for example rosbag play -r 0.1 .

-r FACTOR, --rate=FACTOR
                      multiply the publish rate by FACTOR

This is a known drawback of an asynchronous pub/sub framework like ROS, compared to things like ecto (which was made by the same people as ROS, by the way). But don't get distracted by this side remark, I think you're on the right track.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-05-06 09:06:01 -0500

Seen: 387 times

Last updated: May 08 '17