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

"disparity_filter.enable" : "true" does not work #3184

Closed
Shunichi09 opened this issue Aug 17, 2024 · 4 comments
Closed

"disparity_filter.enable" : "true" does not work #3184

Shunichi09 opened this issue Aug 17, 2024 · 4 comments
Labels

Comments

@Shunichi09
Copy link

Shunichi09 commented Aug 17, 2024

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model D435 / D435i
Firmware Version 5.16.0.1
Operating System & Version ubuntu 22.04}
Kernel Version (Linux Only) (e.g. 5.4)
Platform PC
Librealsense SDK Version 2.. }
Language cpp and ros2
Segment {Robot}
ROS Distro Humble }
RealSense ROS Wrapper Version current ros2-dev branch

Issue Description

When I apply "disparity_filter.enable": "true", I encounter the following error:

[realsense2_camera_node-1] Please try different format of this stream.
[realsense2_camera_node-1] [ERROR] [1723874490.956257341] [camera.rs_745412071535]: cv::Mat is empty. Ignoring this frame.
[realsense2_camera_node-1] [ERROR] [1723874490.956261868] [camera.rs_745412071535]: Could not fill ROS message. Frame was dropped.
[realsense2_camera_node-1] [ERROR] [1723874490.992304169] [camera.rs_745412071535]: Format DISPARITY32 is not supported in realsense2_camera node.

I suspect this error might be due to an incorrect format setting for either the depth or RGB streams.
My current configuration is as follows:

"depth_module.depth_profile": "1280x720x30",
"rgb_camera.color_profile": "1280x720x30",
"depth_module.infra_profile": "1280x720x30",

I searched through the documentation but couldn't find any information regarding this issue.

Could you please advise me on how to resolve this?

I really appreciate your help in advance.

My current launch settingis

realsense_launch = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            os.path.join(
                get_package_share_directory("realsense2_camera"),
                "launch",
                "rs_launch.py",
            )
        ),
        launch_arguments={
            "serial_no": LaunchConfiguration("realsense_serial_number"),
            "depth_module.depth_profile": "1280x720x30",
            "rgb_camera.color_profile": "1280x720x30",
            "depth_module.infra_profile": "1280x720x30",
            "rgb_camera.color_format": "RGB8",
            "enable_sync": "true",
            "align_depth.enable": "true",
            "enable_rgbd": "false",
            "enable_color": "true",
            "enable_depth": "true",
            "camera_name": LaunchConfiguration("realsense_camera_name"),
            "rgb_camera.enable_auto_white_balance": "false",
            "rgb_camera.white_balance": "4600",
            "spatial_filter.enable": "true",  
            "temporal_filter.enable": "true", 
            "hole_filling_filter.enable": "false", 
            "decimation_filter.enable": "true",  
            "disparity_filter.enable": "true",
            "hdr_merge.enable": "true",
        }.items(),
        condition=IfCondition(LaunchConfiguration("realsense_node")),
    )
@MartyG-RealSense
Copy link
Collaborator

Hi @Shunichi09 A RealSense ROS user at #2304 who also had problems with setting the disparity filter to true found that they also had to set disparity_to_depth.enable to true to resolve the problem, as the disparity image is then output in 16-bit format instead of the unsupported 32-bit format.

@Shunichi09
Copy link
Author

Thank you for the quick reply!!

Wow! I solved the problem. I really appreciate your help.

@MartyG-RealSense
Copy link
Collaborator

You are very welcome, @Shunichi09 - I'm pleased that I could help. Thanks very much for the update!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to solution achieved and no further comments received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants