-
Notifications
You must be signed in to change notification settings - Fork 522
Closed
Description
Bug report
Required Info:
- Operating System:
- Ubuntu 20.04
- Installation type:
- binaries
- Version or commit hash:
- 9.2.0-1focal.20220211.031858
- DDS implementation:
- N/A
- Client library (if applicable):
- rclcpp
Steps to reproduce issue
Call rclcpp::ParameterEventHandler::get_parameter_from_event(const rcl_interfaces::msg::ParameterEvent & event, const std::string parameter_name, const std::string node_name) for a non-existent parameter.
Expected behavior
According to
rclcpp/rclcpp/include/rclcpp/parameter_event_handler.hpp
Lines 263 to 265 in c24e485
| * The user is responsible to check if the returned parameter has been properly assigned. | |
| * By default, if the requested parameter is not found in the event, the returned parameter | |
| * has parameter value of type rclcpp::PARAMETER_NOT_SET. |
Actual behavior
The function throws an exception and does not return normally. See
rclcpp/rclcpp/src/rclcpp/parameter_event_handler.cpp
Lines 135 to 139 in c24e485
| if (!get_parameter_from_event(event, p, parameter_name, node_name)) { | |
| throw std::runtime_error( | |
| "Parameter '" + parameter_name + "' of node '" + node_name + | |
| "' is not part of parameter event"); | |
| } |
Additional information
None
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels