Giter Site home page Giter Site logo

viniciusvidal2 / rover Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 601 KB

This repository will contain code for the ROVER developed by GRIN lab.

License: GNU Lesser General Public License v2.1

Dockerfile 1.14% CMake 2.01% C++ 36.86% C 1.98% Shell 0.80% Python 57.20%

rover's Introduction

ROVER

This repository will contain code for the ROVER developed by GRIN lab.

Getting started

Clone the repository with its proper submodules in your folder of preference:

git clone --recursive
cd ROVER
git submodule update --remote

Run the following command from inside the ROVER directory to build the docker image in your machine. The image name should be rover_image, with proper tag on it.

docker build -t rover_image:0.1 .

This image should contain the necessary dependencies to use ROS packages and Ardupilot communication through mavlink.

NOTE: Bear in mind the tag you are using when building the image. If for some reason you change it, make sure you do in all the following commands.

Embedded board setup

First of all, the embedded system expects some sensors and actuators to be connected for correct bootup. The absense of any of those could cause startup to crash. Currently we are using:

  • USB camera
  • Dynamixel driver and motors
  • Livox mid360 Make sure they are properly connected and configured. In the case of livox sensor, make sure the cable network has the proper local network manual IP address (192.168.1.50).

We need not only to build the docker image inside the embedded board, but to setup its system to run everything at bootup. To do that, we must create a service with the proper dependencies

  • Create a file at /etc/systemd/system/rover_bringup.service with the following command:
sudo nano /etc/systemd/system/rover_bringup.service
  • Add the following content to this file:
[Unit]
Description=Rover system bringup with docker container and dependencies
After=graphical.target
Wants=graphical.target

[Service]
Type=simple
ExecStart=/home/YOUR_BOARD_USERNAME/ROVER/init_board.sh
Restart=on-failure
RestartSec=10

[Install]
WantedBy=graphical.target
  • Enable and start the service with the commands:
sudo systemctl daemon-reload
sudo systemctl enable rover_bringup.service
sudo systemctl start rover_bringup.service

You must also enable the system monitor host. Please add the following lines into the ~/.bashrc file:

export DISLAY=:0
xhost +

You should see the camera prompting in the monitor/radio transmitter next time you bootup. All other sensors should work just fine as well

Running the container

Desktop

Use the following command to run the container:

docker run --restart=always -itd  --network host --name rover_container rover_image:0.1

This will not log you inside to container. In case you need to login inside the container from the terminal, use the following command:

docker exec -it rover_container bash

Embedded (RPI or Jetson boards)

You should not neet to run the container by hand in the embedded board, but you can do it two ways:

  • Calling the file that is responsible for starting the entire system at bootup:
./home/YOUR_BOARD_USERNAME/ROVER/init_board.sh
  • Running the docker container passing all the necessary info (provided that you have all the sensors connected. If for some reason you don't, remove the config that relates to the missing sensor):
sudo docker run --restart=always -itd --device=/dev/ttyACM0 --device=/dev/ttyUSB0 --device /dev/video0:/dev/video0 --device /dev/video1:/dev/video1 --privileged --group-add video -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --network host --name rover_container rover_image:0.1

rover's People

Contributors

viniciusvidal2 avatar danielcostaufjf avatar

Watchers

Lucian avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.