rclnodejs 0.32.0 → 0.32.2

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/README.md CHANGED
@@ -45,7 +45,7 @@ npm i rclnodejs@x.y.z
45
45
 
46
46
  | RCLNODEJS Version | Compatible ROS 2 LTS |
47
47
  | :------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------: |
48
- | latest version (currently [v0.32.0](https://github.com/RobotWebTools/rclnodejs/tree/0.32.0)) | [Humble](https://github.com/RobotWebTools/rclnodejs/tree/humble-hawksbill)<br>[Jazzy](https://github.com/RobotWebTools/rclnodejs/tree/jazzy) |
48
+ | latest version (currently [v0.32.2](https://github.com/RobotWebTools/rclnodejs/tree/0.32.2)) | [Humble](https://github.com/RobotWebTools/rclnodejs/tree/humble-hawksbill)<br>[Jazzy](https://github.com/RobotWebTools/rclnodejs/tree/jazzy) |
49
49
 
50
50
  ## Documentation
51
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rclnodejs",
3
- "version": "0.32.0",
3
+ "version": "0.32.2",
4
4
  "description": "ROS2.0 JavaScript client with Node.js",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -17,16 +17,18 @@
17
17
  "build:dev": "node-gyp -j 16 build --debug",
18
18
  "rebuild": "npm run clean && node-gyp -j 16 rebuild",
19
19
  "rebuild:dev": "npm run clean && node-gyp -j 16 rebuild --debug",
20
- "generate-messages": "node scripts/generate_messages.js && node scripts/generate_tsd.js",
21
- "generate-messages:dev": "node scripts/generate_messages.js --debug && node scripts/generate_tsd.js",
20
+ "generate-messages": "node scripts/generate_messages.js",
21
+ "generate-messages:dev": "node scripts/generate_messages.js --debug",
22
+ "generate-tsd-messages": "node scripts/generate_tsd.js",
22
23
  "clean": "node-gyp clean && rimraf ./generated",
23
24
  "install": "npm run rebuild",
24
25
  "postinstall": "npm run generate-messages",
25
26
  "docs": "cd docs && make",
26
- "test": "node --expose-gc ./scripts/run_test.js && npx tsd",
27
+ "test": "nyc node --expose-gc ./scripts/run_test.js && npx tsd",
27
28
  "lint": "eslint && node ./scripts/cpplint.js",
28
- "format": "clang-format -i -style=file ./src/*.cpp ./src/*.hpp && prettier --write \"{lib,rosidl_gen,rostsd_gen,rosidl_parser,types,example,test,scripts,benchmark}/**/*.{js,md,ts}\" ./*.{js,md,ts}",
29
- "prepare": "husky"
29
+ "format": "clang-format -i -style=file ./src/*.cpp ./src/*.hpp && prettier --write \"{lib,rosidl_gen,rostsd_gen,rosidl_parser,types,example,test,scripts,benchmark,rostsd_gen}/**/*.{js,md,ts}\" ./*.{js,md,ts}",
30
+ "prepare": "husky",
31
+ "coverage": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
30
32
  },
31
33
  "bin": {
32
34
  "generate-ros-messages": "./scripts/generate_messages.js"
@@ -49,6 +51,7 @@
49
51
  "@typescript-eslint/parser": "^8.18.0",
50
52
  "clang-format": "^1.8.0",
51
53
  "commander": "^13.1.0",
54
+ "coveralls": "^3.1.1",
52
55
  "deep-equal": "^2.2.3",
53
56
  "eslint": "^9.16.0",
54
57
  "eslint-config-prettier": "^10.0.2",
@@ -58,7 +61,7 @@
58
61
  "jsdoc": "^4.0.4",
59
62
  "lint-staged": "^15.2.10",
60
63
  "mocha": "^11.0.2",
61
- "rimraf": "^6.0.1",
64
+ "nyc": "^17.1.0",
62
65
  "sinon": "^19.0.2",
63
66
  "tree-kill": "^1.2.2",
64
67
  "tsd": "^0.31.2",
@@ -78,6 +81,7 @@
78
81
  "json-bigint": "^1.0.0",
79
82
  "nan": "^2.22.0",
80
83
  "prettier": "^3.4.2",
84
+ "rimraf": "^6.0.1",
81
85
  "walk": "^2.3.15"
82
86
  },
83
87
  "husky": {
@@ -25,6 +25,7 @@ declare module "rclnodejs" {
25
25
 
26
26
  'use strict';
27
27
 
28
+ const os = require('os');
28
29
  const path = require('path');
29
30
  const fs = require('fs');
30
31
  const loader = require('../lib/interface_loader.js');
@@ -34,7 +35,10 @@ async function generateAll() {
34
35
  // load pkg and interface info (msgs and srvs)
35
36
  const generatedPath = path.join(__dirname, '../generated/');
36
37
  const pkgInfos = getPkgInfos(generatedPath);
37
-
38
+ if (pkgInfos.length === 0) {
39
+ console.log('No package found, prebuild interfaces.d.ts will be used.');
40
+ return;
41
+ }
38
42
  // write interfaces.d.ts file
39
43
  const interfacesFilePath = path.join(__dirname, '../types/interfaces.d.ts');
40
44
  const fd = fs.openSync(interfacesFilePath, 'w');
@@ -69,8 +73,15 @@ function getPkgInfos(rootDir) {
69
73
  })
70
74
  )
71
75
  continue;
72
-
73
- const rosInterface = loader.loadInterface(typeClass);
76
+ let rosInterface = null;
77
+ try {
78
+ rosInterface = loader.loadInterface(typeClass);
79
+ } catch (e) {
80
+ console.log(
81
+ `${e.message}, please make sure it's built for ${os.arch()} platform correctly.`
82
+ );
83
+ return pkgInfos;
84
+ }
74
85
 
75
86
  if (!pkgInfo.subfolders.has(typeClass.type)) {
76
87
  pkgInfo.subfolders.set(typeClass.type, []);
@@ -45,7 +45,7 @@ npm i rclnodejs@x.y.z
45
45
 
46
46
  | RCLNODEJS Version | Compatible ROS 2 LTS |
47
47
  | :------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------: |
48
- | latest version (currently [v0.32.0](https://github.com/RobotWebTools/rclnodejs/tree/0.32.0)) | [Humble](https://github.com/RobotWebTools/rclnodejs/tree/humble-hawksbill)<br>[Jazzy](https://github.com/RobotWebTools/rclnodejs/tree/jazzy) |
48
+ | latest version (currently [v0.32.2](https://github.com/RobotWebTools/rclnodejs/tree/0.32.2)) | [Humble](https://github.com/RobotWebTools/rclnodejs/tree/humble-hawksbill)<br>[Jazzy](https://github.com/RobotWebTools/rclnodejs/tree/jazzy) |
49
49
 
50
50
  ## Documentation
51
51
 
@@ -198,7 +198,7 @@ declare module 'rclnodejs' {
198
198
  }
199
199
  export interface ListNodes_Response {
200
200
  full_node_names: string[];
201
- unique_ids: number[];
201
+ unique_ids: bigint[];
202
202
  }
203
203
  export interface ListNodes_ResponseConstructor {
204
204
  new(other?: ListNodes_Response): ListNodes_Response;
@@ -224,7 +224,7 @@ declare module 'rclnodejs' {
224
224
  success: boolean;
225
225
  error_message: string;
226
226
  full_node_name: string;
227
- unique_id: number;
227
+ unique_id: bigint;
228
228
  }
229
229
  export interface LoadNode_ResponseConstructor {
230
230
  new(other?: LoadNode_Response): LoadNode_Response;
@@ -234,7 +234,7 @@ declare module 'rclnodejs' {
234
234
  readonly Response: UnloadNode_ResponseConstructor;
235
235
  }
236
236
  export interface UnloadNode_Request {
237
- unique_id: number;
237
+ unique_id: bigint;
238
238
  }
239
239
  export interface UnloadNode_RequestConstructor {
240
240
  new(other?: UnloadNode_Request): UnloadNode_Request;
@@ -470,14 +470,14 @@ declare module 'rclnodejs' {
470
470
  new(other?: Int32MultiArray): Int32MultiArray;
471
471
  }
472
472
  export interface Int64 {
473
- data: number;
473
+ data: bigint;
474
474
  }
475
475
  export interface Int64Constructor {
476
476
  new(other?: Int64): Int64;
477
477
  }
478
478
  export interface Int64MultiArray {
479
479
  layout: example_interfaces.msg.MultiArrayLayout;
480
- data: number[];
480
+ data: bigint[];
481
481
  }
482
482
  export interface Int64MultiArrayConstructor {
483
483
  new(other?: Int64MultiArray): Int64MultiArray;
@@ -543,14 +543,14 @@ declare module 'rclnodejs' {
543
543
  new(other?: UInt32MultiArray): UInt32MultiArray;
544
544
  }
545
545
  export interface UInt64 {
546
- data: number;
546
+ data: bigint;
547
547
  }
548
548
  export interface UInt64Constructor {
549
549
  new(other?: UInt64): UInt64;
550
550
  }
551
551
  export interface UInt64MultiArray {
552
552
  layout: example_interfaces.msg.MultiArrayLayout;
553
- data: number[];
553
+ data: bigint[];
554
554
  }
555
555
  export interface UInt64MultiArrayConstructor {
556
556
  new(other?: UInt64MultiArray): UInt64MultiArray;
@@ -581,14 +581,14 @@ declare module 'rclnodejs' {
581
581
  readonly Response: AddTwoInts_ResponseConstructor;
582
582
  }
583
583
  export interface AddTwoInts_Request {
584
- a: number;
585
- b: number;
584
+ a: bigint;
585
+ b: bigint;
586
586
  }
587
587
  export interface AddTwoInts_RequestConstructor {
588
588
  new(other?: AddTwoInts_Request): AddTwoInts_Request;
589
589
  }
590
590
  export interface AddTwoInts_Response {
591
- sum: number;
591
+ sum: bigint;
592
592
  }
593
593
  export interface AddTwoInts_ResponseConstructor {
594
594
  new(other?: AddTwoInts_Response): AddTwoInts_Response;
@@ -924,7 +924,7 @@ declare module 'rclnodejs' {
924
924
  new(other?: TransitionDescription): TransitionDescription;
925
925
  }
926
926
  export interface TransitionEvent {
927
- timestamp: number;
927
+ timestamp: bigint;
928
928
  transition: lifecycle_msgs.msg.Transition;
929
929
  start_state: lifecycle_msgs.msg.State;
930
930
  goal_state: lifecycle_msgs.msg.State;
@@ -1311,12 +1311,12 @@ declare module 'rclnodejs' {
1311
1311
  stamp: builtin_interfaces.msg.Time;
1312
1312
  command: pendulum_msgs.msg.JointCommand;
1313
1313
  state: pendulum_msgs.msg.JointState;
1314
- cur_latency: number;
1314
+ cur_latency: bigint;
1315
1315
  mean_latency: number;
1316
- min_latency: number;
1317
- max_latency: number;
1318
- minor_pagefaults: number;
1319
- major_pagefaults: number;
1316
+ min_latency: bigint;
1317
+ max_latency: bigint;
1318
+ minor_pagefaults: bigint;
1319
+ major_pagefaults: bigint;
1320
1320
  }
1321
1321
  export interface RttestResultsConstructor {
1322
1322
  new(other?: RttestResults): RttestResults;
@@ -1335,9 +1335,9 @@ declare module 'rclnodejs' {
1335
1335
  new(other?: FloatingPointRange): FloatingPointRange;
1336
1336
  }
1337
1337
  export interface IntegerRange {
1338
- from_value: number;
1339
- to_value: number;
1340
- step: number;
1338
+ from_value: bigint;
1339
+ to_value: bigint;
1340
+ step: bigint;
1341
1341
  }
1342
1342
  export interface IntegerRangeConstructor {
1343
1343
  new(other?: IntegerRange): IntegerRange;
@@ -1422,12 +1422,12 @@ declare module 'rclnodejs' {
1422
1422
  export interface ParameterValue {
1423
1423
  type: number;
1424
1424
  bool_value: boolean;
1425
- integer_value: number;
1425
+ integer_value: bigint;
1426
1426
  double_value: number;
1427
1427
  string_value: string;
1428
1428
  byte_array_value: number[] | Uint8Array;
1429
1429
  bool_array_value: boolean[];
1430
- integer_array_value: number[];
1430
+ integer_array_value: bigint[];
1431
1431
  double_array_value: number[] | Float64Array;
1432
1432
  string_array_value: string[];
1433
1433
  }
@@ -1497,10 +1497,10 @@ declare module 'rclnodejs' {
1497
1497
  }
1498
1498
  export interface ListParameters_Request {
1499
1499
  prefixes: string[];
1500
- depth: number;
1500
+ depth: bigint;
1501
1501
  }
1502
1502
  export interface ListParameters_RequestConstructor {
1503
- readonly DEPTH_RECURSIVE: number;
1503
+ readonly DEPTH_RECURSIVE: bigint;
1504
1504
  new(other?: ListParameters_Request): ListParameters_Request;
1505
1505
  }
1506
1506
  export interface ListParameters_Response {
@@ -1704,13 +1704,13 @@ declare module 'rclnodejs' {
1704
1704
  readonly Response: Burst_ResponseConstructor;
1705
1705
  }
1706
1706
  export interface Burst_Request {
1707
- num_messages: number;
1707
+ num_messages: bigint;
1708
1708
  }
1709
1709
  export interface Burst_RequestConstructor {
1710
1710
  new(other?: Burst_Request): Burst_Request;
1711
1711
  }
1712
1712
  export interface Burst_Response {
1713
- actually_burst: number;
1713
+ actually_burst: bigint;
1714
1714
  }
1715
1715
  export interface Burst_ResponseConstructor {
1716
1716
  new(other?: Burst_Response): Burst_Response;
@@ -2387,14 +2387,14 @@ declare module 'rclnodejs' {
2387
2387
  new(other?: Int32MultiArray): Int32MultiArray;
2388
2388
  }
2389
2389
  export interface Int64 {
2390
- data: number;
2390
+ data: bigint;
2391
2391
  }
2392
2392
  export interface Int64Constructor {
2393
2393
  new(other?: Int64): Int64;
2394
2394
  }
2395
2395
  export interface Int64MultiArray {
2396
2396
  layout: std_msgs.msg.MultiArrayLayout;
2397
- data: number[];
2397
+ data: bigint[];
2398
2398
  }
2399
2399
  export interface Int64MultiArrayConstructor {
2400
2400
  new(other?: Int64MultiArray): Int64MultiArray;
@@ -2460,14 +2460,14 @@ declare module 'rclnodejs' {
2460
2460
  new(other?: UInt32MultiArray): UInt32MultiArray;
2461
2461
  }
2462
2462
  export interface UInt64 {
2463
- data: number;
2463
+ data: bigint;
2464
2464
  }
2465
2465
  export interface UInt64Constructor {
2466
2466
  new(other?: UInt64): UInt64;
2467
2467
  }
2468
2468
  export interface UInt64MultiArray {
2469
2469
  layout: std_msgs.msg.MultiArrayLayout;
2470
- data: number[];
2470
+ data: bigint[];
2471
2471
  }
2472
2472
  export interface UInt64MultiArrayConstructor {
2473
2473
  new(other?: UInt64MultiArray): UInt64MultiArray;
@@ -2710,8 +2710,8 @@ declare module 'rclnodejs' {
2710
2710
  uint16_values: number[] | Uint16Array;
2711
2711
  int32_values: number[] | Int32Array;
2712
2712
  uint32_values: number[] | Uint32Array;
2713
- int64_values: number[];
2714
- uint64_values: number[];
2713
+ int64_values: bigint[];
2714
+ uint64_values: bigint[];
2715
2715
  string_values: string[];
2716
2716
  basic_types_values: test_msgs.msg.BasicTypes[];
2717
2717
  constants_values: test_msgs.msg.Constants[];
@@ -2727,8 +2727,8 @@ declare module 'rclnodejs' {
2727
2727
  uint16_values_default: number[] | Uint16Array;
2728
2728
  int32_values_default: number[] | Int32Array;
2729
2729
  uint32_values_default: number[] | Uint32Array;
2730
- int64_values_default: number[];
2731
- uint64_values_default: number[];
2730
+ int64_values_default: bigint[];
2731
+ uint64_values_default: bigint[];
2732
2732
  string_values_default: string[];
2733
2733
  alignment_check: number;
2734
2734
  }
@@ -2747,8 +2747,8 @@ declare module 'rclnodejs' {
2747
2747
  uint16_value: number;
2748
2748
  int32_value: number;
2749
2749
  uint32_value: number;
2750
- int64_value: number;
2751
- uint64_value: number;
2750
+ int64_value: bigint;
2751
+ uint64_value: bigint;
2752
2752
  }
2753
2753
  export interface BasicTypesConstructor {
2754
2754
  new(other?: BasicTypes): BasicTypes;
@@ -2765,8 +2765,8 @@ declare module 'rclnodejs' {
2765
2765
  uint16_values: number[] | Uint16Array;
2766
2766
  int32_values: number[] | Int32Array;
2767
2767
  uint32_values: number[] | Uint32Array;
2768
- int64_values: number[];
2769
- uint64_values: number[];
2768
+ int64_values: bigint[];
2769
+ uint64_values: bigint[];
2770
2770
  basic_types_values: test_msgs.msg.BasicTypes[];
2771
2771
  constants_values: test_msgs.msg.Constants[];
2772
2772
  defaults_values: test_msgs.msg.Defaults[];
@@ -2781,8 +2781,8 @@ declare module 'rclnodejs' {
2781
2781
  uint16_values_default: number[] | Uint16Array;
2782
2782
  int32_values_default: number[] | Int32Array;
2783
2783
  uint32_values_default: number[] | Uint32Array;
2784
- int64_values_default: number[];
2785
- uint64_values_default: number[];
2784
+ int64_values_default: bigint[];
2785
+ uint64_values_default: bigint[];
2786
2786
  alignment_check: number;
2787
2787
  }
2788
2788
  export interface BoundedPlainSequencesConstructor {
@@ -2800,8 +2800,8 @@ declare module 'rclnodejs' {
2800
2800
  uint16_values: number[] | Uint16Array;
2801
2801
  int32_values: number[] | Int32Array;
2802
2802
  uint32_values: number[] | Uint32Array;
2803
- int64_values: number[];
2804
- uint64_values: number[];
2803
+ int64_values: bigint[];
2804
+ uint64_values: bigint[];
2805
2805
  string_values: string[];
2806
2806
  basic_types_values: test_msgs.msg.BasicTypes[];
2807
2807
  constants_values: test_msgs.msg.Constants[];
@@ -2817,8 +2817,8 @@ declare module 'rclnodejs' {
2817
2817
  uint16_values_default: number[] | Uint16Array;
2818
2818
  int32_values_default: number[] | Int32Array;
2819
2819
  uint32_values_default: number[] | Uint32Array;
2820
- int64_values_default: number[];
2821
- uint64_values_default: number[];
2820
+ int64_values_default: bigint[];
2821
+ uint64_values_default: bigint[];
2822
2822
  string_values_default: string[];
2823
2823
  alignment_check: number;
2824
2824
  }
@@ -2846,8 +2846,8 @@ declare module 'rclnodejs' {
2846
2846
  readonly UINT16_CONST: number;
2847
2847
  readonly INT32_CONST: number;
2848
2848
  readonly UINT32_CONST: number;
2849
- readonly INT64_CONST: number;
2850
- readonly UINT64_CONST: number;
2849
+ readonly INT64_CONST: bigint;
2850
+ readonly UINT64_CONST: bigint;
2851
2851
  new(other?: Constants): Constants;
2852
2852
  }
2853
2853
  export interface Defaults {
@@ -2862,8 +2862,8 @@ declare module 'rclnodejs' {
2862
2862
  uint16_value: number;
2863
2863
  int32_value: number;
2864
2864
  uint32_value: number;
2865
- int64_value: number;
2866
- uint64_value: number;
2865
+ int64_value: bigint;
2866
+ uint64_value: bigint;
2867
2867
  }
2868
2868
  export interface DefaultsConstructor {
2869
2869
  new(other?: Defaults): Defaults;
@@ -2923,8 +2923,8 @@ declare module 'rclnodejs' {
2923
2923
  uint16_values: number[] | Uint16Array;
2924
2924
  int32_values: number[] | Int32Array;
2925
2925
  uint32_values: number[] | Uint32Array;
2926
- int64_values: number[];
2927
- uint64_values: number[];
2926
+ int64_values: bigint[];
2927
+ uint64_values: bigint[];
2928
2928
  string_values: string[];
2929
2929
  basic_types_values: test_msgs.msg.BasicTypes[];
2930
2930
  constants_values: test_msgs.msg.Constants[];
@@ -2940,8 +2940,8 @@ declare module 'rclnodejs' {
2940
2940
  uint16_values_default: number[] | Uint16Array;
2941
2941
  int32_values_default: number[] | Int32Array;
2942
2942
  uint32_values_default: number[] | Uint32Array;
2943
- int64_values_default: number[];
2944
- uint64_values_default: number[];
2943
+ int64_values_default: bigint[];
2944
+ uint64_values_default: bigint[];
2945
2945
  string_values_default: string[];
2946
2946
  alignment_check: number;
2947
2947
  }
@@ -2978,8 +2978,8 @@ declare module 'rclnodejs' {
2978
2978
  uint16_values: number[] | Uint16Array;
2979
2979
  int32_values: number[] | Int32Array;
2980
2980
  uint32_values: number[] | Uint32Array;
2981
- int64_values: number[];
2982
- uint64_values: number[];
2981
+ int64_values: bigint[];
2982
+ uint64_values: bigint[];
2983
2983
  string_values: string[];
2984
2984
  basic_types_values: test_msgs.msg.BasicTypes[];
2985
2985
  constants_values: test_msgs.msg.Constants[];
@@ -2995,8 +2995,8 @@ declare module 'rclnodejs' {
2995
2995
  uint16_values_default: number[] | Uint16Array;
2996
2996
  int32_values_default: number[] | Int32Array;
2997
2997
  uint32_values_default: number[] | Uint32Array;
2998
- int64_values_default: number[];
2999
- uint64_values_default: number[];
2998
+ int64_values_default: bigint[];
2999
+ uint64_values_default: bigint[];
3000
3000
  string_values_default: string[];
3001
3001
  }
3002
3002
  export interface Arrays_RequestConstructor {
@@ -3014,8 +3014,8 @@ declare module 'rclnodejs' {
3014
3014
  uint16_values: number[] | Uint16Array;
3015
3015
  int32_values: number[] | Int32Array;
3016
3016
  uint32_values: number[] | Uint32Array;
3017
- int64_values: number[];
3018
- uint64_values: number[];
3017
+ int64_values: bigint[];
3018
+ uint64_values: bigint[];
3019
3019
  string_values: string[];
3020
3020
  basic_types_values: test_msgs.msg.BasicTypes[];
3021
3021
  constants_values: test_msgs.msg.Constants[];
@@ -3031,8 +3031,8 @@ declare module 'rclnodejs' {
3031
3031
  uint16_values_default: number[] | Uint16Array;
3032
3032
  int32_values_default: number[] | Int32Array;
3033
3033
  uint32_values_default: number[] | Uint32Array;
3034
- int64_values_default: number[];
3035
- uint64_values_default: number[];
3034
+ int64_values_default: bigint[];
3035
+ uint64_values_default: bigint[];
3036
3036
  string_values_default: string[];
3037
3037
  }
3038
3038
  export interface Arrays_ResponseConstructor {
@@ -3054,8 +3054,8 @@ declare module 'rclnodejs' {
3054
3054
  uint16_value: number;
3055
3055
  int32_value: number;
3056
3056
  uint32_value: number;
3057
- int64_value: number;
3058
- uint64_value: number;
3057
+ int64_value: bigint;
3058
+ uint64_value: bigint;
3059
3059
  string_value: string;
3060
3060
  }
3061
3061
  export interface BasicTypes_RequestConstructor {
@@ -3073,8 +3073,8 @@ declare module 'rclnodejs' {
3073
3073
  uint16_value: number;
3074
3074
  int32_value: number;
3075
3075
  uint32_value: number;
3076
- int64_value: number;
3077
- uint64_value: number;
3076
+ int64_value: bigint;
3077
+ uint64_value: bigint;
3078
3078
  string_value: string;
3079
3079
  }
3080
3080
  export interface BasicTypes_ResponseConstructor {
@@ -3528,7 +3528,7 @@ declare module 'rclnodejs' {
3528
3528
  }
3529
3529
  export interface InteractiveMarkerInit {
3530
3530
  server_id: string;
3531
- seq_num: number;
3531
+ seq_num: bigint;
3532
3532
  markers: visualization_msgs.msg.InteractiveMarker[];
3533
3533
  }
3534
3534
  export interface InteractiveMarkerInitConstructor {
@@ -3544,7 +3544,7 @@ declare module 'rclnodejs' {
3544
3544
  }
3545
3545
  export interface InteractiveMarkerUpdate {
3546
3546
  server_id: string;
3547
- seq_num: number;
3547
+ seq_num: bigint;
3548
3548
  type: number;
3549
3549
  markers: visualization_msgs.msg.InteractiveMarker[];
3550
3550
  poses: visualization_msgs.msg.InteractiveMarkerPose[];
@@ -3640,7 +3640,7 @@ declare module 'rclnodejs' {
3640
3640
  new(other?: GetInteractiveMarkers_Request): GetInteractiveMarkers_Request;
3641
3641
  }
3642
3642
  export interface GetInteractiveMarkers_Response {
3643
- sequence_number: number;
3643
+ sequence_number: bigint;
3644
3644
  markers: visualization_msgs.msg.InteractiveMarker[];
3645
3645
  }
3646
3646
  export interface GetInteractiveMarkers_ResponseConstructor {
package/.gitattributes DELETED
@@ -1,117 +0,0 @@
1
- # Based on https://github.com/alexkaratarakis/gitattributes/blob/master/Web.gitattributes
2
-
3
- # Auto detect
4
- ## Handle line endings automatically for files detected as
5
- ## text and leave all files detected as binary untouched.
6
- ## This will handle all files NOT defined below.
7
- * text=auto
8
-
9
- # Source code
10
- *.bash text eol=lf
11
- *.bat text eol=crlf
12
- *.c text eol=lf
13
- *.cmd text eol=crlf
14
- *.cpp text eol=lf
15
- *.css text diff=css
16
- *.hpp text eol=lf
17
- *.htm text diff=html
18
- *.html text diff=html
19
- *.inc text
20
- *.ini text
21
- *.js text eol=lf
22
- *.json text eol=lf
23
- *.jsx text eol=lf
24
- *.less text
25
- *.ls text
26
- *.map text -diff
27
- *.ps1 text eol=crlf
28
- *.py text diff=python
29
- *.sh text eol=lf
30
- *.ts text eol=lf
31
- *.tsx text eol=lf
32
- *.xml text eol=lf
33
- *.xhtml text diff=html
34
-
35
- # Templates
36
- *.em text eol=lf
37
-
38
- # Docker
39
- Dockerfile text
40
-
41
- # Documentation
42
- *.ipynb text
43
- *.markdown text diff=markdown
44
- *.md text diff=markdown
45
- *.mdwn text diff=markdown
46
- *.mdown text diff=markdown
47
- *.mkd text diff=markdown
48
- *.mkdn text diff=markdown
49
- *.mdtxt text
50
- *.mdtext text
51
- *.txt text
52
- AUTHORS text
53
- CHANGELOG text
54
- CHANGES text
55
- CONTRIBUTING text
56
- COPYING text
57
- copyright text
58
- *COPYRIGHT* text
59
- license text
60
- LICENSE text
61
- readme text
62
- *README* text
63
- TODO text
64
-
65
- # Configs
66
- *.cnf text
67
- *.conf text
68
- *.config text
69
- .editorconfig text
70
- .env text
71
- .gitattributes text
72
- .gitconfig text
73
- .htaccess text
74
- *.lock text -diff
75
- *.gyp text
76
- package.json text eol=lf
77
- package-lock.json text -diff
78
- pnpm-lock.yaml text eol=lf -diff
79
- yarn.lock text -diff
80
- *.toml text
81
- *.yaml text eol=lf
82
- *.yml text eol=lf
83
- Makefile text
84
- makefile text
85
-
86
- # Graphics
87
- *.bmp binary
88
- *.gif binary
89
- *.ico binary
90
- *.jng binary
91
- *.jp2 binary
92
- *.jpg binary
93
- *.jpeg binary
94
- *.jpx binary
95
- *.jxr binary
96
- *.pdf binary
97
- *.png binary
98
- # SVG treated as an asset (binary) by default.
99
- *.svg text
100
- # If you want to treat it as binary,
101
- # use the following line instead.
102
- # *.svg binary
103
- *.svgz binary
104
- *.tif binary
105
- *.tiff binary
106
- *.wbmp binary
107
- *.webp binary
108
-
109
- # Executables
110
- *.exe binary
111
- *.pyc binary
112
-
113
- # RC files (like .babelrc or .eslintrc)
114
- *.*rc text
115
-
116
- # Ignore files (like .npmignore or .gitignore)
117
- *.*ignore text
package/CONTRIBUTORS.md DELETED
@@ -1,63 +0,0 @@
1
- # rclnodejs contributors (sorted alphabetically)
2
-
3
- - **[Alaa El Jawad](https://github.com/ejalaa12), [Ian McElroy](https://github.com/imcelroy)**
4
-
5
- - Fix compatibility with ROS2 parameters array types
6
- - Unit tests for all parameter types
7
- - Handle concurrent ROS2 client calls, with unit tests
8
-
9
- - **[Alex Mikhalev](https://github.com/amikhalev)**
10
-
11
- - Fix build for AMENT_PREFIX_PATH with multiple entries
12
-
13
- - **[Felix Divo](https://github.com/felixdivo)**
14
-
15
- - Code cleanup of index.js, tests cases & message generation
16
- - Improved shutdown behavior
17
- - Fixed compilation warnings
18
-
19
- - **[Hanyia](https://github.com/hanyia)**
20
-
21
- - Benchmark test script
22
-
23
- - **[Kenny Yuan](https://github.com/kenny-y)**
24
-
25
- - Message features: JS generation, typed arrays, plain JS object, compound msgs, many others...
26
- - npm publish scripts
27
- - Mac support
28
-
29
- - **[Matt Richard](https://github.com/mattrichard)**
30
-
31
- - ROS2 Actions
32
- - Guard conditions
33
- - Node utility methods (countPublishers/subscribers...)
34
- - TypeScript improvements
35
- - Node 12 compatibility
36
-
37
- - **[Minggang Wang](https://github.com/minggangw)**
38
-
39
- - Author, lead developer, maintainer
40
- - Core, CI
41
-
42
- - **[Martins Mozeiko](https://github.com/martins-mozeiko)**
43
-
44
- - QoS new/delete fix
45
-
46
- - **[Qiuzhong](https://github.com/qiuzhong)**
47
-
48
- - Test coverage for actions, topics, multi-array messages, cross platform, security
49
- - Converted from setTimeout to ROS2 Timer
50
-
51
- - **[Teo Koon Peng](https://github.com/koonpeng)**
52
-
53
- - TypeScript improvements
54
- - Added Client#waitForService
55
- - Code style improvements, e.g., Prettier formatting
56
- - Improved code generation smarts and efficiency
57
-
58
- - **[Wayne Parrott](https://github.com/wayneparrott)**
59
- - TypeScript support with interface generation
60
- - ROS2 parameter support
61
- - ROS2 lifecycle node
62
- - Rate class
63
- - Node class hierarchy
@@ -1,54 +0,0 @@
1
- # Rclnodejs Electron demo
2
-
3
- ## Introduction
4
-
5
- This is a minimal rclnodejs demo using Electron. More information about Electron, please check with [Electron documentation](https://electronjs.org/docs/latest/tutorial/quick-start).
6
-
7
- The demo includes the following files:
8
-
9
- - `package.json` - Points to the app's main file and lists its details and dependencies.
10
- - `main.js` - Introduces the `rclnodejs` native module, starts the app and creates a browser window to render HTML. This is the app's **main process**.
11
- - `index.html` - Includes a text editor where you can input the the topic to be published. This is the app's **renderer process**.
12
- - `renderer.js` - Communicate with main process to publish a topic and get it through a subscription.
13
-
14
- ## To run the demo
15
-
16
- Before starting, please ensure you have installed [nodejs](https://nodejs.org/en).
17
-
18
- 1. Clone this repository.
19
-
20
- ```bash
21
- git clone https://github.com/RobotWebTools/rclnodejs.git
22
- ```
23
-
24
- 2. Go into the demo.
25
- ```bash
26
- cd rclnodejs/electron_demo
27
- ```
28
-
29
- 3. [SOURCE THE ROS 2 SETUP FILE](https://docs.ros.org/en/jazzy/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html#source-the-setup-files)
30
-
31
- 4. Install dependencies
32
- ```bash
33
- npm install
34
- ```
35
-
36
- 5. Rebuild rclnodejs for Electron
37
- ```bash
38
- # Every time you run "npm install", run this:
39
- ./node_modules/.bin/electron-rebuild
40
- ```
41
-
42
- 6. Run the app
43
- ```
44
- npm start
45
- ```
46
-
47
- If it works, you can see the demo as:
48
- ![demo screenshot](./electron-demo.gif)
49
-
50
- ## Resources for Learning Electron
51
-
52
- - [electronjs.org/docs](https://electronjs.org/docs) - all of Electron's documentation.
53
- - [Native Node Modules](https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules) - Use a native node module.
54
-
Binary file
@@ -1,25 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
-
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta http-equiv="Content-Security-Policy"
7
- content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
8
- <title>RCLNODEJS Electron Demo</title>
9
- </head>
10
-
11
- <body>
12
- <div>
13
- <div style="height: 20px;"></div>
14
- <div>
15
- <input id="topic-input"></input>
16
- <button id="publish-topic">Publish topic</button>
17
- </div>
18
- <div style="height: 20px;"></div>
19
- <span>Received topic:</span>
20
- <span id="received-topic"></span>
21
- </div>
22
- <script src="./renderer.js"></script>
23
- </body>
24
-
25
- </html>
@@ -1,66 +0,0 @@
1
- // Licensed under the Apache License, Version 2.0 (the "License");
2
- // you may not use this file except in compliance with the License.
3
- // You may obtain a copy of the License at
4
- //
5
- // http://www.apache.org/licenses/LICENSE-2.0
6
- //
7
- // Unless required by applicable law or agreed to in writing, software
8
- // distributed under the License is distributed on an "AS IS" BASIS,
9
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- // See the License for the specific language governing permissions and
11
- // limitations under the License.
12
-
13
- const { app, BrowserWindow } = require('electron')
14
- let rclnodejs = require("rclnodejs");
15
- const { ipcMain } = require('electron');
16
-
17
- function createWindow() {
18
- // Create the browser window.
19
- const mainWindow = new BrowserWindow({
20
- width: 800,
21
- height: 600,
22
- webPreferences: {
23
- // Add the following two lines in order to use require() in renderer, see details
24
- // https://stackoverflow.com/questions/44391448/electron-require-is-not-defined
25
- nodeIntegration: true,
26
- contextIsolation: false,
27
- }
28
- });
29
-
30
- mainWindow.loadFile('index.html');
31
- }
32
-
33
- // This method will be called when Electron has finished
34
- // initialization and is ready to create browser windows.
35
- // Some APIs can only be used after this event occurs.
36
- app.whenReady().then(() => {
37
- createWindow();
38
- rclnodejs.init().then(() => {
39
- let sender = null;
40
- const node = rclnodejs.createNode('publisher_example_node');
41
- node.createSubscription('std_msgs/msg/String', 'topic', (msg) => {
42
- if (sender) {
43
- sender.send('topic-received', msg.data);
44
- }
45
- });
46
- const publisher = node.createPublisher('std_msgs/msg/String', 'topic');
47
- ipcMain.on('publish-topic', (event, topic) => {
48
- publisher.publish(topic);
49
- sender = event.sender;
50
- });
51
- rclnodejs.spin(node);
52
- });
53
-
54
- app.on('activate', function () {
55
- // On macOS it's common to re-create a window in the app when the
56
- // dock icon is clicked and there are no other windows open.
57
- if (BrowserWindow.getAllWindows().length === 0) createWindow();
58
- });
59
- });
60
-
61
- // Quit when all windows are closed, except on macOS. There, it's common
62
- // for applications and their menu bar to stay active until the user quits
63
- // explicitly with Cmd + Q.
64
- app.on('window-all-closed', function () {
65
- if (process.platform !== 'darwin') app.quit()
66
- });
@@ -1,22 +0,0 @@
1
- {
2
- "name": "rclnodejs-electron-demo",
3
- "version": "1.0.0",
4
- "description": "A minimal rclnodejs Electron application",
5
- "main": "main.js",
6
- "scripts": {
7
- "start": "electron ."
8
- },
9
- "keywords": [
10
- "Electron",
11
- "rclnodejs",
12
- "demo"
13
- ],
14
- "license": "Apache",
15
- "dependencies": {
16
- "rclnodejs": "^0.27.4"
17
- },
18
- "devDependencies": {
19
- "@electron/rebuild": "^3.6.0",
20
- "electron": "^31.0.0"
21
- }
22
- }
@@ -1,22 +0,0 @@
1
- // Licensed under the Apache License, Version 2.0 (the "License");
2
- // you may not use this file except in compliance with the License.
3
- // You may obtain a copy of the License at
4
- //
5
- // http://www.apache.org/licenses/LICENSE-2.0
6
- //
7
- // Unless required by applicable law or agreed to in writing, software
8
- // distributed under the License is distributed on an "AS IS" BASIS,
9
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- // See the License for the specific language governing permissions and
11
- // limitations under the License.
12
-
13
- const { ipcRenderer } = require('electron');
14
-
15
- ipcRenderer.on('topic-received', function (event, response) {
16
- document.getElementById('received-topic').innerText = response;
17
- });
18
-
19
- document.getElementById('publish-topic').addEventListener('click', () => {
20
- const topic = document.getElementById('topic-input').value;
21
- ipcRenderer.send('publish-topic', topic);
22
- });
package/eslint.config.mjs DELETED
@@ -1,65 +0,0 @@
1
- import typescriptEslint from "@typescript-eslint/eslint-plugin";
2
- import prettier from "eslint-plugin-prettier";
3
- import globals from "globals";
4
- import tsParser from "@typescript-eslint/parser";
5
- import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
6
- import js from "@eslint/js";
7
-
8
- export default [
9
- {
10
- ignores: [
11
- "eslint.config.mjs",
12
- "types/interfaces.d.ts",
13
- "test/types/index.test-d.ts",
14
- "**/generated/",
15
- "**/scripts/",
16
- "**/benchmark/",
17
- "**/docs/",
18
- "**/electron_demo/",
19
- ],
20
- },
21
- {
22
- ...js.configs.recommended,
23
- files: ["lib/**/*.js", "index.js"],
24
- },
25
- {
26
- rules: {
27
- 'no-dupe-class-members': 'off',
28
- },
29
- },
30
- {
31
- plugins: {
32
- "@typescript-eslint": typescriptEslint,
33
- },
34
- languageOptions: {
35
- globals: {
36
- ...globals.node,
37
- },
38
- parser: tsParser,
39
- ecmaVersion: "latest",
40
- sourceType: "module",
41
- },
42
- files: ['types/*.d.ts'],
43
- rules: {
44
- ...typescriptEslint.configs.recommended.rules,
45
- "@typescript-eslint/no-explicit-any": "off",
46
- },
47
- },
48
- {
49
- plugins: {
50
- prettier,
51
- },
52
- languageOptions: {
53
- globals: {
54
- ...globals.node,
55
- },
56
- ecmaVersion: "latest",
57
- sourceType: "commonjs",
58
- },
59
- files: ["lib/**/*.js", "rosidl_parser/**/*.js", "rosidl_gen/**/*.js",
60
- "rostsd_gen/**/*.js", "test/**/*.js", "example/**/*.js", "index.js"],
61
- rules: {
62
- ...eslintPluginPrettierRecommended.rules,
63
- },
64
- }
65
- ];
package/suppr.txt DELETED
@@ -1,3 +0,0 @@
1
- leak:librcl.so$
2
- leak:ref-napi/prebuilds/linux-x64/node.napi.node$
3
- leak:^napi_module_register$