Skip to content

Latest commit

 

History

History

electron_demo

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Rclnodejs Electron demo

Introduction

This is a minimal rclnodejs demo using Electron. More information about Electron, please check with Electron documentation.

The demo includes the following files:

  • package.json - Points to the app's main file and lists its details and dependencies.
  • main.js - Introduces the rclnodejs native module, starts the app and creates a browser window to render HTML. This is the app's main process.
  • index.html - Includes a text editor where you can input the the topic to be published. This is the app's renderer process.
  • renderer.js - Communicate with main process to publish a topic and get it through a subscription.

To run the demo

Before starting, please ensure you have installed nodejs.

  1. Clone this repository.
git clone https://github.com/RobotWebTools/rclnodejs.git
  1. Go into the demo.
cd rclnodejs/electron_demo
  1. SOURCE THE ROS 2 SETUP FILE

  2. Install dependencies

npm install
  1. Rebuild rclnodejs for Electron
# Every time you run "npm install", run this:
./node_modules/.bin/electron-rebuild
  1. Run the app
npm start

If it works, you can see the demo as: demo screenshot

Resources for Learning Electron