ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Your arguments to create_subscription are around the wrong way. It should be:

mSub = create_subscription<sensor_msgs::msg::Image>( "/zed/zed_node/depth/depth_registered", camera_qos_profile, std::bind(&MinimalDepthSubscriber::depthCallback, this, _1));

See this example.

Your arguments to create_subscription are around the wrong way. It should be:

 mSub = create_subscription<sensor_msgs::msg::Image>(
            "/zed/zed_node/depth/depth_registered",
            camera_qos_profile,
            std::bind(&MinimalDepthSubscriber::depthCallback, this, _1));

Your QOS is also the wrong object type. You have to pass it a rclcpp::QoS reference.

See this example.