# Revision history [back]

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.