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: demo/electron/manipulator/README.md
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,17 +34,27 @@ An interactive Electron application demonstrating a two-joint robotic manipulato
34
34
npm install
35
35
```
36
36
37
-
3.**Rebuild native modules for Electron**:
37
+
3.**Source your ROS 2 environment** (required so the matching prebuilt binary is selected):
38
+
38
39
```bash
39
-
npm run rebuild
40
+
source /opt/ros/$ROS_DISTRO/setup.bash # or your ROS 2 installation path
40
41
```
41
42
43
+
rclnodejs ships prebuilt native binaries for Electron, so no compilation is needed.
44
+
The binary is selected at runtime from `ROS_DISTRO`, the Linux distro codename, and
45
+
the CPU architecture, so `ROS_DISTRO` must be set before launching the app. If no
46
+
matching prebuilt binary is available for your platform, rclnodejs falls back to
47
+
building from source.
48
+
49
+
> Note: do not run `electron-rebuild` against rclnodejs — it recompiles the addon
50
+
> from source and bypasses the prebuilt binary. The Electron Forge `rebuildConfig`
51
+
> in `package.json` already excludes `rclnodejs` from the automatic rebuild step.
52
+
42
53
## 📜 Available Scripts
43
54
44
55
-**`npm start`** - Launch the application in development mode
45
56
-**`npm run package`** - Package the application into a standalone executable folder
46
57
-**`npm run make`** - Create platform-specific installers (requires system tools like `zip`, `dpkg`)
47
-
-**`npm run rebuild`** - Rebuild native modules after dependency changes
48
58
49
59
## 🚀 Quick Start
50
60
@@ -54,9 +64,9 @@ An interactive Electron application demonstrating a two-joint robotic manipulato
54
64
npm start
55
65
```
56
66
57
-
- ✅ **No ROS2 environment required**
58
-
- ✅ **Works without external setup**
67
+
- ✅ **No ROS2 topic publishing required**
59
68
- ✅ **Pure visualization and manual control**
69
+
- ⚠️ ROS 2 must still be sourced so the prebuilt native binary is selected (otherwise rclnodejs builds from source)
60
70
- ⚠️ No ROS2 topic publishing (local mode only)
61
71
62
72
### Option 2: Manual ROS2 Setup (Recommended for ROS2 Integration)
@@ -308,7 +318,7 @@ manipulator/
308
318
2.**Build errors with Electron**
309
319
310
320
- This demo currently uses Electron 40.1.0
311
-
-If you change Electron or other native-module dependencies, rerun `npm run rebuild`
321
+
-rclnodejs loads its prebuilt Electron binary at runtime; if it fails to load, ensure ROS 2 is sourced so the matching prebuild is selected. To force a from-source rebuild of rclnodejs, set `RCLNODEJS_FORCE_BUILD=1`
312
322
- The versions recorded in `package.json` and `package-lock.json` are the tested baseline for this demo
0 commit comments