Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Camera stream delayed #266

Closed
etigafy opened this issue Mar 29, 2023 · 4 comments
Closed

[BUG] Camera stream delayed #266

etigafy opened this issue Mar 29, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@etigafy
Copy link

etigafy commented Mar 29, 2023

I'm using the oak-d pro on the TB4 and running a pose estimation to drive towards a dock. I'm using the following parameters:
/oakd:
ros__parameters:
camera:
i_enable_imu: false
i_enable_ir: false
i_floodlight_brightness: 0
i_laser_dot_brightness: 100
i_nn_type: none
i_pipeline_type: RGB
i_usb_speed: SUPER_PLUS
rgb:
i_board_socket_id: 0
i_fps: 30.0
i_height: 720
i_interleaved: false
i_max_q_size: 10
i_preview_size: 250
i_enable_preview: false
i_low_bandwidth: true
i_keep_preview_aspect_ratio: true
i_publish_topic: true
i_resolution: '1080'
i_width: 1280
use_sim_time: false
with the 1280x720 image size the image stream is delayed about 3s which is really bad for a docking scenario. The topic /oakd/rgb/image_raw/compressed is publishing with 29 Hz.

I tried to use smaller image sizes but got troubles with the pose estimation which might be due to the camera calibration which i got from device.readCalibration() are these values not accurate enough for smaller images?

Is there the possibility to just publish the compressed image just in monochrome?

@etigafy etigafy added the bug Something isn't working label Mar 29, 2023
@Serafadam
Copy link
Collaborator

Hi, I assume this delay is occurring when streaming images over a network to some other device? If that's the case there's a lot of things that can influence latency, mostly network speed and setup. Some tips - you can try out DDS Tuning and using for example preview stream instead of RGB. Newest PR for Humble adds more ways you can also resize your RGB images.

@etigafy
Copy link
Author

etigafy commented Apr 25, 2023

Thank you for answering. Yes, exactly I'm running the Cam Nodes on a Raspberry PI as I'm using a Turtlebot4. Is there a way to resize images with the older version? As I don't want to mess up the Turtlebot4 image with updating the depthai-ros package. Is it also possible to get accurate camera calibration data for different image sizes? Is there a possibility to publish the images just in monochrome? Thanks in advance.

@Serafadam
Copy link
Collaborator

Hi, other way to set custom size would be to build custom node as in depthai_examples. Updating driver shouldn't change anything significant, though you could also use Docker container to get latest camera driver in isolated environment. Camera info gets updated based on new size, and regarding monochrome, it's not available in the driver itself, although you could just make a simple node that subscribes and republishes those images, same way as in depthai_filters.

@Serafadam
Copy link
Collaborator

Closing due to inactivity, please reopen if there are still questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants