Read-only mirror of https://github.com/ethz-asl/hud — ETHZ ASL. Issues & pull requests at the source.
  • C++ 78.8%
  • Python 10.1%
  • CMake 7.2%
  • Scala 2.2%
  • SuperCollider 1.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kenneth Blomqvist d4e1006d6a
Merge pull request #1 from ethz-asl/fix
Fixes and deps update
2021-12-15 15:36:21 +01:00
assets Add readme and example 2021-05-12 18:18:19 +02:00
bindings Poll events function 2021-03-11 15:11:09 +01:00
cmake PointLayer instancing and multiple points 2021-01-06 20:35:57 +01:00
examples/python Add readme and example 2021-05-12 18:18:19 +02:00
include/hud Fix point layer colors 2021-03-11 19:36:56 +01:00
shaders Fix point layer colors 2021-03-11 19:36:56 +01:00
src Fix point layer colors 2021-03-11 19:36:56 +01:00
submodules Python bindings 2021-01-11 17:24:42 +01:00
test API usability improvements, setup.py, first tests 2021-01-18 19:16:47 +01:00
.gitattributes HStack view 2021-01-04 16:14:44 +01:00
.gitignore fix and ignore build 2021-12-14 11:50:15 +01:00
.gitmodules Python bindings 2021-01-11 17:24:42 +01:00
.ycm_extra_conf.py Configure ycm 2021-01-05 12:08:05 +01:00
CMakeLists.txt fix and ignore build 2021-12-14 11:50:15 +01:00
LICENSE Add License 2021-01-06 22:05:24 +01:00
README.md fix and ignore build 2021-12-14 11:50:15 +01:00
setup.py API usability improvements, setup.py, first tests 2021-01-18 19:16:47 +01:00

HUD

The goal of HUD, is to be able to extremely quickly put together a graphical interface. It is built on bgfx, and therefore supports many rendering backends, including OpenGL, Metal and Vulkan.

It can be used either directly through the C++ interface or through the Python bindings.

It built around views. Currently supported views are:

  • ImagePane - shows an image.
  • PointLayer - renders points in 2D.
  • ZStack - Stacks views on top of each other.
  • HStack - Stacks views horizontally.

Views are rendered by hud.AppWindow. It is easy to key handlers to the window using .add_key_handler to respond to key events.

Click handlers can be attached to views to do something when the user clicks the view.

Installing python bindings

sudo apt-get install libglfw3-dev libeigen3-dev ninja-build

git submodule update --init --recursive
mkdir build && cd build &&
cmake .. -DCMAKE_BUILD_TYPE=Release &&
make -j4

Install bindings with pip install ..

Examples

The example examples/python/stereo_image.py shows a small example which uses the HStack, ImagePane, ZStack and PointLayer views.

Run it with python examples/python/stereo_image.py.