Data in Rviz not synchronized
Hello,
I have some problems of synchronizations.
- I publish stereo pictures from my dataset (left and right) then i get the disparity and the depth map. Despite the parameters , i have a shift of about 1s between my picture and the publicaiton of the depth map. How I can solve it ? Is it because i have lots of intermediates nodes ? ( left/right -> stereo_image_proc -> disparity -> depth map)
- Then in Rviz, zhen i publish the picture and the depth map, there is at least 5s of shift...And i really don't know why.
Thank you
EDIT:
Actually I try an algorithm for SLAM. With the dataset provided by the authors (depth image provided), it works very well. Now I want to try with my own dataset (so record my own bag and provide my own depth map). So that's why I add others node to process the disparity and depth map from my left and right pictures. I can show my launch file if you want ? But with my dataset, despite I have now a depth map it doesn't work at all and don't know why. I presume that is because of the shift because the process. Maybe there is a relation between their dataset and their algorithm (for example regard to the time)
- Are you sure your messages are published with the correct timestamps, with regard to ros::Time::now()?
When I analyse my bag I have the following (for depth map and my monocular image):
field.header.stamp always at 0
field.header.frame_id is empty
field.header.seq I have 0,1,2.. so it's okey
%time i have a big number for each frame, so I presume it's okey
I think that is the problem maybe ? But When I put in my different nodes (stereo publisher, depth processor) the time stamp by doing for example image_left->header.stamp=ros::Time::now() and image_right->header.stamp=ros::Time::now()
, I still have nothing in me stamp and I have a message which appear on my terminal which telling that my message are not synchronized... don't know if I'm doing well or If i did something wrong.
[ WARN] [1428982008.806538635]: [image_transport] Topics '/camera/left/image_color' and '/camera/left/camera_info' do not appear to be synchronized. In the last 10s:
Image messages received: 5
CameraInfo messages received: 5
Synchronized pairs: 0
Read pictures left: /home/isg/Documents/dataset_odometry/image_2/000006.png
Read pictures right: /home/isg/Documents/dataset_odometry/image_3/000006.png
image type 16
[ WARN] [1428982009.859383623]: [image_transport] Topics '/camera/left/image_mono' and '/camera/left/camera_info' do not appear to be synchronized. In the last 10s:
Image messages received: 5
CameraInfo messages received: 5
Synchronized pairs: 0
[ WARN] [1428982009.888232403]: [image_transport] Topics '/camera/right/image_mono' and '/camera/right/camera_info' do not appear to be synchronized. In the last 10s:
Image messages received: 5
CameraInfo messages received: 5
- Use rostopic echo --offset TOPIC_NAME/header/stamp to examine by how much your messages are delayed ...