Skip to main content

A simple live 6D frames viewer (and more)

Project description

FramesViewer

A simple live 6D frames viewer

https://user-images.githubusercontent.com/6552564/194662755-2a6c181c-e662-4104-a71d-10e85bad3a87.mp4

Installation

pip install FramesViewer

or

pip3 install -e .

Example :

from FramesViewer import Viewer
import FramesViewer.utils as utils
import time

fv = Viewer()
fv.start()

# Frames
frame1 = utils.make_pose([0.15, 0.15, 0], [45, 0, 0])
frame2 = utils.make_pose([0.15, 0.15, 0.15], [0, 90, 45])
frame3 = frame2.copy()

fv.push_frame(frame1, "frame1", [1, 0, 0])
fv.push_frame(frame2, "frame2", [0, 1, 0])

fv.push_link("frame1", "frame2", color=(1, 0, 0))

fv.push_frame(frame3, "frame3")
fv.delete_frame("frame3")

fv.create_points_List("a", size=10, color=(1, 0, 0))

# verts = [[0, 0, 0], [1, 0, 0], [1, 1, 0]]
# fv.createMesh("test", verts=verts)

# Points
for i in range(10):
    for j in range(10):
        for z in range(10):
            fv.push_point("a", [i*0.1, j*0.1, z*0.1])

# An infinite loop is needed to keep the viewer thread alive.
while True:
    frame2 = utils.translate_absolute(frame2, [0, 0.0005, 0])
    frame2 = utils.rotate_in_self(frame2, [0.5, 0.5, 0.5])
    fv.push_frame(frame2, "frame2", [0, 1, 0])
    time.sleep(0.01)

Once fv.start() is called, the viewer runs in a separate thread.

You can then dynamically call fv.push_frame(...) to add, update or remove frames.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

framesviewer-1.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

framesviewer-1.1.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file framesviewer-1.1.0.tar.gz.

File metadata

  • Download URL: framesviewer-1.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for framesviewer-1.1.0.tar.gz
Algorithm Hash digest
SHA256 190f66920cec044f64951c31675372c97c5ab35cba0822cd6a0d08a57965ba48
MD5 a64d986a74b5e6010cb94ce5399c906d
BLAKE2b-256 6ce929c535d651097877cf8dcae503dad8de1989882aa1f18a5f3cb2d11e71f2

See more details on using hashes here.

File details

Details for the file framesviewer-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: framesviewer-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for framesviewer-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34845cb59a79a92106d160aa5ea615e3653897308e21a2c3701f742b84b558ae
MD5 1188604b99d1a58225b6c891b3328f1e
BLAKE2b-256 d31934505a7ffa9e3c69a2acaa28f7f8ad44dfaf948d185864dc67a0bee3fb1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page