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

ROS Node Parameters set is success even if there was an error in the value #3249

Open
edgarcamilocamacho opened this issue Nov 11, 2024 · 3 comments
Labels

Comments

@edgarcamilocamacho
Copy link

edgarcamilocamacho commented Nov 11, 2024

Required Info
Camera Model D435 / D435i
Firmware Version 5.16.0.1
Operating System & Version Ubuntu 20.04.6 LTS
Kernel Version (Linux Only) 5.10.104-tegra
Platform NVIDIA Jetson AGX
Librealsense SDK Version 2.56.1
ROS Distro Humble
RealSense ROS Wrapper Version 4.56.1

Issue Description

I wanted to change the format of the RGB camera and did a typo like:

$ ros2 param set /gary/cameras/nav_bottom rgb_camera.color_format "BRG8"
Set parameter successful

As you can see the node responds that the setting of the parameter was success, but the logs of the camera's node says:

[nav_bottom-5] [ERROR] [1731349854.170183534] [gary.cameras.nav_bottom]: color stream doesn't support BRG8 format. Run 'ros2 param describe <your_node_name> rgb_camera.color_format' to get the list of supported formats. Setting the ROS param 'rgb_camera.color_format' back to: BGR8

If the parameter is not ok and the node itselfs has knowledge about it, it should return FAILED when trying to set the parameter, no?

@MartyG-RealSense
Copy link
Collaborator

Hi @edgarcamilocamacho Technically, RealSense cameras (and the librealsense SDK) support the BGR8 color format. However, the RealSense ROS wrapper - which runs on top of librealsense - only provides the streams in one format. For the color stream, that default format is RGB8.

In 2021 a RealSense ROS user at #1670 edited the source code of the ROS wrapper's base_realsense_node.cpp file to change the supported default format for a particular stream type.

@edgarcamilocamacho
Copy link
Author

But what I mean is that I made a typo and I didin't write "BGR" but "BRG", that's the point.

@MartyG-RealSense
Copy link
Collaborator

Thanks for the clarification. It seems like a problem with ROS2 rather than the RealSense ROS wrapper, as ROS2 allows it to register as successful but the wrapper catches the error.

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