Ask Your Question

rosbag slow?

asked 2012-05-29 17:58:35 -0500

Hyon Lim gravatar image

Hi. I'm using ROS with two machines on wireless network. Let say, machine #1,#2.

The machine #1 has USB camera, and running roscore. The machine #2 is for viewing /usb_cam/image_raw/compressed, and recording video using rosbag.

Before run rosbag recording, everything is fine. However, when I ran the rosbag, both machine become very slow and about after 30secs later, the video is stucked.

Does anyone have experienced this problem?

To record using rosbag, I have used following command.

$ rosbag record


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-05-29 20:58:54 -0500

Mac gravatar image

The (likely) problem here is that ROS uses peer-to-peer transport, so adding a second subscriber (the rosbag) doubles the number of bits that need to get pushed over your wireless link.

You can use a republish node to solve this; run it on machine #2, and then run the viewer and rosbag record on machine #2, but subscribed to the republish node, not the actual data topic. Then you move the bits over the wireless link once (machine #1 -> republish node), and then twice on the loopback interface (republish -> viewer and republish -> rosbag).

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


Asked: 2012-05-29 17:58:35 -0500

Seen: 846 times

Last updated: May 29 '12