ROS2 wrapper launch does not publish image and stalls

Even though ZED_Explorer is working , my ROS2 fork https://github.com/AutonomousDrivingH2politO/zed-ros2-wrapper on autonomous-driving branch

the node starts, topics are advertised, but the launch effectively stalls and no data is ever published (checked with ros2 topic echo and ros2 topic hz).

From the same workspace, my custom ROS 2 node is able to publish RGB images, etc., so the camera and ZED SDK seem to be working.

Attached is the output log of the following launch

bylogix@ubuntu:~/$ ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zed2i

Platform:

Jetson Orin AGX

JetPack / L4T version: L4T R36.4.7

NVIDIA Driver Version: 540.4. CUDA Version: 12.6

ROS2 Humble

Hi @betelgeuse
Welcome to the Stereolabs community.

It seems that you modified the TF structure.
Please send a picture of the TF tree after you started your node.

Have you read how to do that correctly in the Robot Integration guide?
The important concept is use_zed_localization.

Hi the tf tree was fine infact I was testing the system and everything was working after shutting down and until re launching the camera. And yes I have read the guide

following is my rtabmap launch with zed odom:

from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import PathJoinSubstitution
from launch_ros.substitutions import FindPackageShare

# This launch file uses ZED VIO to position the frame of the vechile therefore the tf looks like map->odom->camera_link 
# only important thing to preserve is map->odom as specified by REP 105 ROS convention
def generate_launch_description() -> LaunchDescription:
    rviz_cfg = PathJoinSubstitution(
        [
            FindPackageShare("juno_bringup"),
            "launch",
            "rviz_config",
            "zed_rtabmap_rgbd.rviz",
        ]
    )

    zed_camera_launch = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            PathJoinSubstitution(
                [
                    FindPackageShare("zed_wrapper"),
                    "launch",
                    "zed_camera.launch.py",
                ]
            )
        ),
        launch_arguments={
            "camera_model": "zed2i",
            "publish_map_tf": "false",
            "publish_imu_tf": "true",
            "publish_tf": "true"
        }.items(),
    )

    rtabmap_launch = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            PathJoinSubstitution(
                [
                    FindPackageShare("rtabmap_launch"),
                    "launch",
                    "rtabmap.launch.py",
                ]
            )
        ),
        launch_arguments={
            # Run rtabmap_slam in "rtabmap" namespace so mapping topics
            # appear under /rtabmap (e.g., /rtabmap/map).
            "namespace": "rtabmap",
            "rviz_cfg": rviz_cfg,
            "args": "--delete_db_on_start",
            "frame_id": "zed_camera_link",
            "odom_topic": "/zed/zed_node/odom",
            "visual_odometry": "false",
            "rgb_topic": "/zed/zed_node/rgb/color/rect/image",
            "depth_topic": "/zed/zed_node/depth/depth_registered",
            "camera_info_topic": "/zed/zed_node/rgb/color/rect/image/camera_info",
            "wait_imu_to_init": "true",
            "imu_topic": "/zed/zed_node/imu/data",
            "rviz": "true",
            "rtabmap_viz": "false",
            "approx_sync": "false",
            "rgbd_sync": "true",
            "approx_rgbd_sync": "false",
            "topic_queue_size": "2",
        }.items(),
    )

    return LaunchDescription(
        [
            zed_camera_launch,
            rtabmap_launch,
        ]
    )

It looks like the setup is indeed correct.

Please send me the full log of the wrapper when it stalls and a screenshot of the Diagnostic information:

Its fixed after putting the camera to the table from the ground. This was the previous output by the way .I can only attach the last part as i’m a new user :

Rotation:
[component_container_isolated-2] FFFF757AC698
[component_container_isolated-2] 0.999904 -0.013350 0.003701
[component_container_isolated-2] 0.013313 0.999865 0.009671
[component_container_isolated-2] -0.003829 -0.009621 0.999946
[component_container_isolated-2] e[0m
[component_container_isolated-2] e[0m[INFO] [1763558684.138882175] [zed.zed_node]: ===Subscribers ===e[0m
[component_container_isolated-2] e[0m[INFO] [1763558684.140282710] [zed.zed_node]: * Plane detection: '/clicked_point’e[0m
[component_container_isolated-2] e[0m[INFO] [1763558684.293886561] [zed.zed_node]: === Starting Positional Tracking ===e[0m
[component_container_isolated-2] e[0m[INFO] [1763558684.294050432] [zed.zed_node]: * Waiting for valid static transformations…e[0m
[component_container_isolated-2] e[0m[INFO] [1763558685.297015528] [zed.zed_node]: Static transform ref. CMOS Sensor to Camera Center [zed_left_camera_frame → zed_camera_center]e[0m
[component_container_isolated-2] e[0m[INFO] [1763558685.297250887] [zed.zed_node]: * Translation: {0.010,-0.060,0.000}e[0m
[component_container_isolated-2] e[0m[INFO] [1763558685.297303814] [zed.zed_node]: * Rotation: {0.000,-0.000,0.000}e[0m
[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)

1 Like

I made a change at the system, so right now I need a base_link that is static transformed from zed_camera_link. The problem is the base_link should between zed_camera_link and odometry, while keeping the zed publish_tf. The problem is this parameter makes odom → zed_camera_link transformation directly so it does not seem possible to add a middle frame between them. I added our rtab + zed launch code. i need the structure of map→odom→base_link→camera_link

from launch import LaunchDescription

from launch.actions import IncludeLaunchDescription

from launch.launch_description_sources import PythonLaunchDescriptionSource

from launch.substitutions import PathJoinSubstitution

from launch_ros.substitutions import FindPackageShare

from launch.actions import GroupAction

from launch_ros.actions import PushRosNamespace, SetRemap

from launch_ros.actions import Node

# TF chain: map->odom->zed_camera_link (REP 105)

# map->odom: provided by global EKF (GPS-fused)

# odom->zed_camera_link: provided by local EKF

# rtabmap: costmap/grid generation only (publish_tf disabled)

def generate_launch_description() -> LaunchDescription:

rviz_cfg = PathJoinSubstitution(

        [

FindPackageShare("juno_bringup"),

"launch",

"rviz_config",

"zed_rtabmap_rgbd.rviz",

        ]

    )




static_tf_node = Node(

package="tf2_ros",

executable="static_transform_publisher",

arguments=[

"--x", "1.1", "--y", "0", "--z", "1",

"--yaw", "0", "--pitch", "0", "--roll", "0",

"--frame-id", "base_link",

"--child-frame-id", "zed_camera_link",

        ],

    )

zed_camera_launch = IncludeLaunchDescription(

PythonLaunchDescriptionSource(

PathJoinSubstitution(

                [

FindPackageShare("zed_wrapper"),

"launch",

"zed_camera.launch.py",

                ]

            )

        ),

launch_arguments={

"camera_model": "zed2i",

"publish_map_tf": "false",

"publish_imu_tf": "true",

"publish_tf": "true",

        }.items(),

    )




rtabmap_launch = GroupAction([

SetRemap("goal", "/rtabmap/goal_internal"),

IncludeLaunchDescription(

PythonLaunchDescriptionSource(

PathJoinSubstitution(

                    [

FindPackageShare("rtabmap_launch"),

"launch",

"rtabmap.launch.py",

                    ]

                )

            ),

launch_arguments={

# Run rtabmap_slam in "rtabmap" namespace so mapping topics

# appear under /rtabmap (e.g., /rtabmap/map).

"namespace": "rtabmap",

"rviz_cfg": rviz_cfg,

"args": "--delete_db_on_start --Rtabmap/DetectionRate 1.00",

"frame_id": "zed_camera_link",

"odom_topic": "/zed/zed_node/odom",

"rgb_topic": "/zed/zed_node/rgb/color/rect/image",

"visual_odometry": "false",

"publish_tf": "true",

"depth_topic": "/zed/zed_node/depth/depth_registered",

"camera_info_topic": "/zed/zed_node/rgb/color/rect/image/camera_info",

"wait_imu_to_init": "true",

"imu_topic": "/zed/zed_node/imu/data",

"rviz": "true",

"rtabmap_viz": "false",

"approx_sync": "false",

"rgbd_sync": "true",

"approx_rgbd_sync": "false",

"topic_queue_size": "2",

        }.items(),

        ),

    ])




return LaunchDescription(

        [

zed_camera_launch,

rtabmap_launch,

static_tf_node,

        ]

    )




 

You must follow the indications in this section of the documentation:

If you keep publish_tf, then you need a node that performs the required computations to provide the transforms that you need.