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

Setting visual presets for D435i in ROS 2 #2445

Closed
hello-chintan opened this issue Aug 11, 2022 · 6 comments
Closed

Setting visual presets for D435i in ROS 2 #2445

hello-chintan opened this issue Aug 11, 2022 · 6 comments
Labels

Comments

@hello-chintan
Copy link

Hello,

I am using a D435i camera with ROS 2 Galactic and looking to launch the realsense ROS 2 driver with the HighAccuracyPreset visual preset. How do I apply this preset while launching the driver? I also want to know if there is a way to change the visual preset to its default values while the camera is running without having to relaunch the driver.

Thank you!

@MartyG-RealSense
Copy link
Collaborator

Hi @hello-chintan You could first obtain the json preset file for HighAccuracyPreset from the link below if you do not have it already.

https://dev.intelrealsense.com/docs/d400-series-visual-presets#preset-table

You could then load and apply the json file during launch by defining a path to it in the ROS2 rs_launch.py launch file's json_file_path parameter.

https://github.com/IntelRealSense/realsense-ros/blob/ros2-beta/realsense2_camera/launch/rs_launch.py#L20

I am not aware of a method for changing the preset in ROS2 without stopping the session and relaunching.

@hello-chintan
Copy link
Author

Hey @MartyG-RealSense. Thank you for the response! I got the camera to use the HighAccuracyPreset through the .json file. I have just one follow-up question on this. I understand that in ROS 1 we can switch the visual preset parameter using the dynamic_reconfigure package while the camera is active. Since dynamic_reconfigure has not been ported to ROS 2, is there an alternative to achieving this through other means, possibly by using a similar ROS 2 package? I think I am just confused that if it was possible in ROS 1, is it just the absence of the right ROS 2 package that is the hurdle?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 19, 2022

In the Galactic-compatible ros2 wrapper branch (the previous generation of ROS2 wrapper before the current ros2_beta one) you can access the parameters during runtime with ros2 run rqt_reconfigure rqt_reconfigure

https://github.com/IntelRealSense/realsense-ros/tree/ros2#view-and-modify-camera-controls-params-in-runtime

The ros2 wrapper version that matches with librealsense 2.50.0 is 3.2.3

https://github.com/IntelRealSense/realsense-ros/releases/tag/3.2.3

@MartyG-RealSense
Copy link
Collaborator

Hi @hello-chintan Do you require further assistance with this case, please? Thanks!

@hello-chintan
Copy link
Author

Hey, @MartyG-RealSense. Thank you for pointing me to the resources. I'm closing the issue.

@MartyG-RealSense
Copy link
Collaborator

You are very welcome, @hello-chintan - thanks very much for the update!

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