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
-**Note:** to install rclnodejs from GitHub: add `"rclnodejs":"RobotWebTools/rclnodejs#<branch>"` to your `package.json` depdendency section.
@@ -75,6 +75,7 @@ API documentation is generated by `jsdoc` and can be viewed in the `docs/` folde
75
75
`rclnodejs` API can be used in TypeScript projects. You can find the TypeScript declaration files (\*.d.ts) in the `types/` folder.
76
76
77
77
Your `tsconfig.json` file should include the following compiler options:
78
+
78
79
```jsonc
79
80
{
80
81
"compilerOptions": {
@@ -98,18 +99,19 @@ rclnodejs.init().then(() => {
98
99
});
99
100
```
100
101
101
-
The benefits of using TypeScript become evident when working with more complex use-cases. ROS messages are defined in the `types/interfaces.d.ts` module. This module is updated as part of the `generate-messages` process described in the next section.
102
+
The benefits of using TypeScript become evident when working with more complex use-cases. ROS messages are defined in the `types/interfaces.d.ts` module. This module is updated as part of the `generate-messages` process described in the next section.
102
103
103
104
## ROS2 Interface Message Generation (important)
104
-
ROS components communicate by sending and receiving messages described
105
-
by the interface definition language (IDL). ROS client libraries such as
106
-
rclnodejs are responsible for converting these IDL message descriptions
107
-
into source code of their target language. For this, rclnodejs provides
108
-
the `generate-messages` npm script that reads in the IDL
109
-
messages files of a ROS environment and generates corresponding JavaScript
110
-
message interface files. Additionally, the tool generates the TypeScript
111
-
`interface.d.ts` file containing declarations for every IDL message file
112
-
processed.
105
+
106
+
ROS components communicate by sending and receiving messages described
107
+
by the interface definition language (IDL). ROS client libraries such as
108
+
rclnodejs are responsible for converting these IDL message descriptions
109
+
into source code of their target language. For this, rclnodejs provides
110
+
the `generate-messages` npm script that reads in the IDL
111
+
messages files of a ROS environment and generates corresponding JavaScript
112
+
message interface files. Additionally, the tool generates the TypeScript
113
+
`interface.d.ts` file containing declarations for every IDL message file
114
+
processed.
113
115
114
116
Learn more about ROS interfaces and IDL [here](https://index.ros.org/doc/ros2/Concepts/About-ROS-Interfaces/).
0 commit comments