Skip to content

Measure orientation of your robot or device using an IMU, visualize its data using this code

Notifications You must be signed in to change notification settings

BrianLesko/IMU-visualization

Repository files navigation

Measure Orientation using an IMU

IMU's are necessary for robotics applications and consumer devices. IMU's are used in conjunction with GPS modules to track both position and orientation in space.

IMU stands for inertial measurement unit.

IMU's are used in robotics and vehicles. Written in C++ Arduino and intended for use with a mobile robot.

Use this code to visualize the orientation of your IMU

 

 

Usage

The .ino files are for the Arduino BLE Sense 2 or the Nicla Sense ME Arduino boards.

Get either board, upload the .ino file using the arduino IDE, and make sure the serial monitor is closed. The Nicla sense board is much more accurate.

Then, run the following commands in your terminal:

python3 -m venv my_env
source my_env/bin/activate # or on windows: source my_env\Scripts\activate
pip install streamlit pyserial 
streamlit run https://raw.githubusercontent.com/BrianLesko/IMU-visualization/main/app.py

to stop the app, go back to the terminal and press control C

This will start the local Streamlit server, and you can access the chatbot by opening a web browser and navigating to http://localhost:8501.

 

Repository Structure

repository/
├── app.py # the code and UI integrated together live here
├── customize_gui # class for adding gui elements
├── requirements.txt # the python packages needed to run locally
├── .gitignore # includes the local virtual environment named my_env
├── .streamlit/
│   └── config.toml # theme info for the UI
└── docs/
    └── preview.png # preview photo for Github

 


 

╭━━╮╭━━━┳━━┳━━━┳━╮╱╭╮ ╭╮╱╱╭━━━┳━━━┳╮╭━┳━━━╮ ┃╭╮┃┃╭━╮┣┫┣┫╭━╮┃┃╰╮┃┃ ┃┃╱╱┃╭━━┫╭━╮┃┃┃╭┫╭━╮┃ ┃╰╯╰┫╰━╯┃┃┃┃┃╱┃┃╭╮╰╯┃ ┃┃╱╱┃╰━━┫╰━━┫╰╯╯┃┃╱┃┃ ┃╭━╮┃╭╮╭╯┃┃┃╰━╯┃┃╰╮┃┃ ┃┃╱╭┫╭━━┻━━╮┃╭╮┃┃┃╱┃┃ ┃╰━╯┃┃┃╰┳┫┣┫╭━╮┃┃╱┃┃┃ ┃╰━╯┃╰━━┫╰━╯┃┃┃╰┫╰━╯┃ ╰━━━┻╯╰━┻━━┻╯╱╰┻╯╱╰━╯ ╰━━━┻━━━┻━━━┻╯╰━┻━━━╯

 

X Logo             GitHub             LinkedIn

follow all of these for a cookie :)

 

About

Measure orientation of your robot or device using an IMU, visualize its data using this code

Topics

Resources

Stars

Watchers

Forks