Commit b668729
mppi parameters_handler: Improve verbose handling (ros-navigation#4704) (ros-navigation#4711)
* mppi parameters_handler: Improve verbose handling (ros-navigation#4704)
The "verbose" parameter of the parameters_handler is
a special case that needs registration before the
dynamic parameter handler callback is registered.
In verbose mode make the parameter handler info/warn/debug
messages more expressive.
Signed-off-by: Mike Wake <[email protected]>
* Address review comments. (ros-navigation#4704)
* remove comments.
* Use RCLCPP_DEBUG instead of INFO for low level messages.
* Add test for trying to access parameters that are not declared.
Signed-off-by: Mike Wake <[email protected]>
* mppi parameters_handler: Improve static/dynamic/not defined logging (ros-navigation#4704)
Attempts to change undefined parameters will not be successful
and will log an error.
Attempts to change static parameters will be ignored, a debug
message is logged if a change in parameters is attempted.
Signed-off-by: Mike Wake <[email protected]>
* mppi parameters_handler: populate SetParametersResult (ros-navigation#4704)
Provide a mechanism to populate an rcl_interfaces::msg::SetParametersResult
with the reasons for unsuccessful parameter setting, so that it may be
propogated back to a set parameter client.
The mechanism provides feedback when attempting to set undefined
parameters, static parameters and could be used to validate dynamic
parameters and provide a reason for rejection.
NOTE: This changes public interface of ParametersHandler class.
s/setDynamicParamCallback/setParamCallback
s/addDynamicParamCallback/addParamCallback which takes
a callback function that is able to populate a
rcl_interfaces::msg::SetParametersResult.
In order to indicate an unsuccessful parameter change and the
reason, callback functions should append a "\n"
to the reason before appending to if it is not empty.
Signed-off-by: Mike Wake <[email protected]>
* mppi parameters_handler: fix reason handling and improve tests
Signed-off-by: Mike Wake <[email protected]>
---------
Signed-off-by: Mike Wake <[email protected]>
Signed-off-by: Joseph Duchesne <[email protected]>1 parent 6bdac71 commit b668729
File tree
4 files changed
+182
-34
lines changed4 files changed
+182
-34
lines changedLines changed: 38 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | | - | |
| 107 | + | |
| 108 | + | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| |||
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
117 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
118 | 129 | | |
119 | 130 | | |
120 | 131 | | |
121 | 132 | | |
122 | | - | |
| 133 | + | |
123 | 134 | | |
124 | 135 | | |
125 | 136 | | |
| |||
160 | 171 | | |
161 | 172 | | |
162 | 173 | | |
163 | | - | |
164 | | - | |
| 174 | + | |
165 | 175 | | |
166 | 176 | | |
167 | 177 | | |
| |||
179 | 189 | | |
180 | 190 | | |
181 | 191 | | |
182 | | - | |
| 192 | + | |
183 | 193 | | |
184 | 194 | | |
185 | 195 | | |
| |||
208 | 218 | | |
209 | 219 | | |
210 | 220 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 221 | + | |
215 | 222 | | |
216 | 223 | | |
217 | 224 | | |
| |||
224 | 231 | | |
225 | 232 | | |
226 | 233 | | |
227 | | - | |
| 234 | + | |
| 235 | + | |
228 | 236 | | |
229 | 237 | | |
230 | 238 | | |
231 | 239 | | |
232 | 240 | | |
233 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
234 | 244 | | |
235 | | - | |
236 | 245 | | |
237 | 246 | | |
238 | 247 | | |
239 | 248 | | |
240 | 249 | | |
241 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
242 | 260 | | |
243 | | - | |
244 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
245 | 265 | | |
246 | 266 | | |
247 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
67 | | - | |
| 71 | + | |
68 | 72 | | |
69 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
74 | 82 | | |
75 | 83 | | |
76 | 84 | | |
77 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
78 | 88 | | |
79 | 89 | | |
80 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
108 | | - | |
| 108 | + | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
149 | 196 | | |
150 | 197 | | |
151 | 198 | | |
| |||
167 | 214 | | |
168 | 215 | | |
169 | 216 | | |
170 | | - | |
171 | | - | |
172 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
173 | 223 | | |
174 | | - | |
| 224 | + | |
175 | 225 | | |
176 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
177 | 234 | | |
178 | 235 | | |
179 | 236 | | |
180 | 237 | | |
181 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
0 commit comments