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

rosbag slow?

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

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

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

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

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

Question Tools

Stats

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

Seen: 1,478 times

Last updated: May 29 '12