rclnodejs 1.5.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +79 -3
- package/lib/action/client.js +55 -9
- package/lib/action/deferred.js +8 -2
- package/lib/action/server.js +10 -1
- package/lib/action/uuid.js +4 -1
- package/lib/client.js +152 -3
- package/lib/clock.js +4 -1
- package/lib/context.js +12 -2
- package/lib/duration.js +37 -12
- package/lib/errors.js +571 -0
- package/lib/event_handler.js +21 -4
- package/lib/interface_loader.js +52 -12
- package/lib/lifecycle.js +8 -2
- package/lib/logging.js +12 -3
- package/lib/message_serialization.js +179 -0
- package/lib/native_loader.js +9 -4
- package/lib/node.js +283 -47
- package/lib/parameter.js +176 -45
- package/lib/parameter_client.js +506 -0
- package/lib/parameter_watcher.js +309 -0
- package/lib/qos.js +22 -5
- package/lib/rate.js +6 -1
- package/lib/serialization.js +7 -2
- package/lib/subscription.js +16 -1
- package/lib/time.js +136 -21
- package/lib/time_source.js +13 -4
- package/lib/utils.js +313 -0
- package/lib/validator.js +11 -12
- package/package.json +2 -7
- package/prebuilds/linux-arm64/humble-jammy-arm64-rclnodejs.node +0 -0
- package/prebuilds/linux-arm64/jazzy-noble-arm64-rclnodejs.node +0 -0
- package/prebuilds/linux-arm64/kilted-noble-arm64-rclnodejs.node +0 -0
- package/prebuilds/linux-x64/humble-jammy-x64-rclnodejs.node +0 -0
- package/prebuilds/linux-x64/jazzy-noble-x64-rclnodejs.node +0 -0
- package/prebuilds/linux-x64/kilted-noble-x64-rclnodejs.node +0 -0
- package/rosidl_convertor/idl_convertor.js +3 -2
- package/rosidl_gen/generate_worker.js +1 -1
- package/rosidl_gen/idl_generator.js +11 -24
- package/rosidl_gen/index.js +1 -1
- package/rosidl_gen/templates/action-template.js +68 -0
- package/rosidl_gen/templates/message-template.js +1113 -0
- package/rosidl_gen/templates/service-event-template.js +31 -0
- package/rosidl_gen/templates/service-template.js +44 -0
- package/rosidl_parser/rosidl_parser.js +2 -2
- package/third_party/ref-napi/lib/ref.js +0 -45
- package/types/base.d.ts +3 -0
- package/types/client.d.ts +36 -0
- package/types/errors.d.ts +447 -0
- package/types/index.d.ts +17 -0
- package/types/interfaces.d.ts +1910 -1
- package/types/node.d.ts +56 -1
- package/types/parameter_client.d.ts +252 -0
- package/types/parameter_watcher.d.ts +104 -0
- package/rosidl_gen/templates/CMakeLists.dot +0 -40
- package/rosidl_gen/templates/action.dot +0 -50
- package/rosidl_gen/templates/message.dot +0 -851
- package/rosidl_gen/templates/package.dot +0 -16
- package/rosidl_gen/templates/service.dot +0 -26
- package/rosidl_gen/templates/service_event.dot +0 -10
package/types/node.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ declare module 'rclnodejs' {
|
|
|
12
12
|
name: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Valid serialization modes for message conversion
|
|
17
|
+
*/
|
|
18
|
+
type SerializationMode = 'default' | 'plain' | 'json';
|
|
19
|
+
|
|
15
20
|
/**
|
|
16
21
|
* A filter description similar to a SQL WHERE clause that limits
|
|
17
22
|
* the data wanted by a Subscription.
|
|
@@ -56,6 +61,15 @@ declare module 'rclnodejs' {
|
|
|
56
61
|
*/
|
|
57
62
|
isRaw?: boolean;
|
|
58
63
|
|
|
64
|
+
/**
|
|
65
|
+
* Controls message serialization format, default: 'default'.
|
|
66
|
+
*
|
|
67
|
+
* - 'default': Use native rclnodejs behavior (respects enableTypedArray setting)
|
|
68
|
+
* - 'plain': Convert TypedArrays to regular arrays
|
|
69
|
+
* - 'json': Fully JSON-safe (handles TypedArrays, BigInt, etc.)
|
|
70
|
+
*/
|
|
71
|
+
serializationMode?: SerializationMode;
|
|
72
|
+
|
|
59
73
|
/**
|
|
60
74
|
* ROS Middleware "quality of service" setting, default: QoS.profileDefault.
|
|
61
75
|
*/
|
|
@@ -76,7 +90,8 @@ declare module 'rclnodejs' {
|
|
|
76
90
|
* enableTypedArray: true,
|
|
77
91
|
* qos: QoS.profileDefault,
|
|
78
92
|
* isRaw: false,
|
|
79
|
-
* contentFilter: undefined
|
|
93
|
+
* contentFilter: undefined,
|
|
94
|
+
* serializationMode: 'default'
|
|
80
95
|
* }
|
|
81
96
|
* ```
|
|
82
97
|
*/
|
|
@@ -392,6 +407,32 @@ declare module 'rclnodejs' {
|
|
|
392
407
|
callback: ServiceRequestHandler<T>
|
|
393
408
|
): ServiceType<T>;
|
|
394
409
|
|
|
410
|
+
/**
|
|
411
|
+
* Create a ParameterClient for accessing parameters on a remote node.
|
|
412
|
+
*
|
|
413
|
+
* @param remoteNodeName - The name of the remote node whose parameters to access.
|
|
414
|
+
* @param options - Options for parameter client.
|
|
415
|
+
* @returns An instance of ParameterClient.
|
|
416
|
+
*/
|
|
417
|
+
createParameterClient(
|
|
418
|
+
remoteNodeName: string,
|
|
419
|
+
options?: { timeout?: number }
|
|
420
|
+
): ParameterClient;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Create a ParameterWatcher for watching parameter changes on a remote node.
|
|
424
|
+
*
|
|
425
|
+
* @param remoteNodeName - The name of the remote node whose parameters to watch.
|
|
426
|
+
* @param parameterNames - Array of parameter names to watch.
|
|
427
|
+
* @param options - Options for parameter watcher.
|
|
428
|
+
* @returns An instance of ParameterWatcher.
|
|
429
|
+
*/
|
|
430
|
+
createParameterWatcher(
|
|
431
|
+
remoteNodeName: string,
|
|
432
|
+
parameterNames: string[],
|
|
433
|
+
options?: { timeout?: number }
|
|
434
|
+
): ParameterWatcher;
|
|
435
|
+
|
|
395
436
|
/**
|
|
396
437
|
* Create a guard condition.
|
|
397
438
|
*
|
|
@@ -439,6 +480,20 @@ declare module 'rclnodejs' {
|
|
|
439
480
|
*/
|
|
440
481
|
destroyService(service: Service): void;
|
|
441
482
|
|
|
483
|
+
/**
|
|
484
|
+
* Destroy a ParameterClient.
|
|
485
|
+
*
|
|
486
|
+
* @param parameterClient - ParameterClient to be destroyed.
|
|
487
|
+
*/
|
|
488
|
+
destroyParameterClient(parameterClient: ParameterClient): void;
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Destroy a ParameterWatcher.
|
|
492
|
+
*
|
|
493
|
+
* @param watcher - ParameterWatcher to be destroyed.
|
|
494
|
+
*/
|
|
495
|
+
destroyParameterWatcher(watcher: ParameterWatcher): void;
|
|
496
|
+
|
|
442
497
|
/**
|
|
443
498
|
* Destroy a Timer.
|
|
444
499
|
*
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
// Copyright (c) 2025 Mahmoud Alghalayini. All rights reserved.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
declare module 'rclnodejs' {
|
|
16
|
+
/**
|
|
17
|
+
* Options for ParameterClient constructor.
|
|
18
|
+
*/
|
|
19
|
+
export interface ParameterClientOptions {
|
|
20
|
+
/**
|
|
21
|
+
* Default timeout in milliseconds for service calls.
|
|
22
|
+
* @default 5000
|
|
23
|
+
*/
|
|
24
|
+
timeout?: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Options for parameter service calls.
|
|
29
|
+
*/
|
|
30
|
+
export interface ParameterServiceCallOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Timeout in milliseconds for this specific call.
|
|
33
|
+
*/
|
|
34
|
+
timeout?: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* AbortSignal to cancel the request.
|
|
38
|
+
*/
|
|
39
|
+
signal?: AbortSignal;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Result of a parameter set operation.
|
|
44
|
+
*/
|
|
45
|
+
export interface ParameterSetResult {
|
|
46
|
+
/**
|
|
47
|
+
* The name of the parameter.
|
|
48
|
+
*/
|
|
49
|
+
name: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Whether the operation was successful.
|
|
53
|
+
*/
|
|
54
|
+
successful: boolean;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Reason message, typically populated on failure.
|
|
58
|
+
*/
|
|
59
|
+
reason: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Result of a list parameters operation.
|
|
64
|
+
*/
|
|
65
|
+
export interface ListParametersResult {
|
|
66
|
+
/**
|
|
67
|
+
* Array of parameter names found.
|
|
68
|
+
*/
|
|
69
|
+
names: string[];
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Array of parameter prefixes found.
|
|
73
|
+
*/
|
|
74
|
+
prefixes: string[];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Options for listing parameters.
|
|
79
|
+
*/
|
|
80
|
+
export interface ListParametersOptions extends ParameterServiceCallOptions {
|
|
81
|
+
/**
|
|
82
|
+
* Optional array of parameter name prefixes to filter by.
|
|
83
|
+
*/
|
|
84
|
+
prefixes?: string[];
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Depth of parameter namespace to list.
|
|
88
|
+
* @default 0 (unlimited)
|
|
89
|
+
*/
|
|
90
|
+
depth?: number;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Parameter to set with name and value.
|
|
95
|
+
*/
|
|
96
|
+
export interface ParameterToSet {
|
|
97
|
+
/**
|
|
98
|
+
* The name of the parameter.
|
|
99
|
+
*/
|
|
100
|
+
name: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The value to set. Type is automatically inferred.
|
|
104
|
+
*/
|
|
105
|
+
value: any;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Class for accessing parameters on remote ROS 2 nodes.
|
|
110
|
+
*
|
|
111
|
+
* Provides promise-based APIs to get, set, list, and describe parameters
|
|
112
|
+
* on other nodes in the ROS 2 system.
|
|
113
|
+
*/
|
|
114
|
+
export class ParameterClient {
|
|
115
|
+
/**
|
|
116
|
+
* Create a new ParameterClient for accessing parameters on a remote node.
|
|
117
|
+
*
|
|
118
|
+
* @param node - The node to use for creating service clients.
|
|
119
|
+
* @param remoteNodeName - The name of the remote node whose parameters to access.
|
|
120
|
+
* @param options - Optional configuration for the parameter client.
|
|
121
|
+
* @throws {TypeError} If node is not provided or remoteNodeName is not a valid string.
|
|
122
|
+
* @throws {Error} If remoteNodeName is not a valid ROS node name.
|
|
123
|
+
*/
|
|
124
|
+
constructor(
|
|
125
|
+
node: Node,
|
|
126
|
+
remoteNodeName: string,
|
|
127
|
+
options?: ParameterClientOptions
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Get the name of the remote node this client is connected to.
|
|
132
|
+
*/
|
|
133
|
+
readonly remoteNodeName: string;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Get a single parameter from the remote node.
|
|
137
|
+
*
|
|
138
|
+
* @param name - The name of the parameter to retrieve.
|
|
139
|
+
* @param options - Optional timeout and abort signal.
|
|
140
|
+
* @returns Promise that resolves with the Parameter object.
|
|
141
|
+
* @throws {Error} If the parameter is not found or service call fails.
|
|
142
|
+
*/
|
|
143
|
+
getParameter(
|
|
144
|
+
name: string,
|
|
145
|
+
options?: ParameterServiceCallOptions
|
|
146
|
+
): Promise<Parameter>;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Get multiple parameters from the remote node.
|
|
150
|
+
*
|
|
151
|
+
* @param names - Array of parameter names to retrieve.
|
|
152
|
+
* @param options - Optional timeout and abort signal.
|
|
153
|
+
* @returns Promise that resolves with an array of Parameter objects.
|
|
154
|
+
* @throws {Error} If the service call fails.
|
|
155
|
+
* @throws {TypeError} If names is not a non-empty array.
|
|
156
|
+
*/
|
|
157
|
+
getParameters(
|
|
158
|
+
names: string[],
|
|
159
|
+
options?: ParameterServiceCallOptions
|
|
160
|
+
): Promise<Parameter[]>;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Set a single parameter on the remote node.
|
|
164
|
+
*
|
|
165
|
+
* @param name - The name of the parameter to set.
|
|
166
|
+
* @param value - The value to set. Type is automatically inferred.
|
|
167
|
+
* @param options - Optional timeout and abort signal.
|
|
168
|
+
* @returns Promise that resolves with the result.
|
|
169
|
+
* @throws {Error} If the service call fails.
|
|
170
|
+
*/
|
|
171
|
+
setParameter(
|
|
172
|
+
name: string,
|
|
173
|
+
value: any,
|
|
174
|
+
options?: ParameterServiceCallOptions
|
|
175
|
+
): Promise<ParameterSetResult>;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Set multiple parameters on the remote node.
|
|
179
|
+
*
|
|
180
|
+
* @param parameters - Array of parameter objects with name and value.
|
|
181
|
+
* @param options - Optional timeout and abort signal.
|
|
182
|
+
* @returns Promise that resolves with an array of results.
|
|
183
|
+
* @throws {Error} If the service call fails.
|
|
184
|
+
* @throws {TypeError} If parameters is not a non-empty array.
|
|
185
|
+
*/
|
|
186
|
+
setParameters(
|
|
187
|
+
parameters: ParameterToSet[],
|
|
188
|
+
options?: ParameterServiceCallOptions
|
|
189
|
+
): Promise<ParameterSetResult[]>;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* List all parameters available on the remote node.
|
|
193
|
+
*
|
|
194
|
+
* @param options - Optional filters, depth, timeout and abort signal.
|
|
195
|
+
* @returns Promise that resolves with parameter names and prefixes.
|
|
196
|
+
* @throws {Error} If the service call fails.
|
|
197
|
+
*/
|
|
198
|
+
listParameters(
|
|
199
|
+
options?: ListParametersOptions
|
|
200
|
+
): Promise<ListParametersResult>;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Describe parameters on the remote node.
|
|
204
|
+
*
|
|
205
|
+
* @param names - Array of parameter names to describe.
|
|
206
|
+
* @param options - Optional timeout and abort signal.
|
|
207
|
+
* @returns Promise that resolves with an array of parameter descriptors.
|
|
208
|
+
* @throws {Error} If the service call fails.
|
|
209
|
+
* @throws {TypeError} If names is not a non-empty array.
|
|
210
|
+
*/
|
|
211
|
+
describeParameters(
|
|
212
|
+
names: string[],
|
|
213
|
+
options?: ParameterServiceCallOptions
|
|
214
|
+
): Promise<any[]>;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Get the types of parameters on the remote node.
|
|
218
|
+
*
|
|
219
|
+
* @param names - Array of parameter names.
|
|
220
|
+
* @param options - Optional timeout and abort signal.
|
|
221
|
+
* @returns Promise that resolves with an array of parameter types.
|
|
222
|
+
* @throws {Error} If the service call fails.
|
|
223
|
+
* @throws {TypeError} If names is not a non-empty array.
|
|
224
|
+
*/
|
|
225
|
+
getParameterTypes(
|
|
226
|
+
names: string[],
|
|
227
|
+
options?: ParameterServiceCallOptions
|
|
228
|
+
): Promise<ParameterType[]>;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Wait for the parameter services to be available on the remote node.
|
|
232
|
+
* This is useful to verify the remote node is running before making calls.
|
|
233
|
+
*
|
|
234
|
+
* @param timeout - Optional timeout in milliseconds.
|
|
235
|
+
* @returns Promise that resolves to true if services are available.
|
|
236
|
+
*/
|
|
237
|
+
waitForService(timeout?: number): Promise<boolean>;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Check if the parameter client has been destroyed.
|
|
241
|
+
*
|
|
242
|
+
* @returns True if destroyed, false otherwise.
|
|
243
|
+
*/
|
|
244
|
+
isDestroyed(): boolean;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Destroy the parameter client and clean up all service clients.
|
|
248
|
+
* After calling this method, the client cannot be used anymore.
|
|
249
|
+
*/
|
|
250
|
+
destroy(): void;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// Copyright (c) 2025 Mahmoud Alghalayini. All rights reserved.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
declare module 'rclnodejs' {
|
|
16
|
+
import { EventEmitter } from 'events';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Options for ParameterWatcher constructor.
|
|
20
|
+
*/
|
|
21
|
+
export interface ParameterWatcherOptions {
|
|
22
|
+
/**
|
|
23
|
+
* Default timeout in milliseconds for service calls.
|
|
24
|
+
* @default 5000
|
|
25
|
+
*/
|
|
26
|
+
timeout?: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* ParameterWatcher - Watches parameter changes on a remote node.
|
|
31
|
+
*
|
|
32
|
+
* Subscribes to /parameter_events and emits 'change' events when
|
|
33
|
+
* watched parameters on the target node are modified.
|
|
34
|
+
*/
|
|
35
|
+
class ParameterWatcher extends EventEmitter {
|
|
36
|
+
/**
|
|
37
|
+
* Get the remote node name being watched.
|
|
38
|
+
*/
|
|
39
|
+
readonly remoteNodeName: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Get the list of watched parameter names.
|
|
43
|
+
*/
|
|
44
|
+
readonly watchedParameters: string[];
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Start watching for parameter changes.
|
|
48
|
+
* Waits for the remote node's parameter services and subscribes to parameter events.
|
|
49
|
+
*
|
|
50
|
+
* @param timeout - Timeout in milliseconds to wait for services.
|
|
51
|
+
* @returns Promise that resolves to true when watching has started.
|
|
52
|
+
*/
|
|
53
|
+
start(timeout?: number): Promise<boolean>;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get current values of all watched parameters.
|
|
57
|
+
*
|
|
58
|
+
* @param options - Optional request options (timeout, signal).
|
|
59
|
+
* @returns Promise that resolves to an array of Parameter objects.
|
|
60
|
+
*/
|
|
61
|
+
getCurrentValues(options?: {
|
|
62
|
+
timeout?: number;
|
|
63
|
+
signal?: AbortSignal;
|
|
64
|
+
}): Promise<Parameter[]>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Add a parameter name to the watch list.
|
|
68
|
+
*
|
|
69
|
+
* @param name - Parameter name to watch.
|
|
70
|
+
*/
|
|
71
|
+
addParameter(name: string): void;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Remove a parameter name from the watch list.
|
|
75
|
+
*
|
|
76
|
+
* @param name - Parameter name to stop watching.
|
|
77
|
+
* @returns True if the parameter was in the watch list.
|
|
78
|
+
*/
|
|
79
|
+
removeParameter(name: string): boolean;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Check if the watcher has been destroyed.
|
|
83
|
+
*
|
|
84
|
+
* @returns True if destroyed.
|
|
85
|
+
*/
|
|
86
|
+
isDestroyed(): boolean;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Destroy the watcher and clean up resources.
|
|
90
|
+
* Unsubscribes from parameter events and destroys the parameter client.
|
|
91
|
+
*/
|
|
92
|
+
destroy(): void;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Event emitted when watched parameters change.
|
|
96
|
+
*
|
|
97
|
+
* @event change
|
|
98
|
+
* @param params - Array of changed parameters (ParameterValue messages).
|
|
99
|
+
*/
|
|
100
|
+
on(event: 'change', listener: (params: any[]) => void): this;
|
|
101
|
+
once(event: 'change', listener: (params: any[]) => void): this;
|
|
102
|
+
emit(event: 'change', params: any[]): boolean;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# This file is automatically generated by Intel rclnodejs
|
|
2
|
-
#
|
|
3
|
-
# *** DO NOT EDIT directly
|
|
4
|
-
|
|
5
|
-
cmake_minimum_required(VERSION 3.5)
|
|
6
|
-
|
|
7
|
-
project({{=it.projectName}})
|
|
8
|
-
|
|
9
|
-
# Default to C++14
|
|
10
|
-
if(NOT CMAKE_CXX_STANDARD)
|
|
11
|
-
set(CMAKE_CXX_STANDARD 14)
|
|
12
|
-
endif()
|
|
13
|
-
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
14
|
-
# we dont use add_compile_options with pedantic in message packages
|
|
15
|
-
# because the Python C extensions dont comply with it
|
|
16
|
-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
|
|
17
|
-
endif()
|
|
18
|
-
|
|
19
|
-
{{~ it.dependencies :dependency}}
|
|
20
|
-
find_package({{=dependency}} REQUIRED)
|
|
21
|
-
{{~}}
|
|
22
|
-
find_package(actionlib_msgs REQUIRED)
|
|
23
|
-
find_package(ament_cmake REQUIRED)
|
|
24
|
-
find_package(rosidl_default_generators REQUIRED)
|
|
25
|
-
|
|
26
|
-
set(msg_files
|
|
27
|
-
{{~ it.msgFiles :msgFile}}
|
|
28
|
-
"msg/{{=msgFile}}.msg"
|
|
29
|
-
{{~}}
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
rosidl_generate_interfaces(${PROJECT_NAME}
|
|
33
|
-
${msg_files}
|
|
34
|
-
{{~ it.dependencies :dependency}}
|
|
35
|
-
DEPENDENCIES {{=dependency}}
|
|
36
|
-
{{~}}
|
|
37
|
-
DEPENDENCIES actionlib_msgs
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
ament_package()
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// This file is automatically generated by rclnodejs
|
|
2
|
-
//
|
|
3
|
-
// *** DO NOT EDIT directly
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
|
-
{{
|
|
9
|
-
const className = it.actionInfo.pkgName + '__' + it.actionInfo.subFolder + '__' + it.actionInfo.interfaceName;
|
|
10
|
-
}}
|
|
11
|
-
|
|
12
|
-
class {{=className}} {
|
|
13
|
-
static get Goal() {
|
|
14
|
-
return require('./{{=className}}_Goal.js');
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
static get Result() {
|
|
18
|
-
return require('./{{=className}}_Result.js');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
static get Feedback() {
|
|
22
|
-
return require('./{{=className}}_Feedback.js');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
static get impl() {
|
|
26
|
-
return {
|
|
27
|
-
get SendGoalService() {
|
|
28
|
-
return require('./{{=className}}_SendGoal.js');
|
|
29
|
-
},
|
|
30
|
-
get GetResultService() {
|
|
31
|
-
return require('./{{=className}}_GetResult.js');
|
|
32
|
-
},
|
|
33
|
-
get FeedbackMessage() {
|
|
34
|
-
return require('./{{=className}}_FeedbackMessage.js');
|
|
35
|
-
},
|
|
36
|
-
get CancelGoal() {
|
|
37
|
-
return require('../action_msgs/action_msgs__srv__CancelGoal.js');
|
|
38
|
-
},
|
|
39
|
-
get GoalStatusArray() {
|
|
40
|
-
return require('../action_msgs/action_msgs__msg__GoalStatusArray.js');
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
static type() {
|
|
46
|
-
return {pkgName: '{{=it.actionInfo.pkgName}}', subFolder: '{{=it.actionInfo.subFolder}}', interfaceName: '{{=it.actionInfo.interfaceName}}'};
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
module.exports = {{=className}};
|