-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow declaring uninitialized parameters (#798)
* Allow declaring uninitialized parameters Parameters can now be declared without a default value and without an override. Attempting to access a statically typed parameter that does not have value will raise an exception. Getting dynamically typed parameters will return an unset parameter value. This change is equivalent to that made in rclcpp: ros2/rclcpp#1673 Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Fix flake8 Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Minor refactor Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Don't allow static parameters to be undeclared Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Return alternative for uninitialized parameters in get_parameter_or Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Ditto for dynamic parameters This is the same behavior as rclcpp. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Fix lint Signed-off-by: Jacob Perron <jacob@openrobotics.org>
- Loading branch information
1 parent
714f69e
commit 38a4088
Showing
3 changed files
with
79 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters