Add namespace to tf tree

Hey,

my robot publishes a tf tree and I want the zed_wrapper to used it. So I set publish_tf to false. The zed_wrapper expects a tf tree which consists of “camera_name + frame_name”. Our robot publishes a tf tree which includes a namespace: “namespace + camera_name + frame_name” e.g. “robot/uuid1/zed_front_camera_link”. How can I adjust the zed_wrapper to consider namesspaces in the tf tree. Because right at the moment the zed wrapper always stops at: “Waiting for valid static transformations…” .

I already tried adding the namespace in the zed_camera.launch.py to the xacro. But it didn’t work.

Any ideas or suggestions?

Thanks Jeremy

Hi @Jeremy
please read the Robot Integration documentation and explore the parameters of all the launch files by using the -s option: ros2 launch zed_wrapper zed_camera.launch.py -s.
You can normally set a namespace.

Hey, thanks for the quick response. I used the namespace option of the launch command. Unfortunately the namespace is not applied to the tf tree. Also in the zed_camera_component_main.cpp line 1816 ff:
mCameraFrameId = mCameraName + “_camera_center”;

mLeftCamFrameId = mCameraName + “_left_camera_frame”;

mLeftCamOptFrameId = mCameraName + “_left_camera_optical_frame”;

mRightCamFrameId = mCameraName + “_right_camera_frame”;

mRightCamOptFrameId = mCameraName + “_right_camera_optical_frame”;

if I understand it properly the frames only consider the camera name and ignore the namespace.

I will checkout the Robot Integration documentation and see if it provides a solution.

Thanks Jeremy

This is correct. Normally, we prefer not to use namespaces in TF broadcasting.