Ask Your Question

sync problem on image and camera_info over wireless

asked 2013-07-30 06:00:50 -0500

chyphen gravatar image

I was running pgr_camera_driver (with a PointGrey Flea3 GigE camera) that published both color image and camera_info with the same timestamp in tandam over wireless network. Color image and camera_info were subscribed by another program using image_transport::CameraSubscriber. I got error on synchronization between images and camera_info, and images were not received by the subscriber. The problem went away when the camera was connected through a wired connection. Does anyone experience the same problem? Any suggestion to make pgr_camera_driver work over wireless will be appreciated.

Thanks, CC

edit retag flag offensive close merge delete


What resolution and what frame rate? Use image_viewer to look at the image and make sure that you are not filling up the whole bandwidth. We have used an USB/Firewire PG Camera over WiFi and it works if we reduce the resolution or compress the image.

TommyP gravatar image TommyP  ( 2013-07-30 12:27:57 -0500 )edit

Resolution 640 by 480 at 15fps. Thanks for the suggestion. CC

chyphen gravatar image chyphen  ( 2013-07-30 13:01:43 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-07-30 12:14:14 -0500

Murilo F. M. gravatar image

It appears that this question describes a similar issue to the one you are having.

Have you considered/tried using message filters (more specifically, ApproximateTime) to synchronise the published colour image and published messages from the camera_info topic?

That worked for me, although I was synchronising 4 topics published by different sensors (also over a wireless connection).

Due to limited throughput and higher latency of wireless (as opposed to wired) connections, from my experience, messages are likely to get to the peer subscribing to such topics not necessarily at the same rate as they are published. Also, you might get a message from camera_info topic whilst the corresponding, synchronised sensor_msgs/Image is yet to be received by the subscriber.

I hope it helps!

edit flag offensive delete link more

answered 2013-07-30 12:36:05 -0500

chyphen gravatar image


Thanks for sharing your experience. I used CameraSubscriber to subscribe both raw_image and camera_info. CameraSubscriber uses MessageFilters and TimeSynchronizer (according to and has been designed for synchronizing raw_image and camera_info.

message_filters::Subscriber<image> image_sub(nh, "image", 1); message_filters::Subscriber<camerainfo> info_sub(nh, "camera_info", 1); TimeSynchronizer<image, camerainfo=""> sync(image_sub, info_sub, 10); sync.registerCallback(boost::bind(&callback, _1, _2)); I guess I could used code segment above directly with the ability to adjust synchronization parameters. What sychronization policy did you use?

I also checked the code in pgr_camera_driver. It used CameraPublisher to "simultanously" publish both topics. When using wired connection, both topics subscribed by my program show the same time-stamp. So the problem doesn't seem to be on publisher side.



edit flag offensive delete link more


I used ApproximateTime policy, since ExactTime was not working due to messages never having matching timestamps. Perhaps you could try using ApproximateTime instead of TimeSynchronizer (which, I think, works just like ExactTime) and see if your callback gets called.

Murilo F. M. gravatar image Murilo F. M.  ( 2013-07-30 13:07:47 -0500 )edit

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


Asked: 2013-07-30 06:00:50 -0500

Seen: 1,296 times

Last updated: Jul 30 '13