Skip to content

Commit 8fea81e

Browse files
authored
Consolidate all demos under demo/ + add rosocket demo (#1503)
- Move `electron_demo/` → `demo/electron/` and `ts_demo/` → `demo/typescript/`, so all runnable demos live under a single `demo/` tree (Electron, TypeScript, and the new rosocket demo). Path-only renames; per-demo READMEs and the top-level `README.md`, `scripts/npmjs-readme.md`, `eslint.config.mjs`, and `.npmignore` are updated to reference the new locations. - Add `demo/rosocket/` — a minimal end-to-end example of the `rosocket` WebSocket bridge: a Node `server.js` that wires `/chatter` (`std_msgs/msg/String`) and `/add_two_ints` (`example_interfaces/srv/AddTwoInts`) to plain WebSocket URLs, and a single-file `index.html` browser client (no client library, just built-in `WebSocket` + `JSON`) demonstrating subscribe / publish / service-call. README documents how to source ROS 2, run the bridge alongside the existing AddTwoInts service example, open the page from any modern browser, and verify the round-trip from the ROS 2 side. Fix: #1502
1 parent 500efad commit 8fea81e

51 files changed

Lines changed: 411 additions & 18 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ tutorials/
2626
electron_demo/
2727
ts_demo/
2828
tools/
29+
demo/
2930
.github/
3031
.nyc_output/
3132
.vscode/

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ Create rich, interactive desktop applications using Electron and web technologie
144144

145145
| Demo | Description | Screenshot |
146146
| :-----------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------: |
147-
| **🐢 [turtle_tf2](./electron_demo/turtle_tf2)** | Real-time coordinate frame visualization with turtle control. Features TF2 transforms, keyboard control, and dynamic frame updates. | ![turtle_tf2](./electron_demo/turtle_tf2/turtle-tf2-demo.png) |
148-
| **🦾 [manipulator](./electron_demo/manipulator)** | Interactive two-joint robotic arm simulation. Features 3D joint visualization, manual/automatic control, and visual movement markers. | ![manipulator](./electron_demo/manipulator/manipulator-demo.png) |
147+
| **🐢 [turtle_tf2](./demo/electron/turtle_tf2)** | Real-time coordinate frame visualization with turtle control. Features TF2 transforms, keyboard control, and dynamic frame updates. | ![turtle_tf2](./demo/electron/turtle_tf2/turtle-tf2-demo.png) |
148+
| **🦾 [manipulator](./demo/electron/manipulator)** | Interactive two-joint robotic arm simulation. Features 3D joint visualization, manual/automatic control, and visual movement markers. | ![manipulator](./demo/electron/manipulator/manipulator-demo.png) |
149149

150-
Explore more examples in [electron_demo](https://github.com/RobotWebTools/rclnodejs/tree/develop/electron_demo).
150+
Explore more examples in [demo/electron](https://github.com/RobotWebTools/rclnodejs/tree/develop/demo/electron).
151151

152152
## Using rclnodejs with TypeScript
153153

@@ -175,7 +175,7 @@ rclnodejs.init().then(() => {
175175
});
176176
```
177177

178-
See [TypeScript demos](https://github.com/RobotWebTools/rclnodejs/tree/develop/ts_demo) for more examples.
178+
See [TypeScript demos](https://github.com/RobotWebTools/rclnodejs/tree/develop/demo/typescript) for more examples.
179179

180180
## Observable Subscriptions
181181

File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ An interactive Electron application demonstrating a two-joint robotic manipulato
2525
1. **Navigate to the demo directory**:
2626

2727
```bash
28-
cd rclnodejs/electron_demo/manipulator
28+
cd rclnodejs/demo/electron/manipulator
2929
```
3030

3131
2. **Install dependencies**:

0 commit comments

Comments
 (0)