-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
How to publish disparity map? #1167
Comments
A filter type can be selected in the roslaunch instruction. You can then define the specific settings of the filter in a rosrun dynamic_reconfigure command immediately after the roslaunch instruction. The link below has an example of using dynamic_reconfigure to define a filter selected in roslaunch. I hope that applying filter settings with a rosrun instruction will give you the results you need when the stream is visualised in RViz. |
@MartyG-RealSense yes I’ve been able to turn on the filter by adding it to the roslaunch command however don’t know what topic the filter is being applied to? Also, I think the disparity filter is just on or off. It doesn’t have parameters that need changing through dynamic reconfigure but I’ll have to check. |
A list of published topics is here: https://github.com/IntelRealSense/realsense-ros#published-topics camera/depth/image_rect_raw seems like a good candidate for a choice of topic. |
In realsense-viewer, if you turn off the Disparity to Depth filter in the Depth Stream, I believe you get to see the Disparity map (instead of Depth Map), as the colors invert (This is logical as Disparity = (baseline * focal length)/depth is the inverse of depth). Yes, I am checking camera/depth/image_rect_raw in RViz, yet I am seeing no change in the data even if I turn the disparity filter on. I have also checked individual pixel values when applying the filter and they still give me depth data instead of disparity data. |
When turning the filter on, the following topics appear:
These don't seem to publish the disparity data as their data is of the dynamic_reconfigure type. When running |
As per the comment in #724 :
and also #826 could it be that the disparity filter changes to disparity and then back to depth again? So I can't actually see the disparity map? Is there any way I can turn off disparity_end so that the data doesn't turn back into depth? @doronhi I basically want the disparity map to be able to calculate the U-V-Disparity. |
I wondered too about the "and back" part when I saw it. I agree that tagging Doronhi into the discussion was a good idea, as I researched this problem deeply and could not find a solution. I do apologize. |
Some of the filters give better results when applied over the disparity image then over the depth image. A recommended scheme for using filters is mentioned in post-processing-filters.md |
@doronhi yeah understood! Thanks! Is there no way of publishing the disparity map instead of the depth one then? |
Hi @jorgemia Do you still require assistance with this case, please? Thanks! |
@MartyG-RealSense I never got an answer so I used an alternative method and no longer need a disparity map...but publishing the disparity map as a topic could be a useful feature to have. Don’t think this should be a hard thing to implement as the camera already produces this and then transforms it into depth. So would be good to have an option which you can turn on. |
The link below has a suggestion about how to visualize a disparity map from stereo_image_proc in RViz or rqt: |
@jorgemia Do you require further assistance please or can this case be closed? Thanks! |
Case closed due to no further comments received. |
I’ve seen there is a disparity filter that can be turned on, but see no difference when visualising the depth stream through rviz. Where can I see the changes when applying this filter? Is it possible to publish a topic with the disparity map and another topic with the depth (in metres) already processed simultaneously?
The text was updated successfully, but these errors were encountered: