• Stars
    star
    288
  • Rank 143,818 (Top 3 %)
  • Language
    C++
  • License
    MIT License
  • Created over 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

3D visualization library for rapid prototyping of 3D algorithms

Iridescence

Iridescence is a light-weight visualization library for rapid prototyping of 3D algorithms. This library is designed for accelerating personal research and development projects (mainly focusing on point-cloud-related algorithms) and is NOT intended to be a general-purpose visualization library with rich rendering capabilities.

Build on Ubuntu 18.04 / 20.04 / 22.04

Features

What this library provides:

  • An easy-to-use 3D visualization framework (inpaticular suitable for rendering point clouds)
  • Tightly integrated Dear ImGui interfaces for rapid UI design

What this library does NOT provide:

  • Realistic rendering and shading
  • Rich textured 3D mesh rendering

See documentation for details.

Dependencies

Installation

# Install dependencies
sudo apt-get install -y libglm-dev libglfw3-dev libpng-dev libjpeg-dev libeigen3-dev libboost-filesystem-dev libboost-program-options-dev

# Build and install Iridescence
git clone https://github.com/koide3/iridescence --recursive
mkdir iridescence/build && cd iridescence/build
cmake ..
make -j
sudo make install

# [Optional] Build and install python bindings
cd ..
sudo python3 setup.py install

# [Optional2] Install stubs for autocomplete
pip install pybind11-stubgen
cd ~/.local/lib/python3.10/site-packages
pybind11-stubgen -o . --ignore-invalid=all pyridescence

Docker

  • Build: docker build -t iridescence -f docker/ubuntu/Dockerfile .
  • Run: bash docker/run.sh iridescence

Use Iridescence in your cmake project

# Add FindIridescence.cmake to your project
wget -P path/to/your_project/cmake/ https://github.com/koide3/iridescence/raw/master/cmake/FindIridescence.cmake
# Make FindIridescence.cmake visible to your cmake project
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake")

# Find package
find_package(Iridescence REQUIRED)

# Add include dirs and link libraries
target_include_directories(your_program PUBLIC
  ${Iridescence_INCLUDE_DIRS}
)
target_link_libraries(your_program
  ${Iridescence_LIBRARIES}
)

Minimum example

C++:

#include <glk/primitives/primitives.hpp>
#include <guik/viewer/light_viewer.hpp>

int main(int argc, char** argv) {
  // Create a viewer instance (global singleton)
  auto viewer = guik::LightViewer::instance();

  float angle = 0.0f;

  // Register a callback for UI rendering
  viewer->register_ui_callback("ui", [&]() {
    // In the callback, you can call ImGui commands to create your UI.
    // Here, we use "DragFloat" and "Button" to create a simple UI.
    ImGui::DragFloat("Angle", &angle, 0.01f);

    if (ImGui::Button("Close")) {
      viewer->close();
    }
  });

  // Spin the viewer until it gets closed
  while (viewer->spin_once()) {
    // Objects to be rendered are called "drawables" and managed with unique names.
    // Here, solid and wire spheres are registered to the viewer respectively with the "Rainbow" and "FlatColor" coloring schemes.
    // The "Rainbow" coloring scheme encodes the height of each fragment using the turbo colormap by default.
    Eigen::AngleAxisf transform(angle, Eigen::Vector3f::UnitZ());
    viewer->update_drawable("sphere", glk::Primitives::sphere(), guik::Rainbow(transform));
    viewer->update_drawable("wire_sphere", glk::Primitives::wire_sphere(), guik::FlatColor({0.1f, 0.7f, 1.0f, 1.0f}, transform));
  }

  return 0;
}
Python version
#!/usr/bin/python3
import numpy
from scipy.spatial.transform import Rotation

from pyridescence import *

# Create a viewer instance (global singleton)
viewer = guik.LightViewer.instance()

angle = 0.0

# Define a callback for UI rendering
def ui_callback():
  # In the callback, you can call ImGui commands to create your UI.
  # Here, we use "DragFloat" and "Button" to create a simple UI.

  global angle
  _, angle = imgui.drag_float('angle', angle, 0.01)

  if imgui.button('close'):
    viewer.close()

# Register a callback for UI rendering
viewer.register_ui_callback('ui', ui_callback)

# Spin the viewer until it gets closed
while viewer.spin_once():
  # Objects to be rendered are called "drawables" and managed with unique names.
  # Here, solid and wire spheres are registered to the viewer respectively with the "Rainbow" and "FlatColor" coloring schemes.
  # The "Rainbow" coloring scheme encodes the height of each fragment using the turbo colormap by default.
  transform = numpy.identity(4)
  transform[:3, :3] = Rotation.from_rotvec([0.0, 0.0, angle]).as_matrix()
  viewer.update_drawable('sphere', glk.primitives.sphere(), guik.Rainbow(transform))
  viewer.update_drawable('wire_sphere', glk.primitives.wire_sphere(), guik.FlatColor(0.1, 0.7, 1.0, 1.0, transform))

example_01

See documentation for details.

Some use examples in my academic works

ral2021 iros2022

License

This package is released under the MIT license.

More Repositories

1

hdl_graph_slam

3D LIDAR-based Graph SLAM
C++
1,973
star
2

fast_gicp

A collection of GICP-based fast point cloud registration algorithms
C++
1,230
star
3

interactive_slam

Interactive Map Correction for 3D Graph SLAM
C++
839
star
4

hdl_localization

Real-time 3D localization using a (velodyne) 3D LIDAR
C++
795
star
5

ndt_omp

Multi-threaded and SSE friendly NDT algorithm
C++
728
star
6

direct_visual_lidar_calibration

A toolbox for target-less LiDAR-camera calibration [ROS1/ROS2]
C++
692
star
7

glim

GLIM: versatile and extensible range-based 3D localization and mapping framework
C++
431
star
8

small_gicp

Efficient and parallel algorithms for point cloud registration [C++, Python]
C++
365
star
9

hdl_people_tracking

Real-time people tracking using a 3D LIDAR
C++
283
star
10

slam_docker_collection

A collection of docker environments for 3D SLAM packages
219
star
11

monocular_person_following

Monocular camera-based person tracking and identification ROS framework for person following robots
C++
183
star
12

hdl_global_localization

C++
171
star
13

gtsam_points

A collection of GTSAM factors and optimizers for point cloud SLAM
C++
145
star
14

gazebo_apriltag

Apriltag models for gazebo
Python
60
star
15

pointcloud_to_2dmap

C++
58
star
16

st_handeye_graph

General hand-eye calibration based on reprojection error minimization and pose graph optimization
C++
57
star
17

livox_to_pointcloud2

C++
52
star
18

rviz_factor_graph_plugins

C++
39
star
19

caratheodory2

C++
37
star
20

automatic_tuning

C++
29
star
21

sparse_dynamic_calibration

Sparse and dynamic camera network calibration with visual odometry
C++
29
star
22

glim_ros2

C++
25
star
23

glil_pubdoc

Public documentation for GLIL, A closed-source point-cloud-based real-time localization package
22
star
24

cpp_parallel_code

Cuda
22
star
25

monocular_people_tracking

C++
19
star
26

glim_ext

C++
18
star
27

open3d_graph_slam

Python
16
star
28

glim_mid360_tutorial

15
star
29

points_inspector

An inspection tool for sensor_msgs/PointCloud2 messages [ROS1/ROS2]
C++
14
star
30

glim_ros1

C++
11
star
31

ccf_person_identification

Convolutional Channel Features + Online boosting-based person identification for mobile robots
C++
10
star
32

caratheodory

C++ implementation of the algorithm in "Fast and Accurate Least-Mean-Squares Solvers", NIPS19
C++
10
star
33

pykalman_test

A simple UKF demo using pykalman
Python
9
star
34

odometry_saver

C++
9
star
35

gtsam_docker

Dockerfile
7
star
36

ros2d2

A ROS package to make R2D2-like sound
C
6
star
37

ccf_feature_extraction

Pretrained convolutional channel features for people identification
C++
5
star
38

vscode_ros

4
star
39

open_face_recognition

Python
3
star
40

date_logger

Shell
2
star
41

tf_pose_ros_msgs

CMake
2
star
42

dial_controller

Python
1
star
43

ppa

Shell
1
star
44

ros1_docker_scripts

Shell
1
star
45

velodyne_packets2points

1
star
46

koide3.github.io

HTML
1
star
47

lidar_slam_dataset

1
star