https://github.com/ros2jsguy/rclnodejs-electron-example
Very basic Electron app demonstrating the use of a ROS 2 rclnodejs node, publisher & subscriber
https://github.com/ros2jsguy/rclnodejs-electron-example
Last synced: about 1 year ago
JSON representation
Very basic Electron app demonstrating the use of a ROS 2 rclnodejs node, publisher & subscriber
- Host: GitHub
- URL: https://github.com/ros2jsguy/rclnodejs-electron-example
- Owner: ros2jsguy
- Created: 2021-11-18T21:20:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-20T12:57:08.000Z (over 4 years ago)
- Last Synced: 2025-03-14T04:11:09.129Z (over 1 year ago)
- Language: JavaScript
- Size: 62.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rclnodejs-electron-example
This very basic project demonstrates how to use the ROS 2 rclnodejs client api with Electron.
No bundler, e.g., Webpack, is used.
## Prerequisites:
* Nodejs 12, 14-16
* npm or Yarn
## Getting Started
1. Clone this repository
```
git clone https://github.com/ros2jsguy/rclnodejs-electron-example
```
2. Install JavaScript dependencies
```
npm install
```
3. Rebuild rclnodejs using Electron node version
```
npx electron-rebuild
```
4. Run
Launch the Electron app to create a ROS 2 node, publisher and subscriber. The publisher will output a message
every second. The subscriber will echo messages it receives from the publisher to stdout.
```
npm start
```
## Special note
This example uses the latest Electron v16 which incorporates Node 14. We must use the rclnodejs [`node-16`](https://github.com/RobotWebTools/rclnodejs/tree/nodejs-16) branch to support node versions greater tha 12.x. Thus we are currently loading the rclnodejs `node-16` branch directly from Github until it is published to the Npmjs repository.