We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d34a15f commit a6a2d48Copy full SHA for a6a2d48
scripts/npmjs-readme.md
@@ -58,10 +58,10 @@ TypeScript example:
58
```typescript
59
import * as rclnodejs from 'rclnodejs';
60
rclnodejs.init().then(() => {
61
- const node = new rclnodejs.Node('publisher_example_node');
+ const node = rclnodejs.createNode('publisher_example_node');
62
const publisher = node.createPublisher('std_msgs/msg/String', 'topic');
63
publisher.publish(`Hello ROS 2 from rclnodejs`);
64
- node.spin();
+ rclnodejs.spin(node);
65
});
66
```
67
0 commit comments