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

Not working on ROS2 Galactic/Rolling #2245

Closed
yushijinhun opened this issue Feb 6, 2022 · 7 comments
Closed

Not working on ROS2 Galactic/Rolling #2245

yushijinhun opened this issue Feb 6, 2022 · 7 comments
Labels

Comments

@yushijinhun
Copy link
Contributor

Due to a breaking change made in ROS2 Galactic, realsense2_camera_node will crash on startup:

terminate called after throwing an instance of 'rclcpp::exceptions::InvalidParameterTypeException'
  what():  parameter 'depth_module.auto_gain_limit_toggle' has invalid type: cannot undeclare an statically typed parameter

The solution is to set dynamic_typing flag in ParameterDescriptor (see yushijinhun@5958859), but this flag is introduced in Galactic and doesn't work on older ROS2 releases.

@MartyG-RealSense
Copy link
Collaborator

Hi @yushijinhun I have not seen this error occur previously. Are you using the most recent ROS2 wrapper version 4.0.1 or the older 3.2.3 that is also compatible with librealsense SDK version 2.50.0?

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

@yushijinhun
Copy link
Contributor Author

I'm using the latest commit from ros2-beta branch and ROS2 Rolling. My camera is RealSense D455.

@MartyG-RealSense
Copy link
Collaborator

As this particular error has not been reported before as far as I am aware, it's very useful that you have highlighted it in your report as it may be an issue that was introduced in the recent 4.0.1 rather than the older 3.2.3. Thanks!

@doronhi
Copy link
Contributor

doronhi commented Feb 7, 2022

Hi @yushijinhun
In Galactic, The error exists in version 3.2.3 when running with "hdr_merge" filter:
ros2 launch realsense2_camera rs_launch.py filters:=hdr_merge

Version 4.0.1 introduced extensive usage of rclcpp::Node::undeclare_parameter function which causes this error.
The solution you propose works. I want to make sure that this is the intended approach before applying it. To that end, I posted question #395760 in ros_answers.com. I hope to get a clear understanding of the issue soon and fix it accordingly.

@imstevenpmwyca
Copy link

Hello @yushijinhun and @doronhi,
I'm getting a similar error when trying to unload the component:
terminate called after throwing an instance of 'rclcpp::exceptions::InvalidParameterTypeException' what(): parameter 'accel_fps' has invalid type: cannot undeclare an statically typed parameter
I'm using a D455 and the ros2 branch (b364081)

@yushijinhun
Copy link
Contributor Author

I confirm that it has been fixed in #2247.

@doronhi
Copy link
Contributor

doronhi commented Feb 15, 2022

Thanks for noticing the issue and confirming the correction.

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

4 participants