Skip to main content

roboflex.visualization

A thin wrapper of various display nodes over SDL2. For now just supplies one node: RGBImageTV. It can display rgb tensors of the form (H,W,3) uint8.

System requirements

  • libsdl: SDL (Simple Directmedia Layer)

      # search for existing libsdl packages
      dpkg -l | grep sdl # -> shows nothing
    
      # install libsdl
      sudo apt-get install libsdl2-dev
    
      # search for existing libsdl packages again
      dpkg -l | grep sdl # -> shows:
      ii  libsdl2-2.0-0:amd64                        2.0.20+dfsg-2ubuntu1.22.04.1                                        amd64        Simple DirectMedia Layer
      ii  libsdl2-dev:amd64                          2.0.20+dfsg-2ubuntu1.22.04.1                                        amd64        Simple DirectMedia Layer development files
    
      THIS, for me on ubuntu22, puts headers in /usr/include/SDL2 and libs in /lib/x86_64-linux-gnu/libSDL2-2.0.so
    
      # to remove it:
      sudo apt-get -y purge libsdl2-dev
    

Import

import roboflex.visualization as rv

Nodes

There are three: RGBImageTV, BlackAndWhiteTV, and DepthTV

# RGBImageTV will redraw rgb images at some
# frequency (refresh rate). It will look into
# all messages it receives - those that contain
# the key "rgb", mapping to a (3,H,W) tensor
# will be rendered. Messages get propagated.

rgb_tv = rcw.RGBImageTV(

    # mandatory (refresh rate)
    frequency_hz: float,

    # optional; defaults are:
    width = 640,
    height = 480,
    image_key = "rgb",
    initial_pos = (-1, -1),
    mirror = False,
    debug = False,
    name = "RGBImageTV"
)

# must be started!
rgb_tv.start()


# BlackAndWhiteTV will redraw rgb images at some
# frequency (refresh rate). It will look into
# all messages it receives - those that contain
# the key "ir1", mapping to a (H,W) tensor
# will be rendered. Messages get propagated.

black_and_white_tv = rcw.BlackAndWhiteTV(

    # mandatory (refresh rate)
    frequency_hz: float,

    # optional; defaults are:
    width = 640,
    height = 480,
    image_key = "ir1",
    initial_pos = (-1, -1),
    mirror = False,
    debug = False,
    name = "BlackAndWhiteTV"
)

# must be started!
black_and_white_tv.start()


# DepthTV will redraw depth images at some
# frequency (refresh rate). It will look into
# all messages it receives - those that contain
# the key "depth", mapping to a (H,W) tensor
# will be rendered. Messages get propagated.

depth_tv = rcw.DepthTV(

    # mandatory (refresh rate)
    frequency_hz: float,

    # optional; defaults are:
    width = 640,
    height = 480,
    image_key = "depth",
    initial_pos = (-1, -1),
    mirror = False,
    debug = False,
    name = "RGBImageTV"
)

# must be started!
depth_tv.start()

Metadata

Release files for roboflex.visualization 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for roboflex.visualization 0.1.13
File Size Uploaded Provenance Actions
roboflex_visualization-0.1.13.tar.gz 11.0 kB Without provenance Details for roboflex_visualization-0.1.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for roboflex.visualization 0.1.13
File Interpreter ABI Platform Actions
roboflex_visualization-0.1.13-cp311-cp311-macosx_15_0_arm64.whl CPython 3.11 CPython 3.11 macOS 15.0+ ARM64 Details for roboflex_visualization-0.1.13-cp311-cp311-macosx_15_0_arm64.whl

Total release size: 463.6 kB

Release files / roboflex_visualization-0.1.13.tar.gz

Download URL roboflex_visualization-0.1.13.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ec5045ac94ea89c41ced6494ff141f8492ce5bfd81e636d9775e337263732512
BLAKE2b-256 checksum
How to use checksums
ea6a1baacc643bf83d3cdf65572fc6215a715041fab1af59715597bd1a537530
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release files / roboflex_visualization-0.1.13-cp311-cp311-macosx_15_0_arm64.whl

Download URL roboflex_visualization-0.1.13-cp311-cp311-macosx_15_0_arm64.whl
Size 452.6 kB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
5472bb2d223b4b12080e58d8288cfcfffc5de9c998f4f9a1b277ce7ac6da9cdd
BLAKE2b-256 checksum
How to use checksums
7a7ef25c8e82fadcc2fc65b9fb489b30f85fc0d9479e220b247eace67c463247
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Security for roboflex.visualization 0.1.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page