Giter Club home page Giter Club logo

uzumal / tello-orbslam2-ros-hololens2 Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 1.0 1.01 GB

Run ORBSLAM2 and provide AR to users using HoloLens2 (Unity), Ubuntu (ROS) and Tello

License: GNU General Public License v3.0

CMake 4.02% C 2.61% C++ 67.90% Python 2.74% Shell 0.14% Makefile 14.35% Perl 0.02% Tcl 0.01% Cuda 2.20% Fortran 1.60% Batchfile 0.01% Lex 0.01% Yacc 0.01% HTML 1.80% Java 0.97% JavaScript 0.17% C# 0.98% TeX 0.17% MATLAB 0.02% Objective-C++ 0.28%
augmented-reality drone hololens2 mrtk-ros-application orbslam2 ros ros-melodic tello unity dji

tello-orbslam2-ros-hololens2's Introduction

tello-orbslam2-ros-hololens2

release License: GPL v3 ROS Unity

Software for visualizing drone mapping environments using HoloLens2. I am using this software for my Master's research, please cite the paper when using the program.

It is developed using ROS Melodic, ROS-SHARP, and Unity.

Licence

The source code is released under GPLv3 license.

Getting Started

refer to how using ros command.

Brief steps on installing the Require packages.

If you need any help, I suggest you refer to it.

A brief description of how to set up to HoloLens2 (Unity).

Usage

Note: if u use a virtual-box, you must connect TELLO-XXXXX before launch Ubuntu.

roslaunch flock_driver orbslam2_with_cloud_map.launch
sudo apt-get install ros-melodic-rosbridge-suite
roslaunch rosbridge_server rosbridge_websocket.launch 
roslaunch pcl_ros_processing pcl_downsampling.launch

Prerequisites

We have tested the library in **Ubuntu 18.04.

basically have all the necessary libraries, so move to the folder and install each package

cd ~/tello-orbslam2-ros-hololens2/Requirements/

Setup Software

Install what you need

catking tools

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install python-catkin-tools

ffmpeg

sudo apt install ffmpeg

Python PIL

sudo apt-get install python-imaging-tk

Python Pygame

sudo apt-get install python-pygame

Pangolin

We use Pangolin for visualization and user interface. Dowload and install instructions can be found at: https://github.com/stevenlovegrove/Pangolin.

sudo apt install libgl1-mesa-dev
sudo apt install libglew-dev
sudo apt-get install libxkbcommon-dev
cd Pangolin
mkdir build
cd build
cmake ..
cmake --build .
sudo make install

Pybind11

pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code.

cd pybind
mkdir build
cmake ..
make -j6
sudo make install

Eigen3

Required by g2o (see below). Download and install instructions can be found at: http://eigen.tuxfamily.org. Required at least 3.1.0.

cd eigen-3.3.7
mkdir build
cd build
cmake ..
# make check (not definitely)
sudo make install

DBoW2 and g2o (Included in Thirdparty folder)

We use modified versions of the DBoW2 library to perform place recognition and g2o library to perform non-linear optimizations. Both modified libraries (which are BSD) are included in the Thirdparty folder.

cd DBoW2
mkdir build
cd build
cmake ..
make
sudo make install

h264decoder

cd h264decoder
mkdir build
cd build
cmake ..
make

now copy it to python path

sudo cp ~/ROS/h264decoder/libh264decoder.so /usr/local/lib/python2.7/dist-packages

OpenCV 3.4.0

We use OpenCV to manipulate images and features. Dowload and install instructions can be found at: http://opencv.org. Required at OpenCV 3.4.0.

# root authority
sudo su -

apt-get update
apt-get upgrade

# Add repository to include libjasper-dev
add-apt-repository "deb http://security.ubuntu.com/ubuntu bionic-security main"

# install dependent packages
apt-get -y install build-essential checkinstall cmake unzip pkg-config yasm
apt-get -y install git gfortran python3-dev
apt-get -y install libjpeg8-dev libjasper-dev libpng12-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine2-dev libv4l-dev
apt-get -y install libjpeg-dev libpng-dev libtiff-dev libtbb-dev
apt-get -y install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libatlas-base-dev libxvidcore-dev libx264-dev libgtk-3-dev

# Specify the latest version from the tag
cd /usr/local/src
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.git
cd opencv_contrib
# change the version
cd opencv_contrib
git checkout -b 3.4.0 refs/tags/3.2.0
cd ../opencv/
git checkout -b 3.4.0 refs/tags/3.2.0

# Build and Install
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_FFMPEG=ON -D WITH_CUDA=ON -DWITH_NVCUVID=ON -DBUILD_opencv_cudacodec=OFF -DCUDA_GENERATION=Pascal ..
// cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_FFMPEG=ON ..
make
make install
echo /usr/local/lib > /etc/ld.so.conf.d/opencv.conf
ldconfig -v

# Check the OpenCV Version
opencv_version

exit

Build

Installing our version of TelloPy

based on https://github.com/dji-sdk/Tello-Python and https://github.com/hanyazou/TelloPy

cd ~/drone-slam-octomap/Tello_ROS_ORBSLAM/TelloPy
sudo python setup.py install

Installing orbslam2

based on https://github.com/appliedAI-Initiative/orb_slam_2_ros and https://github.com/rayvburn/ORB-SLAM2_ROS and https://github.com/tau-adl/Tello_ROS_ORBSLAM

cd ~/tello-orbslam2-ros-hololens2/Tello_ROS_ORBSLAM/ROS/tello_catkin_ws/
catkin init
catkin clean
catkin build --mem-limit 70% -j1

Add the enviroment setup to bashrc

echo "source $PWD/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

Installing rosbridge-server

rosbridge allows dynamic socket and web-socket based access to the full capabilities of ROS.

sudo apt-get install ros-melodic-rosbridge-server
roslaunch rosbridge_server rosbridge_websocket.launch

Installing pcl_ros_processing

pcl_ros_processing allows downsampling pointcloud from ros-orb-slam2.

cd pc_ws
catkin init
catkin build

Add the enviroment setup to bashrc

echo "source $PWD/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

HoloLens Setup

Unzipping below files

tello-orbslam2-ros-hololens2/Unity Projects/ar-ros-package.zip
tello-orbslam2-ros-hololens2/Unity Projects/mrtk-ros-droneImage-package.zip

and please import these package files.

You must change IP address to yours IP address in below file.

tello-orbslam2-ros-hololens2/Unity Projects/ar-ros/Assets/RosSharp/Scripts/RosBridgeClient/RosCommuncation/RosConnector.cs

スクリーンショット 2022-12-13 9 40 36

Note: If you want to change the connection point, check the second pc checkbox (see figure).

Appendix

Use as appropriate

cmakeのversion-update

wget https://cmake.org/files/v3.14/cmake-3.14.0.tar.gz
tar xvf cmake-3.14.0.tar.gz
cd ~/Downloads/cmake-3.14.0   # or wherever you downloaded cmake
./bootstrap --prefix=$HOME/cmake-install
make 
make install
export PATH=$HOME/cmake-install/bin:$PATH
export CMAKE_PREFIX_PATH=$HOME/cmake-install:$CMAKE_PREFIX_PATH

If you encounter a lock error

sudo rm /var/lib/apt/lists/lock
sudo rm /var/lib/dpkg/lock
sudo rm /var/lib/dpkg/lock-frontend

For users who install from scratch by themselves

Eigen3

cd ~
mkdir eigen_ws
wget https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz
tar xvf eigen-3.3.7.tar.gz
cd eigen-3.3.7
mkdir build
cd build
cmake ..
# make check (not definitely)
sudo make install

g2o

sudo apt install libsuitesparse-dev - qtdeclarative5-dev - qt5-qmake - libqglviewer-dev
mkdir ~/g2o_ws
cd ~/g2o_ws
git clone https://github.com/RainerKuemmerle/g2o.git
cd g2o
mkdir build
cd build
cmake ..
make
sudo make install

DBoW2

sudo apt-get install libboost-dev
mkdir ~/DBoW2_ws
cd ~/DBoW2_ws
git clone https://github.com/dorian3d/DBoW2.git
cd DBoW2
mkdir build
cd build
cmake ..
make
sudo make install

Pangolin(ver.0.5)

cd ~/ROS/
git clone --recursive https://github.com/stevenlovegrove/Pangolin.git -b v0.5
sudo apt install libgl1-mesa-dev
sudo apt install libglew-dev
sudo apt-get install libxkbcommon-dev
cd Pangolin
mkdir build
cd build
cmake ..
cmake --build .
sudo make install

Pybind11

git clone https://github.com/pybind/pybind11.git
cd pybind
mkdir build
cmake ..
make -j6
sudo make install

Disclaimer

This is research code, it is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of merchantability or fitness for a particular purpose.

tello-orbslam2-ros-hololens2's People

Contributors

uzumal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

thaoho3108

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.