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
Copy file name to clipboardExpand all lines: README.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,13 +16,13 @@
16
16
**Key features:** Topics, Services, Actions, Parameters, Lifecycle Nodes, TypeScript support, RxJS Observables, Electron integration, ROS 2 in the browser (typed Web SDK + thin WebSocket gateway — `rclnodejs/web`, `rosocket`), and prebuilt binaries for Linux x64/arm64.
More runnable examples in [example/](https://github.com/RobotWebTools/rclnodejs/tree/develop/example) and step-by-step guides in [tutorials/](./tutorials/).
@@ -146,7 +146,7 @@ how much glue you want to write.
146
146
rclnodejs supports [RxJS](https://rxjs.dev/) Observable subscriptions for reactive programming with ROS 2 messages. Use operators like `throttleTime()`, `debounceTime()`, `map()`, and `combineLatest()` to build declarative message processing pipelines.
147
147
148
148
```javascript
149
-
const { throttleTime, map } =require('rxjs');
149
+
import { throttleTime, map } from'rxjs';
150
150
151
151
constobsSub=node.createObservableSubscription(
152
152
'sensor_msgs/msg/LaserScan',
@@ -173,7 +173,7 @@ rclnodejs auto-generates JavaScript bindings and TypeScript declarations for eve
173
173
Use the generated types directly:
174
174
175
175
```javascript
176
-
constrclnodejs=require('rclnodejs');
176
+
importrclnodejsfrom'rclnodejs';
177
177
let stringMsgObject =rclnodejs.createMessageObject('std_msgs/msg/String');
178
178
stringMsgObject.data='hello world';
179
179
```
@@ -199,9 +199,9 @@ TypeScript declaration files are included in the package and exposed through the
0 commit comments