Mixed Reality Simulator
Mixed reality-based swarm simulator that supports both virtual and physical robots in the same environment. The simulator is built using Node.js and uses MQTT protocol for communication. The simulator can be used to support physical and virtual robots in the same environment.
System Requirements
Please install node dependencies as follows. Make sure you have Node.js and npm installed.
npm install
It is recommended to use Node 16 or newer version |
Environment Variables
Please copy the sample.env file and rename into .env and complete the configurations for HTTP and MQTT
MQTT_HOST=mqtt://localhost
MQTT_USER=user
MQTT_PASS=password
MQTT_CLIENT=mqtt_server
MQTT_CHANNEL=v1
ARENA_CONFIG="./app/config/arena/{arena_config}.json"
LOG_LEVEL='info'
Run/Deployment
Local Deployment
# Dev Server with live reload
npm run dev
# Production ready build
npm run start
Production Deployment
# Install PM2 globally (if not yet)
sudo npm i -g pm2
# Start the server (give a proper server name)
pm2 start app/index.js --name {server_name}
# Generate and register a systemd unit for PM2
# This command above prints another command with sudo, and copy/paste that into CLI
pm2 startup systemd
# Persist the current PM2 process list
pm2 save
# Restart the server
pm2 restart {server_name}
# Stop the server
pm2 stop {server_name}
Architecture
