Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kissualizer: a new KISS-ICP visualizer! #379

Merged
merged 42 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
164eb9f
Merge pull request #2 from PRBonn/main
l00p3 Jul 26, 2024
5d75de3
Visualizer initialized
l00p3 Jul 26, 2024
d071d41
Simple buttons added
l00p3 Jul 26, 2024
caa7f1a
Almost done
l00p3 Jul 26, 2024
ff61af6
Center viewpoint option
l00p3 Jul 26, 2024
502ea17
Better static member management
l00p3 Jul 26, 2024
133e21a
Better palette and global view
l00p3 Jul 26, 2024
0d03ca7
Global View is not switchable standing
l00p3 Jul 26, 2024
a5c63ad
Arrows on trajectory
l00p3 Jul 26, 2024
addcbec
Slight beautification of arrows
l00p3 Jul 26, 2024
18725e2
Global points dimensions
l00p3 Jul 26, 2024
802ae40
Trajectory not invisible but actually not there in local mode
l00p3 Jul 26, 2024
089bd1b
Some TODO todo
l00p3 Jul 26, 2024
bd92e91
Refactor code, palette changed, trajectory swithc in global fixed
l00p3 Jul 29, 2024
8fb9c71
Some separator
l00p3 Jul 29, 2024
d0f9d0b
Points size sliders
l00p3 Jul 29, 2024
f2c270e
Better viewpoint centering
l00p3 Jul 29, 2024
fff0f79
Screenshot demo added
l00p3 Jul 29, 2024
27b4c17
Some button key added
l00p3 Jul 29, 2024
0dae3d0
Fixed DEBUG name window
l00p3 Jul 29, 2024
42c3a16
Parameters visualization and fps added
l00p3 Jul 30, 2024
a189757
Center viewpoint improved
l00p3 Jul 30, 2024
9ed426b
Trajectory un-registration for better bounding box
l00p3 Jul 30, 2024
60236f4
Color palette changed again
l00p3 Jul 30, 2024
62d756d
Some cleaning
l00p3 Jul 30, 2024
fbdef70
Button name with keys and missing keys added
l00p3 Jul 31, 2024
bed3c91
Embrace Benedikt's colors and fix typo
l00p3 Jul 31, 2024
d289e53
Fix Palette and quantity size
tizianoGuadagnino Aug 1, 2024
4ae44c0
Fix license
tizianoGuadagnino Aug 1, 2024
64b1cc0
Color approved by Gupta
tizianoGuadagnino Aug 1, 2024
877f43f
Now everything is member of Kissualizer
l00p3 Aug 2, 2024
34b7e71
Trajectory as points, not anymore a curve
l00p3 Aug 2, 2024
14825d0
Screenshot name with timestamp
l00p3 Aug 2, 2024
07d42e6
Style fix
l00p3 Aug 2, 2024
c676763
Button names constants less ugly
l00p3 Aug 2, 2024
3db2af5
Now we have a dict to visualize parameters and co
l00p3 Aug 2, 2024
5e3688f
FPS computation not anymore in visualizer class
l00p3 Aug 2, 2024
58bf027
isort ti odio
l00p3 Aug 2, 2024
bdeb70e
Odometry info is now open by default
l00p3 Aug 2, 2024
492d296
Quit button on the right, why not
l00p3 Aug 2, 2024
257551d
Pose picking started
l00p3 Aug 2, 2024
285d744
Pose selection and visualization on the trajectory
l00p3 Aug 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ results/
wheelhouse/
_skbuild/
.gitlab-ci-local/
.polyscope.ini
imgui.ini

# Created by https://www.toptal.com/developers/gitignore/api/python,c++
# Edit at https://www.toptal.com/developers/gitignore?templates=python,c++
Expand Down
30 changes: 21 additions & 9 deletions python/kiss_icp/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from kiss_icp.metrics import absolute_trajectory_error, sequence_error
from kiss_icp.tools.pipeline_results import PipelineResults
from kiss_icp.tools.progress_bar import get_progress_bar
from kiss_icp.tools.visualizer import RegistrationVisualizer, StubVisualizer
from kiss_icp.tools.visualizer import Kissualizer, StubVisualizer


class OdometryPipeline:
Expand Down Expand Up @@ -76,9 +76,13 @@ def __init__(
)

# Visualizer
self.visualizer = RegistrationVisualizer() if visualize else StubVisualizer()
self.visualizer = Kissualizer() if visualize else StubVisualizer()
self._vis_infos = {
"max_range": self.config.data.max_range,
"min_range": self.config.data.min_range,
}
if hasattr(self._dataset, "use_global_visualizer"):
self.visualizer.global_view = self._dataset.use_global_visualizer
self.visualizer._global_view = self._dataset.use_global_visualizer

# Public interface ------
def run(self):
Expand All @@ -99,8 +103,15 @@ def _run_pipeline(self):
source, keypoints = self.odometry.register_frame(raw_frame, timestamps)
self.poses[idx - self._first] = self.odometry.last_pose
self.times[idx - self._first] = time.perf_counter_ns() - start_time

# Udate visualizer
self._vis_infos["FPS"] = int(np.floor(self._get_fps()))
self.visualizer.update(
source, keypoints, self.odometry.local_map, self.odometry.last_pose
source,
keypoints,
self.odometry.local_map,
self.odometry.last_pose,
self._vis_infos,
)

def _next(self, idx):
Expand Down Expand Up @@ -169,6 +180,11 @@ def _write_gt_poses(self):
timestamps=self._get_frames_timestamps(),
)

def _get_fps(self):
times_nozero = self.times[self.times != 0]
total_time_s = np.sum(times_nozero) * 1e-9
return float(times_nozero.shape[0] / total_time_s) if total_time_s > 0 else 0

def _run_evaluation(self):
# Run estimation metrics evaluation, only when GT data was provided
if self.has_gt:
Expand All @@ -180,11 +196,7 @@ def _run_evaluation(self):
self.results.append(desc="Absolute Rotational Error (ARE)", units="rad", value=ate_rot)

# Run timing metrics evaluation, always
def _get_fps():
total_time_s = np.sum(self.times) * 1e-9
return float(self._n_scans / total_time_s) if total_time_s > 0 else 0

fps = _get_fps()
fps = self._get_fps()
avg_fps = int(np.floor(fps))
avg_ms = int(np.ceil(1e3 / fps)) if fps > 0 else 0
if avg_fps > 0:
Expand Down
Loading
Loading