rclnodejs 0.22.3 → 0.23.1
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 +6 -7
- package/binding.gyp +2 -0
- package/index.js +4 -0
- package/lib/client.js +28 -0
- package/lib/lifecycle.js +4 -1
- package/lib/node_options.js +1 -1
- package/lib/service.js +38 -2
- package/lib/service_introspection.js +30 -0
- package/package.json +24 -24
- package/rosidl_gen/idl_generator.js +23 -3
- package/rosidl_gen/templates/service_event.dot +304 -0
- package/rostsd_gen/index.js +15 -12
- package/scripts/npmjs-readme.md +6 -7
- package/src/rcl_bindings.cpp +72 -1
- package/types/base.d.ts +1 -0
- package/types/client.d.ts +12 -0
- package/types/interfaces.d.ts +750 -0
- package/types/service.d.ts +12 -0
- package/types/service_introspection.d.ts +10 -0
- package/.github/workflows/identify-ros-distro.yml +0 -48
- package/.github/workflows/linux-build-and-test-compatibility.yml +0 -38
- package/.github/workflows/linux-build-and-test.yml +0 -53
- package/.github/workflows/windows-build-and-test-compatibility.yml +0 -54
- package/.github/workflows/windows-build-and-test.yml +0 -70
- package/.prettierrc.yml +0 -4
- package/.vscode/settings.json +0 -79
package/types/service.d.ts
CHANGED
|
@@ -76,5 +76,17 @@ declare module 'rclnodejs' {
|
|
|
76
76
|
* Name of the service.
|
|
77
77
|
*/
|
|
78
78
|
readonly serviceName: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Configure introspection.
|
|
82
|
+
* @param clock - Clock to use for service event timestamps
|
|
83
|
+
* @param QoSProfile - QOS profile for the service event publisher
|
|
84
|
+
* @param introspectionState - The state to set introspection to
|
|
85
|
+
*/
|
|
86
|
+
configureIntrospection(
|
|
87
|
+
clock: Clock,
|
|
88
|
+
serviceEventPubQOS: QoS,
|
|
89
|
+
introspectionState: ServiceIntrospectionStates
|
|
90
|
+
): void;
|
|
79
91
|
}
|
|
80
92
|
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
name: Identify ROS Distro from GITHUB_REF_NAME
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_call:
|
|
5
|
-
outputs:
|
|
6
|
-
distro:
|
|
7
|
-
description: "The ROS distribution short name"
|
|
8
|
-
value: ${{ jobs.identify-ros-distro.outputs.distro }}
|
|
9
|
-
linuxos:
|
|
10
|
-
description: "The ROS compatible Linux version"
|
|
11
|
-
value: ${{ jobs.identify-ros-distro.outputs.linuxos }}
|
|
12
|
-
env:
|
|
13
|
-
ROLLING_VAR: ${{ contains(github.ref, 'develop') }}
|
|
14
|
-
IRON_VAR: ${{ contains(github.ref, 'iron') }}
|
|
15
|
-
HUMBLE_VAR: ${{ contains(github.ref, 'humble') }}
|
|
16
|
-
GALACTIC_VAR: ${{ contains(github.ref, 'galactic') }}
|
|
17
|
-
FOXY_VAR: ${{ contains(github.ref, 'foxy') }}
|
|
18
|
-
|
|
19
|
-
jobs:
|
|
20
|
-
identify-ros-distro:
|
|
21
|
-
runs-on: ubuntu-latest
|
|
22
|
-
outputs:
|
|
23
|
-
distro: ${{ steps.identify.outputs.distro }}
|
|
24
|
-
linuxos: ${{ steps.identify.outputs.linuxos }}
|
|
25
|
-
steps:
|
|
26
|
-
- name: Identify distro
|
|
27
|
-
id: identify
|
|
28
|
-
run: |
|
|
29
|
-
if ${ROLLING_VAR} == true; then
|
|
30
|
-
echo "::set-output name=distro::rolling"
|
|
31
|
-
echo "::set-output name=linuxos::ubuntu-22.04"
|
|
32
|
-
elif ${IRON_VAR} == true; then
|
|
33
|
-
echo "::set-output name=distro::iron"
|
|
34
|
-
echo "::set-output name=linuxos::ubuntu-22.04"
|
|
35
|
-
elif ${HUMBLE_VAR} == true; then
|
|
36
|
-
echo "::set-output name=distro::humble"
|
|
37
|
-
echo "::set-output name=linuxos::ubuntu-22.04"
|
|
38
|
-
elif ${GALACTIC_VAR} == true; then
|
|
39
|
-
echo "::set-output name=distro::galactic"
|
|
40
|
-
echo "::set-output name=linuxos::ubuntu-20.04"
|
|
41
|
-
elif ${FOXY_VAR} == true; then
|
|
42
|
-
echo "::set-output name=distro::foxy"
|
|
43
|
-
echo "::set-output name=linuxos::ubuntu-20.04"
|
|
44
|
-
else
|
|
45
|
-
echo "Unable to map branch name to ROS distro, using ROLLING as default"
|
|
46
|
-
echo "::set-output name=distro::rolling"
|
|
47
|
-
echo "::set-output name=linuxos::ubuntu-22.04"
|
|
48
|
-
fi
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
name: rclnodejs - Linux Build & Compatibility Test
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
build-humble-and-rolling: # iron, humble and rolling distros
|
|
8
|
-
runs-on: ubuntu-22.04
|
|
9
|
-
strategy:
|
|
10
|
-
fail-fast: false
|
|
11
|
-
matrix:
|
|
12
|
-
node-version: [16.X, 18.X, 20.X]
|
|
13
|
-
ros_distribution:
|
|
14
|
-
- iron
|
|
15
|
-
- humble
|
|
16
|
-
- rolling
|
|
17
|
-
|
|
18
|
-
steps:
|
|
19
|
-
- name: Setup ROS2
|
|
20
|
-
uses: ros-tooling/setup-ros@v0.6
|
|
21
|
-
with:
|
|
22
|
-
required-ros-distributions: ${{ matrix.ros_distribution }}
|
|
23
|
-
|
|
24
|
-
- name: Install test-msgs on Linux
|
|
25
|
-
run: |
|
|
26
|
-
sudo apt install ros-${{ matrix.ros_distribution }}-test-msgs
|
|
27
|
-
- uses: actions/checkout@v3
|
|
28
|
-
|
|
29
|
-
- name: Setup Node.js ${{ matrix.node-version }}
|
|
30
|
-
uses: actions/setup-node@v3
|
|
31
|
-
with:
|
|
32
|
-
node-version: ${{ matrix.node-version }}
|
|
33
|
-
|
|
34
|
-
- name: Build and test rclnodejs
|
|
35
|
-
run: |
|
|
36
|
-
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
|
|
37
|
-
npm i
|
|
38
|
-
npm test
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
name: rclnodejs - Linux Build and Test
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
push:
|
|
6
|
-
branches:
|
|
7
|
-
- develop
|
|
8
|
-
- iron-irwini
|
|
9
|
-
- humble-hawksbill
|
|
10
|
-
- galactic-geochelone
|
|
11
|
-
- foxy-fitzroy
|
|
12
|
-
pull_request:
|
|
13
|
-
branches:
|
|
14
|
-
- develop
|
|
15
|
-
- iron-irwini
|
|
16
|
-
- humble-hawksbill
|
|
17
|
-
- galactic-geochelone
|
|
18
|
-
- foxy-fitzroy
|
|
19
|
-
workflow_dispatch:
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
identify-ros-distro:
|
|
23
|
-
uses: ./.github/workflows/identify-ros-distro.yml
|
|
24
|
-
|
|
25
|
-
build:
|
|
26
|
-
needs: identify-ros-distro
|
|
27
|
-
runs-on: ${{ needs.identify-ros-distro.outputs.linuxos }}
|
|
28
|
-
strategy:
|
|
29
|
-
fail-fast: false
|
|
30
|
-
matrix:
|
|
31
|
-
node-version: [16.X, 18.X, 20.X]
|
|
32
|
-
steps:
|
|
33
|
-
- name: Setup Node.js ${{ matrix.node-version }}
|
|
34
|
-
uses: actions/setup-node@v3
|
|
35
|
-
with:
|
|
36
|
-
node-version: ${{ matrix.node-version }}
|
|
37
|
-
|
|
38
|
-
- name: Setup ROS2
|
|
39
|
-
uses: ros-tooling/setup-ros@v0.6
|
|
40
|
-
with:
|
|
41
|
-
required-ros-distributions: ${{ needs.identify-ros-distro.outputs.distro }}
|
|
42
|
-
|
|
43
|
-
- name: Install test-msgs on Linux
|
|
44
|
-
run: |
|
|
45
|
-
sudo apt install ros-${{ needs.identify-ros-distro.outputs.distro }}-test-msgs
|
|
46
|
-
|
|
47
|
-
- uses: actions/checkout@v3
|
|
48
|
-
|
|
49
|
-
- name: Build and test rclnodejs
|
|
50
|
-
run: |
|
|
51
|
-
source /opt/ros/${{ needs.identify-ros-distro.outputs.distro }}/setup.bash
|
|
52
|
-
npm i
|
|
53
|
-
npm test
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
name: rclnodejs - Windows Build & Compatibility Test
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
workflow_dispatch:
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
build:
|
|
9
|
-
runs-on: windows-2019
|
|
10
|
-
strategy:
|
|
11
|
-
fail-fast: false
|
|
12
|
-
matrix:
|
|
13
|
-
node-version: [16.20.0, 18.16.0, 20.X]
|
|
14
|
-
ros_distribution:
|
|
15
|
-
- iron
|
|
16
|
-
- humble
|
|
17
|
-
- rolling
|
|
18
|
-
steps:
|
|
19
|
-
- name: Setup Node.js ${{ matrix.node-version }}
|
|
20
|
-
uses: actions/setup-node@v3
|
|
21
|
-
with:
|
|
22
|
-
node-version: ${{ matrix.node-version }}
|
|
23
|
-
|
|
24
|
-
- name: Setup ROS2
|
|
25
|
-
uses: ros-tooling/setup-ros@v0.6
|
|
26
|
-
with:
|
|
27
|
-
required-ros-distributions: ${{ matrix.ros_distribution }}
|
|
28
|
-
|
|
29
|
-
- name: Install ROS2 Rolling (Conditional)
|
|
30
|
-
if: ${{ matrix.ros_distribution == 'rolling' }}
|
|
31
|
-
shell: bash
|
|
32
|
-
run: |
|
|
33
|
-
wget --quiet https://ci.ros2.org/view/packaging/job/packaging_windows/lastSuccessfulBuild/artifact/ws/ros2-package-windows-AMD64.zip -O rolling.zip
|
|
34
|
-
7z x rolling.zip -y -o/c/dev/rolling
|
|
35
|
-
|
|
36
|
-
- name: Prebuild - Setup VS Dev Environment
|
|
37
|
-
uses: seanmiddleditch/gha-setup-vsdevenv@v4
|
|
38
|
-
|
|
39
|
-
- uses: actions/checkout@v3
|
|
40
|
-
|
|
41
|
-
- name: Build rclnodejs
|
|
42
|
-
shell: cmd
|
|
43
|
-
run: |
|
|
44
|
-
call "c:\dev\${{ matrix.ros_distribution }}\ros2-windows\setup.bat"
|
|
45
|
-
npm i
|
|
46
|
-
|
|
47
|
-
# On the windows/foxy combination the Eclipse CycloneDDS RMW implementation is used to workaround
|
|
48
|
-
# an error when loading the default fastrtps ddl
|
|
49
|
-
- name: Test rclnodejs
|
|
50
|
-
shell: cmd
|
|
51
|
-
run: |
|
|
52
|
-
call "c:\dev\${{ matrix.ros_distribution }}\ros2-windows\setup.bat"
|
|
53
|
-
cmd /c "if ${{ matrix.ros_distribution }}==foxy (set RMW_IMPLEMENTATION=rmw_cyclonedds_cpp&&npm test)"
|
|
54
|
-
cmd /c "if NOT ${{ matrix.ros_distribution }}==foxy (npm test)"
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
name: rclnodejs - Windows Build & Test
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
push:
|
|
6
|
-
branches:
|
|
7
|
-
- develop
|
|
8
|
-
- iron-irwini
|
|
9
|
-
- humble-hawksbill
|
|
10
|
-
- galactic-geochelone
|
|
11
|
-
- foxy-fitzroy
|
|
12
|
-
pull_request:
|
|
13
|
-
branches:
|
|
14
|
-
- develop
|
|
15
|
-
- iron-irwini
|
|
16
|
-
- humble-hawksbill
|
|
17
|
-
- galactic-geochelone
|
|
18
|
-
- foxy-fitzroy
|
|
19
|
-
workflow_dispatch:
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
identify-ros-distro:
|
|
23
|
-
uses: ./.github/workflows/identify-ros-distro.yml
|
|
24
|
-
|
|
25
|
-
build:
|
|
26
|
-
needs: identify-ros-distro
|
|
27
|
-
runs-on: windows-2019
|
|
28
|
-
strategy:
|
|
29
|
-
fail-fast: false
|
|
30
|
-
matrix:
|
|
31
|
-
# Explicit node versions are used to workaround an error
|
|
32
|
-
# where node-gyp fails due to some silly cacheing
|
|
33
|
-
node-version: [16.20.0, 18.16.0, 20.X]
|
|
34
|
-
steps:
|
|
35
|
-
- name: Setup Node.js ${{ matrix.node-version }}
|
|
36
|
-
uses: actions/setup-node@v3
|
|
37
|
-
with:
|
|
38
|
-
node-version: ${{ matrix.node-version }}
|
|
39
|
-
|
|
40
|
-
- name: Setup ROS2
|
|
41
|
-
uses: ros-tooling/setup-ros@v0.6
|
|
42
|
-
with:
|
|
43
|
-
required-ros-distributions: ${{ needs.identify-ros-distro.outputs.distro }}
|
|
44
|
-
|
|
45
|
-
- name: Install ROS2 Rolling (Conditional)
|
|
46
|
-
if: ${{ needs.identify-ros-distro.outputs.distro == 'rolling' }}
|
|
47
|
-
shell: bash
|
|
48
|
-
run: |
|
|
49
|
-
wget --quiet https://ci.ros2.org/view/packaging/job/packaging_windows/lastSuccessfulBuild/artifact/ws/ros2-package-windows-AMD64.zip -O rolling.zip
|
|
50
|
-
7z x rolling.zip -y -o/c/dev/rolling
|
|
51
|
-
|
|
52
|
-
- name: Prebuild - Setup VS Dev Environment
|
|
53
|
-
uses: seanmiddleditch/gha-setup-vsdevenv@v4
|
|
54
|
-
|
|
55
|
-
- uses: actions/checkout@v3
|
|
56
|
-
|
|
57
|
-
- name: Build rclnodejs
|
|
58
|
-
shell: cmd
|
|
59
|
-
run: |
|
|
60
|
-
call "c:\dev\${{ needs.identify-ros-distro.outputs.distro }}\ros2-windows\setup.bat"
|
|
61
|
-
npm i
|
|
62
|
-
|
|
63
|
-
# On the windows/foxy combination the Eclipse CycloneDDS RMW implementation is used to workaround
|
|
64
|
-
# an error when loading the default fastrtps ddl
|
|
65
|
-
- name: Test rclnodejs
|
|
66
|
-
shell: cmd
|
|
67
|
-
run: |
|
|
68
|
-
call "c:\dev\${{ needs.identify-ros-distro.outputs.distro }}\ros2-windows\setup.bat"
|
|
69
|
-
cmd /c "if ${{ needs.identify-ros-distro.outputs.distro }}==foxy (set RMW_IMPLEMENTATION=rmw_cyclonedds_cpp&&npm test)"
|
|
70
|
-
cmd /c "if NOT ${{ needs.identify-ros-distro.outputs.distro }}==foxy (npm test)"
|
package/.prettierrc.yml
DELETED
package/.vscode/settings.json
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files.associations": {
|
|
3
|
-
"*.ipp": "cpp",
|
|
4
|
-
"string_view": "cpp",
|
|
5
|
-
"array": "cpp",
|
|
6
|
-
"string": "cpp",
|
|
7
|
-
"sstream": "cpp",
|
|
8
|
-
"cctype": "cpp",
|
|
9
|
-
"clocale": "cpp",
|
|
10
|
-
"cmath": "cpp",
|
|
11
|
-
"csignal": "cpp",
|
|
12
|
-
"cstdarg": "cpp",
|
|
13
|
-
"cstddef": "cpp",
|
|
14
|
-
"cstdio": "cpp",
|
|
15
|
-
"cstdlib": "cpp",
|
|
16
|
-
"cstring": "cpp",
|
|
17
|
-
"ctime": "cpp",
|
|
18
|
-
"cwchar": "cpp",
|
|
19
|
-
"cwctype": "cpp",
|
|
20
|
-
"any": "cpp",
|
|
21
|
-
"atomic": "cpp",
|
|
22
|
-
"strstream": "cpp",
|
|
23
|
-
"bit": "cpp",
|
|
24
|
-
"*.tcc": "cpp",
|
|
25
|
-
"bitset": "cpp",
|
|
26
|
-
"chrono": "cpp",
|
|
27
|
-
"codecvt": "cpp",
|
|
28
|
-
"compare": "cpp",
|
|
29
|
-
"complex": "cpp",
|
|
30
|
-
"concepts": "cpp",
|
|
31
|
-
"condition_variable": "cpp",
|
|
32
|
-
"cstdint": "cpp",
|
|
33
|
-
"deque": "cpp",
|
|
34
|
-
"forward_list": "cpp",
|
|
35
|
-
"list": "cpp",
|
|
36
|
-
"map": "cpp",
|
|
37
|
-
"set": "cpp",
|
|
38
|
-
"unordered_map": "cpp",
|
|
39
|
-
"unordered_set": "cpp",
|
|
40
|
-
"vector": "cpp",
|
|
41
|
-
"exception": "cpp",
|
|
42
|
-
"algorithm": "cpp",
|
|
43
|
-
"functional": "cpp",
|
|
44
|
-
"iterator": "cpp",
|
|
45
|
-
"memory": "cpp",
|
|
46
|
-
"memory_resource": "cpp",
|
|
47
|
-
"numeric": "cpp",
|
|
48
|
-
"optional": "cpp",
|
|
49
|
-
"random": "cpp",
|
|
50
|
-
"ratio": "cpp",
|
|
51
|
-
"system_error": "cpp",
|
|
52
|
-
"tuple": "cpp",
|
|
53
|
-
"type_traits": "cpp",
|
|
54
|
-
"utility": "cpp",
|
|
55
|
-
"fstream": "cpp",
|
|
56
|
-
"future": "cpp",
|
|
57
|
-
"initializer_list": "cpp",
|
|
58
|
-
"iomanip": "cpp",
|
|
59
|
-
"iosfwd": "cpp",
|
|
60
|
-
"iostream": "cpp",
|
|
61
|
-
"istream": "cpp",
|
|
62
|
-
"limits": "cpp",
|
|
63
|
-
"mutex": "cpp",
|
|
64
|
-
"new": "cpp",
|
|
65
|
-
"numbers": "cpp",
|
|
66
|
-
"ostream": "cpp",
|
|
67
|
-
"semaphore": "cpp",
|
|
68
|
-
"shared_mutex": "cpp",
|
|
69
|
-
"stdexcept": "cpp",
|
|
70
|
-
"stop_token": "cpp",
|
|
71
|
-
"streambuf": "cpp",
|
|
72
|
-
"thread": "cpp",
|
|
73
|
-
"cfenv": "cpp",
|
|
74
|
-
"cinttypes": "cpp",
|
|
75
|
-
"typeindex": "cpp",
|
|
76
|
-
"typeinfo": "cpp",
|
|
77
|
-
"variant": "cpp"
|
|
78
|
-
}
|
|
79
|
-
}
|