Skip to content

marcelarosalesj/robot-four

Repository files navigation

Fog robot

Fog robot is a mobile robot thought to work on an edge cloud environment.

Hardware components

  • Pixhawk
  • Companion Computer Raspberry Pi

Software architecture

The Software Architecture is based on microservices using Docker containers. The vision processing is done with OpenCV framework.

  • vision-sense: client system that automatically pulls an image every x seconds, stores it in storage directory and request an operation to image-processing.
  • image-processing: server system that performs operation on the image
  • control-panel: front-end
  • wheel-motion: server system that manages the wheels of the Fog robot.
  • storage: filesystem that stores all images related to this system.
  • database: influxdb with information about image path and timestamp.

Getting started

DISPLAY=:0.0 ; export DISPLAY
xhost +local:docker
docker network create my-network --driver bridge
docker-compose up

Note: remove proxies environmental variables in vision-sense so it can connect to database.

Container Development environment

# Get started
docker pull spmallick/opencv-docker:opencv
xhost +local:docker
docker run -v $(pwd):/localdisk --device=/dev/video0:/dev/video0 --device=/dev/video1:/dev/video1 -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -p 5000:5000 -p 8888:8888 -it spmallick/opencv-docker:opencv /bin/bash

# To reuse the development container
docker start  <container_hash>
docker attach <container_hash>

For some the Dockerfile files in this project, it is required to use the appropriate virtualenv to use the OpenCV installation.

Proxies

For running docker-compose in an internal network, consider to setup these:

  • Add to /etc/systemd/system/docker.service.d/http-proxy.conf this Environment="HTTP_PROXY=http://proxy_url:proxy_port" "NO_PROXY=localhost,127.0.0.0/8"
  • Add here ~/.docker/config.json this
{
 "proxies":
 {
   "default":
   {
     "httpProxy": "http://proxy.server:port",
     "httpsProxy": "http://proxy.server:port",
     "noProxy": "localhost,127.0.0.1"
   }
 }
}

Docker compose

# to start the containers
docker-compose up

# to remove everything
docker-compose down -v --rmi all --remove-orphans

Mount USB

Check out this guide

References

Releases

No releases published

Packages

No packages published