Image_transport warning of unsyncronization
Hello.
I am trying to use the package depthimage_to_laserscan. My launch file to do this is the following:
<node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan">
<remap from="image" to="/camera/depth/image"/>
<remap from="camera_info" to="/camera/depth/camera_info"/>
</node>
The problem comes when y launch it and am image_transport warn appears:
[ WARN] [1619004832.858784407]: [image_transport] Topics '/camera/depth/image' and '/camera/depth/camera_info' do not appear to be synchronized. In the last 10s:
Image messages received: 75
CameraInfo messages received: 75
Synchronized pairs: 0
I have tried to use the ApproximateTimeSynchronizer
to syncronize these topics, but with this, they still don't syncronize. this is my file to use the syncronizer:
#!/usr/bin/env python3
import rospy
import message_filters
from sensor_msgs.msg import Image
from sensor_msgs.msg import CameraInfo
rospy.init_node('sync_node')
rospy.loginfo("Sync started")
def callback(image_raw, image_info):
print("callback")
image_raw = message_filters.Subscriber('/camera/depth/image', Image)
image_info = message_filters.Subscriber('/camera/depth/camera_info', CameraInfo)
ts = message_filters.ApproximateTimeSynchronizer([image_raw, image_info], 10, 0.01, allow_headerless=True)
ts.registerCallback(callback)
rospy.spin()
Checking the header of both topics, the stamp is almost equal (difference of 1-3 ms).
What is wrong?
Thanks in advance.
Best regards. Alessandro
Your
Image
andCameraInfo
topics are at 7.5hz. Is this intentional or is something bottlenecking?When you run this node do you see "callback" printed? (If you are using roslaunch don't forget
output:="screen"
for the node)