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.viewer import Viewer 
from FramesViewer import 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.pushFrame(frame1, "frame1", [1, 0, 0])
fv.pushFrame(frame2, "frame2", [0, 1, 0])

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

fv.pushFrame(frame3, "frame3")
fv.deleteFrame("frame3")

fv.createPointsList("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.pushPoint("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.translateAbsolute(frame2, [0, 0.0005, 0])
    frame2 = utils.rotateInSelf(frame2, [0.5, 0.5, 0.5])
    fv.pushFrame(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.pushFrame(...) 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.0.2.tar.gz (375.2 kB view details)

Uploaded Source

File details

Details for the file FramesViewer-1.0.2.tar.gz.

File metadata

  • Download URL: FramesViewer-1.0.2.tar.gz
  • Upload date:
  • Size: 375.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for FramesViewer-1.0.2.tar.gz
Algorithm Hash digest
SHA256 cf5b0ba7e4b64800a67e4df0efd95e04fb401312d8bf11314e20dd3749665a45
MD5 ada251927d9d48a5a9a7c7792da34c1b
BLAKE2b-256 e9b37e87713ae9aa16042ced9cb7a52a8194e7fc4f9dcfa1b5f9739a82333290

See more details on using hashes here.

Supported by

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