# 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 two:
There is 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()
Raw data
{
"_id": null,
"home_page": "https://github.com/flexrobotics/roboflex_visualization",
"name": "roboflex.visualization",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "SDL2,visualization,robotics,middleware,flexbuffers,python,c++,c++20",
"author": "Colin Prepscius",
"author_email": "colinprepscius@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/46/36/39a2a0e722f23a11c189bcb24eaf59fee0dab06cf216902618c1682d2297/roboflex.visualization-0.1.10.tar.gz",
"platform": null,
"description": "# roboflex.visualization\n\nA thin wrapper of various display nodes over SDL2. For now just supplies\none node: RGBImageTV. It can display rgb tensors of the form (H,W,3) uint8.\n\n## System requirements\n\n* libsdl: SDL (Simple Directmedia Layer)\n\n # search for existing libsdl packages\n dpkg -l | grep sdl # -> shows nothing\n\n # install libsdl\n sudo apt-get install libsdl2-dev\n\n # search for existing libsdl packages again\n dpkg -l | grep sdl # -> shows:\n ii libsdl2-2.0-0:amd64 2.0.20+dfsg-2ubuntu1.22.04.1 amd64 Simple DirectMedia Layer\n ii libsdl2-dev:amd64 2.0.20+dfsg-2ubuntu1.22.04.1 amd64 Simple DirectMedia Layer development files\n\n THIS, for me on ubuntu22, puts headers in /usr/include/SDL2 and libs in /lib/x86_64-linux-gnu/libSDL2-2.0.so\n\n # to remove it:\n sudo apt-get -y purge libsdl2-dev\n\n## Import\n\n import roboflex.visualization as rv\n\n## Nodes\n\nThere are two: \n\nThere is are three: **RGBImageTV**, **BlackAndWhiteTV**, and **DepthTV**\n\n\n # RGBImageTV will redraw rgb images at some\n # frequency (refresh rate). It will look into\n # all messages it receives - those that contain\n # the key \"rgb\", mapping to a (3,H,W) tensor\n # will be rendered. Messages get propagated.\n\n rgb_tv = rcw.RGBImageTV(\n\n # mandatory (refresh rate)\n frequency_hz: float,\n\n # optional; defaults are:\n width = 640,\n height = 480,\n image_key = \"rgb\",\n initial_pos = (-1, -1),\n mirror = False,\n debug = False,\n name = \"RGBImageTV\"\n )\n\n # must be started!\n rgb_tv.start()\n\n\n # BlackAndWhiteTV will redraw rgb images at some\n # frequency (refresh rate). It will look into\n # all messages it receives - those that contain\n # the key \"ir1\", mapping to a (H,W) tensor\n # will be rendered. Messages get propagated.\n\n black_and_white_tv = rcw.BlackAndWhiteTV(\n\n # mandatory (refresh rate)\n frequency_hz: float,\n\n # optional; defaults are:\n width = 640,\n height = 480,\n image_key = \"ir1\",\n initial_pos = (-1, -1),\n mirror = False,\n debug = False,\n name = \"BlackAndWhiteTV\"\n )\n\n # must be started!\n black_and_white_tv.start()\n\n\n # DepthTV will redraw depth images at some\n # frequency (refresh rate). It will look into\n # all messages it receives - those that contain\n # the key \"depth\", mapping to a (H,W) tensor\n # will be rendered. Messages get propagated.\n\n depth_tv = rcw.DepthTV(\n\n # mandatory (refresh rate)\n frequency_hz: float,\n\n # optional; defaults are:\n width = 640,\n height = 480,\n image_key = \"depth\",\n initial_pos = (-1, -1),\n mirror = False,\n debug = False,\n name = \"RGBImageTV\"\n )\n\n # must be started!\n depth_tv.start()\n\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Roboflex Visualization Library",
"version": "0.1.10",
"project_urls": {
"Homepage": "https://github.com/flexrobotics/roboflex_visualization"
},
"split_keywords": [
"sdl2",
"visualization",
"robotics",
"middleware",
"flexbuffers",
"python",
"c++",
"c++20"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "463639a2a0e722f23a11c189bcb24eaf59fee0dab06cf216902618c1682d2297",
"md5": "7b5433347d06bccae760501c0297f692",
"sha256": "c40aa867476415e7c54b7105c38721599249d59d096c1b5b16b63da1b75edc93"
},
"downloads": -1,
"filename": "roboflex.visualization-0.1.10.tar.gz",
"has_sig": false,
"md5_digest": "7b5433347d06bccae760501c0297f692",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 10540,
"upload_time": "2023-12-05T23:31:01",
"upload_time_iso_8601": "2023-12-05T23:31:01.873559Z",
"url": "https://files.pythonhosted.org/packages/46/36/39a2a0e722f23a11c189bcb24eaf59fee0dab06cf216902618c1682d2297/roboflex.visualization-0.1.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-05 23:31:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "flexrobotics",
"github_project": "roboflex_visualization",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "roboflex.visualization"
}