GithubHelp home page GithubHelp logo

damonmin / slamwithcameraimuforpython Goto Github PK

View Code? Open in Web Editor NEW

This project forked from knagara/slamwithcameraimuforpython

0.0 2.0 0.0 28.23 MB

SLAM with Camera and IMU (Python)

Python 99.87% Batchfile 0.13%

slamwithcameraimuforpython's Introduction

SLAM with Camera and IMU for Python

画像センサとIMUを用いたSLAMのためのPythonプログラム(日本語説明は後半)

SLAM = Simultaneous Localization and Mapping

Overview

How to use

1.Setup Android App (See -> SLAMwithCameraIMUforAndroid)

2.Setup MQTT Broker (See -> MQTT, mosquitto, Apollo)

3.Install MQTT package of Python

>pip install paho-mqtt

4.Create a single line text file named 'server.conf' on the parent directory of Main.py.

server.conf
[Format] ipaddress&port&username&password
[Example] 160.16.xxx.xxx&61613&admin&password

5.Run Main.py

>python Main.py

6.Start Android App

7.Now the program is receiving sensor data and estimate smartphone location, also publishing it to MQTT broker.

8.If you want to save estimated data as CSV, run GetOutputData.py

>python ./data/GetOutputData.py

Important Files

File name Explanation
Main.py The entry point of SLAM program
Receive sensor data
Publish estimated location
image_RBPF.py Parse sensor data of camera
landmark.py Landmark (Keypoint in 3D space) class
Initialize landmark parameters
Observation model
particle.py Particle class
particle_filter_RBPF.py Particle filter
sensor.py Parse sensor data of IMU
state_RBPF.py Manage state variable
data/GetOutputData.py Receive estimated data and save them as CSV

Data Flow



概要

使い方

1.Androidアプリをセットアップ(ここを参照 -> SLAMwithCameraIMUforAndroid

2.MQTTブローカーをセットアップ(ここを参照 -> sango

3.PythonのMQTTパッケージをインストール

>pip install paho-mqtt

4.server.confという名前のファイルをMain.pyの親ディレクトリに作成する

server.conf
[フォーマット] ipaddress&port&username&password
[例] 160.16.xxx.xxx&61613&admin&password

5.Main.pyを起動

>python Main.py

6.Androidアプリを起動

7.センサデータを受信し、位置の推定が始まります。推定結果はMQTTブローカーに送信されます。

8.推定結果をCSVファイルに保存したい場合は、GetOutputData.pyを起動

>python ./data/GetOutputData.py

重要なファイル

File name Explanation
Main.py SLAMプログラムのエントリポイント
センサデータの受信
推定結果の送信
image_RBPF.py 画像センサデータのパース
landmark.py ランドマーク(3D空間中の特徴点)クラス
ランドマークのパラメータの初期化
観測モデル
particle.py パーティクルクラス
particle_filter_RBPF.py パーティクルフィルタ
sensor.py IMUセンサデータのパース
state_RBPF.py 状態変数の管理
data/GetOutputData.py 推定結果を受信してCSVで保存

データフロー

slamwithcameraimuforpython's People

Watchers

 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.