Commit 6857dd2
authored
Introducing ros2 parameters and name remapping (#576)
This PR introduces ROS2 parameter and name remapping support.
Parameter Use-cases:
Declare Parameters
Override Declared Parameters
Override Declared Parameters from yaml parameters file
List Parameters
Describe Parameters
Get Parameters
Set Parameters
Set Parameters Atomically
Remap Use-cases:
Remap node name
Remap node namespace name
Remap publisher topic name
Remap service name
1. Name remapping and paramter overrides w/ yaml file support is
delegated to rcl api.
2. index#init() modified to accept an argv array with --ros-args
commandline arguments.
3. index#createNode() accepts NodeOptions for programmatic defined
parameter overrides.
4. Added parameter.js with
ParameterType
Parameter
ParameterDescription
FloatingPointRange
IntegerRange
5. Added is-close module dependency for use in the FloatingPointRange
class.
6. New rcl_bindings functions:
getParameterOverrides()
getTopic()
getServiceName()
7. Node.js changes:
added instance vars:
_parameters
_parameterDescriptors
_parameterService
_parameterEventPublisher
init() function changes:
sets up parameter-overrides
optionally declares parameters from parameter-overrides
starts parameterService
creates parameterEventPublisher
Node methods:
getParameterOverrides()
hasParameter()
declareParameter()
declareParameters()
undeclareParameter()
getParameter()
getParameters()
hasParameterDescriptor()
getParameterDescriptor()
getParameterDescriptors()
setParameter()
setParameters()
setParameterAtomically()
setParametersAtomically()
_getNativeParameterOverrides()
_valdateParameters()
8. Tests files:
test-parameters.js
test-parameter-service.js
test-remapping.js
9. Examples:
parameter-declaration-example.js
parameter-override-example.js
Fix #414, #415, #416, #421.1 parent 8006534 commit 6857dd2
File tree
29 files changed
+3799
-38
lines changed- example
- lib
- src
- test
- types
- yaml
- types
29 files changed
+3799
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| |||
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
100 | 111 | | |
101 | 112 | | |
102 | 113 | | |
103 | 114 | | |
104 | 115 | | |
| 116 | + | |
105 | 117 | | |
106 | 118 | | |
107 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
108 | 125 | | |
109 | 126 | | |
110 | 127 | | |
111 | 128 | | |
112 | 129 | | |
113 | 130 | | |
| 131 | + | |
114 | 132 | | |
115 | | - | |
| 133 | + | |
116 | 134 | | |
117 | 135 | | |
118 | 136 | | |
119 | 137 | | |
120 | 138 | | |
121 | | - | |
| 139 | + | |
122 | 140 | | |
123 | 141 | | |
124 | 142 | | |
| |||
127 | 145 | | |
128 | 146 | | |
129 | 147 | | |
| 148 | + | |
130 | 149 | | |
131 | 150 | | |
132 | | - | |
| 151 | + | |
133 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
134 | 161 | | |
135 | 162 | | |
136 | 163 | | |
| |||
150 | 177 | | |
151 | 178 | | |
152 | 179 | | |
153 | | - | |
| 180 | + | |
154 | 181 | | |
155 | 182 | | |
156 | 183 | | |
| |||
0 commit comments