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

ROS2 Dynamic Reconfigure Image Transport #2565

Closed
xkaraman opened this issue Nov 28, 2022 · 20 comments
Closed

ROS2 Dynamic Reconfigure Image Transport #2565

xkaraman opened this issue Nov 28, 2022 · 20 comments
Assignees
Labels

Comments

@xkaraman
Copy link

Currently only base topic parameters can be configured.

Image transport plugins like compressed, compressedDepth are not available for reconfigure from ros2 run rqt_reconfigure rqt_reconfigure
image

Trying to configure them manually with
ros2 param set /camera/camera .aligned_depth_to_color.image_raw.compressed.format png results to an error of

Setting parameter failed: parameter '.aligned_depth_to_color.image_raw.compressed.format' cannot be set because it was not declared

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Nov 30, 2022

Hi @xkaraman Your ros2 param set instruction looks unusual to me in regard to how it has full-stop marks instead of / symbols.

ros2 param set /camera/camera .aligned_depth_to_color.image_raw.compressed.format png

My expectation would be that the instruction would look more like this:

ros2 param set /camera/aligned_depth_to_color/image_raw/compressed

As aligned topics would only be published if align_depth was enabled and they are listed in the rqt_reconfigure window, it seems that you have enabled align_depth in your launch but are indeed missing the compressed topics.

Are the compressed topics listed outside of the rqt_reconfigure interface if you use the command ros2 topic list to list all currently available topics?

@xkaraman
Copy link
Author

Yeah .param it's seems unusual to me coming from ros1 but apparently that's how it's done in ros2. Also ros2 param set node_name param_name value is the way to go for setting them in ROS2.

Yes aligned_depth was set to true and topics where visible and able to visualize through rviz

@MartyG-RealSense
Copy link
Collaborator

@xkaraman I will highlight your issue to one of my Intel RealSense colleagues. Thanks very much for your patience!

@Nir-Az In this issue, @xkaraman has compressed topics listed in ROS2 when using ros2 topic list but cannot interact with those compressed topics in the rqt_reconfigure window during runtime after launch or configure them with ros2 param set instructions. Is that normal for ROS2 please? Thanks!

image

@Nir-Az
Copy link
Collaborator

Nir-Az commented Dec 4, 2022

Hi,
I am not familiar with image transport parameters, but are you sure you see the new compressed topic in the topic list?

@xkaraman
Copy link
Author

xkaraman commented Dec 5, 2022

Yes @Nir-Az, i have also confirmed through ros2 topic echo /camera/color/image_raw/compressed --once --no-arr that yields:

header:
  stamp:
    sec: 1670235648
    nanosec: 56710912
  frame_id: camera_color_optical_frame
format: rgb8; jpeg compressed bgr8
data: '<sequence type: uint8, length: 285846>'
---

I would like to also report that when i open ros2 run rqt_reconfigure rqt_reconfigure and navigate to camera/camera paremters, when i scroll down to see the pameters, colorizer.stream_format_filter is the last one i can see before rqt crashing with an expception of [ros2run]: Floating point exception.

@Nir-Az
Copy link
Collaborator

Nir-Az commented Dec 5, 2022

OK, we will need to investigate those 2 issues on our side
Thanks

@xkaraman
Copy link
Author

xkaraman commented Dec 5, 2022

I noticed that if i remove namespace argument when launching the node from ROS2 launch file rs_launch.py params do NOT have the . in from of the param that has been odd to me as well as @MartyG-RealSense. Maybe i should open a new issue for it?
Still no compressed parameters are shown though.

@MartyG-RealSense
Copy link
Collaborator

Hi @xkaraman Let's await the outcome of the investigation by @Nir-Az before creating another issue. Thanks!

@xkaraman
Copy link
Author

xkaraman commented Jan 3, 2023

Any news on this @MartyG-RealSense ?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jan 3, 2023

Hi @xkaraman I checked with the RealSense ROS team about this issue. They advised that it's in their pipeline but not a main focus at the moment and they will investigate it once they are able to get to it. Thanks very much for your patience.

@MartyG-RealSense
Copy link
Collaborator

Hi @xkaraman Bearing in mind the information in the comment above, do you require further assistance with this case please? Thanks!

@xkaraman
Copy link
Author

xkaraman commented Jan 10, 2023

Ok thanks for the update @MartyG-RealSense. Personally i don't need further assistance but maybe the issue must remain open until a fix is proposed?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jan 10, 2023

I put an Enhancement label on the case to signify to keep it open whilst the feature request remains active.

@SamerKhshiboun
Copy link
Contributor

SamerKhshiboun commented Mar 19, 2023

Hi @xkaraman

My name is Samer and I'm a developer in the RealSense SW Team.

Regarding the scroll down issue in the rqt_reconfigure and that the last parameter you see is colorizer.stream_format_filter:
The problem is that the next paramter that rqt_reconfigure trying to pull and view, is "colorizer.stream_index_filter" which defined as an INT value in a range of [-1, INT_MAX].
LibRealSense is returning this range, but somehow it overflows to be INT_MAX + 1, which rqt_reconfigure is not accepting as it limited to INT_MAX(32bit) and overflows this number to be negative number.

This is the message I get from rqt_reconfigure:
[WARN] [1679264563.906326759] [rqt_reconfigure]: Failed to retrieve parameters from node: argument 2 overflowed: value must be in the range -2147483648 to 2147483647
I see there are two problems:

1- in the rqt_reconfigure application which doesn't support big number (bigger than 32 bits) and also doesn't know to skip these errors. (Reference: ros-visualization/rqt_reconfigure#107)

2- in our ros wrapper, which we should prevent these cases in general (need to figure out why the value is increased by 1 while converting from float to double)
image

This answer can provide useful information: https://stackoverflow.com/questions/23420783/convert-int-max-to-float-and-then-back-to-integer

I will continue investigating this issue and will look for a proper way to define the parameter range.
Regarding the other issue, I need to look more deeper in order to understand it.

Will update asap.

@xkaraman
Copy link
Author

Thanks @SamerKhshiboun for the update! If you have any other updates or want me to help somehow, you are more than welcome to ask! :)

@johannesWen
Copy link

Hi, @SamerKhshiboun
Do you have an update concerning the integer overflow?

@MartyG-RealSense
Copy link
Collaborator

Hi @SamerKhshiboun Could you kindly assist with the question of @johannesWen above, please? Thanks!

@SamerKhshiboun
Copy link
Contributor

Hi @MartyG-RealSense , @johannesWen
We opened a PR on librealsense repo
IntelRealSense/librealsense#11858

When this PR will be merged, you can use the latest code of librealsense (development branch) and recompile your librealsense library, and then when using rqt_reconfigure the problem will disappear.

Also, this fix will be included in the future releases of Librealsense

Thanks,
Samer

@MartyG-RealSense
Copy link
Collaborator

Hi @xkaraman and @johannesWen As PR IntelRealSense/librealsense#11858 got merged into the librealsense SDK on May 31 2023, do you require further assistance with this case please? Thanks!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to merging of a fix into the librealsense SDK.

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

5 participants