Closed qetuo105487900 closed 4 months ago
always get the warning code
[ WARN] [1709477545.228805757]: /rtabmap/rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
/rtabmap/rtabmap subscribed to (exact sync):
/rtabmap/odom \
/filter/rs_l515/color/image_raw \
/filter/rs_l515/aligned_depth_to_color/image_raw \
/filter/rs_l515/color/camera_info \
/rtabmap/odom_info
i see here: https://robotics.stackexchange.com/questions/23394/rtabmap-rtabmap-did-not-receive-data-since-5-seconds
mobiiin said is encoding problem ? is it right ? [update] it is still not work ! wt....
i also run rostopic hz
and i found the original and the filters' are very similar. so maybe is not the problem.
should i use tf replace tf_static ? [update] it is still not work ! wt....
What is the rostopic hz output for:
rostopic hz \
/filter/rs_l515/color/image_raw \
/filter/rs_l515/aligned_depth_to_color/image_raw \
/filter/rs_l515/color/camera_info \
hello, @matlabbe
[1] run with depth_topic:=/rs_l515/aligned_depth_to_color/image_raw \ rgb_topic:=/rs_l515/color/image_raw \ camera_info_topic:=/rs_l515/color/camera_info \ which publish from realsense nodelet this can work well !
[2] run with depth_topic:=/filter/rs_l515/aligned_depth_to_color/image_raw \ rgb_topic:=/filter/rs_l515/color/image_raw \ camera_info_topic:=/filter/rs_l515/color/camera_info \ which publish from (realsense nodelet after sharping then publish)
this can't work !
[3] this is hz between /filter/rs_l515/color/image_raw /rs_l515/color/image_raw /filter/rs_l515/aligned_depth_to_color/image_raw /rs_l515/aligned_depth_to_color/image_raw i sure that the encoding color are both rgb8 depth are both 16UC1
maybe problem is at the tf not publish from rs_l515_link? [not this] but i create a tf_frame from base_link, it is still can't work
You should have warnings in rtabmap terminal if topics can be synchronized but don't have the right format or if there is a TF issue. If you have warnings about topics not received for 5 seconds, you may check if /filter/rs_l515/color/camera_info
also published.
I see that you are also using approx_sync:=false
, if the topics don't have the same stamps, use approx_sync:=true
instead.
yes, mr. @matlabbe , i had use approx_sync:=true
instead.
but i still can't slove the problem.
so, can't i use /rs_d435i/color/camera_info
as camera_info_topic ?
like this :
<!-- RGB-D related topics -->
<arg name="rgb_topic" default="filter/rs_d435i/color/image_raw" />
<arg name="depth_topic" default="/rs_d435i/aligned_depth_to_color/image_raw" />
<arg name="camera_info_topic" default="/rs_d435i/color/camera_info" />
<arg name="depth_camera_info_topic" default="$(arg camera_info_topic)" />
as below is sharpened code, are there any problem in the code ?
#!/usr/bin/env python3
import rospy
import cv2
import numpy as np
from cv_bridge import CvBridge, CvBridgeError
from sensor_msgs.msg import Image
def color_callback(data):
cv_image = bridge.imgmsg_to_cv2(data, "bgr8")
sharpened_img = sharpened(cv_image)
sharpened_img = cv2.cvtColor(sharpened_img, cv2.COLOR_BGR2RGB)
sharpened_img = bridge.cv2_to_imgmsg(sharpened_img, "rgb8")
# Publishing
pub_filter_color.publish(sharpened_img)
if __name__ == '__main__':
rospy.init_node('image_filter', anonymous=True)
bridge = CvBridge()
# Subscribers
rospy.Subscriber("/rs_d435i/color/image_raw", Image, color_callback)
# Publishers
pub_filter_color = rospy.Publisher("/filter/rs_d435i/color/image_raw", Image, queue_size=10)
rospy.spin()
thanks!!
You can use /rs_d435i/color/camera_info
if /filter/rs_d435i/color/image_raw
has still the same resolution (and that you didn't change the scale of the image, i.e., kept same calibration).
Another thing I just noticed, you should copy the old header in your new published topic header.
sharpened_img.header = data.header
i use this command
is not work on rtabmap
but i use this command
it can work on rtabmap
so, how to do that i could run with image_filter topic? maybe copy camera info and change stamp to time.now() ?
update
it is still failed that i copy camera info and change stamp to time.now()