Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

EMAR Mini: A Compact, Open‑Source Emergency Assistance Robot

EMAR Mini is a scaled‑down version of the EMAR open‑source emergency robot, designed to aid healthcare professionals during the COVID‑19 pandemic. Built on a Raspberry Pi 4, it integrates Intel RealSense cameras, neural compute hardware, and servomotors to deliver real‑time object detection, depth sensing, and remote control.

This guide walks you through every step of setting up the EMAR Mini, from hardware assembly to secure software configuration.

Safety Notice

Always exercise caution when handling electronics. We do not accept responsibility for any hardware or personal injury resulting from this tutorial. Use the instructions at your own risk.

Prerequisites

HIAS Server

Before beginning, ensure you have a fully functional HIAS server installed. Follow the HIAS installation guide to set up the server.

STLs for 3D Printing

Print the EMAR Mini case and chassis using the STL files provided in the STLs For 3D Printing guide.

Raspberry Pi OS Lite

Download the Raspberry Pi OS Lite (Buster) image from the Raspberry Pi OS download page, extract the file, and flash it onto a 64 GB SD card. After booting, run:

sudo apt-get update && sudo apt-get upgrade
sudo raspi-config

Use the configuration tool to expand the filesystem, set keyboard preferences, and connect to your network.

Installation Overview

The installation process includes:

Device Security

Securing the Raspberry Pi is essential. Follow the steps below to create a dedicated remote user and enable SSH key authentication.

Remote User

Create a new user with sudo privileges:

sudo adduser YourUsername
usermod -aG sudo YourUsername

Log in to the new account via SSH:

ssh [email protected]

SSH Access

Generate an SSH key pair on your local machine (not on the Pi):

ssh-keygen

Copy the public key to the Pi:

ssh-copy-id [email protected]

Test password‑less login:

ssh [email protected]

Disable password authentication by editing /etc/ssh/sshd_config:

sudo nano /etc/ssh/sshd_config
# Change the following line:
#PasswordAuthentication yes
PasswordAuthentication no

Restart SSH:

sudo systemctl restart ssh

UFW Firewall

Enable and configure the Uncomplicated Firewall:

sudo ufw enable
sudo ufw allow 22
sudo ufw allow OpenSSH
sudo ufw status

Expected output:

Status: active
To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere
22                         ALLOW       Anywhere
OpenSSH (v6)               ALLOW       Anywhere (v6)
22 (v6)                    ALLOW       Anywhere (v6)

Fail2Ban

Install and configure Fail2Ban to work with UFW:

sudo apt install fail2ban
sudo mv /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo rm /etc/fail2ban/action.d/ufw.conf
sudo touch /etc/fail2ban/action.d/ufw.conf
sudo tee -a /etc/fail2ban/action.d/ufw.conf <<EOF
[Definition]
  enabled  = true
  actionstart =
  actionstop =
  actioncheck =
  actionban = ufw insert 1 deny from <ip> to any
  actionunban = ufw delete deny from <ip> to any
EOF
sudo sed -i "s#banaction = iptables-multiport#banaction = ufw#g" /etc/fail2ban/jail.local
sudo fail2ban-client restart
sudo fail2ban-client status

Output should include:

Shutdown successful
Server readyStatus
|- Number of jail:      1
`- Jail list:   sshd

Python Dependencies

sudo apt install python3-pip
sudo pip3 install geolocation paho-mqtt psutil numpy requests zmq

Create EMAR Device in HIAS

In your HIAS Server, navigate to Robotics > EMAR > Create. Configure the device by selecting the appropriate iotJumpWay location, assigning a name, and entering the Pi’s IP and MAC address. Leave the Real‑Time Object Detection & Depth settings at default unless custom ports are required.

HIAS Server Proxy

Adjust the NGINX proxy to route traffic to the Pi. Edit /etc/nginx/sites-available/default:

sudo nano /etc/nginx/sites-available/default

Locate the EMAR block and replace the placeholder IP with your Pi’s address:

location ~* ^/Robotics/EMAR/Live/(.*)$ {
  auth_basic "Restricted";
  auth_basic_user_file /etc/nginx/tass/htpasswd;
  proxy_pass https://###.###.#.##:8282/$1;
}

Reload NGINX:

sudo systemctl reload nginx

Update Device Settings

Use the credentials from the HIAS UI to edit confs.json on the Pi, ensuring ports and hostnames match your configuration:

sudo nano confs.json
{
  "iotJumpWay": {
    "host": "",
    "port": 8883,
    "ip": "localhost",
    "lid": 0,
    "zid": 0,
    "did": 0,
    "dn": "",
    "un": "",
    "pw": ""
  },
  "EMAR": {
    "ip": ""
  },
  "Realsense": {
    "server": {"port": 8282},
    "socket": {"port": 8383}
  },
  "MobileNetSSD": {
    "bin": "Model/MobileNetSSD_deploy.bin",
    "classes": [
      "background", "aeroplane", "bicycle", "bird", "boat", "bottle",
      "bus", "car", "cat", "chair", "cow", "diningtable", "dog",
      "horse", "motorbike", "person", "pottedplant", "sheep", "sofa",
      "train", "tvmonitor"
    ],
    "inScaleFactor": 0.007843,
    "meanVal": 127.53,
    "size": 300,
    "threshold": 0.6,
    "xml": "Model/MobileNetSSD_deploy.xml"
  }
}

Intel® RealSense™ D415

Install the RealSense SDK on the Pi. Ensure the camera is disconnected during installation.

wget https://github.com/IntelRealSense/librealsense/raw/master/scripts/libuvc_installation.sh
chmod +x libuvc_installation.sh
sed -i "s/cmake ../ -DFORCE_LIBUVC=true -DCMAKE_BUILD_TYPE=release/cmake ../ -DFORCE_LIBUVC=true -DCMAKE_BUILD_TYPE=release DBUILD_PYTHON_BINDINGS=bool:true/" libuvc_installation.sh
./libuvc_installation.sh

Add the library path to ~/.bashrc:

echo 'export PYTHONPATH=$PYTHONPATH:/usr/local/lib' >> ~/.bashrc
source ~/.bashrc

Verify the device:

rs-enumerate-devices
python3 -c "import pyrealsense; print('PyRealsense loaded')"

Intel® Distribution of OpenVINO™ Toolkit

Follow these steps to install OpenVINO on the Pi:

sudo apt-get install build-essential cmake unzip pkg-config
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libxvidcore-dev libx264-dev
sudo apt-get install libgtk-3-dev
sudo apt-get install libcanberra-gtk*
sudo apt-get install libatlas-base-dev gfortran
sudo apt-get install python3-dev
cd
wget https://download.01.org/opencv/2020/openvinotoolkit/2020.1/l_openvino_toolkit_runtime_raspbian_p_2020.1.023.tgz
tar -xf l_openvino_toolkit_runtime_raspbian_p_2020.1.023.tgz
mv l_openvino_toolkit_runtime_raspbian_p_2020.1.023 openvino
echo 'source ~/openvino/bin/setupvars.sh' >> ~/.bashrc
source ~/.bashrc

Intel® Neural Compute Stick 2

Install the NCS2 dependencies:

sudo usermod -a -G users "$(whoami)"
cd
sh openvino/install_dependencies/install_NCS_udev_rules.sh

Connect the Neck

Attach the final servo through the top of Body-Middle.stl and secure it. Screw the servo arm into the neck base and connect the servo. Use a small amount of adhesive if needed to maintain stability.

Source: EMAR Mini – Emergency Assistance Robot

Manufacturing process

  1. Industrial Robots: Design, Manufacturing, and Future Trends
  2. DIY Wall‑E Inspired Raspberry Pi CD‑Box Robot
  3. Rolling Alarm Robot: A Smart, Mobile Wake‑Up System Powered by Raspberry Pi and Google Calendar
  4. Build a Motorized Minecraft Creeper Robot with Arduino
  5. Build a Speech-Driven Computer Vision Robot on Windows 10 IoT Core
  6. ROS Robot: Terminal‑Controlled Navigation on Raspberry Pi
  7. Arduino Mini Boss Battle Game – Retro-Inspired Project
  8. V4 Speed Line‑Follower Robot – Advanced Arduino Nano System
  9. Compact 5-Story Arduino-Driven Mini Elevator
  10. Understanding Beverage Robots: Technology, Automation, and Their Role in the Beverage Industry