rviz increasing delay with time
I play a bag file with some 2d laser data from a robot sensor. I also have a line extraction algorithm and a node that takes the data, makes some calculations and then it visualizes data in rviz. I use the visualization_msgs::Marker
to publish some lines and points and the PATH
topic to visualize the path of the robot from the odometry data (also from the bag file). After some time I see the data appearing in rviz with some delay, and the delay increases with the time. When I pause the bag_file the shown data are "dragged to the updated-correct position and If I continue the delay appears again after some time. I tried with a much smaller bag_file and I did't have any delays problem (maybe the bag file was short enough to not show the problem). I suspect that the queue_size
I use in the publishers commands gets full and after that I loose data. This results in wrong output of my node. Where does this delay come from and how can I fix it? Here is how I initialize the node and the publisher objects:
rospy.init_node('face_finder', anonymous=True)
marker_publisher = rospy.Publisher('box_visual', Marker, queue_size=100)
rospy.sleep(1)
path_pub = rospy.Publisher('/path', Path, queue_size=100)
rospy.sleep(1)
I use Ubuntu 16.04, ROS-kinetic on a Lenovo-ThinkPad-P1.
Thank you in advance!!!
I have had issues playing back large bag files too and I think it is explained here. For what its worth, I've had better results when I have a large amount of free ram.