Zed-ros-wrapper: the frequency of the topic when I use rosbag to record /zed/right/image_raw_color /zed/left/image_raw_color

Created on 21 Nov 2018  路  10Comments  路  Source: stereolabs/zed-ros-wrapper

I use rosbag record the topics /zed/right/image_raw_color /zed/left/image_raw_color, after a during , I found the count of left image is almost two times of the count of right image , what is the problem ,could you give me a hint? Thank you!
the following is the info of .bag file
018-11-15-12-25-21.bag
path: mutil_camera_2018-11-15-12-25-21.bag
version: 2.0
duration: 17.2s
start: Nov 15 2018 12:25:21.60 (1542255921.60)
end: Nov 15 2018 12:25:38.79 (1542255938.79)
size: 2.6 GB
messages: 6885
compression: none [338/338 chunks]
types: sensor_msgs/Image [060021388200f6f0f447d0fcd9c64743]
sensor_msgs/Imu [6a62c6daae103f4ff57a132d6f95cec2]
topics: /zed/imu/data_raw 6548 msgs : sensor_msgs/Imu
/zed/left/image_raw_color 210 msgs : sensor_msgs/Image
/zed/right/image_raw_color 127 msgs : sensor_msgs/Image

question

Most helpful comment

This is one of the problems with using rosbag. Even if the left and right images are acquired simultaneously, they cannot be published in the same moment.
The left raw image is published before the right raw image and the time elapsed between the two events is very very little...

Left: https://github.com/stereolabs/zed-ros-wrapper/blob/master/zed_wrapper/src/nodelet/src/zed_wrapper_nodelet.cpp#L1782
Right: https://github.com/stereolabs/zed-ros-wrapper/blob/master/zed_wrapper/src/nodelet/src/zed_wrapper_nodelet.cpp#L1806

If your storage (hard disk, SSD, Flash ROM, ...) is not fast enough to save the left image, you can lose the very next right image.

You can try to enlarge your rosbag buffer size using the --buffsize=SIZE flag (see http://wiki.ros.org/rosbag/Commandline), the default value is 256.

Let me know if this works for you.

A question: what is your system configuration? PC, Laptop, Nvidia Jetson?

All 10 comments

This is one of the problems with using rosbag. Even if the left and right images are acquired simultaneously, they cannot be published in the same moment.
The left raw image is published before the right raw image and the time elapsed between the two events is very very little...

Left: https://github.com/stereolabs/zed-ros-wrapper/blob/master/zed_wrapper/src/nodelet/src/zed_wrapper_nodelet.cpp#L1782
Right: https://github.com/stereolabs/zed-ros-wrapper/blob/master/zed_wrapper/src/nodelet/src/zed_wrapper_nodelet.cpp#L1806

If your storage (hard disk, SSD, Flash ROM, ...) is not fast enough to save the left image, you can lose the very next right image.

You can try to enlarge your rosbag buffer size using the --buffsize=SIZE flag (see http://wiki.ros.org/rosbag/Commandline), the default value is 256.

Let me know if this works for you.

A question: what is your system configuration? PC, Laptop, Nvidia Jetson?

Thank you for you reply ! I use PC. after I use another PC ,I did not meet the problem above, I think usb on my PC is bad.

I have another question, I want to use three sensors : lidar imu camera, in order to make sure they are synchronized锛宎nd I want add lidar driver in zed-ros-wrapper. could you give me some advice ? some references?

My only advice is to not add the lidar code to the ZED wrapper. ROS manages synchronization using the topics timestamps.
Write your own node for the lidar or use its own if exists.
Then you can use message_filters to synchronize the topics.

You will find a lot of help about synchronization searching on answers.ros.org

@Myzhar Thank you :+1:
I have another question about the transformation from imu to left camera , I got two calibration results the Euler Angle from imu to left cam is [168.2 -86.7 -95] and [ 45 -60 28] in roll, pitch and yaw, I think the roll and pitch is quite large assuming the PCB for the zed camera is flat. Do you have a probably result from imu to left camera?

The angles should be very little. There was a bug in a previous version. Are you using the latest code available on master branch?

oh! I use the previous version! why the latest version improve the frquency of imu from 500hz to 800hz锛焗ow can I slow down it?

Because the firmware was improved and now it can read the IMU at maximum speed.
You can change the IMU frequency modifying the parameter in the file zed_camera.launch as described in the documentation:
https://www.stereolabs.com/docs/ros/zed_node/

@chenwinki a little request, when you have new questions please open a new issue.
It is good to separate different topics so it can be useful for other users.

I close this issue since the first question has been replied

@Myzhar :1st_place_medal: Thank you!

Was this page helpful?
0 / 5 - 0 ratings