GithubHelp home page GithubHelp logo

osvaldlaszlo / indoor_flyt Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 25.15 MB

This repo is the port of flyt, configurations and informations for the original project https://github.com/AlexisTM/Indoor_Position_lasers

License: GNU General Public License v3.0

Python 100.00%

indoor_flyt's Introduction

Indoor_Flyt

This repo is the port of flyt, configurations and informations for the original project https://github.com/AlexisTM/Indoor_Position_lasers

Installation

  • Write FlytOS image on the eMMC
  • Replace the boot.ini file to match the screen configuration
  • boot
  • user : flytpod:flytpod
  • root : root:flyfly
  • resize partition via Odroid-Utility.sh
  • ssh-keygen
  • Wifi setup (UCLouvain : Tunneled TLS)
  • Don't write keyring password, so we can boot directly and autoconnect WiFi
  • sudo su - # change account to root
  • passwd # set root password
  • as root (not sudo): apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AB19BAC9
  • as root (not sudo): wget -O- http://oph.mdrjr.net/meveric/meveric.asc | apt-key add -
  • as root (not sudo): cd /etc/apt/sources.list.d/ && wget http://oph.mdrjr.net/meveric/sources.lists/meveric-all-XU3.list
  • update FlytOS
# install Pip
cd
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py

# upgrade installation
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

apt-get install ros-indigo-image-proc ros-indigo-image-transport-plugins ros-indigo-image-transport ros-indigo-rosbridge-suite ros-indigo-control-toolbox ros-indigo-octomap-ros ros-indigo-octomap-msgs libgoogle-glog-dev ros-indigo-pyros-setup ros-indigo-eigen-conversions python-serial python-flask python-wtforms python-sqlalchemy python-concurrent.futures python-mock python-zmq python-twisted

# additionnal packages missing from FlytOS
apt-get install tmux ros-indigo-usb-cam

pip install flask-security

dpkg -i flytsim_0.4-3_amd64.deb

# default system_id of FlytOS is 20, for QGround, it is 255
# don't forget to put your namespace here
rosparam set /namespace/mavros/system_id 255
rosparam set /namespace/mavros/component_id 0
rosparam set /namespace/mavros/target_system_id 1
rosparam set /namespace/mavros/target_component_id 1
  • Add additionnal configuration

More FLYT configurations

Modify global namespace

You may want to change the namespace at the first line of /flyt/flytos/flytcore/share/core_api/param_files/global_namespace.yaml

Mavros plugins

Enable and disable mavros plugins by commenting with <!-- --> the XML plugin files at /flyt/flytos/flytcore/share/mavros/mavros_plugins.xml and /flyt/flytos/flytcore/share/mavros_extras/mavros_plugins.xml

Aliases

You should add aliases for easier use in .bash_aliases

alias flyt_start='sudo $(rospack find core_api)/scripts/start_flytOS.sh'
alias flyt_kill='sudo $(rospack find core_api)/scripts/kill_flytOS.sh'

Camera

See Camera folder

Launch files

Go to : sudo $(rospack find core_api)/launch and you find all the informations you need

Add UDEV rules for terminals :

On Linux the default name of a USB FTDI would be like \dev\ttyUSB0. If you have a second FTDI linked on the USB or an Arduino, it will registered as \dev\ttyUSB1. To avoid the confusion between the first plugged and the second plugged, we recommend you to create a symlink from ttyUSBx to a friendly name, depending on the Vendor and Product ID of the USB device.

Using lsusb we can get the vendor and product IDs.

$ lsusb

Bus 006 Device 002: ID 0bda:8153 Realtek Semiconductor Corp.
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 05e3:0616 Genesys Logic, Inc.
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 2341:0042 Arduino SA Mega 2560 R3 (CDC ACM)
Bus 003 Device 005: ID 26ac:0011
Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The Arduino is Bus 003 Device 004: ID 2341:0042 Arduino SA Mega 2560 R3 (CDC ACM)

The Pixhawk is Bus 003 Device 005: ID 26ac:0011

If you do not find your device, unplug it, execute lsusb, plug it, execute lsusb again and see the added device.

Therefore, we can create a new UDEV rule in a file called /etc/udev/rules.d/99-pixhawk.rules with the following content, changing the idVendor and idProduct to yours.

SUBSYSTEM=="tty", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0042", SYMLINK+="ttyArduino"
SUBSYSTEM=="tty", ATTRS{idVendor}=="26ac", ATTRS{idProduct}=="0011", SYMLINK+="ttyPixhawk"

Finally, after a reboot you can be sure to know which device is what and put /dev/ttyPixhawk instead of /dev/ttyUSB0 in your scripts.

Be sure to add yourself in the tty and dialout groups via usermod to avoid to have to execute scripts as root.

usermod -a -G tty ros-user
usermod -a -G dialout ros-user

Tools

  • MavYaml - Allow to convert QGroundControl params (from export menu) to a flyt yaml config file known as /flyt/flytos/flytcore/share/core_api/param_files/flyt_params.yaml

indoor_flyt's People

Contributors

alexistm avatar

Watchers

James Cloos 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.