ouster.sdk.viz.accumulators module¶
Copyright (c) 2023, Ouster, Inc. All rights reserved.
Ouster frame accumulation for LidarFrameViz
- class LidarFrameVizAccumulators(model, point_viz, config, lock)[source]¶
Bases:
objectAccumulate frames, track poses and overall map view Every new frame (
LidarFrameorFrameSet) is passed throughupdate(frame, num).Available visualization depends on whether poses are present or not and params set on init. View modes are combination of:
TRACK - frame poses (i.e. trajectories) of every frame “seen” (poses required)
ACCUM - set of accumulated frames (key frames) picked according to params
MAP - overall map with select ratio of random points from every frame passed through
update()
- Parameters:
model (
LidarFrameVizModel) – a LidarFrameVizModel instance.point_viz (
PointViz) – the PointViz instance to use for rendering clouds.config (
LidarFrameVizAccumulatorsConfig) –a LidarFrameVizAccumulatorsConfig that accepts the following keyword args: accum_max_num: aka,
--accum-num, the maximum number of accumulated(ACCUM) frames to keep
- accum_min_dist_meters: aka,
--accum-every-m, the minimum distance between accumulated (ACCUM) key frames
- accum_min_dist_num: aka,
--accum-every, the minimum distance in frames between accumulated (ACCUM) key frames
map_enabled: enable overall map accumulation (MAP) (
--map) map_select_ratio: percent of points to select from the frames to theoverall map (MAP), default 0.001
map_max_points: maximum number of points to keep in overall map (MAP) map_overflow_from_start: if True, on map overflow continue writing
points from the beginning (as in ring buffer), if False, overwrite points randomly in the existing map
- accum_min_dist_meters: aka,
lock (RLock)
- property track_accumulator: TracksAccumulator¶
Get the TracksAccumulator instance.
- update_point_size(amount)[source]¶
Change the point size of the MAP/ACCUM point cloud. :rtype:
bool- Parameters:
amount (int)
- Return type:
bool
- toggle_mode_accum(state=None)[source]¶
Toggle ACCUM view :rtype:
bool- Parameters:
state (bool | None)
- Return type:
bool
- toggle_mode_map(state=None)[source]¶
Toggle MAP view :rtype:
bool- Parameters:
state (bool | None)
- Return type:
bool
- toggle_osd(state=None)[source]¶
Show or hide the on-screen display. :rtype:
bool- Parameters:
state (bool | None)
- Return type:
bool
- update(frames, frame_num=None)[source]¶
Updates the accumulation state from the current frame. Locking is necessary here because the accumulation state depends on the current view mode, which might change in a separate thread than the thread that calls update(). :rtype:
None- Parameters:
frames (FrameSet)
frame_num (int | None)
- Return type:
None