Multiple ZED how is visual odometry handled

I am using 2 ZED2i cameras.
I launched the zed_multicam_single_nodelet.launch example.
When moving camera 1 the base_link frame moves appropriately.
When moving camera 2 the base_link frame barely moves.
(normally for our setup they cannot move independently)
I also noticed that the odometry of camera2 is not fixed to the base_link frame, while the odometry of camera1 is fixed to the base_link frame

Are the visual odometry completely separate and is the camera1 dominant?
Is it possible to have a visual odometry based on both cameras visual information?
Or should I just manually fuse the two odometries (e.g. robot_localization), or potentially have the visual odometry calculated by rtabmap, which can take multiple camera into account.

When you use 2 cameras you must use an external Kalman Filter node to fuse the odometry messages of the two nodes and generate a correct odom TF.
Note: you must set publish_tf for both the nodes to false otherwise there is a conflict.

1 Like

Alright, I see. I will use an EKF to fuse the two odometries/poses.
Note: for further info, the publish_tf conflict comes from zed with the filter and not the 2 cameras with each-other. The publish_tf can only be true for one camera and further in the code be specified for map->odom and/or odom->base_link. Just that the ekf might also publish odom->base_link and so cause conflict.

Yes, when you use an external EKF/UKF it will provide the final mapodom TF, so you must disable the TF broadcasting in all the ZED nodes.