You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi @Serafadam ! i'm working with a turtlebot4 equipped with oak-d camera. i'm launching
ros2 launch turtlebot4_bringup oakd.launch.py
and i see that this launch file runs something from depthai-ros-driver.
changing config file https://github.com/turtlebot/turtlebot4_robot/blob/humble/turtlebot4_bringup/config/oakd_pro.yaml
i change
i_pipeline_type: RGB to RGBD to get depth image topic
i_height: 720 to 250 to match preview_image size 250x250 (rgb image)
i_width: 1280 to 250 to match preview_image size 250x250 (rgb image)
i need bgr and depth images to be the same size beacuse it is a requirement i need for running a visual odometry algorithm (rtabmap)
but when i change i_height and i_width to 250 and run the launch file, camera is not working anymore and i'm getting an error on terminal.
Is there a way to fix it or maybe another approach to have bgr and depth images of the same size? i tried all depthai-ros-driver and depthai-example and i found images of the same size but i had big delays, intead using
ros2 launch turtlebot4_bringup oakd.launch.py and changing i_pipeline_type: RGB to RGBD i'm getting fewer delays so it could be the best solution.
another requirement is that i need ros2 message of type Image and not CompressedImage
Thank you for your help!
The text was updated successfully, but these errors were encountered:
Hi @IacopoFornai, resizing images is a little bit tricky since we have two separate resize mechanisms, this is explained on this and this documentation pages. Although I don't think you can set it to output 250x250 image without issues in the alignment, you can get close to that and resize further by the means of writing some additional ROS nodes to do that.
One can be achieved by using rgb._i_set_isp_scale which is enabled by default with scale (2/3), this resizes 1080P image to 720P. This preserves aspect ratio & FOV and you can this sheet to see what values can be obtained from different resolution and ISP num/den combination. Note that for alignment final width/height must be divisible by 16 (you can just look at the fields in the sheet and check where all fields are green)
Another way is to use video output which might crop the image depending on the sizes you set, this is controlled by i_width and i_height parameters when rgb.i_set_isp_scale and rgb.i_output_isp are set to false
You could also try setting stereo.i_width and stereo.i_height to manipulate stereo output size itself, although this might result in similar issues as with setting video size directly.
Regarding message types, by Image messages are being output by default, CompressedImage topic is provided by ROS ImageTransport plugin mechanism
hi @Serafadam ! i'm working with a turtlebot4 equipped with oak-d camera. i'm launching
ros2 launch turtlebot4_bringup oakd.launch.py
and i see that this launch file runs something from depthai-ros-driver.
changing config file https://github.com/turtlebot/turtlebot4_robot/blob/humble/turtlebot4_bringup/config/oakd_pro.yaml
i change
i_pipeline_type: RGB to RGBD to get depth image topic
i_height: 720 to 250 to match preview_image size 250x250 (rgb image)
i_width: 1280 to 250 to match preview_image size 250x250 (rgb image)
i need bgr and depth images to be the same size beacuse it is a requirement i need for running a visual odometry algorithm (rtabmap)
but when i change i_height and i_width to 250 and run the launch file, camera is not working anymore and i'm getting an error on terminal.
Is there a way to fix it or maybe another approach to have bgr and depth images of the same size? i tried all depthai-ros-driver and depthai-example and i found images of the same size but i had big delays, intead using
ros2 launch turtlebot4_bringup oakd.launch.py and changing i_pipeline_type: RGB to RGBD i'm getting fewer delays so it could be the best solution.
another requirement is that i need ros2 message of type Image and not CompressedImage
Thank you for your help!
The text was updated successfully, but these errors were encountered: