Skip to content

Commit

Permalink
Unify UI overlays
Browse files Browse the repository at this point in the history
  • Loading branch information
mateosss committed Aug 26, 2023
1 parent d71c434 commit b67fa7a
Show file tree
Hide file tree
Showing 7 changed files with 527 additions and 743 deletions.
10 changes: 10 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ WarningsAsErrors: '*'
HeaderFilterRegex: '.*/thirdparty/basalt-headers/include/basalt/*'

CheckOptions:
- key: readability-braces-around-statements.ShortStatementLines
value: 2
- key: readability-identifier-length.MinimumVariableNameLength
value: 1
- key: readability-identifier-length.MinimumParameterNameLength
value: 1
- key: readability-identifier-length.MinimumLoopCounterNameLength
value: 1
- key: readability-identifier-length.MinimumExceptionNameLength
value: 1
# Classes, structs, ...
- key: readability-identifier-naming.NamespaceCase
value: lower_case
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ target_sources(basalt_internal
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/system_utils.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/time_utils.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/vio_config.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/vis_utils.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vi_estimator/ba_base.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vi_estimator/landmark_database.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vi_estimator/marg_helper.cpp
Expand Down
31 changes: 31 additions & 0 deletions include/basalt/utils/vis_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <pangolin/gl/gldraw.h>

#include <basalt/vi_estimator/vio_estimator.h>
#include <basalt/utils/sophus_utils.hpp>
#include <tuple>

Expand Down Expand Up @@ -121,3 +122,33 @@ void glDrawCirclePerimeters(const std::vector<Eigen::Matrix<P, N, 1>, Allocator>
pangolin::glDrawCirclePerimeter((GLfloat)p(0), (GLfloat)p(1), (GLfloat)radius);
}
}

namespace basalt::vis {

void show_flow(size_t cam_id, const VioVisualizationData::Ptr& curr_vis_data, const OpticalFlowBase::Ptr& opt_flow,
bool show_ids);

void show_tracking_guess(size_t cam_id, size_t frame_id, const VioVisualizationData::Ptr& curr_vis_data,
const VioVisualizationData::Ptr& prev_vis_data);

void show_tracking_guess_vio(size_t cam_id, size_t frame_id, const VioDatasetPtr& vio_dataset,
const std::unordered_map<int64_t, VioVisualizationData::Ptr>& vis_map);

void show_matching_guesses(size_t cam_id, const VioVisualizationData::Ptr& curr_vis_data);

void show_masks(size_t cam_id, const VioVisualizationData::Ptr& curr_vis_data);

void show_cam0_proj(size_t cam_id, double depth_guess, const VioConfig& config, const Calibration<double>& calib);

void show_grid(const VioConfig& config, const Calibration<double>& calib);

void show_guesses(size_t cam_id, const VioVisualizationData::Ptr& curr_vis_data, const VioConfig& config,
const Calibration<double>& calib, bool show_same_pixel_guess, bool show_reproj_fix_depth_guess,
bool show_reproj_avg_depth_guess, bool show_active_guess, double fixed_depth);

void show_obs(size_t cam_id, const VioVisualizationData::Ptr& curr_vis_data, const VioConfig& config,
const Calibration<double>& calib, bool show_same_pixel_guess, bool show_reproj_fix_depth_guess,
bool show_reproj_avg_depth_guess, bool show_active_guess, double fixed_depth, bool show_ids,
bool show_depth, bool show_guesses);

} // namespace basalt::vis
8 changes: 8 additions & 0 deletions src/monado/.clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@ CheckOptions:
value: lower_case
- key: readability-braces-around-statements.ShortStatementLines
value: 2
- key: readability-identifier-length.MinimumVariableNameLength
value: 1
- key: readability-identifier-length.MinimumParameterNameLength
value: 1
- key: readability-identifier-length.MinimumLoopCounterNameLength
value: 1
- key: readability-identifier-length.MinimumExceptionNameLength
value: 1
Loading

0 comments on commit b67fa7a

Please sign in to comment.