luxonis / depthai-ros

Official ROS Driver for DepthAI Sensors.
MIT License
239 stars 173 forks source link

Problem with launch ros driver for "OAK-D Pro W" #378

Closed SDADEEC closed 10 months ago

SDADEEC commented 10 months ago

Hi, thanks very much for the excellent README file. I encounter a problem when modifying the ros driver files based on README's description.

According to README.md, in "Depthai ROS Driver" -> "Specific camera configurations:" -> "OAK D PRO W", I need to set "rgb.i_resolution" to 720 to properly align depth image to color. So I modify the "rgbd.yaml" file by simply adding rgb_i_resolution: '720', and then launch the driver with corresponding "rgbd_pcl.launch" file.

But I got the following info

SUMMARY
========

PARAMETERS
 * /depth_image_to_rgb_pointcloud/queue_size: 10
 * /oak/camera_i_nn_type: none
 * /oak/stereo_i_subpixel: True
 * /robot_description: <?xml version="1....
 * /rosdistro: noetic
 * /rosversion: 1.16.0

NODES
  /
    depth_image_to_rgb_pointcloud (nodelet/nodelet)
    oak (nodelet/nodelet)
    oak_nodelet_manager (nodelet/nodelet)
    oak_state_publisher (robot_state_publisher/robot_state_publisher)

ROS_MASTER_URI=http://localhost:11311

process[oak_state_publisher-1]: started with pid [456029]
process[oak_nodelet_manager-2]: started with pid [456030]
process[oak-3]: started with pid [456036]
process[depth_image_to_rgb_pointcloud-4]: started with pid [456038]
[ INFO] [1693238758.452962541]: Loading nodelet /oak of type depthai_ros_driver/Camera to manager oak_nodelet_manager with the following remappings:
[ INFO] [1693238758.455859573]: waitForService: Service [/oak_nodelet_manager/load_nodelet] has not been advertised, waiting...
[ INFO] [1693238758.507263625]: Initializing nodelet with 12 worker threads.
[ INFO] [1693238758.518209274]: waitForService: Service [/oak_nodelet_manager/load_nodelet] is now available.
[ INFO] [1693238758.694691386]: No ip/mxid/usb_id specified, connecting to the next available device.
[ INFO] [1693238761.409327861]: Camera with MXID: 18443010819A850E00 and Name: 1.6 connected!
[ INFO] [1693238761.410013403]: USB SPEED: SUPER
[ INFO] [1693238761.431406948]: Device type: OAK-D-PRO-W
[ INFO] [1693238761.434096822]: Pipeline type: RGBD
[ INFO] [1693238761.693813287]: Finished setting up pipeline.
[18443010819A850E00] [1.6] [1.286] [ColorCamera(0)] [warning] Unsupported resolution set for detected camera IMX378/214, needs 1080_P / 4_K / 12_MP. Defaulting to 1080_P
[18443010819A850E00] [1.6] [1.508] [StereoDepth(3)] [error] Custom disparity/depth width must be multiple of 16.
[ INFO] [1693238762.074084974]: Camera ready!

The camera has no output after that. Do you know how to deal with the error and warning in the last part?

I also tried to remove the rgb_i_resolution: '720' in the yaml file, and launch it again. But the error and warning still exist. Is there any option to reset the camera parameter every time when launch it?

Serafadam commented 10 months ago

Hi @SDADEEC, thanks for the information, it seems your camera which has IMX378, which doesn't require custom resolution setting, I will update the documentation with that information.

SDADEEC commented 10 months ago

Hi @Serafadam, thanks for the explanation!