What is the difference between the parameters 'set_as_static' and 'publish_tf'?

publish_tf: false # publish odom -> camera_link TF

If I turn this off, the camera will not update TFs and therefore be static. So, what does set_as_static do?

set_as_static: true # If ‘true’ the camera will be static and not move in the environment

This is not true. If it does not update TF, it does not mean that it’s static, it means that it does not update the TF because an external node is doing it.

This says to the ZED SDK that the camera is static to improve the processing pipeline with such a piece of useful information.
This does not mean that the TF is not published… it’s published and it will contain data saying that the camera is not moving.

Oh I see, so to clarify:

publish_tf=False means that the SDK will not try to do localize and publish odom->camera_link, but an external node is still free to try and do it, for example maybe an AMCL node.

But, if we set set_as_static=True, then the camera would not be free to move in any situation, even if an external node tried to a publish a TF.

No, if Positional Tracking is enabled, the SDK continues to calculate the pose of the camera and the Wrapper will publish the relevant information to the pose and odom topics for external nodes that can fuse them with information from other nodes and generate a fused TF information.

The camera “should be” static, and the SDK uses this information to improve the localization process. A “static” camera can move if subject to vibrations or shocks…

If you are sure that the camera is not moving, you can disable the positional tracking module to not process this information if not required.