From c5e3f5f27baf359e5f4919a0f4233f1afcb52a8a Mon Sep 17 00:00:00 2001 From: "Michael X. Grey" Date: Mon, 29 Apr 2024 03:07:42 +0000 Subject: [PATCH 1/2] Add a constant value for failing to set an undeclared parameter Signed-off-by: Michael X. Grey --- rcl_interfaces/msg/SetParametersResult.msg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rcl_interfaces/msg/SetParametersResult.msg b/rcl_interfaces/msg/SetParametersResult.msg index 8dd4192b..b61d7df8 100644 --- a/rcl_interfaces/msg/SetParametersResult.msg +++ b/rcl_interfaces/msg/SetParametersResult.msg @@ -5,3 +5,9 @@ bool successful # Reason why the setting was a failure. On success, the contents of this field # are undefined. This should only be used for logging and user interfaces. string reason + +# This reason for failing to set a parameter value should be given when the node +# is only allowed to set values for declared parameters, and the parameter that +# the request was trying to set not declared by the node. Use the ListParameters +# service to see which parameters are declared. +string REASON_UNDECLARED_NOT_ALLOWED = "Parameter is not declared by the node, which only allows declared parameters" From 40d429d935f50406072dd522d7c5a98406323a9a Mon Sep 17 00:00:00 2001 From: "Michael X. Grey" Date: Mon, 29 Apr 2024 05:11:34 +0000 Subject: [PATCH 2/2] Use lowercase to match other reasons in rclcpp Signed-off-by: Michael X. Grey --- rcl_interfaces/msg/SetParametersResult.msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rcl_interfaces/msg/SetParametersResult.msg b/rcl_interfaces/msg/SetParametersResult.msg index b61d7df8..1e928ed4 100644 --- a/rcl_interfaces/msg/SetParametersResult.msg +++ b/rcl_interfaces/msg/SetParametersResult.msg @@ -10,4 +10,4 @@ string reason # is only allowed to set values for declared parameters, and the parameter that # the request was trying to set not declared by the node. Use the ListParameters # service to see which parameters are declared. -string REASON_UNDECLARED_NOT_ALLOWED = "Parameter is not declared by the node, which only allows declared parameters" +string REASON_UNDECLARED_NOT_ALLOWED = "parameter is not declared by the node, which only allows declared parameters"