Coder Social home page Coder Social logo

tilak-io / tiplot Goto Github PK

View Code? Open in Web Editor NEW
46.0 3.0 5.0 109.17 MB

a cool and simple visualising tool to analyse your drone flights.

Home Page: https://www.tilak.io

License: Apache License 2.0

Shell 0.02% Python 22.29% JavaScript 68.30% HTML 0.78% CSS 3.28% Jupyter Notebook 5.32%
px4 drone plotly chart time-series ulg ulog visualize-data cesium dji

tiplot's Introduction

https://tilak.io/

About Tilak.io

We are an engineering services company that focus on drone technologies. We decided to opensource TiPlot, our log visualising tool, so the world can benefit from a nice and easy way to display logs from PX4, CSV, or even from your Python code or your Jupyter Notebook.

Feature Request

Please reach out to us via our website Tilak.io, we are happy to help !

About TiPlot

TiPlot is an open-source visualisation tool for flight logs. With TiPlot, you can easily visualize your flight data in 2D graphs and a 3D view, helping you better understand the performance and behavior of your unmanned aerial vehicle (UAV).

Entities

Features

  • Supports multiple file formats, including :
    • PX4's .ulg
    • Generic .csv
    • DJI's .DAT
    • QGroundControl's .tlog
    • Ardupilot's .BIN Logs.
  • 2D yt and xy graphs for visualizing flight data.
  • 3D viewer for displaying the paths of your UAVs.
  • Add multiple UAVs to compare flights.
  • Sync the 3D view with a specific timestamp by hovering over it.
  • Perform customized operations on data currently being processed.
  • Ability to send a data dictionary and entities to be displayed in the 3D view over TCP port 5555 from a Python script or a Jupyter notebook.
  • Layouts are automatically saved after every change.
  • Drag and drop plots to reposition them.
  • Plot multiple fields from different topics in yt graphs.
  • X scale of all graphs is synced when zooming in.
  • Y scale of graphs is automatically set to fit all available data in the timestamp range.
  • Change view layout from split to detached to detach the 3D view as a new window.
  • Adjust camera settings and change background color and show grids on the 3 axis in the settings page.

Installation

Prebuilt AppImage

To run TiPlot using the prebuilt AppImage, follow these steps:

  1. Download the latest AppImage from the releases page.
  2. Make the AppImage executable by running:
cd ~/Downloads
chmod +x tiplot-1.x.x.AppImage
  1. Run the AppImage:
./tiplot-1.x.x.AppImage

Building from source

To build TiPlot from source, follow these steps:

  1. Clone the repository:
git clone https://github.com/tilak-io/tiplot
cd tiplot
  1. Install dependencies:
# Install Node dependencies 
yarn install
# Install Python dependencies:
pip3 install -r api/requirements.txt
  1. Start the API server:
yarn start:api

In a new terminal, start the front end:

yarn start

Usage

To use TiPlot, follow these steps:

  1. Launch TiPlot's AppImage, exe or compiled build.
  2. Click the "Browse" button to select a flight log file.
  3. Add a graph (yt or xy).
  4. Use the ALT + hover feature to sync the 3D view with a specific timestamp.
  5. Use the entities page to choose the UAV's position/attitude tables.

Sending data from a Python script or Jupyter notebook

To send data to TiPlot from a Python script or Jupyter notebook, you can use the following code:

import zmq
import zlib
import pickle
import pyulog
import pandas as pd

port = '5555'
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect("tcp://0.0.0.0:%s" % port)

def send_zipped_pickle(socket, obj, flags=0, protocol=-1):
    p = pickle.dumps(obj, protocol)
    z = zlib.compress(p)
    return socket.send(z, flags=flags)

send_zipped_pickle(socket, [datadict, []])

Note that datadict is the data dictionary returned by the parser. [] is the entities array (empty array means we don't want to display anything on 3d view)

For more info check out the Jupyter notebooks in the templates folder.

Running Sequences and Custom Operations

In this guide, we will walk you through the process of creating and executing sequences, which are Python functions containing a set of operations to manipulate log data. These sequences can be customized to suit your specific needs. Follow these steps to get started:

  1. Set Preferred Editor: Ensure that you have configured your preferred code editor in the tool settings by navigating to Tools > Settings > General > External Editor. If you intend to use a terminal-based editor such as Vim or Nano, make sure to specify the appropriate command to launch the terminal. (i.e: kitty nvim for kitty, gnome-terminal -- nvim for ubuntu's default terminal, xterm -e nvim for xterm...)

  2. Create a New Sequence: To begin, create a new sequence by navigating to Tools > Sequences > Add New Sequence.

  3. Provide a Descriptive Name: Give your sequence a meaningful and descriptive name that reflects its purpose.

  4. Edit the Sequence: Upon creating a new sequence, your preferred code editor will open with a template function. You can now define the operations you want to perform on the log data.

Here's an example of a sequence that transforms log data from the NED (North-East-Down) representation to the ENU (East-North-Up) representation for a topic called vehicle_local_position_enu:

def handle_data(datadict):
    import numpy as np
    new = datadict
    # Coordinate transformation matrix from NED to ENU
    NED_to_ENU = np.array([
        [0, 1, 0],  # East (ENU X) corresponds to North (NED Y)
        [1, 0, 0],  # North (ENU Y) corresponds to East (NED X)
        [0, 0, -1]  # Up (ENU Z) corresponds to -Down (NED Z)
    ])
    # Apply the coordinate transformation to the 'x', 'y', and 'z' columns
    new['vehicle_local_position_enu'] = new['vehicle_local_position'].copy()
    xyz_ned = new['vehicle_local_position_enu'][['x', 'y', 'z']].values
    xyz_enu = np.dot(xyz_ned, NED_to_ENU.T)  # Transpose the transformation matrix for NED to ENU
    new['vehicle_local_position_enu'][['x', 'y', 'z']] = xyz_enu
    return new

NOTE: the imports should be inside the function

Feel free to adapt and customize your sequence function to perform the operations that are relevant to your data processing needs.

Happy sequencing ๐ŸŽ‰!

Contributing

We welcome contributions to TiPlot. If you would like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Make your changes and commit them to your branch.
  4. Push your branch to your forked repository.
  5. Create a new pull request.

License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.

tiplot's People

Contributors

cmlbsc avatar hamza-tilak-io avatar hmzyy avatar tilaktilak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tiplot's Issues

Multiselect

  • select multiple field when the dropdown is shown.

Document "Add Log"

We should document log overlay feature ("Add log") and explain how to use it.

Windows Improvements

  • TIPlot is not signed and shows a warning from Windows Defender
  • Removes windows firewall warning
  • The 3d view is not working.

[Ubuntu 20.04] Version 1.1.4 does not load Python lib and it hangs during launch

I downloaded the AppImage v1.1.4 and tried to run it on Ubuntu 20.04, but I am getting the following error:

gmellone@gmellone-TP ~/Downloads> ./tiplot-1.1.4.AppImage 
Found available port: 5000
[48291] Error loading Python lib '/tmp/.mount_tiplotCvnaJX/resources/api/server/libpython3.10.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /tmp/.mount_tiplotCvnaJX/resources/api/server/libpython3.10.so.1.0)

The GUI hangs here:
image


The v1.1.3 runs with no issues on my machine.

Param view Improvements

The scroll bar is hidden in
image

And would be good to have a search option to easily browse through the params

3d view

  • 3d view glitch when using cursor + alt
  • ability to hide the 3d view

Auto Update

TiPlot should check for updates when starting. with the ability of disable auto updates

Sequence Improvements

Auto-open the default text editor of the system when we create a new file
Should be run every time the file get saved
Would be good if we can select sequences that will be run every time a type of file (type of parser) is called. This way a user can customize its default parsing fields

Refresh Sequences

Sequences are only showing up when we refresh the page (going to loader and home again)

Zoom issue

The zoom is not propagated when we use zoom box (only works while zooming on the x axis)

Have a config file

Following the messages on the forum, that would be good to have a config file that defines settings of the parameters. For instance being able to change the fields used in the 3d view. That could be a yml or json file with definition of the entity :

entity = CesiumEntity(name='ulg default entity',

Have a config file

Following the messages on the forum, that would be good to have a config file that defines settings of the parameters. For instance being able to change the fields used in the 3d view. That could be a yml or json file with definition of the entity :

entity = CesiumEntity(name='ulg default entity',

Top/right/front view using drone attitude

For the top feature: it means that when the drone is belly down, we view the drone from above, and when its belly is up, we view the drone from below.
Same for right and frond view idea

Dropdown should overlay plots

image
In this example the dropdown height size is quite limited (and problem arise when the height of the plot become smaller.
Also, there is an issue while using the arrow keys (Up and Down), the current selected line is hidden (below what's visible)

Tooltip

  • Keep only the end if the text is long.
  • Sometimes the timestamp is displayed.
  • Legend should be movable, somewhere else or able to hide

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.