-
Notifications
You must be signed in to change notification settings - Fork 390
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
improve workflow to avoid added latency #895
Comments
The original ROS wrapper was made in that way. I can understand your requirement, you can apply your modification if you need it. |
In that case, thank you for a quick answer. |
- allow setting pub_frame_rate to 0 - when 0 - disable timer based publishing - instead publish immidiately after grabbing Within current worklow publishing and grabbing threads work separately. With publishing rate == grabbing rate this - adds average FRAME_TIME/2 latency - adds pessimistic FRAME_TIME latency The fix removes latency by notifying ROS thread to publish after succesful grabbing Fix for: - stereolabs#895
For anybody in need to remove added latency in ROS1 fix is in: To keep compatibility with existing behavior:
All above was used to keep existing threading model and behavior compatibility. |
We avoid maintaining third-party forks if possible. If the fix looks like something mergeable we are happy to open pull request (and adapt as requested). If not let me know, I will close the issue. |
Preliminary Checks
Proposal
Publish depth/rgb data after grabbing instead of:
With:
This is adding worst case single frame latency (publish just before new data) and half frame latency on average.
Use-Case
Any low-latency ROS application needing depth/RGB data
Anything else?
grab thread (std::thread)
zed-ros-wrapper/zed_nodelets/src/zed_nodelet/src/zed_wrapper_nodelet.cpp
Line 3158 in 50dda07
ROS publish thread (ROS thread)
zed-ros-wrapper/zed_nodelets/src/zed_nodelet/src/zed_wrapper_nodelet.cpp
Line 569 in 50dda07
Run separately
It may be possible to keep current code structure and trigger ROS publishing after successful grab
(as opposed to timer based publishing)
The text was updated successfully, but these errors were encountered: