You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -38,6 +38,16 @@ and ETHz http://www.rsl.ethz.ch/education-students/lectures/ros.html
38
38
2.13 [roscpp: Basic Subscriber](#2.13)
39
39
2.14 [roscpp: Parameters](#2.14)
40
40
2.15 [Making and building the roscpp package](#2.15)
41
+
3.[Dynamic Reconfigure](#3)
42
+
3.1 [Introduction](#3.1)
43
+
3.2 [Command Line](#3.2)
44
+
3.3 [rqt_reconfigure](#3.3)
45
+
3.4 [cfg Files](#3.4)
46
+
3.5 [Setting Up Catkin for Dynamic Reconfigure](#3.5)
47
+
3.6 [rospy: Dynamic Reconfigure](#3.6)
48
+
3.7 [rospy: Dynamic Reconfigure Client](#3.7)
49
+
3.8 [roscpp: Dynamic Reconfigure](#3.8)
50
+
3.9 [roscpp: Dynamic Reconfigure Client](#3.9)
41
51
42
52
43
53
@@ -1321,7 +1331,31 @@ Most of the following sections will be adapted from [the dynamic_reconfigure tut
1321
1331
1322
1332
1323
1333
1324
-
### 3.2 rqt_reconfigure <aname="3.2"></a>
1334
+
### 3.2 Command Line <aname="3.1"></a>
1335
+
1336
+
[go to top](#top)
1337
+
1338
+
You're able to dynamically reconfigure nodes by calling the ROS service that is exposed by the dynamic reconfigure server each dynamically reconfigurable node is running.
1339
+
1340
+
Use tab completion to automatically generate the configurable parameter names!
1341
+
1342
+
```shell
1343
+
$ rosservice call /NODE_NAME/set_parameters
1344
+
```
1345
+
1346
+
You can also keep track of the descriptions of the dynamically reconfigurable parameters or any updates that the server receives by calling
1347
+
1348
+
```shell
1349
+
# For descriptions
1350
+
$ rostopic echo /NODE_NAME/parameter_descriptions
1351
+
1352
+
# For updates
1353
+
$ rostopic echo /NODE_NAME/parameter_updates
1354
+
```
1355
+
1356
+
1357
+
1358
+
### 3.3 rqt_reconfigure <aname="3.3"></a>
1325
1359
1326
1360
[go to top](#top)
1327
1361
@@ -1332,13 +1366,13 @@ One of the best ways to interact with dynamically reconfigurable nodes and param
Every parameter that is meant to be used with dynamic_reconfigure requires a cfg file to **define names, types, level, descriptions, defaults, min, and maxes.**
1358
1392
1359
1393
It's pretty simple to make one too! It's just Python.
If you want to use dynamic reconfigure to modify variables storing parameter values, you'd do it in the callback. In here we're just printing it to show what's going on
1487
+
1488
+
```Python
1489
+
#!/usr/bin/env python
1490
+
1491
+
import rospy
1492
+
1493
+
from dynamic_reconfigure.server import Server
1494
+
from dynamic_reconfigure_example.cfg import ExampleConfig
If you want to use dynamic reconfigure to modify variables storing parameter values, you'd do it in the callback. In here we're just printing it to show what's going on
1534
+
1535
+
```Python
1536
+
#!/usr/bin/env python
1537
+
1538
+
import rospy
1539
+
import dynamic_reconfigure.client
1540
+
1541
+
# Optional callback for the config returned by the server
1542
+
defcallback(config):
1543
+
rospy.loginfo("Config set to {int_param}, {double_param}, {str_param}, {bool_param}, {size}".format(**config))
If you want to use dynamic reconfigure to modify variables storing parameter values, you'd do it in the callback. In here we're just printing it to show what's going on
0 commit comments