This repository contains the frontend code for the ECE 492 Senior Design project.
The application is built using the Electron Framework and communicates via ROS 2.
To set up the application, you need to clone the following GitHub repositories:
- Frontend (this repository)
- wheelchair_sensor_msgs (custom ROS 2 messages repository)
Ensure that ROS 2 is installed on your Linux environment. The required version is Ubuntu 22.04.
To check your Ubuntu version, run:
lsb_release -aOnce you have cloned the custom messages repository, navigate into it and build it using:
colcon buildTo verify the custom messages, use:
ros2 interface show wheelchair_sensor_msgs/msg/MessageNameFrom the root directory, install Node.js and npm:
sudo apt install nodejs
sudo apt install npmCheck the installed versions:
nodejs -v # Should be 12.22.9
npm -v # Should be 11.2.0Navigate into the app directory:
cd test-appInstall dependencies:
npm installThis should generate the node_modules directory and package-lock.json.
Rebuild rclnodejs for Electron (must be run after every npm install):
./node_modules/.bin/electron-rebuildNavigate into the electron-communication directory:
cd electron-communicationInstall rclnodejs:
npm install rclnodejsFor ROS 2 custom messages run:
npx generate-ros-messagesAdd the following lines to your .bashrc file to source ROS 2 Humble and custom messages:
source /opt/ros/humble/setup.bash
source ~/ros2_ws/install/setup.bashNavigate into the electron-communication directory and run:
node middle_man.jsNavigate into the test-app directory and run:
npm startNote that both need to be running in parallel.
Also, npm start might throw some errors upon app launch, but those can be ignored.
test-app/- Contains the main Electron application.electron-communication/- Contains the middle-man node for ROS 2 communication.7034- This is the 4-digit pin for the lock screen (Note: fingerprint does not work for login).