├── .gitignore ├── CMakeLists.txt ├── Examples ├── Monocular │ ├── EuRoC.yaml │ ├── EuRoC_TimeStamps │ │ ├── MH01.txt │ │ ├── MH02.txt │ │ ├── MH03.txt │ │ ├── MH04.txt │ │ ├── MH05.txt │ │ ├── V101.txt │ │ ├── V102.txt │ │ ├── V103.txt │ │ ├── V201.txt │ │ ├── V202.txt │ │ └── V203.txt │ ├── KITTI00-02.yaml │ ├── KITTI03.yaml │ ├── KITTI04-12.yaml │ ├── TUM1.yaml │ ├── TUM2.yaml │ ├── TUM3.yaml │ ├── mono_euroc │ ├── mono_euroc.cpp │ ├── mono_kitti │ ├── mono_kitti.cpp │ ├── mono_live │ ├── mono_live.cpp │ ├── mono_tum │ └── mono_tum.cpp ├── RGB-D │ ├── TUM1.yaml │ ├── TUM1_GPU.yaml │ ├── TUM2.yaml │ ├── TUM3.yaml │ ├── associations │ │ ├── fr1_desk.txt │ │ ├── fr1_desk2.txt │ │ ├── fr1_room.txt │ │ ├── fr1_xyz.txt │ │ ├── fr2_desk.txt │ │ ├── fr2_xyz.txt │ │ ├── fr3_nstr_tex_near.txt │ │ ├── fr3_office.txt │ │ ├── fr3_office_val.txt │ │ ├── fr3_str_tex_far.txt │ │ └── fr3_str_tex_near.txt │ ├── kinect.yaml │ ├── rgbd_live │ ├── rgbd_live.cpp │ ├── rgbd_live.yaml │ ├── rgbd_tum │ └── rgbd_tum.cpp └── Stereo │ ├── EuRoC.yaml │ ├── EuRoC_TimeStamps │ ├── MH01.txt │ ├── MH02.txt │ ├── MH03.txt │ ├── MH04.txt │ ├── MH05.txt │ ├── V101.txt │ ├── V102.txt │ ├── V103.txt │ ├── V201.txt │ ├── V202.txt │ └── V203.txt │ ├── KITTI00-02.yaml │ ├── KITTI00-02_custom.yaml │ ├── KITTI03.yaml │ ├── KITTI04-12.yaml │ ├── euroc_old │ ├── CameraTrajectory_MH01.txt │ ├── CameraTrajectory_MH02.txt │ ├── CameraTrajectory_MH03.txt │ ├── CameraTrajectory_MH04.txt │ └── CameraTrajectory_MH05.txt │ ├── kaist_vio_dataset.yaml │ ├── stereo_euroc │ ├── stereo_euroc.cpp │ ├── stereo_kitti │ ├── stereo_kitti.cpp │ ├── stereo_live │ ├── stereo_live.cpp │ └── stereo_rig_realsense.yaml ├── README.md ├── Thirdparty ├── DBoW2 │ ├── CMakeLists.txt │ ├── DBoW2 │ │ ├── BowVector.cpp │ │ ├── BowVector.h │ │ ├── FClass.h │ │ ├── FORB.cpp │ │ ├── FORB.h │ │ ├── FeatureVector.cpp │ │ ├── FeatureVector.h │ │ ├── ScoringObject.cpp │ │ ├── ScoringObject.h │ │ └── TemplatedVocabulary.h │ ├── DUtils │ │ ├── Random.cpp │ │ ├── Random.h │ │ ├── Timestamp.cpp │ │ └── Timestamp.h │ ├── LICENSE.txt │ └── README.txt ├── g2o │ ├── CMakeLists.txt │ ├── README.txt │ ├── cmake_modules │ │ ├── FindBLAS.cmake │ │ ├── FindEigen3.cmake │ │ └── FindLAPACK.cmake │ ├── config.h │ ├── config.h.in │ ├── g2o │ │ ├── core │ │ │ ├── base_binary_edge.h │ │ │ ├── base_binary_edge.hpp │ │ │ ├── base_edge.h │ │ │ ├── base_multi_edge.h │ │ │ ├── base_multi_edge.hpp │ │ │ ├── base_unary_edge.h │ │ │ ├── base_unary_edge.hpp │ │ │ ├── base_vertex.h │ │ │ ├── base_vertex.hpp │ │ │ ├── batch_stats.cpp │ │ │ ├── batch_stats.h │ │ │ ├── block_solver.h │ │ │ ├── block_solver.hpp │ │ │ ├── cache.cpp │ │ │ ├── cache.h │ │ │ ├── creators.h │ │ │ ├── eigen_types.h │ │ │ ├── estimate_propagator.cpp │ │ │ ├── estimate_propagator.h │ │ │ ├── factory.cpp │ │ │ ├── factory.h │ │ │ ├── hyper_dijkstra.cpp │ │ │ ├── hyper_dijkstra.h │ │ │ ├── hyper_graph.cpp │ │ │ ├── hyper_graph.h │ │ │ ├── hyper_graph_action.cpp │ │ │ ├── hyper_graph_action.h │ │ │ ├── jacobian_workspace.cpp │ │ │ ├── jacobian_workspace.h │ │ │ ├── linear_solver.h │ │ │ ├── marginal_covariance_cholesky.cpp │ │ │ ├── marginal_covariance_cholesky.h │ │ │ ├── matrix_operations.h │ │ │ ├── matrix_structure.cpp │ │ │ ├── matrix_structure.h │ │ │ ├── openmp_mutex.h │ │ │ ├── optimizable_graph.cpp │ │ │ ├── optimizable_graph.h │ │ │ ├── optimization_algorithm.cpp │ │ │ ├── optimization_algorithm.h │ │ │ ├── optimization_algorithm_dogleg.cpp │ │ │ ├── optimization_algorithm_dogleg.h │ │ │ ├── optimization_algorithm_factory.cpp │ │ │ ├── optimization_algorithm_factory.h │ │ │ ├── optimization_algorithm_gauss_newton.cpp │ │ │ ├── optimization_algorithm_gauss_newton.h │ │ │ ├── optimization_algorithm_levenberg.cpp │ │ │ ├── optimization_algorithm_levenberg.h │ │ │ ├── optimization_algorithm_property.h │ │ │ ├── optimization_algorithm_with_hessian.cpp │ │ │ ├── optimization_algorithm_with_hessian.h │ │ │ ├── parameter.cpp │ │ │ ├── parameter.h │ │ │ ├── parameter_container.cpp │ │ │ ├── parameter_container.h │ │ │ ├── robust_kernel.cpp │ │ │ ├── robust_kernel.h │ │ │ ├── robust_kernel_factory.cpp │ │ │ ├── robust_kernel_factory.h │ │ │ ├── robust_kernel_impl.cpp │ │ │ ├── robust_kernel_impl.h │ │ │ ├── solver.cpp │ │ │ ├── solver.h │ │ │ ├── sparse_block_matrix.h │ │ │ ├── sparse_block_matrix.hpp │ │ │ ├── sparse_block_matrix_ccs.h │ │ │ ├── sparse_block_matrix_diagonal.h │ │ │ ├── sparse_block_matrix_test.cpp │ │ │ ├── sparse_optimizer.cpp │ │ │ └── sparse_optimizer.h │ │ ├── solvers │ │ │ ├── linear_solver_dense.h │ │ │ └── linear_solver_eigen.h │ │ ├── stuff │ │ │ ├── color_macros.h │ │ │ ├── macros.h │ │ │ ├── misc.h │ │ │ ├── os_specific.c │ │ │ ├── os_specific.h │ │ │ ├── property.cpp │ │ │ ├── property.h │ │ │ ├── string_tools.cpp │ │ │ ├── string_tools.h │ │ │ ├── timeutil.cpp │ │ │ └── timeutil.h │ │ └── types │ │ │ ├── se3_ops.h │ │ │ ├── se3_ops.hpp │ │ │ ├── se3quat.h │ │ │ ├── sim3.h │ │ │ ├── types_sba.cpp │ │ │ ├── types_sba.h │ │ │ ├── types_seven_dof_expmap.cpp │ │ │ ├── types_seven_dof_expmap.h │ │ │ ├── types_six_dof_expmap.cpp │ │ │ └── types_six_dof_expmap.h │ ├── lib │ │ └── libg2o.so │ └── license-bsd.txt └── g2o_new │ ├── CMakeLists.txt │ ├── Makefile │ ├── README.md │ ├── benchmarks │ ├── CMakeLists.txt │ └── jacobian_timing_tests.cpp │ ├── cmake_modules │ ├── CheckIfUnderscorePrefixedBesselFunctionsExist.cmake │ ├── Config.cmake.in │ ├── FindCSparse.cmake │ ├── FindEigen3.cmake │ ├── FindG2O.cmake │ ├── FindMETIS.cmake │ ├── FindQGLViewer.cmake │ └── FindSuiteSparse.cmake │ ├── codecov.yml │ ├── config.h │ ├── config.h.in │ ├── doc │ ├── .gitignore │ ├── Makefile │ ├── README_IF_IT_WAS_WORKING_AND_IT_DOES_NOT.txt │ ├── doxygen │ │ ├── doxy.config │ │ └── readme.txt │ ├── g2o.tex │ ├── license-bsd.txt │ ├── license-gpl.txt │ ├── license-lgpl.txt │ ├── pics │ │ ├── classes.fig │ │ ├── classes.svg │ │ ├── g2o-logo.svg │ │ ├── hgraph.fig │ │ ├── slam.fig │ │ └── viewer.png │ └── robots.bib │ ├── g2o │ ├── .gitignore │ ├── CMakeLists.txt │ ├── EXTERNAL │ │ ├── CMakeLists.txt │ │ └── freeglut │ │ │ ├── CMakeLists.txt │ │ │ ├── COPYING │ │ │ ├── freeglut_font.cpp │ │ │ ├── freeglut_minimal.h │ │ │ ├── freeglut_stroke_mono_roman.cpp │ │ │ └── freeglut_stroke_roman.cpp │ ├── apps │ │ ├── CMakeLists.txt │ │ ├── g2o_cli │ │ │ ├── CMakeLists.txt │ │ │ ├── dl_wrapper.cpp │ │ │ ├── dl_wrapper.h │ │ │ ├── g2o.cpp │ │ │ ├── g2o_cli_api.h │ │ │ ├── g2o_common.cpp │ │ │ ├── g2o_common.h │ │ │ ├── output_helper.cpp │ │ │ └── output_helper.h │ │ ├── g2o_simulator │ │ │ ├── CMakeLists.txt │ │ │ ├── g2o_simulator_api.h │ │ │ ├── pointsensorparameters.cpp │ │ │ ├── pointsensorparameters.h │ │ │ ├── sensor_line3d.cpp │ │ │ ├── sensor_line3d.h │ │ │ ├── sensor_odometry.h │ │ │ ├── sensor_odometry2d.cpp │ │ │ ├── sensor_odometry2d.h │ │ │ ├── sensor_odometry3d.cpp │ │ │ ├── sensor_odometry3d.h │ │ │ ├── sensor_pointxy.cpp │ │ │ ├── sensor_pointxy.h │ │ │ ├── sensor_pointxy_bearing.cpp │ │ │ ├── sensor_pointxy_bearing.h │ │ │ ├── sensor_pointxy_offset.cpp │ │ │ ├── sensor_pointxy_offset.h │ │ │ ├── sensor_pointxyz.cpp │ │ │ ├── sensor_pointxyz.h │ │ │ ├── sensor_pointxyz_depth.cpp │ │ │ ├── sensor_pointxyz_depth.h │ │ │ ├── sensor_pointxyz_disparity.cpp │ │ │ ├── sensor_pointxyz_disparity.h │ │ │ ├── sensor_pose2d.cpp │ │ │ ├── sensor_pose2d.h │ │ │ ├── sensor_pose3d.cpp │ │ │ ├── sensor_pose3d.h │ │ │ ├── sensor_pose3d_offset.cpp │ │ │ ├── sensor_pose3d_offset.h │ │ │ ├── sensor_se3_prior.cpp │ │ │ ├── sensor_se3_prior.h │ │ │ ├── sensor_segment2d.cpp │ │ │ ├── sensor_segment2d.h │ │ │ ├── sensor_segment2d_line.cpp │ │ │ ├── sensor_segment2d_line.h │ │ │ ├── sensor_segment2d_pointline.cpp │ │ │ ├── sensor_segment2d_pointline.h │ │ │ ├── simulator.cpp │ │ │ ├── simulator.h │ │ │ ├── simulator2d.h │ │ │ ├── simulator2d_base.h │ │ │ ├── simulator2d_segment.cpp │ │ │ ├── simulator3d.h │ │ │ ├── simulator3d_base.h │ │ │ ├── simutils.cpp │ │ │ ├── simutils.h │ │ │ ├── test_simulator2d.cpp │ │ │ └── test_simulator3d.cpp │ │ ├── g2o_viewer │ │ │ ├── CMakeLists.txt │ │ │ ├── base_main_window.ui │ │ │ ├── base_properties_widget.ui │ │ │ ├── g2o_qglviewer.cpp │ │ │ ├── g2o_qglviewer.h │ │ │ ├── g2o_viewer.cpp │ │ │ ├── g2o_viewer_api.h │ │ │ ├── gui_hyper_graph_action.cpp │ │ │ ├── gui_hyper_graph_action.h │ │ │ ├── main_window.cpp │ │ │ ├── main_window.h │ │ │ ├── properties_widget.cpp │ │ │ ├── properties_widget.h │ │ │ ├── run_g2o_viewer.cpp │ │ │ ├── run_g2o_viewer.h │ │ │ ├── stream_redirect.cpp │ │ │ ├── stream_redirect.h │ │ │ ├── viewer_properties_widget.cpp │ │ │ └── viewer_properties_widget.h │ │ └── linked_binaries │ │ │ └── CMakeLists.txt │ ├── autodiff │ │ ├── CMakeLists.txt │ │ ├── LICENSE │ │ ├── array_selector.h │ │ ├── autodiff.h │ │ ├── disable_warnings.h │ │ ├── eigen.h │ │ ├── fixed_array.h │ │ ├── integer_sequence_algorithm.h │ │ ├── jet.h │ │ ├── memory.h │ │ ├── parameter_dims.h │ │ ├── reenable_warnings.h │ │ ├── types.h │ │ └── variadic_evaluate.h │ ├── core │ │ ├── CMakeLists.txt │ │ ├── auto_differentiation.h │ │ ├── base_binary_edge.h │ │ ├── base_dynamic_vertex.h │ │ ├── base_edge.h │ │ ├── base_fixed_sized_edge.h │ │ ├── base_fixed_sized_edge.hpp │ │ ├── base_multi_edge.h │ │ ├── base_unary_edge.h │ │ ├── base_variable_sized_edge.h │ │ ├── base_variable_sized_edge.hpp │ │ ├── base_vertex.h │ │ ├── base_vertex.hpp │ │ ├── batch_stats.cpp │ │ ├── batch_stats.h │ │ ├── block_solver.h │ │ ├── block_solver.hpp │ │ ├── cache.cpp │ │ ├── cache.h │ │ ├── creators.h │ │ ├── dynamic_aligned_buffer.hpp │ │ ├── eigen_types.h │ │ ├── estimate_propagator.cpp │ │ ├── estimate_propagator.h │ │ ├── factory.cpp │ │ ├── factory.h │ │ ├── g2o_core_api.h │ │ ├── hyper_dijkstra.cpp │ │ ├── hyper_dijkstra.h │ │ ├── hyper_graph.cpp │ │ ├── hyper_graph.h │ │ ├── hyper_graph_action.cpp │ │ ├── hyper_graph_action.h │ │ ├── io_helper.h │ │ ├── jacobian_workspace.cpp │ │ ├── jacobian_workspace.h │ │ ├── linear_solver.h │ │ ├── marginal_covariance_cholesky.cpp │ │ ├── marginal_covariance_cholesky.h │ │ ├── matrix_operations.h │ │ ├── matrix_structure.cpp │ │ ├── matrix_structure.h │ │ ├── openmp_mutex.h │ │ ├── optimizable_graph.cpp │ │ ├── optimizable_graph.h │ │ ├── optimization_algorithm.cpp │ │ ├── optimization_algorithm.h │ │ ├── optimization_algorithm_dogleg.cpp │ │ ├── optimization_algorithm_dogleg.h │ │ ├── optimization_algorithm_factory.cpp │ │ ├── optimization_algorithm_factory.h │ │ ├── optimization_algorithm_gauss_newton.cpp │ │ ├── optimization_algorithm_gauss_newton.h │ │ ├── optimization_algorithm_levenberg.cpp │ │ ├── optimization_algorithm_levenberg.h │ │ ├── optimization_algorithm_property.h │ │ ├── optimization_algorithm_with_hessian.cpp │ │ ├── optimization_algorithm_with_hessian.h │ │ ├── ownership.h │ │ ├── parameter.cpp │ │ ├── parameter.h │ │ ├── parameter_container.cpp │ │ ├── parameter_container.h │ │ ├── robust_kernel.cpp │ │ ├── robust_kernel.h │ │ ├── robust_kernel_factory.cpp │ │ ├── robust_kernel_factory.h │ │ ├── robust_kernel_impl.cpp │ │ ├── robust_kernel_impl.h │ │ ├── solver.cpp │ │ ├── solver.h │ │ ├── sparse_block_matrix.h │ │ ├── sparse_block_matrix.hpp │ │ ├── sparse_block_matrix_ccs.h │ │ ├── sparse_block_matrix_diagonal.h │ │ ├── sparse_optimizer.cpp │ │ ├── sparse_optimizer.h │ │ ├── sparse_optimizer_terminate_action.cpp │ │ └── sparse_optimizer_terminate_action.h │ ├── examples │ │ ├── CMakeLists.txt │ │ ├── anonymize_observations │ │ │ ├── CMakeLists.txt │ │ │ └── g2o_anonymize_observations.cpp │ │ ├── ba │ │ │ ├── CMakeLists.txt │ │ │ └── ba_demo.cpp │ │ ├── ba_anchored_inverse_depth │ │ │ ├── CMakeLists.txt │ │ │ └── ba_anchored_inverse_depth_demo.cpp │ │ ├── bal │ │ │ ├── CMakeLists.txt │ │ │ └── bal_example.cpp │ │ ├── calibration_odom_laser │ │ │ ├── CMakeLists.txt │ │ │ ├── closed_form_calibration.cpp │ │ │ ├── closed_form_calibration.h │ │ │ ├── edge_se2_pure_calib.cpp │ │ │ ├── edge_se2_pure_calib.h │ │ │ ├── g2o_calibration_odom_laser_api.h │ │ │ ├── gm2dl_io.cpp │ │ │ ├── gm2dl_io.h │ │ │ ├── motion_information.h │ │ │ ├── sclam_helpers.cpp │ │ │ ├── sclam_helpers.h │ │ │ ├── sclam_laser_calib.cpp │ │ │ ├── sclam_odom_laser.cpp │ │ │ └── sclam_pure_calibration.cpp │ │ ├── convert_segment_line │ │ │ ├── CMakeLists.txt │ │ │ └── convertSegmentLine.cpp │ │ ├── data_convert │ │ │ ├── CMakeLists.txt │ │ │ └── convert_sba_slam3d.cpp │ │ ├── data_fitting │ │ │ ├── CMakeLists.txt │ │ │ ├── circle_fit.cpp │ │ │ └── curve_fit.cpp │ │ ├── dynamic_vertex │ │ │ ├── CMakeLists.txt │ │ │ ├── polynomial_fit.cpp │ │ │ └── static_dynamic_function_fit.cpp │ │ ├── g2o_hierarchical │ │ │ ├── CMakeLists.txt │ │ │ ├── backbone_tree_action.cpp │ │ │ ├── backbone_tree_action.h │ │ │ ├── edge_creator.cpp │ │ │ ├── edge_creator.h │ │ │ ├── edge_labeler.cpp │ │ │ ├── edge_labeler.h │ │ │ ├── edge_types_cost_function.cpp │ │ │ ├── edge_types_cost_function.h │ │ │ ├── g2o_hierarchical.cpp │ │ │ ├── g2o_hierarchical_api.h │ │ │ ├── simple_star_ops.cpp │ │ │ ├── simple_star_ops.h │ │ │ ├── star.cpp │ │ │ └── star.h │ │ ├── icp │ │ │ ├── CMakeLists.txt │ │ │ ├── gicp-test1.dat │ │ │ ├── gicp_demo.cpp │ │ │ └── gicp_sba_demo.cpp │ │ ├── interactive_slam │ │ │ ├── CMakeLists.txt │ │ │ ├── README.txt │ │ │ ├── g2o_incremental │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── README.txt │ │ │ │ ├── g2o_incremental.cpp │ │ │ │ ├── g2o_incremental_api.h │ │ │ │ ├── graph_optimizer_sparse_incremental.cpp │ │ │ │ ├── graph_optimizer_sparse_incremental.h │ │ │ │ ├── linear_solver_cholmod_online.h │ │ │ │ └── protocol.txt │ │ │ ├── g2o_interactive │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── fast_output.h │ │ │ │ ├── g2o_interactive_api.h │ │ │ │ ├── g2o_online.cpp │ │ │ │ ├── g2o_slam_interface.cpp │ │ │ │ ├── g2o_slam_interface.h │ │ │ │ ├── generate_commands.cpp │ │ │ │ ├── graph_optimizer_sparse_online.cpp │ │ │ │ ├── graph_optimizer_sparse_online.h │ │ │ │ ├── protocol.txt │ │ │ │ ├── types_online.cpp │ │ │ │ ├── types_slam2d_online.h │ │ │ │ └── types_slam3d_online.h │ │ │ └── slam_parser │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── example │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── example_slam_interface.cpp │ │ │ │ ├── example_slam_interface.h │ │ │ │ └── test_slam_interface.cpp │ │ │ │ ├── interface │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── abstract_slam_interface.h │ │ │ │ ├── parser_interface.cpp │ │ │ │ ├── parser_interface.h │ │ │ │ ├── slam_context_interface.cpp │ │ │ │ └── slam_context_interface.h │ │ │ │ └── parser │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── FlexLexer.h │ │ │ │ ├── bison_parser.cpp │ │ │ │ ├── bison_parser.h │ │ │ │ ├── commands.h │ │ │ │ ├── driver.cpp │ │ │ │ ├── driver.h │ │ │ │ ├── flex_scanner.cpp │ │ │ │ ├── grammar.sh │ │ │ │ ├── location.hh │ │ │ │ ├── parser.yy │ │ │ │ ├── position.hh │ │ │ │ ├── scanner.h │ │ │ │ ├── scanner.l │ │ │ │ ├── slam_context.cpp │ │ │ │ ├── slam_context.h │ │ │ │ └── test_slam_parser.cpp │ │ ├── line_slam │ │ │ ├── CMakeLists.txt │ │ │ ├── line_test.cpp │ │ │ └── simulator_3d_line.cpp │ │ ├── logging │ │ │ ├── CMakeLists.txt │ │ │ └── logging.cpp │ │ ├── plane_slam │ │ │ ├── CMakeLists.txt │ │ │ ├── plane_test.cpp │ │ │ └── simulator_3d_plane.cpp │ │ ├── sba │ │ │ ├── CMakeLists.txt │ │ │ └── sba_demo.cpp │ │ ├── sim3 │ │ │ ├── CMakeLists.txt │ │ │ └── optimize_sphere_by_sim3.cpp │ │ ├── simple_optimize │ │ │ ├── CMakeLists.txt │ │ │ └── simple_optimize.cpp │ │ ├── slam2d │ │ │ ├── CMakeLists.txt │ │ │ ├── base_main_window.ui │ │ │ ├── main_window.cpp │ │ │ ├── main_window.h │ │ │ ├── slam2d_g2o.cpp │ │ │ ├── slam2d_viewer.cpp │ │ │ └── slam2d_viewer.h │ │ ├── sphere │ │ │ ├── CMakeLists.txt │ │ │ └── create_sphere.cpp │ │ ├── target │ │ │ ├── CMakeLists.txt │ │ │ ├── constant_velocity_target.cpp │ │ │ ├── continuous_to_discrete.h │ │ │ ├── static_target.cpp │ │ │ ├── targetTypes3D.hpp │ │ │ └── targetTypes6D.hpp │ │ └── tutorial_slam2d │ │ │ ├── CMakeLists.txt │ │ │ ├── edge_se2.cpp │ │ │ ├── edge_se2.h │ │ │ ├── edge_se2_pointxy.cpp │ │ │ ├── edge_se2_pointxy.h │ │ │ ├── g2o_tutorial_slam2d_api.h │ │ │ ├── parameter_se2_offset.cpp │ │ │ ├── parameter_se2_offset.h │ │ │ ├── se2.h │ │ │ ├── simulator.cpp │ │ │ ├── simulator.h │ │ │ ├── tutorial_slam2d.cpp │ │ │ ├── types_tutorial_slam2d.cpp │ │ │ ├── types_tutorial_slam2d.h │ │ │ ├── vertex_point_xy.cpp │ │ │ ├── vertex_point_xy.h │ │ │ ├── vertex_se2.cpp │ │ │ └── vertex_se2.h │ ├── solvers │ │ ├── CMakeLists.txt │ │ ├── cholmod │ │ │ ├── CMakeLists.txt │ │ │ ├── cholmod_ext.h │ │ │ ├── cholmod_wrapper.cpp │ │ │ ├── cholmod_wrapper.h │ │ │ ├── linear_solver_cholmod.h │ │ │ └── solver_cholmod.cpp │ │ ├── csparse │ │ │ ├── CMakeLists.txt │ │ │ ├── csparse_extension.cpp │ │ │ ├── csparse_extension.h │ │ │ ├── csparse_helper.cpp │ │ │ ├── csparse_helper.h │ │ │ ├── csparse_wrapper.cpp │ │ │ ├── csparse_wrapper.h │ │ │ ├── g2o_csparse_api.h │ │ │ ├── g2o_csparse_extension_api.h │ │ │ ├── linear_solver_csparse.h │ │ │ └── solver_csparse.cpp │ │ ├── dense │ │ │ ├── CMakeLists.txt │ │ │ ├── linear_solver_dense.h │ │ │ └── solver_dense.cpp │ │ ├── eigen │ │ │ ├── CMakeLists.txt │ │ │ ├── linear_solver_eigen.h │ │ │ └── solver_eigen.cpp │ │ ├── pcg │ │ │ ├── CMakeLists.txt │ │ │ ├── linear_solver_pcg.h │ │ │ ├── linear_solver_pcg.hpp │ │ │ └── solver_pcg.cpp │ │ ├── slam2d_linear │ │ │ ├── CMakeLists.txt │ │ │ ├── g2o_slam2d_linear_api.h │ │ │ ├── slam2d_linear.cpp │ │ │ ├── solver_slam2d_linear.cpp │ │ │ └── solver_slam2d_linear.h │ │ └── structure_only │ │ │ ├── CMakeLists.txt │ │ │ ├── structure_only.cpp │ │ │ └── structure_only_solver.h │ ├── stuff │ │ ├── CMakeLists.txt │ │ ├── color_macros.h │ │ ├── command_args.cpp │ │ ├── command_args.h │ │ ├── filesys_tools.cpp │ │ ├── filesys_tools.h │ │ ├── g2o_stuff_api.h │ │ ├── logger.cpp │ │ ├── logger.h │ │ ├── logger_format.h │ │ ├── macros.h │ │ ├── misc.h │ │ ├── opengl_primitives.cpp │ │ ├── opengl_primitives.h │ │ ├── opengl_wrapper.h │ │ ├── property.cpp │ │ ├── property.h │ │ ├── sampler.cpp │ │ ├── sampler.h │ │ ├── sparse_helper.cpp │ │ ├── sparse_helper.h │ │ ├── string_tools.cpp │ │ ├── string_tools.h │ │ ├── tictoc.cpp │ │ ├── tictoc.h │ │ ├── timeutil.cpp │ │ ├── timeutil.h │ │ ├── tuple_tools.h │ │ └── unscented.h │ ├── types │ │ ├── CMakeLists.txt │ │ ├── data │ │ │ ├── CMakeLists.txt │ │ │ ├── data_queue.cpp │ │ │ ├── data_queue.h │ │ │ ├── g2o_types_data_api.h │ │ │ ├── laser_parameters.cpp │ │ │ ├── laser_parameters.h │ │ │ ├── raw_laser.cpp │ │ │ ├── raw_laser.h │ │ │ ├── robot_data.cpp │ │ │ ├── robot_data.h │ │ │ ├── robot_laser.cpp │ │ │ ├── robot_laser.h │ │ │ ├── types_data.cpp │ │ │ ├── types_data.h │ │ │ ├── vertex_ellipse.cpp │ │ │ ├── vertex_ellipse.h │ │ │ ├── vertex_tag.cpp │ │ │ └── vertex_tag.h │ │ ├── icp │ │ │ ├── CMakeLists.txt │ │ │ ├── g2o_types_icp_api.h │ │ │ ├── types_icp.cpp │ │ │ └── types_icp.h │ │ ├── sba │ │ │ ├── CMakeLists.txt │ │ │ ├── edge_project_p2mc.cpp │ │ │ ├── edge_project_p2mc.h │ │ │ ├── edge_project_p2sc.cpp │ │ │ ├── edge_project_p2sc.h │ │ │ ├── edge_project_psi2uv.cpp │ │ │ ├── edge_project_psi2uv.h │ │ │ ├── edge_project_stereo_xyz.cpp │ │ │ ├── edge_project_stereo_xyz.h │ │ │ ├── edge_project_stereo_xyz_onlypose.cpp │ │ │ ├── edge_project_stereo_xyz_onlypose.h │ │ │ ├── edge_project_xyz.cpp │ │ │ ├── edge_project_xyz.h │ │ │ ├── edge_project_xyz2uv.cpp │ │ │ ├── edge_project_xyz2uv.h │ │ │ ├── edge_project_xyz2uvu.cpp │ │ │ ├── edge_project_xyz2uvu.h │ │ │ ├── edge_project_xyz_onlypose.cpp │ │ │ ├── edge_project_xyz_onlypose.h │ │ │ ├── edge_sba_cam.cpp │ │ │ ├── edge_sba_cam.h │ │ │ ├── edge_sba_scale.cpp │ │ │ ├── edge_sba_scale.h │ │ │ ├── edge_se3_expmap.cpp │ │ │ ├── edge_se3_expmap.h │ │ │ ├── g2o_types_sba_api.h │ │ │ ├── parameter_cameraparameters.cpp │ │ │ ├── parameter_cameraparameters.h │ │ │ ├── sba_utils.h │ │ │ ├── sbacam.cpp │ │ │ ├── sbacam.h │ │ │ ├── types_sba.cpp │ │ │ ├── types_sba.h │ │ │ ├── types_six_dof_expmap.cpp │ │ │ ├── types_six_dof_expmap.h │ │ │ ├── vertex_cam.cpp │ │ │ ├── vertex_cam.h │ │ │ ├── vertex_intrinsics.cpp │ │ │ ├── vertex_intrinsics.h │ │ │ ├── vertex_se3_expmap.cpp │ │ │ └── vertex_se3_expmap.h │ │ ├── sclam2d │ │ │ ├── CMakeLists.txt │ │ │ ├── edge_se2_odom_differential_calib.cpp │ │ │ ├── edge_se2_odom_differential_calib.h │ │ │ ├── edge_se2_sensor_calib.cpp │ │ │ ├── edge_se2_sensor_calib.h │ │ │ ├── g2o_types_sclam2d_api.h │ │ │ ├── odometry_measurement.cpp │ │ │ ├── odometry_measurement.h │ │ │ ├── types_sclam2d.cpp │ │ │ ├── types_sclam2d.h │ │ │ ├── vertex_odom_differential_params.cpp │ │ │ └── vertex_odom_differential_params.h │ │ ├── sim3 │ │ │ ├── CMakeLists.txt │ │ │ ├── sim3.h │ │ │ ├── types_seven_dof_expmap.cpp │ │ │ └── types_seven_dof_expmap.h │ │ ├── slam2d │ │ │ ├── CMakeLists.txt │ │ │ ├── edge_pointxy.cpp │ │ │ ├── edge_pointxy.h │ │ │ ├── edge_se2.cpp │ │ │ ├── edge_se2.h │ │ │ ├── edge_se2_lotsofxy.cpp │ │ │ ├── edge_se2_lotsofxy.h │ │ │ ├── edge_se2_offset.cpp │ │ │ ├── edge_se2_offset.h │ │ │ ├── edge_se2_pointxy.cpp │ │ │ ├── edge_se2_pointxy.h │ │ │ ├── edge_se2_pointxy_bearing.cpp │ │ │ ├── edge_se2_pointxy_bearing.h │ │ │ ├── edge_se2_pointxy_calib.cpp │ │ │ ├── edge_se2_pointxy_calib.h │ │ │ ├── edge_se2_pointxy_offset.cpp │ │ │ ├── edge_se2_pointxy_offset.h │ │ │ ├── edge_se2_prior.cpp │ │ │ ├── edge_se2_prior.h │ │ │ ├── edge_se2_twopointsxy.cpp │ │ │ ├── edge_se2_twopointsxy.h │ │ │ ├── edge_se2_xyprior.cpp │ │ │ ├── edge_se2_xyprior.h │ │ │ ├── edge_xy_prior.cpp │ │ │ ├── edge_xy_prior.h │ │ │ ├── g2o_types_slam2d_api.h │ │ │ ├── parameter_se2_offset.cpp │ │ │ ├── parameter_se2_offset.h │ │ │ ├── se2.h │ │ │ ├── types_slam2d.cpp │ │ │ ├── types_slam2d.h │ │ │ ├── vertex_point_xy.cpp │ │ │ ├── vertex_point_xy.h │ │ │ ├── vertex_se2.cpp │ │ │ └── vertex_se2.h │ │ ├── slam2d_addons │ │ │ ├── CMakeLists.txt │ │ │ ├── edge_line2d.cpp │ │ │ ├── edge_line2d.h │ │ │ ├── edge_line2d_pointxy.cpp │ │ │ ├── edge_line2d_pointxy.h │ │ │ ├── edge_se2_line2d.cpp │ │ │ ├── edge_se2_line2d.h │ │ │ ├── edge_se2_segment2d.cpp │ │ │ ├── edge_se2_segment2d.h │ │ │ ├── edge_se2_segment2d_line.cpp │ │ │ ├── edge_se2_segment2d_line.h │ │ │ ├── edge_se2_segment2d_pointLine.cpp │ │ │ ├── edge_se2_segment2d_pointLine.h │ │ │ ├── g2o_types_slam2d_addons_api.h │ │ │ ├── line_2d.h │ │ │ ├── types_slam2d_addons.cpp │ │ │ ├── types_slam2d_addons.h │ │ │ ├── vertex_line2d.cpp │ │ │ ├── vertex_line2d.h │ │ │ ├── vertex_segment2d.cpp │ │ │ └── vertex_segment2d.h │ │ ├── slam3d │ │ │ ├── CMakeLists.txt │ │ │ ├── dquat2mat.cpp │ │ │ ├── dquat2mat.h │ │ │ ├── dquat2mat.wxm │ │ │ ├── dquat2mat_maxima_generated.cpp │ │ │ ├── edge_pointxyz.cpp │ │ │ ├── edge_pointxyz.h │ │ │ ├── edge_se3.cpp │ │ │ ├── edge_se3.h │ │ │ ├── edge_se3_lotsofxyz.cpp │ │ │ ├── edge_se3_lotsofxyz.h │ │ │ ├── edge_se3_offset.cpp │ │ │ ├── edge_se3_offset.h │ │ │ ├── edge_se3_pointxyz.cpp │ │ │ ├── edge_se3_pointxyz.h │ │ │ ├── edge_se3_pointxyz_depth.cpp │ │ │ ├── edge_se3_pointxyz_depth.h │ │ │ ├── edge_se3_pointxyz_disparity.cpp │ │ │ ├── edge_se3_pointxyz_disparity.h │ │ │ ├── edge_se3_prior.cpp │ │ │ ├── edge_se3_prior.h │ │ │ ├── edge_se3_xyzprior.cpp │ │ │ ├── edge_se3_xyzprior.h │ │ │ ├── edge_xyz_prior.cpp │ │ │ ├── edge_xyz_prior.h │ │ │ ├── g2o_types_slam3d_api.h │ │ │ ├── isometry3d_gradients.cpp │ │ │ ├── isometry3d_gradients.h │ │ │ ├── isometry3d_mappings.cpp │ │ │ ├── isometry3d_mappings.h │ │ │ ├── parameter_camera.cpp │ │ │ ├── parameter_camera.h │ │ │ ├── parameter_se3_offset.cpp │ │ │ ├── parameter_se3_offset.h │ │ │ ├── parameter_stereo_camera.cpp │ │ │ ├── parameter_stereo_camera.h │ │ │ ├── se3_ops.h │ │ │ ├── se3_ops.hpp │ │ │ ├── se3quat.h │ │ │ ├── types_slam3d.cpp │ │ │ ├── types_slam3d.h │ │ │ ├── vertex_pointxyz.cpp │ │ │ ├── vertex_pointxyz.h │ │ │ ├── vertex_se3.cpp │ │ │ └── vertex_se3.h │ │ └── slam3d_addons │ │ │ ├── CMakeLists.txt │ │ │ ├── edge_plane.cpp │ │ │ ├── edge_plane.h │ │ │ ├── edge_se3_calib.cpp │ │ │ ├── edge_se3_calib.h │ │ │ ├── edge_se3_euler.cpp │ │ │ ├── edge_se3_euler.h │ │ │ ├── edge_se3_line.cpp │ │ │ ├── edge_se3_line.h │ │ │ ├── edge_se3_plane_calib.cpp │ │ │ ├── edge_se3_plane_calib.h │ │ │ ├── g2o_types_slam3d_addons_api.h │ │ │ ├── line3d.cpp │ │ │ ├── line3d.h │ │ │ ├── plane3d.h │ │ │ ├── types_slam3d_addons.cpp │ │ │ ├── types_slam3d_addons.h │ │ │ ├── vertex_line3d.cpp │ │ │ ├── vertex_line3d.h │ │ │ ├── vertex_plane.cpp │ │ │ ├── vertex_plane.h │ │ │ ├── vertex_se3_euler.cpp │ │ │ └── vertex_se3_euler.h │ └── what_is_in_these_directories.txt │ ├── script │ ├── android.toolchain.cmake │ ├── install-additional-deps-windows.bat │ ├── install-deps-linux.sh │ ├── install-deps-osx.sh │ └── install-deps-windows.bat │ └── unit_test │ ├── CMakeLists.txt │ ├── data │ ├── CMakeLists.txt │ ├── data_queue_tests.cpp │ └── io_data.cpp │ ├── general │ ├── CMakeLists.txt │ ├── allocate_optimizer.cpp │ ├── allocate_optimizer.h │ ├── auto_diff.cpp │ ├── base_fixed_sized_edge.cpp │ ├── batch_statistics.cpp │ ├── clear_and_redo.cpp │ ├── graph_operations.cpp │ ├── robust_kernel_tests.cpp │ └── sparse_block_matrix.cpp │ ├── sba │ ├── CMakeLists.txt │ ├── io_sba.cpp │ └── io_six_dof_expmap.cpp │ ├── sclam2d │ ├── CMakeLists.txt │ ├── io_sclam2d.cpp │ └── odom_convert_sclam2d.cpp │ ├── sim3 │ ├── CMakeLists.txt │ ├── allocate_sim3.cpp │ ├── io_sim3.cpp │ └── jacobians_sim3.cpp │ ├── slam2d │ ├── CMakeLists.txt │ ├── io_slam2d.cpp │ ├── jacobians_slam2d.cpp │ └── mappings_se2.cpp │ ├── slam2d_addons │ ├── CMakeLists.txt │ └── io_slam2d_addons.cpp │ ├── slam3d │ ├── CMakeLists.txt │ ├── io_slam3d.cpp │ ├── jacobians_slam3d.cpp │ ├── mappings_slam3d.cpp │ ├── optimization_slam3d.cpp │ └── orthogonal_matrix.cpp │ ├── slam3d_addons │ ├── CMakeLists.txt │ └── io_slam3d_addons.cpp │ ├── solver │ ├── CMakeLists.txt │ ├── allocate_algorithm_test.cpp │ ├── linear_solver_test.cpp │ ├── sparse_system_helper.cpp │ └── sparse_system_helper.h │ ├── stuff │ ├── CMakeLists.txt │ ├── command_args_tests.cpp │ ├── filesys_tools_tests.cpp │ ├── misc_tests.cpp │ ├── property_tests.cpp │ ├── string_tools_tests.cpp │ ├── tuple_tools_tests.cpp │ └── unscented_tests.cpp │ └── test_helper │ ├── eigen_matcher.h │ ├── evaluate_jacobian.h │ ├── io.h │ ├── random_state.h │ └── test_main.cpp ├── Vocabulary └── ORBvoc.txt.tar.gz ├── assets ├── gif │ └── kaistvio_circle.gif └── img │ ├── euroc_plot.png │ ├── euroc_table.png │ ├── euroc_traj.png │ ├── fig1.png │ ├── jetson-slam.png │ ├── kaistvio_table.png │ ├── kaistvio_traj.png │ ├── kitti_plot.png │ ├── kitti_traj.png │ ├── vgg.png │ └── video_thumbnail.png ├── build.sh ├── cmake_modules └── FindEigen3.cmake ├── include ├── Converter.h ├── Frame.h ├── FrameDrawer.h ├── Initializer.h ├── KeyFrame.h ├── KeyFrameDatabase.h ├── LocalMapping.h ├── LoopClosing.h ├── Map.h ├── MapDrawer.h ├── MapPoint.h ├── ORBVocabulary.h ├── ORBextractor.h ├── ORBmatcher.h ├── Optimizer.h ├── PnPsolver.h ├── Sim3Solver.h ├── System.h ├── Tracking.h ├── Viewer.h ├── cuda │ ├── orb_gpu.hpp │ ├── orb_matcher.hpp │ ├── synced_mem_holder.hpp │ └── tracking_gpu.hpp ├── tictoc.hpp └── tictoc_cuda.hpp ├── lib └── libJetson-SLAM.so └── src ├── Converter.cpp ├── Frame.cpp ├── FrameDrawer.cpp ├── Initializer.cpp ├── KeyFrame.cpp ├── KeyFrameDatabase.cpp ├── LocalMapping.cpp ├── LoopClosing.cpp ├── Map.cpp ├── MapDrawer.cpp ├── MapPoint.cpp ├── ORBextractor.cpp ├── ORBmatcher.cpp ├── Optimizer.cpp ├── PnPsolver.cpp ├── Sim3Solver.cpp ├── System.cpp ├── Tracking.cpp ├── Viewer.cpp └── cuda ├── orb_FAST_apply_NMS_G.cu ├── orb_FAST_apply_NMS_L.cu ├── orb_FAST_apply_NMS_MS.cpp ├── orb_FAST_apply_NMS_MS.cu ├── orb_FAST_compute_score.cu ├── orb_FAST_obtain_keypoints.cpp ├── orb_FAST_orientation.cu ├── orb_bitpattern.cpp ├── orb_copy_output.cu ├── orb_descriptor.cu ├── orb_gaussian.cu ├── orb_gpu.cpp ├── orb_matcher.cu ├── orb_pyramid.cu ├── orb_stereo_match.cu ├── synced_mem_holder.cpp └── tracking_isinfrustum.cu /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.*~ 3 | -------------------------------------------------------------------------------- /Examples/Monocular/EuRoC.yaml: -------------------------------------------------------------------------------- 1 | %YAML:1.0 2 | 3 | #-------------------------------------------------------------------------------------------- 4 | # Camera Parameters. Adjust them! 5 | #-------------------------------------------------------------------------------------------- 6 | 7 | # Camera calibration and distortion parameters (OpenCV) 8 | Camera.fx: 458.654 9 | Camera.fy: 457.296 10 | Camera.cx: 367.215 11 | Camera.cy: 248.375 12 | 13 | Camera.k1: -0.28340811 14 | Camera.k2: 0.07395907 15 | Camera.p1: 0.00019359 16 | Camera.p2: 1.76187114e-05 17 | 18 | # Camera frames per second 19 | Camera.fps: 20.0 20 | 21 | # Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale) 22 | Camera.RGB: 1 23 | 24 | #-------------------------------------------------------------------------------------------- 25 | # ORB Parameters 26 | #-------------------------------------------------------------------------------------------- 27 | 28 | # ORB Extractor: Number of features per image 29 | ORBextractor.nFeatures: 1000 30 | 31 | # ORB Extractor: Scale factor between levels in the scale pyramid 32 | ORBextractor.scaleFactor: 1.2 33 | 34 | # ORB Extractor: Number of levels in the scale pyramid 35 | ORBextractor.nLevels: 8 36 | 37 | # ORB Extractor: Fast threshold 38 | # Image is divided in a grid. At each cell FAST are extracted imposing a minimum response. 39 | # Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST 40 | # You can lower these values if your images have low contrast 41 | ORBextractor.iniThFAST: 20 42 | ORBextractor.minThFAST: 7 43 | 44 | #-------------------------------------------------------------------------------------------- 45 | # Viewer Parameters 46 | #--------------------------------------------------------------------------------------------- 47 | Viewer.KeyFrameSize: 0.05 48 | Viewer.KeyFrameLineWidth: 1 49 | Viewer.GraphLineWidth: 0.9 50 | Viewer.PointSize:2 51 | Viewer.CameraSize: 0.08 52 | Viewer.CameraLineWidth: 3 53 | Viewer.ViewpointX: 0 54 | Viewer.ViewpointY: -0.7 55 | Viewer.ViewpointZ: -1.8 56 | Viewer.ViewpointF: 500 57 | 58 | -------------------------------------------------------------------------------- /Examples/Monocular/KITTI00-02.yaml: -------------------------------------------------------------------------------- 1 | %YAML:1.0 2 | 3 | #-------------------------------------------------------------------------------------------- 4 | # Camera Parameters. Adjust them! 5 | #-------------------------------------------------------------------------------------------- 6 | 7 | # Camera calibration and distortion parameters (OpenCV) 8 | Camera.fx: 718.856 9 | Camera.fy: 718.856 10 | Camera.cx: 607.1928 11 | Camera.cy: 185.2157 12 | 13 | Camera.k1: 0.0 14 | Camera.k2: 0.0 15 | Camera.p1: 0.0 16 | Camera.p2: 0.0 17 | 18 | # Camera frames per second 19 | Camera.fps: 10.0 20 | 21 | # Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale) 22 | Camera.RGB: 1 23 | 24 | #-------------------------------------------------------------------------------------------- 25 | # ORB Parameters 26 | #-------------------------------------------------------------------------------------------- 27 | 28 | # ORB Extractor: Number of features per image 29 | ORBextractor.nFeatures: 2000 30 | 31 | # ORB Extractor: Scale factor between levels in the scale pyramid 32 | ORBextractor.scaleFactor: 1.2 33 | 34 | # ORB Extractor: Number of levels in the scale pyramid 35 | ORBextractor.nLevels: 8 36 | 37 | # ORB Extractor: Fast threshold 38 | # Image is divided in a grid. At each cell FAST are extracted imposing a minimum response. 39 | # Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST 40 | # You can lower these values if your images have low contrast 41 | ORBextractor.iniThFAST: 20 42 | ORBextractor.minThFAST: 7 43 | 44 | #-------------------------------------------------------------------------------------------- 45 | # Viewer Parameters 46 | #-------------------------------------------------------------------------------------------- 47 | Viewer.KeyFrameSize: 0.1 48 | Viewer.KeyFrameLineWidth: 1 49 | Viewer.GraphLineWidth: 1 50 | Viewer.PointSize:2 51 | Viewer.CameraSize: 0.15 52 | Viewer.CameraLineWidth: 2 53 | Viewer.ViewpointX: 0 54 | Viewer.ViewpointY: -10 55 | Viewer.ViewpointZ: -0.1 56 | Viewer.ViewpointF: 2000 57 | 58 | -------------------------------------------------------------------------------- /Examples/Monocular/KITTI03.yaml: -------------------------------------------------------------------------------- 1 | %YAML:1.0 2 | 3 | #-------------------------------------------------------------------------------------------- 4 | # Camera Parameters. Adjust them! 5 | #-------------------------------------------------------------------------------------------- 6 | 7 | # Camera calibration and distortion parameters (OpenCV) 8 | Camera.fx: 721.5377 9 | Camera.fy: 721.5377 10 | Camera.cx: 609.5593 11 | Camera.cy: 172.854 12 | 13 | Camera.k1: 0.0 14 | Camera.k2: 0.0 15 | Camera.p1: 0.0 16 | Camera.p2: 0.0 17 | 18 | # Camera frames per second 19 | Camera.fps: 10.0 20 | 21 | # Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale) 22 | Camera.RGB: 1 23 | 24 | #-------------------------------------------------------------------------------------------- 25 | # ORB Parameters 26 | #-------------------------------------------------------------------------------------------- 27 | 28 | # ORB Extractor: Number of features per image 29 | ORBextractor.nFeatures: 2000 30 | 31 | # ORB Extractor: Scale factor between levels in the scale pyramid 32 | ORBextractor.scaleFactor: 1.2 33 | 34 | # ORB Extractor: Number of levels in the scale pyramid 35 | ORBextractor.nLevels: 8 36 | 37 | # ORB Extractor: Fast threshold 38 | # Image is divided in a grid. At each cell FAST are extracted imposing a minimum response. 39 | # Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST 40 | # You can lower these values if your images have low contrast 41 | ORBextractor.iniThFAST: 20 42 | ORBextractor.minThFAST: 7 43 | 44 | #-------------------------------------------------------------------------------------------- 45 | # Viewer Parameters 46 | #-------------------------------------------------------------------------------------------- 47 | Viewer.KeyFrameSize: 0.1 48 | Viewer.KeyFrameLineWidth: 1 49 | Viewer.GraphLineWidth: 1 50 | Viewer.PointSize:2 51 | Viewer.CameraSize: 0.15 52 | Viewer.CameraLineWidth: 2 53 | Viewer.ViewpointX: 0 54 | Viewer.ViewpointY: -10 55 | Viewer.ViewpointZ: -0.1 56 | Viewer.ViewpointF: 2000 57 | 58 | -------------------------------------------------------------------------------- /Examples/Monocular/KITTI04-12.yaml: -------------------------------------------------------------------------------- 1 | %YAML:1.0 2 | 3 | #-------------------------------------------------------------------------------------------- 4 | # Camera Parameters. Adjust them! 5 | #-------------------------------------------------------------------------------------------- 6 | 7 | # Camera calibration and distortion parameters (OpenCV) 8 | Camera.fx: 707.0912 9 | Camera.fy: 707.0912 10 | Camera.cx: 601.8873 11 | Camera.cy: 183.1104 12 | 13 | Camera.k1: 0.0 14 | Camera.k2: 0.0 15 | Camera.p1: 0.0 16 | Camera.p2: 0.0 17 | 18 | # Camera frames per second 19 | Camera.fps: 10.0 20 | 21 | # Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale) 22 | Camera.RGB: 1 23 | 24 | #-------------------------------------------------------------------------------------------- 25 | # ORB Parameters 26 | #-------------------------------------------------------------------------------------------- 27 | 28 | # ORB Extractor: Number of features per image 29 | ORBextractor.nFeatures: 2000 30 | 31 | # ORB Extractor: Scale factor between levels in the scale pyramid 32 | ORBextractor.scaleFactor: 1.2 33 | 34 | # ORB Extractor: Number of levels in the scale pyramid 35 | ORBextractor.nLevels: 8 36 | 37 | # ORB Extractor: Fast threshold 38 | # Image is divided in a grid. At each cell FAST are extracted imposing a minimum response. 39 | # Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST 40 | # You can lower these values if your images have low contrast 41 | ORBextractor.iniThFAST: 20 42 | ORBextractor.minThFAST: 7 43 | 44 | #-------------------------------------------------------------------------------------------- 45 | # Viewer Parameters 46 | #-------------------------------------------------------------------------------------------- 47 | Viewer.KeyFrameSize: 0.1 48 | Viewer.KeyFrameLineWidth: 1 49 | Viewer.GraphLineWidth: 1 50 | Viewer.PointSize:2 51 | Viewer.CameraSize: 0.15 52 | Viewer.CameraLineWidth: 2 53 | Viewer.ViewpointX: 0 54 | Viewer.ViewpointY: -10 55 | Viewer.ViewpointZ: -0.1 56 | Viewer.ViewpointF: 2000 57 | 58 | -------------------------------------------------------------------------------- /Examples/Monocular/TUM3.yaml: -------------------------------------------------------------------------------- 1 | %YAML:1.0 2 | 3 | #-------------------------------------------------------------------------------------------- 4 | # Camera Parameters. Adjust them! 5 | #-------------------------------------------------------------------------------------------- 6 | 7 | # Camera calibration and distortion parameters (OpenCV) 8 | Camera.fx: 535.4 9 | Camera.fy: 539.2 10 | Camera.cx: 320.1 11 | Camera.cy: 247.6 12 | 13 | Camera.k1: 0.0 14 | Camera.k2: 0.0 15 | Camera.p1: 0.0 16 | Camera.p2: 0.0 17 | 18 | # Camera frames per second 19 | Camera.fps: 30.0 20 | 21 | # Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale) 22 | Camera.RGB: 1 23 | 24 | #-------------------------------------------------------------------------------------------- 25 | # ORB Parameters 26 | #-------------------------------------------------------------------------------------------- 27 | 28 | # ORB Extractor: Number of features per image 29 | ORBextractor.nFeatures: 1000 30 | 31 | # ORB Extractor: Scale factor between levels in the scale pyramid 32 | ORBextractor.scaleFactor: 1.2 33 | 34 | # ORB Extractor: Number of levels in the scale pyramid 35 | ORBextractor.nLevels: 8 36 | 37 | # ORB Extractor: Fast threshold 38 | # Image is divided in a grid. At each cell FAST are extracted imposing a minimum response. 39 | # Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST 40 | # You can lower these values if your images have low contrast 41 | ORBextractor.iniThFAST: 20 42 | ORBextractor.minThFAST: 7 43 | 44 | #-------------------------------------------------------------------------------------------- 45 | # Viewer Parameters 46 | #-------------------------------------------------------------------------------------------- 47 | Viewer.KeyFrameSize: 0.05 48 | Viewer.KeyFrameLineWidth: 1 49 | Viewer.GraphLineWidth: 0.9 50 | Viewer.PointSize:2 51 | Viewer.CameraSize: 0.08 52 | Viewer.CameraLineWidth: 3 53 | Viewer.ViewpointX: 0 54 | Viewer.ViewpointY: -0.7 55 | Viewer.ViewpointZ: -1.8 56 | Viewer.ViewpointF: 500 57 | 58 | -------------------------------------------------------------------------------- /Examples/Monocular/mono_euroc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/Examples/Monocular/mono_euroc -------------------------------------------------------------------------------- /Examples/Monocular/mono_kitti: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/Examples/Monocular/mono_kitti -------------------------------------------------------------------------------- /Examples/Monocular/mono_live: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/Examples/Monocular/mono_live -------------------------------------------------------------------------------- /Examples/Monocular/mono_tum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/Examples/Monocular/mono_tum -------------------------------------------------------------------------------- /Examples/RGB-D/rgbd_live: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/Examples/RGB-D/rgbd_live -------------------------------------------------------------------------------- /Examples/RGB-D/rgbd_tum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/Examples/RGB-D/rgbd_tum -------------------------------------------------------------------------------- /Examples/Stereo/stereo_euroc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/Examples/Stereo/stereo_euroc -------------------------------------------------------------------------------- /Examples/Stereo/stereo_kitti: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/Examples/Stereo/stereo_kitti -------------------------------------------------------------------------------- /Examples/Stereo/stereo_live: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/Examples/Stereo/stereo_live -------------------------------------------------------------------------------- /Thirdparty/DBoW2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(DBoW2) 3 | 4 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 -march=native ") 5 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3 -march=native") 6 | 7 | set(HDRS_DBOW2 8 | DBoW2/BowVector.h 9 | DBoW2/FORB.h 10 | DBoW2/FClass.h 11 | DBoW2/FeatureVector.h 12 | DBoW2/ScoringObject.h 13 | DBoW2/TemplatedVocabulary.h) 14 | set(SRCS_DBOW2 15 | DBoW2/BowVector.cpp 16 | DBoW2/FORB.cpp 17 | DBoW2/FeatureVector.cpp 18 | DBoW2/ScoringObject.cpp) 19 | 20 | set(HDRS_DUTILS 21 | DUtils/Random.h 22 | DUtils/Timestamp.h) 23 | set(SRCS_DUTILS 24 | DUtils/Random.cpp 25 | DUtils/Timestamp.cpp) 26 | 27 | 28 | find_package(OpenCV 4 REQUIRED) 29 | 30 | set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) 31 | 32 | include_directories(${OpenCV_INCLUDE_DIRS}) 33 | add_library(DBoW2 SHARED ${SRCS_DBOW2} ${SRCS_DUTILS}) 34 | target_link_libraries(DBoW2 ${OpenCV_LIBS}) 35 | 36 | -------------------------------------------------------------------------------- /Thirdparty/DBoW2/DBoW2/FClass.h: -------------------------------------------------------------------------------- 1 | /** 2 | * File: FClass.h 3 | * Date: November 2011 4 | * Author: Dorian Galvez-Lopez 5 | * Description: generic FClass to instantiate templated classes 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #ifndef __D_T_FCLASS__ 11 | #define __D_T_FCLASS__ 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | namespace DBoW2 { 18 | 19 | /// Generic class to encapsulate functions to manage descriptors. 20 | /** 21 | * This class must be inherited. Derived classes can be used as the 22 | * parameter F when creating Templated structures 23 | * (TemplatedVocabulary, TemplatedDatabase, ...) 24 | */ 25 | class FClass 26 | { 27 | class TDescriptor; 28 | typedef const TDescriptor *pDescriptor; 29 | 30 | /** 31 | * Calculates the mean value of a set of descriptors 32 | * @param descriptors 33 | * @param mean mean descriptor 34 | */ 35 | virtual void meanValue(const std::vector &descriptors, 36 | TDescriptor &mean) = 0; 37 | 38 | /** 39 | * Calculates the distance between two descriptors 40 | * @param a 41 | * @param b 42 | * @return distance 43 | */ 44 | static double distance(const TDescriptor &a, const TDescriptor &b); 45 | 46 | /** 47 | * Returns a string version of the descriptor 48 | * @param a descriptor 49 | * @return string version 50 | */ 51 | static std::string toString(const TDescriptor &a); 52 | 53 | /** 54 | * Returns a descriptor from a string 55 | * @param a descriptor 56 | * @param s string version 57 | */ 58 | static void fromString(TDescriptor &a, const std::string &s); 59 | 60 | /** 61 | * Returns a mat with the descriptors in float format 62 | * @param descriptors 63 | * @param mat (out) NxL 32F matrix 64 | */ 65 | static void toMat32F(const std::vector &descriptors, 66 | cv::Mat &mat); 67 | }; 68 | 69 | } // namespace DBoW2 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /Thirdparty/DBoW2/DBoW2/FORB.h: -------------------------------------------------------------------------------- 1 | /** 2 | * File: FORB.h 3 | * Date: June 2012 4 | * Author: Dorian Galvez-Lopez 5 | * Description: functions for ORB descriptors 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #ifndef __D_T_F_ORB__ 11 | #define __D_T_F_ORB__ 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include "FClass.h" 18 | 19 | namespace DBoW2 { 20 | 21 | /// Functions to manipulate ORB descriptors 22 | class FORB: protected FClass 23 | { 24 | public: 25 | 26 | /// Descriptor type 27 | typedef cv::Mat TDescriptor; // CV_8U 28 | /// Pointer to a single descriptor 29 | typedef const TDescriptor *pDescriptor; 30 | /// Descriptor length (in bytes) 31 | static const int L; 32 | 33 | /** 34 | * Calculates the mean value of a set of descriptors 35 | * @param descriptors 36 | * @param mean mean descriptor 37 | */ 38 | static void meanValue(const std::vector &descriptors, 39 | TDescriptor &mean); 40 | 41 | /** 42 | * Calculates the distance between two descriptors 43 | * @param a 44 | * @param b 45 | * @return distance 46 | */ 47 | static int distance(const TDescriptor &a, const TDescriptor &b); 48 | 49 | /** 50 | * Returns a string version of the descriptor 51 | * @param a descriptor 52 | * @return string version 53 | */ 54 | static std::string toString(const TDescriptor &a); 55 | 56 | /** 57 | * Returns a descriptor from a string 58 | * @param a descriptor 59 | * @param s string version 60 | */ 61 | static void fromString(TDescriptor &a, const std::string &s); 62 | 63 | /** 64 | * Returns a mat with the descriptors in float format 65 | * @param descriptors 66 | * @param mat (out) NxL 32F matrix 67 | */ 68 | static void toMat32F(const std::vector &descriptors, 69 | cv::Mat &mat); 70 | 71 | static void toMat8U(const std::vector &descriptors, 72 | cv::Mat &mat); 73 | 74 | }; 75 | 76 | } // namespace DBoW2 77 | 78 | #endif 79 | 80 | -------------------------------------------------------------------------------- /Thirdparty/DBoW2/DBoW2/FeatureVector.h: -------------------------------------------------------------------------------- 1 | /** 2 | * File: FeatureVector.h 3 | * Date: November 2011 4 | * Author: Dorian Galvez-Lopez 5 | * Description: feature vector 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #ifndef __D_T_FEATURE_VECTOR__ 11 | #define __D_T_FEATURE_VECTOR__ 12 | 13 | #include "BowVector.h" 14 | #include 15 | #include 16 | #include 17 | 18 | namespace DBoW2 { 19 | 20 | /// Vector of nodes with indexes of local features 21 | class FeatureVector: 22 | public std::map > 23 | { 24 | public: 25 | 26 | /** 27 | * Constructor 28 | */ 29 | FeatureVector(void); 30 | 31 | /** 32 | * Destructor 33 | */ 34 | ~FeatureVector(void); 35 | 36 | /** 37 | * Adds a feature to an existing node, or adds a new node with an initial 38 | * feature 39 | * @param id node id to add or to modify 40 | * @param i_feature index of feature to add to the given node 41 | */ 42 | void addFeature(NodeId id, unsigned int i_feature); 43 | 44 | /** 45 | * Sends a string versions of the feature vector through the stream 46 | * @param out stream 47 | * @param v feature vector 48 | */ 49 | friend std::ostream& operator<<(std::ostream &out, const FeatureVector &v); 50 | 51 | }; 52 | 53 | } // namespace DBoW2 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /Thirdparty/DBoW2/README.txt: -------------------------------------------------------------------------------- 1 | You should have received this DBoW2 version along with ORB-SLAM2 (https://github.com/raulmur/ORB_SLAM2). 2 | See the original DBoW2 library at: https://github.com/dorian3d/DBoW2 3 | All files included in this version are BSD, see LICENSE.txt 4 | 5 | We also use Random.h, Random.cpp, Timestamp.pp and Timestamp.h from DLib/DUtils. 6 | See the original DLib library at: https://github.com/dorian3d/DLib 7 | All files included in this version are BSD, see LICENSE.txt 8 | -------------------------------------------------------------------------------- /Thirdparty/g2o/README.txt: -------------------------------------------------------------------------------- 1 | You should have received this g2o version along with ORB-SLAM2 (https://github.com/raulmur/ORB_SLAM2). 2 | See the original g2o library at: https://github.com/RainerKuemmerle/g2o 3 | All files included in this g2o version are BSD, see license-bsd.txt 4 | -------------------------------------------------------------------------------- /Thirdparty/g2o/config.h: -------------------------------------------------------------------------------- 1 | #ifndef G2O_CONFIG_H 2 | #define G2O_CONFIG_H 3 | 4 | /* #undef G2O_OPENMP */ 5 | /* #undef G2O_SHARED_LIBS */ 6 | 7 | // give a warning if Eigen defaults to row-major matrices. 8 | // We internally assume column-major matrices throughout the code. 9 | #ifdef EIGEN_DEFAULT_TO_ROW_MAJOR 10 | # error "g2o requires column major Eigen matrices (see http://eigen.tuxfamily.org/bz/show_bug.cgi?id=422)" 11 | #endif 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /Thirdparty/g2o/config.h.in: -------------------------------------------------------------------------------- 1 | #ifndef G2O_CONFIG_H 2 | #define G2O_CONFIG_H 3 | 4 | #cmakedefine G2O_OPENMP 1 5 | #cmakedefine G2O_SHARED_LIBS 1 6 | 7 | // give a warning if Eigen defaults to row-major matrices. 8 | // We internally assume column-major matrices throughout the code. 9 | #ifdef EIGEN_DEFAULT_TO_ROW_MAJOR 10 | # error "g2o requires column major Eigen matrices (see http://eigen.tuxfamily.org/bz/show_bug.cgi?id=422)" 11 | #endif 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /Thirdparty/g2o/g2o/core/parameter.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "parameter.h" 28 | 29 | namespace g2o { 30 | 31 | Parameter::Parameter() : _id(-1) 32 | { 33 | } 34 | 35 | void Parameter::setId(int id_) 36 | { 37 | _id = id_; 38 | } 39 | 40 | } // end namespace 41 | -------------------------------------------------------------------------------- /Thirdparty/g2o/g2o/core/robust_kernel.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "robust_kernel.h" 28 | 29 | namespace g2o { 30 | 31 | RobustKernel::RobustKernel() : 32 | _delta(1.) 33 | { 34 | } 35 | 36 | RobustKernel::RobustKernel(double delta) : 37 | _delta(delta) 38 | { 39 | } 40 | 41 | void RobustKernel::setDelta(double delta) 42 | { 43 | _delta = delta; 44 | } 45 | 46 | } // end namespace g2o 47 | -------------------------------------------------------------------------------- /Thirdparty/g2o/g2o/types/se3_ops.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 H. Strasdat 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_MATH_STUFF 28 | #define G2O_MATH_STUFF 29 | 30 | #include 31 | #include 32 | 33 | namespace g2o { 34 | using namespace Eigen; 35 | 36 | inline Matrix3d skew(const Vector3d&v); 37 | inline Vector3d deltaR(const Matrix3d& R); 38 | inline Vector2d project(const Vector3d&); 39 | inline Vector3d project(const Vector4d&); 40 | inline Vector3d unproject(const Vector2d&); 41 | inline Vector4d unproject(const Vector3d&); 42 | 43 | #include "se3_ops.hpp" 44 | 45 | } 46 | 47 | #endif //MATH_STUFF 48 | -------------------------------------------------------------------------------- /Thirdparty/g2o/lib/libg2o.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/Thirdparty/g2o/lib/libg2o.so -------------------------------------------------------------------------------- /Thirdparty/g2o/license-bsd.txt: -------------------------------------------------------------------------------- 1 | g2o - General Graph Optimization 2 | Copyright (C) 2011 Rainer Kuemmerle, Giorgio Grisetti, Hauke Strasdat, 3 | Kurt Konolige, and Wolfram Burgard 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are 8 | met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 17 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 19 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 22 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/Makefile: -------------------------------------------------------------------------------- 1 | SHELL = /bin/bash 2 | 3 | ifeq ($(VERBOSE), 1) 4 | QUIET= 5 | else 6 | QUIET=-s --no-print-directory 7 | endif 8 | 9 | all: build/Makefile 10 | @ $(MAKE) $(QUIET) -C build 11 | 12 | debug: build/Makefile 13 | @ $(MAKE) $(QUIET) -C build 14 | 15 | clean: build/Makefile 16 | @ $(MAKE) $(QUIET) -C build clean 17 | 18 | build/Makefile: 19 | @ echo "Running cmake to generate Makefile"; \ 20 | cd build; \ 21 | cmake ../; \ 22 | cd - 23 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/benchmarks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(benchmark_jacobian_timing jacobian_timing_tests.cpp) 2 | 3 | target_include_directories(benchmark_jacobian_timing PUBLIC 4 | "$" 5 | ) 6 | 7 | target_link_libraries(benchmark_jacobian_timing benchmark::benchmark ${G2O_EIGEN3_EIGEN_TARGET}) 8 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/cmake_modules/Config.cmake.in: -------------------------------------------------------------------------------- 1 | include(CMakeFindDependencyMacro) 2 | 3 | find_dependency(Eigen3) 4 | 5 | if (@G2O_HAVE_OPENGL@) 6 | find_dependency(OpenGL) 7 | endif() 8 | 9 | # Find spdlog if g2o was build with support for it 10 | if (@G2O_HAVE_LOGGING@) 11 | find_dependency(spdlog) 12 | endif() 13 | 14 | include("${CMAKE_CURRENT_LIST_DIR}/@G2O_TARGETS_EXPORT_NAME@.cmake") 15 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/cmake_modules/FindCSparse.cmake: -------------------------------------------------------------------------------- 1 | # Look for csparse; note the difference in the directory specifications! 2 | find_path(CSPARSE_INCLUDE_DIR NAMES cs.h 3 | PATHS 4 | /usr/include/suitesparse 5 | /usr/include 6 | /opt/local/include 7 | /usr/local/include 8 | /sw/include 9 | /usr/include/ufsparse 10 | /opt/local/include/ufsparse 11 | /usr/local/include/ufsparse 12 | /sw/include/ufsparse 13 | PATH_SUFFIXES 14 | suitesparse 15 | ) 16 | 17 | find_library(CSPARSE_LIBRARY NAMES cxsparse libcxsparse 18 | PATHS 19 | /usr/lib 20 | /usr/local/lib 21 | /opt/local/lib 22 | /sw/lib 23 | ) 24 | 25 | include(FindPackageHandleStandardArgs) 26 | find_package_handle_standard_args(CSparse DEFAULT_MSG 27 | CSPARSE_INCLUDE_DIR CSPARSE_LIBRARY) 28 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/cmake_modules/FindQGLViewer.cmake: -------------------------------------------------------------------------------- 1 | find_package(Qt5 COMPONENTS Core Xml OpenGL Gui Widgets QUIET) 2 | if(NOT Qt5_FOUND) 3 | message("Qt5 not found. Install it and set Qt5_DIR accordingly") 4 | if (WIN32) 5 | message(" In Windows, Qt5_DIR should be something like C:/Qt/5.4/msvc2013_64_opengl/lib/cmake/Qt5") 6 | endif() 7 | return() 8 | endif() 9 | 10 | find_path(QGLVIEWER_INCLUDE_DIR qglviewer.h 11 | /usr/include/QGLViewer 12 | /opt/local/include/QGLViewer 13 | /usr/local/include/QGLViewer 14 | /sw/include/QGLViewer 15 | ENV QGLVIEWERROOT 16 | ) 17 | 18 | find_library(QGLVIEWER_LIBRARY_RELEASE 19 | NAMES qglviewer QGLViewer qglviewer-qt5 QGLViewer-qt5 20 | PATHS /usr/lib 21 | /usr/local/lib 22 | /opt/local/lib 23 | /sw/lib 24 | ENV QGLVIEWERROOT 25 | ENV LD_LIBRARY_PATH 26 | ENV LIBRARY_PATH 27 | PATH_SUFFIXES QGLViewer QGLViewer/release 28 | ) 29 | find_library(QGLVIEWER_LIBRARY_DEBUG 30 | NAMES dqglviewer dQGLViewer dqglviewer-qt5 dQGLViewer-qt5 QGLViewerd2 31 | PATHS /usr/lib 32 | /usr/local/lib 33 | /opt/local/lib 34 | /sw/lib 35 | ENV QGLVIEWERROOT 36 | ENV LD_LIBRARY_PATH 37 | ENV LIBRARY_PATH 38 | PATH_SUFFIXES QGLViewer QGLViewer/debug 39 | ) 40 | 41 | if(QGLVIEWER_LIBRARY_RELEASE) 42 | if(QGLVIEWER_LIBRARY_DEBUG) 43 | set(QGLVIEWER_LIBRARY optimized ${QGLVIEWER_LIBRARY_RELEASE} debug ${QGLVIEWER_LIBRARY_DEBUG}) 44 | else() 45 | set(QGLVIEWER_LIBRARY ${QGLVIEWER_LIBRARY_RELEASE}) 46 | endif() 47 | endif() 48 | 49 | include(FindPackageHandleStandardArgs) 50 | find_package_handle_standard_args(QGLViewer DEFAULT_MSG 51 | QGLVIEWER_INCLUDE_DIR QGLVIEWER_LIBRARY) 52 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | range: 70..100 3 | round: down 4 | precision: 2 5 | status: 6 | project: 7 | default: 8 | threshold: 5% 9 | ignore: 10 | - "g2o/apps/" 11 | - "g2o/examples/" 12 | - "g2o/EXTERNAL/" 13 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/config.h: -------------------------------------------------------------------------------- 1 | #ifndef G2O_CONFIG_H 2 | #define G2O_CONFIG_H 3 | 4 | /* #undef G2O_OPENMP */ 5 | /* #undef G2O_SHARED_LIBS */ 6 | 7 | // give a warning if Eigen defaults to row-major matrices. 8 | // We internally assume column-major matrices throughout the code. 9 | #ifdef EIGEN_DEFAULT_TO_ROW_MAJOR 10 | # error "g2o requires column major Eigen matrices (see http://eigen.tuxfamily.org/bz/show_bug.cgi?id=422)" 11 | #endif 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/config.h.in: -------------------------------------------------------------------------------- 1 | #ifndef G2O_CONFIG_H 2 | #define G2O_CONFIG_H 3 | 4 | #cmakedefine G2O_HAVE_OPENGL 1 5 | #cmakedefine G2O_OPENGL_FOUND 1 6 | #cmakedefine G2O_OPENMP 1 7 | #cmakedefine G2O_SHARED_LIBS 1 8 | #cmakedefine G2O_LGPL_SHARED_LIBS 1 9 | 10 | // available sparse matrix libraries 11 | #cmakedefine G2O_HAVE_CHOLMOD 1 12 | #cmakedefine G2O_HAVE_CSPARSE 1 13 | 14 | // logging framework available 15 | #cmakedefine G2O_HAVE_LOGGING 16 | 17 | #cmakedefine G2O_NO_IMPLICIT_OWNERSHIP_OF_OBJECTS 18 | 19 | #ifdef G2O_NO_IMPLICIT_OWNERSHIP_OF_OBJECTS 20 | #define G2O_DELETE_IMPLICITLY_OWNED_OBJECTS 0 21 | #else 22 | #define G2O_DELETE_IMPLICITLY_OWNED_OBJECTS 1 23 | #endif 24 | 25 | #cmakedefine G2O_CXX_COMPILER "@G2O_CXX_COMPILER@" 26 | #cmakedefine G2O_SRC_DIR "@G2O_SRC_DIR@" 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/doc/.gitignore: -------------------------------------------------------------------------------- 1 | *.aux 2 | *.bbl 3 | *.blg 4 | *.dvi 5 | *.log 6 | *.pdf 7 | pics/*.pdf 8 | doxygen/html 9 | doxygen/YES 10 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/doc/Makefile: -------------------------------------------------------------------------------- 1 | all: g2o.pdf 2 | 3 | pics/%.svg: pics/%.fig 4 | fig2dev -L svg $< $@ 5 | pics/%.pdf: pics/%.fig 6 | fig2dev -L pdf $< $@ 7 | 8 | g2o.pdf: g2o.tex pics/classes.pdf pics/hgraph.pdf pics/slam.pdf 9 | pdflatex g2o.tex 10 | bibtex g2o 11 | pdflatex g2o.tex 12 | pdflatex g2o.tex 13 | 14 | clean: 15 | rm -rf pics/*.svg pics/*.pdf *.log 16 | .PHONY: clean 17 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/doc/doxygen/readme.txt: -------------------------------------------------------------------------------- 1 | run the following in the current folder 2 | 3 | doxygen doxy.config 4 | 5 | assumes that dot tool is installed and available from path 6 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/doc/license-bsd.txt: -------------------------------------------------------------------------------- 1 | g2o - General Graph Optimization 2 | Copyright (C) 2011 Rainer Kuemmerle, Giorgio Grisetti, Hauke Strasdat, 3 | Kurt Konolige, and Wolfram Burgard 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are 8 | met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 17 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 19 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 22 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/doc/pics/viewer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/Thirdparty/g2o_new/doc/pics/viewer.png -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/.gitignore: -------------------------------------------------------------------------------- 1 | playground 2 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(EXTERNAL) 2 | add_subdirectory(autodiff) 3 | add_subdirectory(stuff) 4 | add_subdirectory(core) 5 | 6 | if(G2O_BUILD_APPS) 7 | add_subdirectory(apps) 8 | endif(G2O_BUILD_APPS) 9 | 10 | # Pre-canned types 11 | add_subdirectory(types) 12 | 13 | # Solvers 14 | add_subdirectory(solvers) 15 | 16 | # Examples 17 | if(G2O_BUILD_EXAMPLES) 18 | add_subdirectory(examples) 19 | endif(G2O_BUILD_EXAMPLES) 20 | 21 | if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/playground") 22 | # Playground 23 | option (G2O_BUILD_PLAYGROUND "Build g2o playground" ON) 24 | if (G2O_BUILD_PLAYGROUND) 25 | message(STATUS "building playground") 26 | add_subdirectory(playground) 27 | endif() 28 | endif() 29 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/EXTERNAL/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (G2O_HAVE_OPENGL) 2 | add_subdirectory(freeglut) 3 | endif() 4 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/EXTERNAL/freeglut/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(freeglut_minimal ${G2O_LIB_TYPE} 2 | freeglut_font.cpp 3 | freeglut_stroke_mono_roman.cpp 4 | freeglut_stroke_roman.cpp 5 | ) 6 | 7 | target_link_libraries(freeglut_minimal PUBLIC ${G2O_OPENGL_TARGET}) 8 | target_include_directories(freeglut_minimal PUBLIC 9 | "$" 10 | $ 11 | ) 12 | target_compile_features(freeglut_minimal PUBLIC cxx_std_17) 13 | 14 | set_target_properties(freeglut_minimal PROPERTIES OUTPUT_NAME ${LIB_PREFIX}ext_freeglut_minimal) 15 | set_target_properties(freeglut_minimal PROPERTIES 16 | VERSION ${G2O_LIB_VERSION} 17 | SOVERSION ${G2O_LIB_SOVERSION}) 18 | if (APPLE) 19 | set_target_properties(freeglut_minimal PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 20 | endif() 21 | 22 | install(TARGETS freeglut_minimal 23 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 24 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 25 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 26 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 27 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 28 | ) 29 | 30 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 31 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/EXTERNAL/freeglut) 32 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/EXTERNAL/freeglut/COPYING: -------------------------------------------------------------------------------- 1 | 2 | Freeglut Copyright 3 | ------------------ 4 | 5 | Freeglut code without an explicit copyright is covered by the following 6 | copyright: 7 | 8 | Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies or substantial portions of the Software. 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 | PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 22 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 23 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | Except as contained in this notice, the name of Pawel W. Olszta shall not be 26 | used in advertising or otherwise to promote the sale, use or other dealings 27 | in this Software without prior written authorization from Pawel W. Olszta. 28 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(g2o_cli) 2 | 3 | if (G2O_BUILD_SLAM2D_TYPES AND G2O_BUILD_SLAM3D_TYPES) 4 | add_subdirectory(g2o_simulator) 5 | endif() 6 | 7 | if(QGLVIEWER_FOUND AND Qt5_FOUND AND G2O_HAVE_OPENGL) 8 | add_subdirectory(g2o_viewer) 9 | endif() 10 | 11 | if(G2O_BUILD_LINKED_APPS AND G2O_BUILD_SBA_TYPES AND G2O_BUILD_SCLAM2D_TYPES) 12 | add_subdirectory(linked_binaries) 13 | endif() 14 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/g2o_cli/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(g2o_cli_library ${G2O_LIB_TYPE} 2 | dl_wrapper.cpp dl_wrapper.h 3 | output_helper.cpp output_helper.h 4 | g2o_common.cpp g2o_common.h 5 | g2o_cli_api.h 6 | ) 7 | 8 | set_target_properties(g2o_cli_library PROPERTIES OUTPUT_NAME ${LIB_PREFIX}cli) 9 | set_target_properties(g2o_cli_library PROPERTIES 10 | VERSION ${G2O_LIB_VERSION} 11 | SOVERSION ${G2O_LIB_SOVERSION}) 12 | if (APPLE) 13 | set_target_properties(g2o_cli_library PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 14 | endif() 15 | 16 | set_property(TARGET g2o_cli_library APPEND PROPERTY COMPILE_DEFINITIONS G2O_DEFAULT_TYPES_DIR_="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" G2O_DEFAULT_SOLVERS_DIR_="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") 17 | 18 | target_link_libraries(g2o_cli_library core) 19 | if(UNIX) 20 | target_link_libraries(g2o_cli_library ${CMAKE_DL_LIBS}) 21 | endif(UNIX) 22 | 23 | add_executable(g2o_cli_application 24 | g2o.cpp) 25 | 26 | target_link_libraries(g2o_cli_application g2o_cli_library) 27 | 28 | set_target_properties(g2o_cli_application PROPERTIES OUTPUT_NAME g2o) 29 | 30 | install(TARGETS g2o_cli_library 31 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 32 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 33 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 34 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 35 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 36 | ) 37 | install(TARGETS g2o_cli_application 38 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 39 | ) 40 | 41 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 42 | 43 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/apps/g2o_cli) 44 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/g2o_simulator/pointsensorparameters.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 G. Grisetti, R. Kuemmerle, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "pointsensorparameters.h" 28 | 29 | #include "g2o/stuff/misc.h" // for M_PI 30 | 31 | // Robot2D 32 | namespace g2o { 33 | PointSensorParameters::PointSensorParameters() { 34 | _maxRange2 = 25; 35 | _minRange2 = 0.01; 36 | _fov = M_PI / 2; 37 | _maxAngularDifference = M_PI / 2; 38 | } 39 | } // namespace g2o 40 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/g2o_simulator/sensor_odometry3d.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 G. Grisetti, R. Kuemmerle, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_SENSOR_ODOMETRY3D_H_ 28 | #define G2O_SENSOR_ODOMETRY3D_H_ 29 | 30 | #include "g2o_simulator_api.h" 31 | #include "simulator3d_base.h" 32 | 33 | namespace g2o { 34 | 35 | class G2O_SIMULATOR_API SensorOdometry3D 36 | : public BinarySensor { 37 | public: 38 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 39 | SensorOdometry3D(const std::string& name_); 40 | virtual void sense(); 41 | void addNoise(EdgeType* e); 42 | }; 43 | 44 | } // namespace g2o 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/g2o_simulator/simulator2d.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 G. Grisetti, R. Kuemmerle, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_SIMULATOR2D_ 28 | #define G2O_SIMULATOR2D_ 29 | 30 | #include "sensor_odometry2d.h" 31 | #include "sensor_pointxy.h" 32 | #include "sensor_pointxy_bearing.h" 33 | #include "sensor_pointxy_offset.h" 34 | #include "sensor_pose2d.h" 35 | #include "sensor_segment2d.h" 36 | #include "sensor_segment2d_line.h" 37 | #include "sensor_segment2d_pointline.h" 38 | #include "simulator2d_base.h" 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/g2o_simulator/simulator2d_base.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 G. Grisetti, R. Kuemmerle, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_SIMULATOR2D_BASE_H_ 28 | #define G2O_SIMULATOR2D_BASE_H_ 29 | 30 | #include "g2o/types/slam2d/types_slam2d.h" 31 | #include "g2o/types/slam2d_addons/types_slam2d_addons.h" 32 | #include "simulator.h" 33 | 34 | namespace g2o { 35 | 36 | typedef WorldObject WorldObjectSE2; 37 | 38 | typedef WorldObject WorldObjectPointXY; 39 | 40 | typedef WorldObject WorldObjectSegment2D; 41 | 42 | typedef Robot Robot2D; 43 | 44 | } // namespace g2o 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/g2o_simulator/simulator3d.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 G. Grisetti, R. Kuemmerle, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_SIMULATOR3D_ 28 | #define G2O_SIMULATOR3D_ 29 | 30 | #include "sensor_odometry3d.h" 31 | #include "sensor_pointxyz.h" 32 | #include "sensor_pointxyz_depth.h" 33 | #include "sensor_pointxyz_disparity.h" 34 | #include "sensor_pose3d.h" 35 | #include "sensor_pose3d_offset.h" 36 | #include "sensor_se3_prior.h" 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/g2o_simulator/simulator3d_base.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 G. Grisetti, R. Kuemmerle, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_SIMULATOR3D_BASE_H_ 28 | #define G2O_SIMULATOR3D_BASE_H_ 29 | 30 | #include "g2o/types/slam3d/types_slam3d.h" 31 | #include "g2o/types/slam3d_addons/types_slam3d_addons.h" 32 | #include "simulator.h" 33 | 34 | namespace g2o { 35 | 36 | typedef WorldObject WorldObjectSE3; 37 | 38 | typedef WorldObject WorldObjectTrackXYZ; 39 | 40 | typedef WorldObject WorldObjectLine3D; 41 | 42 | typedef Robot Robot3D; 43 | 44 | } // namespace g2o 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/g2o_viewer/g2o_viewer.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // 4 | // This file is part of g2o. 5 | // 6 | // g2o is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // g2o is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with g2o. If not, see . 18 | 19 | #include 20 | 21 | #include "g2o/apps/g2o_cli/dl_wrapper.h" 22 | #include "g2o/apps/g2o_cli/g2o_common.h" 23 | #include "g2o/core/optimizable_graph.h" 24 | #include "g2o/stuff/command_args.h" 25 | #include "run_g2o_viewer.h" 26 | using namespace std; 27 | using namespace g2o; 28 | 29 | int main(int argc, char** argv) { 30 | OptimizableGraph::initMultiThreading(); 31 | QApplication qapp(argc, argv); 32 | 33 | CommandArgs arg; 34 | #ifndef G2O_DISABLE_DYNAMIC_LOADING_OF_LIBRARIES 35 | string dummy; 36 | arg.param("solverlib", dummy, "", 37 | "specify a solver library which will be loaded"); 38 | arg.param("typeslib", dummy, "", 39 | "specify a types library which will be loaded"); 40 | // loading the standard solver / types 41 | DlWrapper dlTypesWrapper; 42 | loadStandardTypes(dlTypesWrapper, argc, argv); 43 | // register all the solvers 44 | DlWrapper dlSolverWrapper; 45 | loadStandardSolver(dlSolverWrapper, argc, argv); 46 | #endif 47 | 48 | // run the viewer 49 | return RunG2OViewer::run(argc, argv, arg); 50 | } 51 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/g2o_viewer/g2o_viewer_api.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, H. Strasdat, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_VIEWER_API_H 28 | #define G2O_VIEWER_API_H 29 | 30 | #include "g2o/config.h" 31 | 32 | #ifdef _MSC_VER 33 | // We are using a Microsoft compiler: 34 | 35 | #ifdef G2O_SHARED_LIBS 36 | #ifdef viewer_library_EXPORTS 37 | #define G2O_VIEWER_API __declspec(dllexport) 38 | #else 39 | #define G2O_VIEWER_API __declspec(dllimport) 40 | #endif 41 | #else 42 | #define G2O_VIEWER_API 43 | #endif 44 | 45 | #else 46 | // Not Microsoft compiler so set empty definition: 47 | #define G2O_VIEWER_API 48 | #endif 49 | 50 | #endif // G2O_STUFF_API_H 51 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/g2o_viewer/gui_hyper_graph_action.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // 4 | // This file is part of g2o. 5 | // 6 | // g2o is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // g2o is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with g2o. If not, see . 18 | 19 | #ifndef G2O_GUI_HYPER_GRAPH_ACTION_H 20 | #define G2O_GUI_HYPER_GRAPH_ACTION_H 21 | 22 | #include "g2o/core/hyper_graph_action.h" 23 | #include "g2o_viewer_api.h" 24 | 25 | namespace g2o { 26 | 27 | class G2oQGLViewer; 28 | 29 | /** 30 | * \brief action which calls an GUI update after each iteration 31 | */ 32 | class G2O_VIEWER_API GuiHyperGraphAction : public HyperGraphAction { 33 | public: 34 | GuiHyperGraphAction(); 35 | ~GuiHyperGraphAction(); 36 | 37 | /** 38 | * calling updateGL, processEvents to visualize the current state after each 39 | * iteration 40 | */ 41 | HyperGraphAction* operator()(const HyperGraph* graph, 42 | Parameters* parameters = 0); 43 | 44 | G2oQGLViewer* viewer; ///< the viewer which visualizes the graph 45 | bool dumpScreenshots; 46 | }; 47 | 48 | } // namespace g2o 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/g2o_viewer/properties_widget.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // 4 | // This file is part of g2o. 5 | // 6 | // g2o is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // g2o is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with g2o. If not, see . 18 | 19 | #ifndef G2O_PROPERTIES_WINDOW_H 20 | #define G2O_PROPERTIES_WINDOW_H 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | #include "g2o_viewer_api.h" 27 | #include "ui_base_properties_widget.h" 28 | 29 | namespace g2o { 30 | class G2oQGLViewer; 31 | class PropertyMap; 32 | } // namespace g2o 33 | 34 | class G2O_VIEWER_API PropertiesWidget : public QDialog, 35 | public Ui::BasePropertiesWidget { 36 | Q_OBJECT 37 | public: 38 | PropertiesWidget(QWidget* parent = 0); 39 | virtual ~PropertiesWidget(); 40 | 41 | void setProperties(g2o::PropertyMap* properties); 42 | 43 | public slots: 44 | void on_btnApply_clicked(); 45 | void on_btnOK_clicked(); 46 | 47 | protected: 48 | std::vector _propNames; 49 | g2o::PropertyMap* _properties; 50 | 51 | virtual void updateDisplayedProperties(); 52 | virtual void applyProperties(); 53 | virtual std::string humanReadablePropName( 54 | const std::string& propertyName) const; 55 | }; 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/g2o_viewer/run_g2o_viewer.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef RUN_G2O_VIEWER_H 28 | #define RUN_G2O_VIEWER_H 29 | 30 | #include "g2o_viewer_api.h" 31 | 32 | namespace g2o { 33 | 34 | class CommandArgs; 35 | 36 | /** 37 | * \brief wrapper for running the g2o viewer 38 | */ 39 | class G2O_VIEWER_API RunG2OViewer { 40 | public: 41 | static int run(int argc, char** argv, CommandArgs& arg); 42 | }; 43 | 44 | } // namespace g2o 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/apps/g2o_viewer/viewer_properties_widget.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // 4 | // This file is part of g2o. 5 | // 6 | // g2o is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // g2o is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with g2o. If not, see . 18 | 19 | #ifndef G2O_VIEWER_PROPERTIES_WIDGET_H 20 | #define G2O_VIEWER_PROPERTIES_WIDGET_H 21 | 22 | #include "g2o_viewer_api.h" 23 | #include "properties_widget.h" 24 | 25 | namespace g2o { 26 | class G2oQGLViewer; 27 | } 28 | 29 | class G2O_VIEWER_API ViewerPropertiesWidget : public PropertiesWidget { 30 | public: 31 | ViewerPropertiesWidget(QWidget* parent = 0); 32 | virtual ~ViewerPropertiesWidget(); 33 | 34 | void setViewer(g2o::G2oQGLViewer* viewer); 35 | 36 | protected: 37 | g2o::G2oQGLViewer* _viewer; 38 | 39 | virtual void applyProperties(); 40 | virtual std::string humanReadablePropName(const std::string& probName) const; 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/autodiff/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(g2o_ceres_ad INTERFACE) 2 | 3 | install(TARGETS g2o_ceres_ad 4 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 5 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 6 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 7 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 8 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 9 | ) 10 | 11 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 12 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/autodiff) 13 | install(FILES LICENSE DESTINATION ${INCLUDES_INSTALL_DIR}/autodiff) 14 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/autodiff/LICENSE: -------------------------------------------------------------------------------- 1 | Ceres Solver - A fast non-linear least squares minimizer 2 | Copyright 2015 Google Inc. All rights reserved. 3 | http://ceres-solver.org/ 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | * Neither the name of Google Inc. nor the names of its contributors may be 14 | used to endorse or promote products derived from this software without 15 | specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/autodiff/reenable_warnings.h: -------------------------------------------------------------------------------- 1 | // Ceres Solver - A fast non-linear least squares minimizer 2 | // Copyright 2015 Google Inc. All rights reserved. 3 | // http://ceres-solver.org/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // 8 | // * Redistributions of source code must retain the above copyright notice, 9 | // this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright notice, 11 | // this list of conditions and the following disclaimer in the documentation 12 | // and/or other materials provided with the distribution. 13 | // * Neither the name of Google Inc. nor the names of its contributors may be 14 | // used to endorse or promote products derived from this software without 15 | // specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | // POSSIBILITY OF SUCH DAMAGE. 28 | // 29 | 30 | // This is not your usual header guard. See disable_warnings.h 31 | #ifdef G2O_CERES_WARNINGS_DISABLED 32 | #undef G2O_CERES_WARNINGS_DISABLED 33 | 34 | #ifdef _MSC_VER 35 | #pragma warning(pop) 36 | #endif 37 | 38 | #endif // G2O_CERES_WARNINGS_DISABLED 39 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/core/base_multi_edge.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, H. Strasdat, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_BASE_MULTI_EDGE_H 28 | #define G2O_BASE_MULTI_EDGE_H 29 | 30 | #include "base_variable_sized_edge.h" 31 | 32 | namespace g2o { 33 | 34 | template 35 | using BaseMultiEdge = BaseVariableSizedEdge; 36 | 37 | } // end namespace g2o 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/core/dynamic_aligned_buffer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "Eigen/Core" 6 | 7 | namespace g2o { 8 | // 16 byte aligned allocation functions 9 | template 10 | Type* allocate_aligned(size_t n) { 11 | return (Type*)Eigen::internal::aligned_malloc(n * sizeof(Type)); 12 | } 13 | 14 | template 15 | Type* reallocate_aligned(Type* ptr, size_t newSize, size_t oldSize) { 16 | return (Type*)Eigen::internal::aligned_realloc(ptr, newSize * sizeof(Type), 17 | oldSize * sizeof(Type)); 18 | } 19 | 20 | template 21 | void free_aligned(Type* block) { 22 | Eigen::internal::aligned_free(block); 23 | } 24 | 25 | template 26 | struct dynamic_aligned_buffer { 27 | explicit dynamic_aligned_buffer(size_t size) : m_size{0}, m_ptr{nullptr} { 28 | allocate(size); 29 | } 30 | 31 | ~dynamic_aligned_buffer() { free(); } 32 | 33 | Type* request(size_t n) { 34 | if (n <= m_size) return m_ptr; 35 | 36 | m_ptr = reallocate_aligned(m_ptr, n, m_size); 37 | m_size = m_ptr ? n : 0; 38 | 39 | return m_ptr; 40 | } 41 | 42 | private: 43 | void allocate(size_t size) { 44 | m_ptr = allocate_aligned(size); 45 | if (m_ptr != nullptr) m_size = size; 46 | } 47 | 48 | void free() { 49 | if (m_ptr != nullptr) { 50 | free_aligned(m_ptr); 51 | m_size = 0; 52 | m_ptr = nullptr; 53 | } 54 | } 55 | 56 | std::size_t m_size; 57 | Type* m_ptr; 58 | }; 59 | 60 | template 61 | struct aligned_deleter { 62 | void operator()(T* block) { free_aligned(block); } 63 | }; 64 | } // namespace g2o 65 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/core/g2o_core_api.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Description: import/export macros for creating DLLS with Microsoft 3 | * compiler. Any exported function needs to be declared with the 4 | * appropriate G2O_XXXX_API macro. Also, there must be separate macros 5 | * for each DLL (arrrrrgh!!!) 6 | * 7 | * 17 Jan 2012 8 | * Email: pupilli@cs.bris.ac.uk 9 | ****************************************************************************/ 10 | #ifndef G2O_CORE_API_H 11 | #define G2O_CORE_API_H 12 | 13 | #include "g2o/config.h" 14 | 15 | #ifdef _MSC_VER 16 | // We are using a Microsoft compiler: 17 | #ifdef G2O_SHARED_LIBS 18 | #ifdef core_EXPORTS 19 | #define G2O_CORE_API __declspec(dllexport) 20 | #else 21 | #define G2O_CORE_API __declspec(dllimport) 22 | #endif 23 | #else 24 | #define G2O_CORE_API 25 | #endif 26 | 27 | #else 28 | // Not Microsoft compiler so set empty definition: 29 | #define G2O_CORE_API 30 | #endif 31 | 32 | #endif // G2O_CORE_API_H 33 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/core/ownership.h: -------------------------------------------------------------------------------- 1 | #ifndef G2O_OWNERSHIP_H 2 | #define G2O_OWNERSHIP_H 3 | 4 | #include 5 | 6 | namespace g2o { 7 | template 8 | void release(T* obj) { 9 | (void)obj; 10 | #if G2O_DELETE_IMPLICITLY_OWNED_OBJECTS 11 | delete obj; 12 | #endif 13 | } 14 | } // namespace g2o 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/core/parameter.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "parameter.h" 28 | 29 | namespace g2o { 30 | 31 | Parameter::Parameter() : _id(-1) {} 32 | 33 | void Parameter::setId(int id_) { _id = id_; } 34 | 35 | } // namespace g2o 36 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/core/robust_kernel.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "robust_kernel.h" 28 | 29 | namespace g2o { 30 | 31 | RobustKernel::RobustKernel() : _delta(1.) {} 32 | 33 | RobustKernel::RobustKernel(double delta) : _delta(delta) {} 34 | 35 | void RobustKernel::setDelta(double delta) { _delta = delta; } 36 | 37 | } // end namespace g2o 38 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Self-contained examples which declare their own types 2 | add_subdirectory(data_fitting) 3 | add_subdirectory(dynamic_vertex) 4 | add_subdirectory(bal) 5 | add_subdirectory(logging) 6 | add_subdirectory(target) 7 | add_subdirectory(tutorial_slam2d) 8 | 9 | # 2D SLAM examples 10 | 11 | if(G2O_BUILD_SCLAM2D_TYPES AND G2O_BUILD_DATA_TYPES) 12 | add_subdirectory(calibration_odom_laser) 13 | endif() 14 | 15 | # 3D examples 16 | if(G2O_BUILD_SBA_TYPES) 17 | add_subdirectory(ba) 18 | add_subdirectory(ba_anchored_inverse_depth) 19 | add_subdirectory(data_convert) 20 | endif() 21 | 22 | if (G2O_BUILD_ICP_TYPES) 23 | add_subdirectory(icp) 24 | add_subdirectory(sba) 25 | endif() 26 | 27 | if (G2O_BUILD_SLAM3D_ADDON_TYPES) 28 | add_subdirectory(line_slam) 29 | add_subdirectory(plane_slam) 30 | endif() 31 | 32 | if (G2O_BUILD_SIM3_TYPES) 33 | add_subdirectory(sim3) 34 | endif() 35 | 36 | # slam 3d 37 | if (G2O_BUILD_SLAM3D_TYPES) 38 | add_subdirectory(sphere) 39 | endif() 40 | 41 | if(G2O_BUILD_SLAM2D_TYPES AND G2O_BUILD_SLAM3D_TYPES) 42 | add_subdirectory(anonymize_observations) 43 | add_subdirectory(interactive_slam) 44 | add_subdirectory(simple_optimize) 45 | endif() 46 | 47 | if(G2O_BUILD_SLAM2D_TYPES AND G2O_BUILD_SLAM2D_ADDON_TYPES AND G2O_BUILD_SLAM3D_TYPES) 48 | add_subdirectory(convert_segment_line) 49 | endif() 50 | 51 | if(Qt5_FOUND AND QGLVIEWER_FOUND AND G2O_HAVE_OPENGL) 52 | add_subdirectory(slam2d) 53 | endif() 54 | 55 | # complex example of hierarchical optimization 56 | if (G2O_BUILD_SLAM3D_TYPES) 57 | add_subdirectory(g2o_hierarchical) 58 | endif() 59 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/anonymize_observations/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(g2o_anonymize_observations_application 2 | g2o_anonymize_observations.cpp 3 | ) 4 | target_link_libraries(g2o_anonymize_observations_application types_slam3d types_slam2d core) 5 | set_target_properties(g2o_anonymize_observations_application PROPERTIES OUTPUT_NAME g2o_anonymize_observations) 6 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/ba/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(ba_demo 2 | ba_demo.cpp 3 | ) 4 | 5 | target_link_libraries(ba_demo core types_sba solver_dense) 6 | if(CHOLMOD_FOUND) 7 | target_link_libraries(ba_demo solver_cholmod) 8 | else() 9 | target_link_libraries(ba_demo solver_eigen) 10 | endif() 11 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/ba_anchored_inverse_depth/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(ba_anchored_inverse_depth_demo 2 | ba_anchored_inverse_depth_demo.cpp 3 | ) 4 | 5 | target_link_libraries(ba_anchored_inverse_depth_demo core types_sba) 6 | if(CHOLMOD_FOUND) 7 | target_link_libraries(ba_anchored_inverse_depth_demo solver_cholmod) 8 | else() 9 | target_link_libraries(ba_anchored_inverse_depth_demo solver_eigen) 10 | endif() 11 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/bal/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(bal_example bal_example.cpp) 2 | 3 | if(CHOLMOD_FOUND) 4 | target_link_libraries(bal_example solver_cholmod) 5 | else() 6 | target_link_libraries(bal_example solver_eigen) 7 | endif() 8 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/calibration_odom_laser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(calibration_odom_laser_library ${G2O_LIB_TYPE} 2 | gm2dl_io.cpp gm2dl_io.h 3 | sclam_helpers.cpp sclam_helpers.h 4 | motion_information.h 5 | edge_se2_pure_calib.cpp edge_se2_pure_calib.h 6 | closed_form_calibration.cpp closed_form_calibration.h 7 | g2o_calibration_odom_laser_api.h 8 | ) 9 | set_target_properties(calibration_odom_laser_library PROPERTIES OUTPUT_NAME ${LIB_PREFIX}calibration_odom_laser) 10 | set_target_properties(calibration_odom_laser_library PROPERTIES 11 | VERSION ${G2O_LIB_VERSION} 12 | SOVERSION ${G2O_LIB_SOVERSION}) 13 | target_link_libraries(calibration_odom_laser_library core solver_eigen types_sclam2d types_data) 14 | 15 | add_executable(sclam_odom_laser 16 | sclam_odom_laser.cpp 17 | ) 18 | set_target_properties(sclam_odom_laser PROPERTIES OUTPUT_NAME sclam_odom_laser) 19 | target_link_libraries(sclam_odom_laser calibration_odom_laser_library) 20 | 21 | add_executable(sclam_pure_calibration 22 | sclam_pure_calibration.cpp 23 | ) 24 | set_target_properties(sclam_pure_calibration PROPERTIES OUTPUT_NAME sclam_pure_calibration) 25 | target_link_libraries(sclam_pure_calibration calibration_odom_laser_library) 26 | 27 | add_executable(sclam_laser_calib 28 | sclam_laser_calib.cpp 29 | ) 30 | set_target_properties(sclam_laser_calib PROPERTIES OUTPUT_NAME sclam_laser_calib) 31 | target_link_libraries(sclam_laser_calib calibration_odom_laser_library) 32 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/calibration_odom_laser/motion_information.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G.Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_MOTION_INFORMATION_H 28 | #define G2O_MOTION_INFORMATION_H 29 | 30 | #include 31 | 32 | #include "g2o/types/slam2d/se2.h" 33 | #include "g2o_calibration_odom_laser_api.h" 34 | 35 | namespace g2o { 36 | 37 | struct G2O_CALIBRATION_ODOM_LASER_API MotionInformation { 38 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW; 39 | SE2 laserMotion; 40 | SE2 odomMotion; 41 | double timeInterval; 42 | }; 43 | 44 | using MotionInformationVector = std::vector; 45 | 46 | } // namespace g2o 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/calibration_odom_laser/sclam_helpers.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G.Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_SCLAM_HELPERS_H 28 | #define G2O_SCLAM_HELPERS_H 29 | 30 | #include "g2o_calibration_odom_laser_api.h" 31 | 32 | namespace g2o { 33 | 34 | class SparseOptimizer; 35 | class DataQueue; 36 | 37 | G2O_CALIBRATION_ODOM_LASER_API void addOdometryCalibLinksDifferential( 38 | SparseOptimizer& optimizer, const DataQueue& odomData); 39 | 40 | G2O_CALIBRATION_ODOM_LASER_API void allocateSolverForSclam( 41 | SparseOptimizer& optimizer, bool levenberg = false); 42 | 43 | } // namespace g2o 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/convert_segment_line/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(convertSegmentLine_application convertSegmentLine.cpp) 2 | target_link_libraries(convertSegmentLine_application types_slam2d_addons types_slam3d types_slam2d core stuff) 3 | set_target_properties(convertSegmentLine_application PROPERTIES OUTPUT_NAME convertSegmentLine) 4 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/data_convert/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(convert_sba_slam3d 2 | convert_sba_slam3d.cpp 3 | ) 4 | set_target_properties(convert_sba_slam3d PROPERTIES OUTPUT_NAME convert_sba_slam3d) 5 | target_link_libraries(convert_sba_slam3d core types_slam3d types_sba) 6 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/data_fitting/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(circle_fit circle_fit.cpp) 2 | set_target_properties(circle_fit PROPERTIES OUTPUT_NAME circle_fit) 3 | target_link_libraries(circle_fit core solver_dense) 4 | 5 | add_executable(curve_fit curve_fit.cpp) 6 | set_target_properties(curve_fit PROPERTIES OUTPUT_NAME curve_fit) 7 | target_link_libraries(curve_fit core solver_dense) 8 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/dynamic_vertex/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(polynomial_fit polynomial_fit.cpp) 2 | set_target_properties(polynomial_fit PROPERTIES OUTPUT_NAME polynomial_fit) 3 | target_link_libraries(polynomial_fit core solver_eigen) 4 | 5 | add_executable(static_dynamic_function_fit static_dynamic_function_fit.cpp) 6 | set_target_properties(static_dynamic_function_fit PROPERTIES OUTPUT_NAME static_dynamic_function_fit) 7 | target_link_libraries(static_dynamic_function_fit core solver_eigen) 8 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/g2o_hierarchical/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(g2o_hierarchical_library ${G2O_LIB_TYPE} 2 | edge_labeler.cpp 3 | edge_creator.cpp 4 | star.cpp 5 | edge_types_cost_function.cpp 6 | backbone_tree_action.cpp 7 | simple_star_ops.cpp 8 | edge_labeler.h 9 | edge_creator.h 10 | star.h 11 | edge_types_cost_function.h 12 | backbone_tree_action.h 13 | simple_star_ops.h 14 | g2o_hierarchical_api.h 15 | ) 16 | 17 | 18 | set_target_properties(g2o_hierarchical_library PROPERTIES OUTPUT_NAME ${LIB_PREFIX}hierarchical) 19 | set_target_properties(g2o_hierarchical_library PROPERTIES 20 | VERSION ${G2O_LIB_VERSION} 21 | SOVERSION ${G2O_LIB_SOVERSION}) 22 | if (APPLE) 23 | set_target_properties(g2o_hierarchical_library PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 24 | endif() 25 | 26 | target_link_libraries(g2o_hierarchical_library core) 27 | 28 | add_executable(g2o_hierarchical_application 29 | g2o_hierarchical.cpp) 30 | 31 | target_link_libraries(g2o_hierarchical_application g2o_hierarchical_library g2o_cli_library types_slam3d ) #types_slam3d_new 32 | 33 | set_target_properties(g2o_hierarchical_application PROPERTIES OUTPUT_NAME g2o_hierarchical) 34 | 35 | install(TARGETS g2o_hierarchical_library 36 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 37 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 38 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 39 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 40 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 41 | ) 42 | 43 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 44 | install(FILES 45 | ${headers} 46 | DESTINATION ${INCLUDES_INSTALL_DIR}/apps/g2o_hierarchical) 47 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/icp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(gicp_demo 2 | gicp_demo.cpp 3 | ) 4 | 5 | add_executable(gicp_sba_demo 6 | gicp_sba_demo.cpp 7 | ) 8 | 9 | set_target_properties(gicp_sba_demo PROPERTIES OUTPUT_NAME gicp_sba_demo) 10 | 11 | target_link_libraries(gicp_demo core types_sba types_slam3d types_icp ${OPENGL_LIBRARIES} solver_eigen) 12 | target_link_libraries(gicp_sba_demo core types_sba types_slam3d types_icp ${OPENGL_LIBRARIES} solver_eigen) 13 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/icp/gicp-test1.dat: -------------------------------------------------------------------------------- 1 | # Simple GICP example 2 | # 3 | # Vertices at origin, second one is rotated 4 | VERTEX_SE3:QUAT 0 0 0 0 0 0 0 1 5 | VERTEX_SE3:QUAT 1 0 0 0 0.5 0 0 0.5 6 | # 7 | # Edges displaced by 1m on Z axis 8 | EDGE_V_V_GICP 1 0 0 0 1 0 0 1 0 0 2 0 0 1 9 | EDGE_V_V_GICP 1 0 0 1 1 0 0 1 0 1 2 0 0 1 10 | EDGE_V_V_GICP 1 0 1 0 1 0 0 1 1 0 2 0 0 1 11 | EDGE_V_V_GICP 1 0 1 1 1 0 0 1 1 1 2 0 0 1 12 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(slam_parser) 2 | 3 | if(CHOLMOD_FOUND) 4 | add_subdirectory(g2o_interactive) 5 | add_subdirectory(g2o_incremental) 6 | endif(CHOLMOD_FOUND) 7 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/README.txt: -------------------------------------------------------------------------------- 1 | This directory implements an interface to g2o which reads the input data 2 | via stdin and outputs upon request the current estimate to stdout. 3 | 4 | In particular, the interface follows the grammar proposed for the RSS'11 5 | workshop "Automated SLAM Evaluation", see 6 | http://slameval.willowgarage.com/workshop/submissions/ 7 | 8 | Brief description: 9 | - slam_parser (LGPL v3) 10 | The parser for the SLAM protocol 11 | - g2o_interactive (LGPL v3) 12 | Run batch optimization every N nodes 13 | - g2o_incremental (GPL v3) 14 | Incrementally solve the optimzation, batch every 100 nodes 15 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/g2o_incremental/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(g2o_incremental_library ${G2O_LIB_TYPE} 2 | graph_optimizer_sparse_incremental.cpp graph_optimizer_sparse_incremental.h 3 | ) 4 | 5 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../) 6 | 7 | set_target_properties(g2o_incremental_library PROPERTIES OUTPUT_NAME ${LIB_PREFIX}incremental) 8 | set_target_properties(g2o_incremental_library PROPERTIES 9 | VERSION ${G2O_LIB_VERSION} 10 | SOVERSION ${G2O_LIB_SOVERSION}) 11 | target_link_libraries(g2o_incremental_library g2o_interactive_library solver_cholmod ${CAMD_LIBRARY} SuiteSparse::CHOLMOD) 12 | 13 | add_executable(g2o_incremental_application g2o_incremental.cpp) 14 | target_link_libraries(g2o_incremental_application g2o_incremental_library) 15 | set_target_properties(g2o_incremental_application PROPERTIES OUTPUT_NAME g2o_incremental) 16 | 17 | install(TARGETS g2o_incremental_library g2o_incremental_application 18 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 19 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 20 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 21 | ) 22 | 23 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 24 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/examples/interactive_slam/g2o_incremental) 25 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/g2o_incremental/README.txt: -------------------------------------------------------------------------------- 1 | g2o_incremental implements a variant of the iSAM algorithm. 2 | In contrast to iSAM the update of the Cholesky factor is done 3 | using rank updates as provided via the CHOLMOD library. 4 | 5 | “iSAM: Incremental Smoothing and Mapping” 6 | by M. Kaess, A. Ranganathan, and F. Dellaert. 7 | IEEE Trans. on Robotics, vol. 24, no. 6, Dec. 2008, pp. 1365-1378 8 | 9 | Furthermore, it implements a simple protocol to control the operation of the 10 | algorithm. See protocol.txt for more details or 11 | http://slameval.willowgarage.com/workshop/submissions/ for an evaluation system 12 | as well as data sets. 13 | 14 | In the standard configuration g2o_incremental solves after inserting 10 nodes. 15 | This behavior can be modified via a command line option. Furthermore, by 16 | specifying -g on the command line a gnuplot instance is created to visualize 17 | the graph. 18 | 19 | Please note that both the visualization via Gnuplot and the verbose output 20 | affect the timing results. 21 | 22 | g2o_incremental is licensed under GPLv3. 23 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/g2o_interactive/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(g2o_interactive_library ${G2O_LIB_TYPE} 2 | g2o_slam_interface.cpp g2o_slam_interface.h 3 | graph_optimizer_sparse_online.cpp graph_optimizer_sparse_online.h 4 | types_online.cpp 5 | ) 6 | 7 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../) 8 | 9 | set_target_properties(g2o_interactive_library PROPERTIES OUTPUT_NAME ${LIB_PREFIX}interactive) 10 | set_target_properties(g2o_interactive_library PROPERTIES 11 | VERSION ${G2O_LIB_VERSION} 12 | SOVERSION ${G2O_LIB_SOVERSION}) 13 | target_link_libraries(g2o_interactive_library core types_slam2d types_slam3d solver_cholmod parser_library interface_library) 14 | 15 | add_executable(g2o_online_application g2o_online.cpp) 16 | target_link_libraries(g2o_online_application g2o_interactive_library) 17 | set_target_properties(g2o_online_application PROPERTIES OUTPUT_NAME g2o_online) 18 | 19 | #add_executable(generate_commands_application generate_commands.cpp) 20 | #target_link_libraries(generate_commands_application g2o_interactive_library) 21 | #set_target_properties(generate_commands_application PROPERTIES OUTPUT_NAME generate_commands) 22 | 23 | install(TARGETS g2o_interactive_library g2o_online_application 24 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 25 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 26 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 27 | ) 28 | 29 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 30 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/examples/interactive_slam/g2o_interactive) 31 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/g2o_interactive/types_online.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "g2o/core/factory.h" 28 | #include "types_slam2d_online.h" 29 | #include "types_slam3d_online.h" 30 | 31 | namespace g2o { 32 | 33 | G2O_REGISTER_TYPE_GROUP(online); 34 | 35 | G2O_REGISTER_TYPE_NAME("ONLINE_EDGE_SE2", OnlineEdgeSE2); 36 | G2O_REGISTER_TYPE_NAME("ONLINE_VERTEX_SE2", OnlineVertexSE2); 37 | 38 | G2O_REGISTER_TYPE_NAME("ONLINE_VERTEX_SE3:QUAT", OnlineVertexSE3); 39 | G2O_REGISTER_TYPE_NAME("ONLINE_EDGE_SE3:QUAT", OnlineEdgeSE3); 40 | 41 | } // namespace g2o 42 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/slam_parser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(parser) 2 | add_subdirectory(interface) 3 | #add_subdirectory(example) 4 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/slam_parser/example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(example_library ${G2O_LIB_TYPE} 2 | example_slam_interface.cpp 3 | example_slam_interface.h 4 | ) 5 | 6 | set_target_properties(example_library PROPERTIES OUTPUT_NAME ${LIB_PREFIX}example) 7 | 8 | target_link_libraries(example_library parser_library interface_library) 9 | 10 | add_executable(test_slam_interface test_slam_interface.cpp) 11 | target_link_libraries(test_slam_interface example_library) 12 | set_target_properties(test_slam_interface PROPERTIES OUTPUT_NAME test_slam_interface) 13 | 14 | #install(TARGETS example_library 15 | #RUNTIME DESTINATION ${RUNTIME_DESTINATION} 16 | #LIBRARY DESTINATION ${LIBRARY_DESTINATION} 17 | #ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 18 | #) 19 | 20 | #file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") 21 | #install(FILES ${headers} DESTINATION include/slam_parser/example) 22 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/slam_parser/example/test_slam_interface.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include 28 | 29 | #include "example_slam_interface.h" 30 | #include "slam_parser/interface/parser_interface.h" 31 | using namespace std; 32 | 33 | int main() { 34 | ExampleSlamInterface slamInterface; 35 | SlamParser::ParserInterface parserInterface(&slamInterface); 36 | 37 | while (parserInterface.parseCommand(cin)) { 38 | // do something additional if needed 39 | } 40 | 41 | return 0; 42 | } 43 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/slam_parser/interface/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(interface_library_src 2 | abstract_slam_interface.h 3 | parser_interface.cpp 4 | parser_interface.h 5 | slam_context_interface.cpp 6 | slam_context_interface.h 7 | ) 8 | 9 | if (MSVC) 10 | add_library(interface_library STATIC 11 | ${interface_library_src} 12 | ) 13 | else() 14 | add_library(interface_library ${G2O_LIB_TYPE} 15 | ${interface_library_src} 16 | ) 17 | endif() 18 | 19 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../) 20 | 21 | set_target_properties(interface_library PROPERTIES OUTPUT_NAME ${LIB_PREFIX}interface) 22 | set_target_properties(interface_library PROPERTIES 23 | VERSION ${G2O_LIB_VERSION} 24 | SOVERSION ${G2O_LIB_SOVERSION}) 25 | target_link_libraries(interface_library parser_library) 26 | 27 | install(TARGETS interface_library 28 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 29 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 30 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 31 | ) 32 | 33 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") 34 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/examples/interactive_slam/slam_parser/interface) 35 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/slam_parser/parser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(G2O_PARSER_SRC 2 | slam_context.h slam_context.cpp 3 | bison_parser.cpp bison_parser.h 4 | commands.h 5 | driver.h driver.cpp 6 | location.hh 7 | position.hh 8 | scanner.h flex_scanner.cpp 9 | ) 10 | 11 | if (MSVC) 12 | add_library(parser_library STATIC 13 | ${G2O_PARSER_SRC} 14 | ) 15 | else() 16 | add_library(parser_library ${G2O_LIB_TYPE} 17 | ${G2O_PARSER_SRC} 18 | ) 19 | endif() 20 | 21 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 22 | 23 | target_compile_features(parser_library PUBLIC cxx_std_17) 24 | set_target_properties(parser_library PROPERTIES OUTPUT_NAME ${LIB_PREFIX}parser) 25 | set_target_properties(parser_library PROPERTIES 26 | VERSION ${G2O_LIB_VERSION} 27 | SOVERSION ${G2O_LIB_SOVERSION}) 28 | 29 | #add_executable(test_slam_parser test_slam_parser.cpp) 30 | #target_link_libraries(test_slam_parser parser_library) 31 | #set_target_properties(test_slam_parser PROPERTIES OUTPUT_NAME test_slam_parser) 32 | 33 | install(TARGETS parser_library 34 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 35 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 36 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 37 | ) 38 | 39 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hh") 40 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/examples/interactive_slam/slam_parser/parser) 41 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/slam_parser/parser/grammar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # wrapper script to generate the parser by flex / bison 4 | # Copyright (C) 2011 R. Kuemmerle, G. Grisetti, H. Strasdat, W. Burgard 5 | 6 | flex -o flex_scanner.cpp -i scanner.l 7 | 8 | cp /usr/include/FlexLexer.h . 9 | 10 | bison -o bison_parser.cpp --defines=bison_parser.h parser.yy 11 | 12 | for f in *.cpp; do 13 | clang-format -i "$f" 14 | done 15 | 16 | for f in *.h; do 17 | clang-format -i "$f" 18 | done 19 | 20 | for f in *.hh; do 21 | clang-format -i "$f" 22 | done 23 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/slam_parser/parser/position.hh: -------------------------------------------------------------------------------- 1 | // A Bison parser, made by GNU Bison 3.8.2. 2 | 3 | // Starting with Bison 3.2, this file is useless: the structure it 4 | // used to define is now defined in "location.hh". 5 | // 6 | // To get rid of this file: 7 | // 1. add '%require "3.2"' (or newer) to your grammar file 8 | // 2. remove references to this file from your build system 9 | // 3. if you used to include it, include "location.hh" instead. 10 | 11 | #include "location.hh" 12 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/slam_parser/parser/scanner.h: -------------------------------------------------------------------------------- 1 | #ifndef SCANNER_H 2 | #define SCANNER_H 3 | 4 | #ifndef YY_DECL 5 | 6 | #define YY_DECL \ 7 | SlamParser::Parser::token_type SlamParser::Scanner::lex( \ 8 | SlamParser::Parser::semantic_type* yylval, \ 9 | SlamParser::Parser::location_type* yylloc) 10 | #endif 11 | 12 | #ifndef __FLEX_LEXER_H 13 | #define yyFlexLexer SlamFlexLexer 14 | #include "FlexLexer.h" 15 | #undef yyFlexLexer 16 | #endif 17 | 18 | #include "bison_parser.h" 19 | 20 | namespace SlamParser { 21 | 22 | class Scanner : public SlamFlexLexer { 23 | public: 24 | /** Create a new scanner object. The streams arg_yyin and arg_yyout default 25 | * to cin and cout, but that assignment is only made when initializing in 26 | * yylex(). */ 27 | Scanner(std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0); 28 | 29 | /** Required for virtual functions */ 30 | virtual ~Scanner(); 31 | 32 | /** This is the main lexing function. It is generated by flex according to 33 | * the macro declaration YY_DECL above. The generated bison parser then 34 | * calls this virtual function to fetch new tokens. */ 35 | virtual Parser::token_type lex(Parser::semantic_type* yylval, 36 | Parser::location_type* yylloc); 37 | 38 | /** Enable debug output (via arg_yyout) if compiled into the scanner. */ 39 | void set_debug(bool b); 40 | }; 41 | 42 | } // namespace SlamParser 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/slam_parser/parser/slam_context.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef SLAM_CONTEXT_H 28 | #define SLAM_CONTEXT_H 29 | 30 | #include 31 | 32 | namespace SlamParser { 33 | 34 | class CommandNode; 35 | 36 | class SlamContext { 37 | public: 38 | SlamContext(); 39 | virtual ~SlamContext(); 40 | 41 | virtual bool process(CommandNode* commandNode); 42 | }; 43 | 44 | } // namespace SlamParser 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/interactive_slam/slam_parser/parser/test_slam_parser.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include 28 | 29 | #include "commands.h" 30 | #include "driver.h" 31 | #include "slam_context.h" 32 | using namespace std; 33 | 34 | int main() { 35 | SlamParser::SlamContext slamContext; 36 | SlamParser::Driver driver(slamContext); 37 | driver.trace_parsing = true; 38 | driver.trace_scanning = true; 39 | 40 | bool parseStatus = driver.parse_stream(cin); 41 | if (!parseStatus) return 1; 42 | } 43 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/line_slam/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # add_executable(line_test line_test.cpp) 2 | # target_link_libraries(line_test types_slam3d_addons types_slam3d) 3 | # set_target_properties(line_test PROPERTIES OUTPUT_NAME line_test) 4 | 5 | add_executable(simulator_3d_line simulator_3d_line.cpp) 6 | target_link_libraries(simulator_3d_line solver_eigen types_slam3d_addons) 7 | set_target_properties(simulator_3d_line PROPERTIES OUTPUT_NAME simulator_3d_line) 8 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/logging/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(logging_application 2 | logging.cpp 3 | ) 4 | target_link_libraries(logging_application stuff) 5 | set_target_properties(logging_application PROPERTIES OUTPUT_NAME logging_example) 6 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/logging/logging.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 G. Grisetti, R. Kuemmerle, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "g2o/stuff/logger.h" 28 | 29 | int main() { 30 | G2O_TRACE("TRACE Hello World"); 31 | G2O_DEBUG("DEBUG Hello World"); 32 | G2O_WARN("WARN Hello World"); 33 | G2O_ERROR("ERROR Hello World"); 34 | G2O_INFO("INFO Hello World {}", 123); 35 | } 36 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/plane_slam/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(simulator_3d_plane 2 | simulator_3d_plane.cpp 3 | ) 4 | target_link_libraries(simulator_3d_plane solver_eigen types_slam3d_addons) 5 | set_target_properties(simulator_3d_plane PROPERTIES OUTPUT_NAME simulator_3d_plane) 6 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/sba/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(sba_demo sba_demo.cpp) 2 | target_link_libraries(sba_demo core types_icp types_sba) 3 | set_target_properties(sba_demo PROPERTIES OUTPUT_NAME sba_demo) 4 | 5 | # Link CHOLMOD if available, CSparse otherwise 6 | if(CHOLMOD_FOUND) 7 | target_link_libraries(sba_demo solver_cholmod) 8 | else() 9 | target_link_libraries(sba_demo solver_eigen) 10 | endif() 11 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/sim3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(optimize_sphere_by_sim3 2 | optimize_sphere_by_sim3.cpp 3 | ) 4 | 5 | set_target_properties(optimize_sphere_by_sim3 PROPERTIES OUTPUT_NAME optimize_sphere_by_sim3) 6 | target_link_libraries(optimize_sphere_by_sim3 core types_slam3d types_sim3) 7 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/simple_optimize/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(simple_optimize 2 | simple_optimize.cpp 3 | ) 4 | 5 | set_target_properties(simple_optimize PROPERTIES OUTPUT_NAME simple_optimize) 6 | 7 | target_link_libraries(simple_optimize core solver_eigen) 8 | target_link_libraries(simple_optimize types_slam2d) 9 | target_link_libraries(simple_optimize types_slam3d) 10 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/slam2d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # qt components used (also by qglviewer): Core Gui Xml OpenGL Widgets 2 | include_directories(SYSTEM 3 | ${QGLVIEWER_INCLUDE_DIR} 4 | ${Qt5Core_INCLUDE_DIRS} 5 | ${Qt5Gui_INCLUDE_DIRS} 6 | ${Qt5Xml_INCLUDE_DIRS} 7 | ${Qt5Widgets_INCLUDE_DIRS} 8 | ${Qt5OpenGL_INCLUDE_DIRS} 9 | ) 10 | include_directories(${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) 11 | 12 | QT5_WRAP_UI(UI_HEADERS base_main_window.ui) 13 | QT5_WRAP_CPP(UI_SOURCES main_window.h) 14 | 15 | add_executable(slam2d_g2o 16 | main_window.cpp 17 | slam2d_viewer.cpp 18 | slam2d_viewer.h 19 | slam2d_g2o.cpp 20 | ${UI_HEADERS} 21 | ${UI_SOURCES} 22 | ) 23 | 24 | set_target_properties(slam2d_g2o PROPERTIES OUTPUT_NAME slam2d_g2o) 25 | 26 | if(Qt5_POSITION_INDEPENDENT_CODE) 27 | set_property(TARGET slam2d_g2o PROPERTY COMPILE_FLAGS -fPIC) 28 | message(STATUS "Generating position independent code for slam2d because Qt5 was built with -reduce-relocations") 29 | # Note: using 30 | # set(CMAKE_POSITION_INDEPENDENT_CODE ON) 31 | # does not seem to work: This generates some libraries with -fPIE which is not enough for Qt... 32 | endif() 33 | 34 | target_link_libraries(slam2d_g2o core solver_eigen types_slam2d opengl_helper 35 | ${QGLVIEWER_LIBRARY} 36 | ${Qt5Core_LIBRARIES} 37 | ${Qt5Gui_LIBRARIES} 38 | ${Qt5Xml_LIBRARIES} 39 | ${Qt5Widgets_LIBRARIES} 40 | ${Qt5OpenGL_LIBRARIES} 41 | ) 42 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/slam2d/main_window.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // 4 | // This file is part of g2o. 5 | // 6 | // g2o is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // g2o is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with g2o. If not, see . 18 | 19 | #ifndef G2O_MAIN_WINDOW_H 20 | #define G2O_MAIN_WINDOW_H 21 | 22 | #include "ui_base_main_window.h" 23 | 24 | class MainWindow : public QMainWindow, public Ui::BaseMainWindow { 25 | Q_OBJECT 26 | public: 27 | MainWindow(QWidget* parent = 0); 28 | ~MainWindow(); 29 | 30 | public slots: 31 | void on_actionLoad_triggered(bool); 32 | void on_actionSave_triggered(bool); 33 | void on_actionQuit_triggered(bool); 34 | void on_btnOptimize_clicked(); 35 | void on_btnInitialGuess_clicked(); 36 | 37 | protected: 38 | void fixGraph(); 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/slam2d/slam2d_g2o.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // 4 | // This file is part of g2o. 5 | // 6 | // g2o is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // g2o is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with g2o. If not, see . 18 | 19 | #include 20 | #include 21 | 22 | #include "g2o/core/factory.h" 23 | #include "g2o/core/sparse_optimizer.h" 24 | #include "main_window.h" 25 | using namespace std; 26 | using namespace g2o; 27 | 28 | G2O_USE_TYPE_GROUP(slam2d); 29 | 30 | int main(int argc, char** argv) { 31 | QApplication qapp(argc, argv); 32 | 33 | MainWindow mw; 34 | mw.viewer->graph = new SparseOptimizer(); 35 | mw.show(); 36 | 37 | return qapp.exec(); 38 | } 39 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/slam2d/slam2d_viewer.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // 4 | // This file is part of g2o. 5 | // 6 | // g2o is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // g2o is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with g2o. If not, see . 18 | 19 | #ifndef SLAM2D_VIEWER_H 20 | #define SLAM2D_VIEWER_H 21 | 22 | #include "g2o/core/sparse_block_matrix.h" 23 | #include "qglviewer.h" 24 | 25 | namespace g2o { 26 | 27 | class SparseOptimizer; 28 | 29 | class Slam2DViewer : public QGLViewer { 30 | public: 31 | Slam2DViewer(QWidget* parent = NULL, const QGLWidget* shareWidget = 0); 32 | ~Slam2DViewer(); 33 | virtual void draw(); 34 | void init(); 35 | 36 | public: 37 | SparseOptimizer* graph; 38 | bool drawCovariance; 39 | g2o::SparseBlockMatrix covariances; 40 | }; 41 | 42 | } // namespace g2o 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/sphere/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(create_sphere 2 | create_sphere.cpp 3 | ) 4 | 5 | set_target_properties(create_sphere PROPERTIES OUTPUT_NAME create_sphere) 6 | target_link_libraries(create_sphere core types_slam3d) 7 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/target/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(static_target 2 | static_target.cpp 3 | ) 4 | target_link_libraries(static_target core solver_eigen) 5 | set_target_properties(static_target PROPERTIES OUTPUT_NAME static_target) 6 | 7 | add_executable(constant_velocity_target 8 | constant_velocity_target.cpp 9 | ) 10 | 11 | set_target_properties(constant_velocity_target PROPERTIES OUTPUT_NAME constant_velocity_target) 12 | 13 | target_link_libraries(constant_velocity_target core solver_eigen solver_pcg) 14 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/target/continuous_to_discrete.h: -------------------------------------------------------------------------------- 1 | #ifndef G2O_CONTINUOUS_TO_DISCRETE_H_ 2 | #define G2O_CONTINUOUS_TO_DISCRETE_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Form for fixed-size matrices 8 | template 9 | void continuousToDiscrete(MatrixType& Fd, MatrixType& Qd, const MatrixType& Fc, 10 | const MatrixType& Qc, double dt) { 11 | enum { 12 | NX = MatrixType::ColsAtCompileTime, 13 | NY = MatrixType::RowsAtCompileTime, 14 | NX2 = 2 * MatrixType::RowsAtCompileTime 15 | }; 16 | 17 | typedef Eigen::Matrix 18 | DoubleSizedMatrixType; 19 | DoubleSizedMatrixType bigA(NX2, NX2), bigB(NX2, NX2); 20 | 21 | // Construct the "big A matrix" 22 | bigA.template topLeftCorner() = -Fc * dt; 23 | bigA.template topRightCorner() = Qc * dt; 24 | bigA.template bottomLeftCorner().setZero(); 25 | bigA.template bottomRightCorner() = Fc.transpose() * dt; 26 | 27 | // bigB = expm(bigA) 28 | // Eigen::MatrixExponential me(bigA); 29 | // me.compute(bigB); 30 | bigB = bigA.exp(); 31 | 32 | // Extract the discrete time components 33 | Fd = bigB.template bottomRightCorner().transpose(); 34 | Qd = Fd * bigB.template topRightCorner(); 35 | } 36 | 37 | #endif // __CONTINUOUS_TO_DISCRETE_H__ 38 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/target/targetTypes3D.hpp: -------------------------------------------------------------------------------- 1 | #ifndef G2O_TARGET_TYPES_3D_HPP_ 2 | #define G2O_TARGET_TYPES_3D_HPP_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | // This header file specifies a set of types for the different 10 | // tracking examples; note that 11 | 12 | class VertexPosition3D : public g2o::BaseVertex<3, Eigen::Vector3d> { 13 | public: 14 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 15 | VertexPosition3D() {} 16 | 17 | virtual void setToOriginImpl() { _estimate.setZero(); } 18 | 19 | virtual void oplusImpl(const double* update) { 20 | _estimate[0] += update[0]; 21 | _estimate[1] += update[1]; 22 | _estimate[2] += update[2]; 23 | } 24 | 25 | virtual bool read(std::istream& /*is*/) { return false; } 26 | 27 | virtual bool write(std::ostream& /*os*/) const { return false; } 28 | }; 29 | 30 | // Store velocity separately from position? 31 | class VertexVelocity3D : public g2o::BaseVertex<3, Eigen::Vector3d> { 32 | public: 33 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 34 | VertexVelocity3D() {} 35 | 36 | virtual void setToOriginImpl() { _estimate.setZero(); } 37 | 38 | virtual void oplusImpl(const double* update) { 39 | _estimate[0] += update[0]; 40 | _estimate[1] += update[1]; 41 | _estimate[2] += update[2]; 42 | } 43 | 44 | virtual bool read(std::istream& /*is*/) { return false; } 45 | 46 | virtual bool write(std::ostream& /*os*/) const { return false; } 47 | }; 48 | 49 | // The idealised GPS measurement; this is 3D and linear 50 | class GPSObservationPosition3DEdge 51 | : public g2o::BaseUnaryEdge<3, Eigen::Vector3d, VertexPosition3D> { 52 | public: 53 | GPSObservationPosition3DEdge() {} 54 | 55 | void computeError() { 56 | const VertexPosition3D* v = 57 | static_cast(_vertices[0]); 58 | _error = v->estimate() - _measurement; 59 | } 60 | 61 | virtual bool read(std::istream& /*is*/) { return false; } 62 | 63 | virtual bool write(std::ostream& /*os*/) const { return false; } 64 | }; 65 | 66 | #endif // __TARGET_TYPES_3D_HPP__ 67 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/tutorial_slam2d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(tutorial_slam2d_library ${G2O_LIB_TYPE} 2 | edge_se2_pointxy.cpp se2.h vertex_point_xy.h 3 | edge_se2.cpp edge_se2_pointxy.h vertex_se2.cpp 4 | edge_se2.h vertex_point_xy.cpp vertex_se2.h 5 | parameter_se2_offset.h parameter_se2_offset.cpp 6 | types_tutorial_slam2d.h types_tutorial_slam2d.cpp 7 | simulator.h simulator.cpp 8 | g2o_tutorial_slam2d_api.h 9 | ) 10 | 11 | set_target_properties(tutorial_slam2d_library PROPERTIES OUTPUT_NAME ${LIB_PREFIX}tutorial_slam2d) 12 | set_target_properties(tutorial_slam2d_library PROPERTIES 13 | VERSION ${G2O_LIB_VERSION} 14 | SOVERSION ${G2O_LIB_SOVERSION}) 15 | 16 | target_link_libraries(tutorial_slam2d_library core solver_eigen) 17 | 18 | add_executable(tutorial_slam2d 19 | tutorial_slam2d.cpp 20 | ) 21 | 22 | set_target_properties(tutorial_slam2d PROPERTIES OUTPUT_NAME tutorial_slam2d) 23 | 24 | target_link_libraries(tutorial_slam2d tutorial_slam2d_library) 25 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/tutorial_slam2d/types_tutorial_slam2d.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_TYPES_TUTORIAL_SLAM2D_ 28 | #define G2O_TYPES_TUTORIAL_SLAM2D_ 29 | 30 | #include "edge_se2.h" 31 | #include "edge_se2_pointxy.h" 32 | #include "parameter_se2_offset.h" 33 | #include "vertex_se2.h" 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/examples/tutorial_slam2d/vertex_se2.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "vertex_se2.h" 28 | 29 | namespace g2o { 30 | namespace tutorial { 31 | 32 | VertexSE2::VertexSE2() : BaseVertex<3, SE2>() {} 33 | 34 | bool VertexSE2::read(std::istream& is) { 35 | Eigen::Vector3d p; 36 | is >> p[0] >> p[1] >> p[2]; 37 | _estimate.fromVector(p); 38 | return true; 39 | } 40 | 41 | bool VertexSE2::write(std::ostream& os) const { 42 | Eigen::Vector3d p = estimate().toVector(); 43 | os << p[0] << " " << p[1] << " " << p[2]; 44 | return os.good(); 45 | } 46 | 47 | } // namespace tutorial 48 | } // namespace g2o 49 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/solvers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(pcg) 2 | add_subdirectory(dense) 3 | 4 | if(G2O_BUILD_SLAM2D_TYPES) 5 | add_subdirectory(slam2d_linear) 6 | endif() 7 | 8 | add_subdirectory(structure_only) 9 | 10 | if(CSPARSE_FOUND) 11 | add_subdirectory(csparse) 12 | endif() 13 | 14 | if(CHOLMOD_FOUND) 15 | add_subdirectory(cholmod) 16 | endif(CHOLMOD_FOUND) 17 | 18 | # Sparse Module of Eigen is stable starting from 3.1 19 | add_subdirectory(eigen) 20 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/solvers/cholmod/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (NOT G2O_USE_CHOLMOD) 2 | return() 3 | endif() 4 | 5 | set(PUBLIC_HEADERS 6 | linear_solver_cholmod.h 7 | cholmod_wrapper.h 8 | ) 9 | 10 | add_library(solver_cholmod ${G2O_LIB_TYPE} 11 | cholmod_wrapper.cpp 12 | solver_cholmod.cpp 13 | ) 14 | 15 | target_include_directories(solver_cholmod PUBLIC 16 | $ 17 | $) 18 | 19 | set_target_properties(solver_cholmod PROPERTIES 20 | OUTPUT_NAME ${LIB_PREFIX}solver_cholmod 21 | PUBLIC_HEADER "${PUBLIC_HEADERS}" 22 | ) 23 | set_target_properties(solver_cholmod PROPERTIES 24 | VERSION ${G2O_LIB_VERSION} 25 | SOVERSION ${G2O_LIB_SOVERSION}) 26 | 27 | if (APPLE) 28 | set_target_properties(solver_cholmod PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 29 | endif() 30 | 31 | add_definitions(${BLAS_DEFINITIONS} ${LAPACK_DEFINITIONS}) 32 | target_compile_features(solver_cholmod PUBLIC cxx_std_17) 33 | target_link_libraries(solver_cholmod 34 | PUBLIC core 35 | PRIVATE SuiteSparse::CHOLMOD 36 | ) 37 | 38 | install(TARGETS solver_cholmod 39 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 40 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 41 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 42 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 43 | PUBLIC_HEADER DESTINATION ${INCLUDES_DESTINATION}/g2o/solvers/cholmod 44 | ) 45 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/solvers/csparse/csparse_extension.h: -------------------------------------------------------------------------------- 1 | // CSparse: a Concise Sparse matrix package. 2 | // Copyright (c) 2006, Timothy A. Davis. 3 | // http://www.cise.ufl.edu/research/sparse/CSparse 4 | // 5 | // -------------------------------------------------------------------------------- 6 | // 7 | // CSparse is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 2.1 of the License, or (at your option) any later version. 11 | // 12 | // CSparse is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | // Lesser General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU Lesser General Public 18 | // License along with this Module; if not, write to the Free Software 19 | // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | 21 | #ifndef G2O_CSPARSE_EXTENSION_H 22 | #define G2O_CSPARSE_EXTENSION_H 23 | 24 | #ifndef NCOMPLEX 25 | #define NCOMPLEX 26 | #endif 27 | #include 28 | 29 | #include "g2o_csparse_extension_api.h" 30 | 31 | namespace g2o::csparse_extension { 32 | 33 | // our extensions to csparse 34 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 35 | /** 36 | * Originally from CSparse, avoid memory re-allocations by giving workspace 37 | * pointers CSparse: Copyright (c) 2006-2011, Timothy A. Davis. 38 | */ 39 | G2O_CSPARSE_EXTENSION_API csn* cs_chol_workspace(const cs* A, const css* S, 40 | int* cin, double* xin); 41 | G2O_CSPARSE_EXTENSION_API int cs_cholsolsymb(const cs* A, double* b, 42 | const css* S, double* workspace, 43 | int* work); 44 | 45 | } // namespace g2o::csparse_extension 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/solvers/csparse/csparse_helper.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_CSPARSE_HELPER_H 28 | #define G2O_CSPARSE_HELPER_H 29 | 30 | #include "csparse_extension.h" 31 | #include "g2o_csparse_extension_api.h" 32 | 33 | namespace g2o { 34 | 35 | namespace csparse_extension { 36 | 37 | /** 38 | * write the sparse matrix to a file loadable with ocatve 39 | */ 40 | G2O_CSPARSE_EXTENSION_API bool writeCs2Octave(const char* filename, const cs* A, 41 | bool upperTriangular = true); 42 | 43 | } // namespace csparse_extension 44 | } // namespace g2o 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/solvers/csparse/g2o_csparse_extension_api.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2012 Rainer Kuemmerle 3 | // 4 | // g2o is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Lesser General Public License as published 6 | // by the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // g2o is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public License 15 | // along with this program. If not, see . 16 | 17 | #ifndef G2O_CSPARSE_EXTENSION_API_H 18 | #define G2O_CSPARSE_EXTENSION_API_H 19 | 20 | #include "g2o/config.h" 21 | 22 | #ifdef _MSC_VER 23 | // We are using a Microsoft compiler: 24 | #ifdef G2O_LGPL_SHARED_LIBS 25 | #ifdef csparse_extension_EXPORTS 26 | #define G2O_CSPARSE_EXTENSION_API __declspec(dllexport) 27 | #else 28 | #define G2O_CSPARSE_EXTENSION_API __declspec(dllimport) 29 | #endif 30 | #else 31 | #define G2O_CSPARSE_EXTENSION_API 32 | #endif 33 | 34 | #else 35 | // Not Microsoft compiler so set empty definition: 36 | #define G2O_CSPARSE_EXTENSION_API 37 | #endif 38 | 39 | #endif // G2O_CSPARSE_API_H 40 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/solvers/dense/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(solver_dense ${G2O_LIB_TYPE} 2 | solver_dense.cpp linear_solver_dense.h 3 | ) 4 | 5 | set_target_properties(solver_dense PROPERTIES OUTPUT_NAME ${LIB_PREFIX}solver_dense) 6 | set_target_properties(solver_dense PROPERTIES 7 | VERSION ${G2O_LIB_VERSION} 8 | SOVERSION ${G2O_LIB_SOVERSION}) 9 | if (APPLE) 10 | set_target_properties(solver_dense PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 11 | endif() 12 | 13 | target_compile_features(solver_dense PUBLIC cxx_std_17) 14 | target_link_libraries(solver_dense core) 15 | 16 | install(TARGETS solver_dense 17 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 18 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 19 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 20 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 21 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 22 | ) 23 | 24 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 25 | 26 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/solvers/dense) 27 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/solvers/eigen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(solver_eigen ${G2O_LIB_TYPE} 2 | solver_eigen.cpp 3 | linear_solver_eigen.h 4 | ) 5 | set_target_properties(solver_eigen PROPERTIES OUTPUT_NAME ${LIB_PREFIX}solver_eigen) 6 | set_target_properties(solver_eigen PROPERTIES 7 | VERSION ${G2O_LIB_VERSION} 8 | SOVERSION ${G2O_LIB_SOVERSION}) 9 | if (APPLE) 10 | set_target_properties(solver_eigen PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 11 | endif() 12 | target_compile_features(solver_eigen PUBLIC cxx_std_17) 13 | target_link_libraries(solver_eigen core) 14 | 15 | target_include_directories(solver_eigen PUBLIC 16 | $ 17 | $ 18 | ) 19 | 20 | install(TARGETS solver_eigen 21 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 22 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 23 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 24 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 25 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 26 | ) 27 | 28 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 29 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/solvers/eigen) 30 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/solvers/pcg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(solver_pcg ${G2O_LIB_TYPE} 2 | solver_pcg.cpp 3 | linear_solver_pcg.h 4 | linear_solver_pcg.hpp 5 | ) 6 | 7 | set_target_properties(solver_pcg PROPERTIES OUTPUT_NAME ${LIB_PREFIX}solver_pcg) 8 | set_target_properties(solver_pcg PROPERTIES 9 | VERSION ${G2O_LIB_VERSION} 10 | SOVERSION ${G2O_LIB_SOVERSION}) 11 | if (APPLE) 12 | set_target_properties(solver_pcg PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 13 | endif() 14 | 15 | target_compile_features(solver_pcg PUBLIC cxx_std_17) 16 | target_link_libraries(solver_pcg core) 17 | 18 | target_include_directories(solver_pcg PUBLIC 19 | $ 20 | $) 21 | 22 | install(TARGETS solver_pcg 23 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 24 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 25 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 26 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 27 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 28 | ) 29 | 30 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 31 | 32 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/solvers/pcg) 33 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/solvers/slam2d_linear/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(solver_slam2d_linear ${G2O_LIB_TYPE} 2 | slam2d_linear.cpp 3 | solver_slam2d_linear.h solver_slam2d_linear.cpp 4 | g2o_slam2d_linear_api.h 5 | ) 6 | 7 | set_target_properties(solver_slam2d_linear PROPERTIES OUTPUT_NAME ${LIB_PREFIX}solver_slam2d_linear) 8 | set_target_properties(solver_slam2d_linear PROPERTIES 9 | VERSION ${G2O_LIB_VERSION} 10 | SOVERSION ${G2O_LIB_SOVERSION}) 11 | if (APPLE) 12 | set_target_properties(solver_slam2d_linear PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 13 | endif() 14 | 15 | target_compile_features(solver_slam2d_linear PUBLIC cxx_std_17) 16 | target_link_libraries(solver_slam2d_linear solver_eigen types_slam2d) 17 | 18 | install(TARGETS solver_slam2d_linear 19 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 20 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 21 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 22 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 23 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 24 | ) 25 | 26 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 27 | 28 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/solvers/slam2d_linear) 29 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/solvers/structure_only/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(solver_structure_only ${G2O_LIB_TYPE} 2 | structure_only.cpp 3 | structure_only_solver.h 4 | ) 5 | 6 | set_target_properties(solver_structure_only PROPERTIES OUTPUT_NAME ${LIB_PREFIX}solver_structure_only) 7 | set_target_properties(solver_structure_only PROPERTIES 8 | VERSION ${G2O_LIB_VERSION} 9 | SOVERSION ${G2O_LIB_SOVERSION}) 10 | if (APPLE) 11 | set_target_properties(solver_structure_only PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 12 | endif() 13 | 14 | target_compile_features(solver_structure_only PUBLIC cxx_std_17) 15 | target_link_libraries(solver_structure_only core) 16 | 17 | install(TARGETS solver_structure_only 18 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 19 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 20 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 21 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 22 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 23 | ) 24 | 25 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 26 | 27 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/solvers/structure_only) 28 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/stuff/opengl_wrapper.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, H. Strasdat, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_OPENGL_WRAPPER_H 28 | #define G2O_OPENGL_WRAPPER_H 29 | 30 | #include "g2o/config.h" 31 | 32 | #ifdef WINDOWS 33 | #include 34 | #endif 35 | 36 | #ifdef G2O_OPENGL_FOUND 37 | #ifdef __APPLE__ 38 | #include 39 | #else 40 | #include 41 | #endif 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/stuff/timeutil.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "timeutil.h" 28 | 29 | #include 30 | 31 | #include "g2o/stuff/logger.h" 32 | 33 | namespace g2o { 34 | 35 | ScopeTime::ScopeTime(const char* title) 36 | : _title(title), _startTime(get_monotonic_time()) {} 37 | 38 | ScopeTime::~ScopeTime() { 39 | G2O_DEBUG("{} took {}ms.", _title, 40 | 1000 * (get_monotonic_time() - _startTime)); 41 | } 42 | 43 | double get_monotonic_time() { 44 | return seconds{std::chrono::steady_clock::now().time_since_epoch()}.count(); 45 | } 46 | 47 | } // namespace g2o 48 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/stuff/tuple_tools.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | namespace g2o { 32 | 33 | template 34 | void tuple_apply_i_(F&& f, T& t, int i, std::index_sequence) { 35 | (..., (I == i ? f(std::get(t)) : void())); 36 | } 37 | 38 | template 39 | void tuple_apply_i(F&& f, T& t, int i) { 40 | tuple_apply_i_( 41 | f, t, i, std::make_index_sequence>>()); 42 | } 43 | 44 | } // namespace g2o 45 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Pre-canned types 2 | 3 | # 2D types 4 | if(G2O_BUILD_SLAM2D_TYPES) 5 | add_subdirectory(slam2d) 6 | if(G2O_BUILD_SLAM2D_ADDON_TYPES) 7 | add_subdirectory(slam2d_addons) 8 | endif() 9 | if(G2O_BUILD_DATA_TYPES) 10 | add_subdirectory(data) 11 | endif() 12 | if(G2O_BUILD_SCLAM2D_TYPES) 13 | add_subdirectory(sclam2d) 14 | endif() 15 | endif() 16 | 17 | # 3D types 18 | if(G2O_BUILD_SLAM3D_TYPES) 19 | add_subdirectory(slam3d) 20 | if(G2O_BUILD_SLAM3D_ADDON_TYPES) 21 | add_subdirectory(slam3d_addons) 22 | endif() 23 | if(G2O_BUILD_SBA_TYPES) 24 | add_subdirectory(sba) 25 | if(G2O_BUILD_ICP_TYPES) 26 | add_subdirectory(icp) 27 | endif() 28 | if (G2O_BUILD_SIM3_TYPES) 29 | add_subdirectory(sim3) 30 | endif() 31 | endif() 32 | endif() 33 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/data/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(types_data ${G2O_LIB_TYPE} 2 | types_data.cpp 3 | robot_data.cpp robot_data.h 4 | vertex_tag.cpp vertex_tag.h 5 | vertex_ellipse.cpp vertex_ellipse.h 6 | laser_parameters.cpp laser_parameters.h 7 | raw_laser.cpp raw_laser.h 8 | robot_laser.cpp robot_laser.h 9 | data_queue.cpp data_queue.h 10 | g2o_types_data_api.h 11 | ) 12 | 13 | set_target_properties(types_data PROPERTIES OUTPUT_NAME ${LIB_PREFIX}types_data) 14 | set_target_properties(types_data PROPERTIES 15 | VERSION ${G2O_LIB_VERSION} 16 | SOVERSION ${G2O_LIB_SOVERSION}) 17 | if (APPLE) 18 | set_target_properties(types_data PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 19 | endif() 20 | 21 | 22 | target_compile_features(types_data PUBLIC cxx_std_17) 23 | target_link_libraries(types_data core types_slam2d) 24 | if(G2O_HAVE_OPENGL) 25 | target_link_libraries(types_data freeglut_minimal opengl_helper) 26 | endif() 27 | 28 | target_include_directories(types_data PUBLIC 29 | $ 30 | $) 31 | 32 | install(TARGETS types_data 33 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 34 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 35 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 36 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 37 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 38 | ) 39 | 40 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 41 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/types/data) 42 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/data/robot_data.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "robot_data.h" 28 | 29 | namespace g2o { 30 | 31 | RobotData::RobotData() 32 | : HyperGraph::Data(), _timestamp(-1.), _loggerTimestamp(-1.) {} 33 | 34 | RobotData::~RobotData() {} 35 | 36 | void RobotData::setTimestamp(double ts) { _timestamp = ts; } 37 | 38 | void RobotData::setLoggerTimestamp(double ts) { _loggerTimestamp = ts; } 39 | 40 | void RobotData::setTag(const std::string& tag) { _tag = tag; } 41 | 42 | void RobotData::setHostname(const std::string& hostname) { 43 | _hostname = hostname; 44 | } 45 | 46 | } // namespace g2o 47 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/data/types_data.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_TYPES_DATA_H 28 | #define G2O_TYPES_DATA_H 29 | 30 | #include "robot_laser.h" 31 | #include "vertex_ellipse.h" 32 | #include "vertex_tag.h" 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/icp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(types_icp ${G2O_LIB_TYPE} 2 | types_icp.cpp types_icp.h 3 | g2o_types_icp_api.h 4 | ) 5 | 6 | set_target_properties(types_icp PROPERTIES OUTPUT_NAME ${LIB_PREFIX}types_icp) 7 | set_target_properties(types_icp PROPERTIES 8 | VERSION ${G2O_LIB_VERSION} 9 | SOVERSION ${G2O_LIB_SOVERSION}) 10 | if (APPLE) 11 | set_target_properties(types_icp PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 12 | endif() 13 | target_compile_features(types_icp PUBLIC cxx_std_17) 14 | target_link_libraries(types_icp types_sba types_slam3d) 15 | 16 | target_include_directories(types_icp PUBLIC 17 | $ 18 | $) 19 | 20 | install(TARGETS types_icp 21 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 22 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 23 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 24 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 25 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 26 | ) 27 | 28 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 29 | 30 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/types/icp) 31 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/sba/types_sba.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 Kurt Konolige 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_SBA_TYPES 28 | #define G2O_SBA_TYPES 29 | 30 | // clanf-format off 31 | #include "g2o_types_sba_api.h" 32 | // clanf-format on 33 | 34 | #include "edge_project_p2mc.h" 35 | #include "edge_project_p2sc.h" 36 | #include "edge_sba_cam.h" 37 | #include "edge_sba_scale.h" 38 | #include "g2o/types/slam3d/vertex_pointxyz.h" 39 | #include "sbacam.h" 40 | #include "vertex_cam.h" 41 | #include "vertex_intrinsics.h" 42 | 43 | #endif // SBA_TYPES 44 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/sclam2d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(types_sclam2d ${G2O_LIB_TYPE} 2 | edge_se2_sensor_calib.cpp edge_se2_sensor_calib.h 3 | vertex_odom_differential_params.cpp vertex_odom_differential_params.h 4 | edge_se2_odom_differential_calib.cpp edge_se2_odom_differential_calib.h 5 | odometry_measurement.cpp odometry_measurement.h 6 | types_sclam2d.cpp types_sclam2d.h 7 | g2o_types_sclam2d_api.h 8 | ) 9 | 10 | set_target_properties(types_sclam2d PROPERTIES OUTPUT_NAME ${LIB_PREFIX}types_sclam2d) 11 | set_target_properties(types_sclam2d PROPERTIES 12 | VERSION ${G2O_LIB_VERSION} 13 | SOVERSION ${G2O_LIB_SOVERSION}) 14 | if (APPLE) 15 | set_target_properties(types_sclam2d PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 16 | endif() 17 | target_compile_features(types_sclam2d PUBLIC cxx_std_17) 18 | target_link_libraries(types_sclam2d types_slam2d core) 19 | if(G2O_HAVE_OPENGL) 20 | target_link_libraries(types_sclam2d opengl_helper) 21 | endif() 22 | 23 | target_include_directories(types_sclam2d PUBLIC 24 | $ 25 | $) 26 | 27 | install(TARGETS types_sclam2d 28 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 29 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 30 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 31 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 32 | ) 33 | 34 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 35 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/types/sclam2d) 36 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/sclam2d/types_sclam2d.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_TYPES_SCLAM_H 28 | #define G2O_TYPES_SCLAM_H 29 | 30 | #include "edge_se2_odom_differential_calib.h" 31 | #include "edge_se2_sensor_calib.h" 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/sclam2d/vertex_odom_differential_params.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "vertex_odom_differential_params.h" 28 | 29 | namespace g2o { 30 | 31 | VertexOdomDifferentialParams::VertexOdomDifferentialParams() 32 | : BaseVertex<3, Vector3>() {} 33 | 34 | bool VertexOdomDifferentialParams::read(std::istream& is) { 35 | return internal::readVector(is, _estimate); 36 | } 37 | 38 | bool VertexOdomDifferentialParams::write(std::ostream& os) const { 39 | return internal::writeVector(os, estimate()); 40 | } 41 | 42 | } // namespace g2o 43 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/sim3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(types_sim3 ${G2O_LIB_TYPE} 2 | types_seven_dof_expmap.cpp 3 | types_seven_dof_expmap.h 4 | ) 5 | 6 | set_target_properties(types_sim3 PROPERTIES OUTPUT_NAME ${LIB_PREFIX}types_sim3) 7 | set_target_properties(types_sim3 PROPERTIES 8 | VERSION ${G2O_LIB_VERSION} 9 | SOVERSION ${G2O_LIB_SOVERSION}) 10 | if (APPLE) 11 | set_target_properties(types_sim3 PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 12 | endif() 13 | target_compile_features(types_sim3 PUBLIC cxx_std_17) 14 | target_link_libraries(types_sim3 PUBLIC types_sba) 15 | 16 | target_include_directories(types_sim3 PUBLIC 17 | $ 18 | $) 19 | 20 | install(TARGETS types_sim3 21 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 22 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 23 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 24 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 25 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 26 | ) 27 | 28 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 29 | 30 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/types/sim3) 31 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/slam2d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(types_slam2d ${G2O_LIB_TYPE} 2 | se2.h 3 | edge_se2_pointxy_bearing.h edge_se2_prior.h 4 | edge_se2.cpp edge_se2_pointxy_calib.cpp types_slam2d.cpp 5 | edge_se2.h edge_se2_pointxy_calib.h vertex_point_xy.cpp 6 | edge_se2_pointxy.cpp vertex_point_xy.h 7 | edge_se2_pointxy.h vertex_se2.cpp 8 | edge_se2_pointxy_bearing.cpp edge_se2_prior.cpp vertex_se2.h 9 | parameter_se2_offset.cpp parameter_se2_offset.h 10 | edge_se2_offset.cpp edge_se2_offset.h 11 | edge_se2_pointxy_offset.cpp edge_se2_pointxy_offset.h 12 | edge_se2_xyprior.cpp edge_se2_xyprior.h 13 | edge_pointxy.cpp edge_pointxy.h 14 | edge_se2_twopointsxy.cpp edge_se2_twopointsxy.h 15 | edge_se2_lotsofxy.cpp edge_se2_lotsofxy.h 16 | edge_xy_prior.cpp edge_xy_prior.h 17 | g2o_types_slam2d_api.h 18 | ) 19 | 20 | set_target_properties(types_slam2d PROPERTIES OUTPUT_NAME ${LIB_PREFIX}types_slam2d) 21 | set_target_properties(types_slam2d PROPERTIES 22 | VERSION ${G2O_LIB_VERSION} 23 | SOVERSION ${G2O_LIB_SOVERSION}) 24 | if (APPLE) 25 | set_target_properties(types_slam2d PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 26 | endif() 27 | target_compile_features(types_slam2d PUBLIC cxx_std_17) 28 | target_link_libraries(types_slam2d core) 29 | if(G2O_HAVE_OPENGL) 30 | target_link_libraries(types_slam2d opengl_helper) 31 | endif() 32 | 33 | target_include_directories(types_slam2d PUBLIC 34 | $ 35 | $) 36 | 37 | install(TARGETS types_slam2d 38 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 39 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 40 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 41 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 42 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 43 | ) 44 | 45 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 46 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/types/slam2d) 47 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/slam2d_addons/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(types_slam2d_addons ${G2O_LIB_TYPE} 2 | line_2d.h 3 | types_slam2d_addons.cpp types_slam2d_addons.h 4 | vertex_segment2d.cpp vertex_segment2d.h 5 | edge_se2_segment2d.cpp edge_se2_segment2d.h 6 | edge_se2_segment2d_line.cpp edge_se2_segment2d_line.h 7 | edge_se2_segment2d_pointLine.cpp edge_se2_segment2d_pointLine.h 8 | vertex_line2d.cpp vertex_line2d.h 9 | edge_se2_line2d.cpp edge_se2_line2d.h 10 | edge_line2d_pointxy.cpp edge_line2d_pointxy.h 11 | edge_line2d.cpp edge_line2d.h 12 | g2o_types_slam2d_addons_api.h 13 | ) 14 | 15 | set_target_properties(types_slam2d_addons PROPERTIES OUTPUT_NAME ${LIB_PREFIX}types_slam2d_addons) 16 | set_target_properties(types_slam2d_addons PROPERTIES 17 | VERSION ${G2O_LIB_VERSION} 18 | SOVERSION ${G2O_LIB_SOVERSION}) 19 | if (APPLE) 20 | set_target_properties(types_slam2d_addons PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 21 | endif() 22 | target_compile_features(types_slam2d_addons PUBLIC cxx_std_17) 23 | target_link_libraries(types_slam2d_addons types_slam2d core) 24 | if(G2O_HAVE_OPENGL) 25 | target_link_libraries(types_slam2d_addons opengl_helper) 26 | endif() 27 | 28 | target_include_directories(types_slam2d_addons PUBLIC 29 | $ 30 | $) 31 | 32 | install(TARGETS types_slam2d_addons 33 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 34 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 35 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 36 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 37 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 38 | ) 39 | 40 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 41 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/types/slam2d_addons) 42 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/slam2d_addons/edge_line2d_pointxy.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "edge_line2d_pointxy.h" 28 | 29 | namespace g2o { 30 | 31 | EdgeLine2DPointXY::EdgeLine2DPointXY() 32 | : BaseBinaryEdge<1, double, VertexLine2D, VertexPointXY>() {} 33 | 34 | bool EdgeLine2DPointXY::read(std::istream& is) { 35 | is >> _measurement; 36 | is >> information()(0, 0); 37 | return true; 38 | } 39 | 40 | bool EdgeLine2DPointXY::write(std::ostream& os) const { 41 | os << measurement() << " "; 42 | os << information()(0, 0); 43 | return os.good(); 44 | } 45 | 46 | } // namespace g2o 47 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/slam2d_addons/edge_se2_segment2d_line.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "edge_se2_segment2d_line.h" 28 | 29 | namespace g2o { 30 | 31 | EdgeSE2Segment2DLine::EdgeSE2Segment2DLine() 32 | : BaseBinaryEdge<2, Vector2, VertexSE2, VertexSegment2D>() {} 33 | 34 | bool EdgeSE2Segment2DLine::read(std::istream& is) { 35 | internal::readVector(is, _measurement); 36 | return readInformationMatrix(is); 37 | } 38 | 39 | bool EdgeSE2Segment2DLine::write(std::ostream& os) const { 40 | internal::writeVector(os, measurement()); 41 | return writeInformationMatrix(os); 42 | } 43 | 44 | } // namespace g2o 45 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/slam2d_addons/types_slam2d_addons.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_TYPES_SLAM2D_SEGMENT_ 28 | #define G2O_TYPES_SLAM2D_SEGMENT_ 29 | 30 | #include "g2o/config.h" 31 | #include "g2o/types/slam2d/types_slam2d.h" 32 | 33 | // line slam ver 1 34 | #include "edge_se2_segment2d.h" 35 | #include "edge_se2_segment2d_line.h" 36 | #include "edge_se2_segment2d_pointLine.h" 37 | 38 | // line slam ver 2 39 | #include "edge_line2d.h" 40 | #include "edge_line2d_pointxy.h" 41 | #include "edge_se2_line2d.h" 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/slam3d/isometry3d_gradients.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "isometry3d_gradients.h" 28 | 29 | #include 30 | namespace g2o { 31 | using namespace std; 32 | using namespace Eigen; 33 | 34 | namespace internal { 35 | #include "dquat2mat.cpp" 36 | } // end namespace internal 37 | 38 | } // namespace g2o 39 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/slam3d_addons/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(types_slam3d_addons ${G2O_LIB_TYPE} 2 | vertex_se3_euler.cpp 3 | vertex_se3_euler.h 4 | edge_se3_euler.cpp 5 | edge_se3_euler.h 6 | vertex_plane.cpp 7 | vertex_plane.h 8 | edge_se3_plane_calib.cpp 9 | edge_se3_plane_calib.h 10 | line3d.cpp line3d.h 11 | vertex_line3d.cpp vertex_line3d.h 12 | edge_se3_line.cpp edge_se3_line.h 13 | edge_plane.cpp edge_plane.h 14 | edge_se3_calib.cpp edge_se3_calib.h 15 | types_slam3d_addons.cpp 16 | types_slam3d_addons.h 17 | ) 18 | 19 | 20 | set_target_properties(types_slam3d_addons PROPERTIES OUTPUT_NAME ${LIB_PREFIX}types_slam3d_addons) 21 | set_target_properties(types_slam3d_addons PROPERTIES 22 | VERSION ${G2O_LIB_VERSION} 23 | SOVERSION ${G2O_LIB_SOVERSION}) 24 | if (APPLE) 25 | set_target_properties(types_slam3d_addons PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") 26 | endif() 27 | target_compile_features(types_slam3d_addons PUBLIC cxx_std_17) 28 | target_link_libraries(types_slam3d_addons types_slam3d core) 29 | if(G2O_HAVE_OPENGL) 30 | target_link_libraries(types_slam3d_addons opengl_helper) 31 | endif() 32 | 33 | target_include_directories(types_slam3d_addons PUBLIC 34 | $ 35 | $) 36 | 37 | install(TARGETS types_slam3d_addons 38 | EXPORT ${G2O_TARGETS_EXPORT_NAME} 39 | RUNTIME DESTINATION ${RUNTIME_DESTINATION} 40 | LIBRARY DESTINATION ${LIBRARY_DESTINATION} 41 | ARCHIVE DESTINATION ${ARCHIVE_DESTINATION} 42 | INCLUDES DESTINATION ${INCLUDES_DESTINATION} 43 | ) 44 | 45 | file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 46 | install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/types/slam3d_addons) 47 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/g2o/types/slam3d_addons/vertex_se3_euler.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "vertex_se3_euler.h" 28 | 29 | #include "g2o/types/slam3d/isometry3d_mappings.h" 30 | 31 | namespace g2o { 32 | 33 | bool VertexSE3Euler::read(std::istream& is) { 34 | Vector6 est; 35 | bool state = internal::readVector(is, est); 36 | setEstimate(internal::fromVectorET(est)); 37 | return state; 38 | } 39 | 40 | bool VertexSE3Euler::write(std::ostream& os) const { 41 | return internal::writeVector(os, internal::toVectorET(estimate())); 42 | } 43 | 44 | } // namespace g2o 45 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/script/install-additional-deps-windows.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set VCPKG_ROOT_DIR=%1 3 | set VCPKG_DEFAULT_TRIPLET=%2 4 | setlocal 5 | 6 | rem ---------------------------------- 7 | rem Locate vcpkg using environment variables falling back to sensible defaults 8 | rem ---------------------------------- 9 | set "VcPkgDir=%USERPROFILE%\.vcpkg\vcpkg" 10 | set "VcPkgTriplet=x64-windows" 11 | if defined VCPKG_ROOT_DIR if /i not "%VCPKG_ROOT_DIR%"=="" set "VcPkgDir=%VCPKG_ROOT_DIR%" 12 | if defined VCPKG_DEFAULT_TRIPLET if /i not "%VCPKG_DEFAULT_TRIPLET%"=="" set "VcPkgTriplet=%VCPKG_DEFAULT_TRIPLET%" 13 | 14 | pushd %VcPkgDir% 15 | 16 | rem ============================== 17 | rem Upgrade and Install packages. 18 | rem ============================== 19 | set "VcPkgLibs=cmake eigen3 suitesparse lapack-reference openblas ceres qt5 glew" 20 | 21 | echo vcpkg found at %VcPkgDir%... 22 | echo installing %VcPkgLibs% for triplet %VcPkgTriplet%... 23 | 24 | call %VcPkgDir% upgrade %VcPkgLibs% --no-dry-run --triplet %VcPkgTriplet% 25 | call %VcPkgDir% install %VcPkgLibs% --triplet %VcPkgTriplet% 26 | 27 | popd 28 | 29 | endlocal & set "VcPkgDir=%VcPkgDir%" & set "VcPkgTriplet=%VcPkgTriplet%" 30 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/script/install-deps-linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -ev 4 | 5 | # source for new gcc 6 | #sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test 7 | 8 | sudo apt-get update -qq 9 | 10 | # dependencies for building g2o 11 | sudo apt-get install -qq qtdeclarative5-dev qt5-qmake libqglviewer-dev-qt5 libsuitesparse-dev 12 | 13 | # install new gcc 14 | #if [ "$CC" = "gcc" ]; then 15 | #apt-cache search -n "^gcc-[0-9]+$" 16 | #sudo apt-get install -qq gcc-8 g++-8 17 | #fi 18 | 19 | # download eigen3 and unpack it 20 | cd /tmp 21 | wget -O eigen3.zip https://gitlab.com/libeigen/eigen/-/archive/3.3.8/eigen-3.3.8.zip 22 | unzip -q eigen3.zip 23 | ls -l eigen* 24 | sudo mv /tmp/eigen-3.3.8 /usr/include/eigen3 25 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/script/install-deps-osx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ev 4 | 5 | brew update 6 | 7 | if brew outdated | grep -qx cmake; then 8 | brew upgrade cmake; 9 | fi 10 | 11 | if brew outdated | grep -qx eigen; then 12 | brew upgrade eigen 13 | else 14 | brew install eigen 15 | fi 16 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/script/install-deps-windows.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set VCPKG_ROOT_DIR=%1 3 | set VCPKG_DEFAULT_TRIPLET=%2 4 | setlocal 5 | 6 | rem ---------------------------------- 7 | rem Locate vcpkg using environment variables falling back to sensible defaults 8 | rem ---------------------------------- 9 | set "VcPkgDir=%USERPROFILE%\.vcpkg\vcpkg" 10 | set "VcPkgTriplet=x64-windows" 11 | if defined VCPKG_ROOT_DIR if /i not "%VCPKG_ROOT_DIR%"=="" set "VcPkgDir=%VCPKG_ROOT_DIR%" 12 | if defined VCPKG_DEFAULT_TRIPLET if /i not "%VCPKG_DEFAULT_TRIPLET%"=="" set "VcPkgTriplet=%VCPKG_DEFAULT_TRIPLET%" 13 | 14 | pushd %VcPkgDir% 15 | 16 | rem ============================== 17 | rem Upgrade and Install packages. 18 | rem ============================== 19 | set "VcPkgLibs=cmake eigen3 suitesparse lapack-reference openblas ceres" 20 | 21 | echo vcpkg found at %VcPkgDir%... 22 | echo installing %VcPkgLibs% for triplet %VcPkgTriplet%... 23 | 24 | call %VcPkgDir% upgrade %VcPkgLibs% --no-dry-run --triplet %VcPkgTriplet% 25 | call %VcPkgDir% install %VcPkgLibs% --triplet %VcPkgTriplet% 26 | 27 | popd 28 | 29 | endlocal & set "VcPkgDir=%VcPkgDir%" & set "VcPkgTriplet=%VcPkgTriplet%" 30 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(FetchContent) 2 | FetchContent_Declare( 3 | googletest 4 | GIT_REPOSITORY https://github.com/google/googletest.git 5 | GIT_TAG main 6 | ) 7 | # For Windows: Prevent overriding the parent project's compiler/linker settings 8 | set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) 9 | # Prevent installing gtest/gmock 10 | set(INSTALL_GTEST OFF CACHE BOOL "" FORCE) 11 | FetchContent_MakeAvailable(googletest) 12 | 13 | macro(create_test target) 14 | target_link_libraries(${target} gtest gmock gtest_main) 15 | add_test (NAME ${target} COMMAND $) 16 | endmacro(create_test) 17 | 18 | add_subdirectory(general) 19 | add_subdirectory(data) 20 | add_subdirectory(stuff) 21 | add_subdirectory(sclam2d) 22 | add_subdirectory(slam2d) 23 | add_subdirectory(slam2d_addons) 24 | add_subdirectory(slam3d) 25 | add_subdirectory(slam3d_addons) 26 | add_subdirectory(sim3) 27 | add_subdirectory(sba) 28 | add_subdirectory(solver) 29 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/data/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(unittest_data 2 | data_queue_tests.cpp 3 | io_data.cpp 4 | ) 5 | target_link_libraries(unittest_data types_data stuff) 6 | create_test(unittest_data) 7 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/general/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(unittest_general 2 | allocate_optimizer.cpp allocate_optimizer.h 3 | auto_diff.cpp 4 | batch_statistics.cpp 5 | graph_operations.cpp 6 | clear_and_redo.cpp 7 | base_fixed_sized_edge.cpp 8 | robust_kernel_tests.cpp 9 | sparse_block_matrix.cpp 10 | ) 11 | target_link_libraries(unittest_general types_slam3d types_slam2d) 12 | create_test(unittest_general) 13 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/general/allocate_optimizer.h: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #ifndef G2O_TEST_ALLOCATE_OPTIMIZER_H 28 | #define G2O_TEST_ALLOCATE_OPTIMIZER_H 29 | 30 | namespace g2o { 31 | 32 | class SparseOptimizer; 33 | 34 | namespace internal { 35 | 36 | g2o::SparseOptimizer* createOptimizerForTests(); 37 | 38 | } // namespace internal 39 | } // namespace g2o 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/sba/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(unittest_sba 2 | io_sba.cpp 3 | io_six_dof_expmap.cpp 4 | ) 5 | target_link_libraries(unittest_sba types_sba) 6 | create_test(unittest_sba) 7 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/sclam2d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(unittest_sclam2d 2 | io_sclam2d.cpp 3 | odom_convert_sclam2d.cpp 4 | ) 5 | target_link_libraries(unittest_sclam2d types_sclam2d) 6 | create_test(unittest_sclam2d) 7 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/sim3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(unittest_sim3 2 | allocate_sim3.cpp 3 | io_sim3.cpp 4 | jacobians_sim3.cpp 5 | ) 6 | target_link_libraries(unittest_sim3 types_sim3) 7 | create_test(unittest_sim3) 8 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/sim3/allocate_sim3.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "g2o/types/sim3/types_seven_dof_expmap.h" 28 | #include "gtest/gtest.h" 29 | 30 | TEST(Sim3, VertexSE3ExpmapCtor) { 31 | auto* v = new g2o::VertexSE3Expmap(); 32 | ASSERT_NE(nullptr, v); 33 | delete v; 34 | SUCCEED(); 35 | } 36 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/slam2d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(unittest_slam2d 2 | mappings_se2.cpp 3 | jacobians_slam2d.cpp 4 | io_slam2d.cpp 5 | ) 6 | target_link_libraries(unittest_slam2d types_slam2d) 7 | create_test(unittest_slam2d) 8 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/slam2d_addons/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(unittest_slam2d_addons 2 | io_slam2d_addons.cpp 3 | ) 4 | target_link_libraries(unittest_slam2d_addons types_slam2d_addons) 5 | create_test(unittest_slam2d_addons) 6 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/slam3d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(unittest_slam3d 2 | io_slam3d.cpp 3 | jacobians_slam3d.cpp 4 | mappings_slam3d.cpp 5 | orthogonal_matrix.cpp 6 | optimization_slam3d.cpp 7 | ) 8 | target_link_libraries(unittest_slam3d types_slam3d) 9 | create_test(unittest_slam3d) 10 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/slam3d_addons/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(unittest_slam3d_addons 2 | io_slam3d_addons.cpp 3 | ) 4 | target_link_libraries(unittest_slam3d_addons types_slam3d_addons) 5 | create_test(unittest_slam3d_addons) 6 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/solver/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(unittest_solver 2 | sparse_system_helper.cpp sparse_system_helper.h 3 | allocate_algorithm_test.cpp 4 | linear_solver_test.cpp 5 | ) 6 | 7 | # setting up linking of the test based on the available solvers 8 | set(SOLVER_LIBRARIES solver_eigen solver_dense solver_pcg solver_structure_only) 9 | if(G2O_BUILD_SLAM2D_TYPES) 10 | list(APPEND SOLVER_LIBRARIES solver_slam2d_linear) 11 | endif() 12 | if(CHOLMOD_FOUND) 13 | list(APPEND SOLVER_LIBRARIES solver_cholmod) 14 | endif() 15 | if(CSPARSE_FOUND) 16 | list(APPEND SOLVER_LIBRARIES solver_csparse) 17 | endif() 18 | 19 | target_link_libraries(unittest_solver ${SOLVER_LIBRARIES}) 20 | create_test(unittest_solver) 21 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/stuff/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(unittest_stuff 2 | command_args_tests.cpp 3 | filesys_tools_tests.cpp 4 | misc_tests.cpp 5 | property_tests.cpp 6 | string_tools_tests.cpp 7 | tuple_tools_tests.cpp 8 | unscented_tests.cpp 9 | ) 10 | target_link_libraries(unittest_stuff stuff) 11 | create_test(unittest_stuff) 12 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/stuff/tuple_tools_tests.cpp: -------------------------------------------------------------------------------- 1 | // g2o - General Graph Optimization 2 | // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above copyright 12 | // notice, this list of conditions and the following disclaimer in the 13 | // documentation and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 16 | // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 18 | // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #include "g2o/stuff/tuple_tools.h" 28 | #include "gtest/gtest.h" 29 | 30 | TEST(Stuff, Tuple_apply) { 31 | auto t = std::make_tuple(1, 2, 3); 32 | ASSERT_EQ(1, std::get<0>(t)); 33 | ASSERT_EQ(2, std::get<1>(t)); 34 | ASSERT_EQ(3, std::get<2>(t)); 35 | auto plus_one = [](int& i) { ++i; }; 36 | g2o::tuple_apply_i(plus_one, t, 1); 37 | ASSERT_EQ(1, std::get<0>(t)); 38 | ASSERT_EQ(3, std::get<1>(t)); 39 | ASSERT_EQ(3, std::get<2>(t)); 40 | } 41 | -------------------------------------------------------------------------------- /Thirdparty/g2o_new/unit_test/test_helper/test_main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char** argv) { 5 | ::testing::InitGoogleTest(&argc, argv); 6 | ::testing::InitGoogleMock(&argc, argv); 7 | int ret = RUN_ALL_TESTS(); 8 | return ret; 9 | } 10 | -------------------------------------------------------------------------------- /Vocabulary/ORBvoc.txt.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/Vocabulary/ORBvoc.txt.tar.gz -------------------------------------------------------------------------------- /assets/gif/kaistvio_circle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/assets/gif/kaistvio_circle.gif -------------------------------------------------------------------------------- /assets/img/euroc_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/assets/img/euroc_plot.png -------------------------------------------------------------------------------- /assets/img/euroc_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/assets/img/euroc_table.png -------------------------------------------------------------------------------- /assets/img/euroc_traj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/assets/img/euroc_traj.png -------------------------------------------------------------------------------- /assets/img/fig1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/assets/img/fig1.png -------------------------------------------------------------------------------- /assets/img/jetson-slam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/assets/img/jetson-slam.png -------------------------------------------------------------------------------- /assets/img/kaistvio_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/assets/img/kaistvio_table.png -------------------------------------------------------------------------------- /assets/img/kaistvio_traj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/assets/img/kaistvio_traj.png -------------------------------------------------------------------------------- /assets/img/kitti_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/assets/img/kitti_plot.png -------------------------------------------------------------------------------- /assets/img/kitti_traj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/assets/img/kitti_traj.png -------------------------------------------------------------------------------- /assets/img/vgg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/assets/img/vgg.png -------------------------------------------------------------------------------- /assets/img/video_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/assets/img/video_thumbnail.png -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | echo "Thirdparty/DBoW2 ..." 2 | 3 | cd Thirdparty/DBoW2 4 | mkdir build 5 | cd build 6 | cmake .. -DCMAKE_BUILD_TYPE=Release 7 | make -j 8 | 9 | cd ../../g2o 10 | 11 | echo "Building Thirdparty/g2o ..." 12 | 13 | mkdir build 14 | cd build 15 | cmake .. -DCMAKE_BUILD_TYPE=Release 16 | make -j 17 | 18 | cd ../../../ 19 | 20 | echo "Uncompress ORB Vocabulary ..." 21 | 22 | cd Vocabulary 23 | tar -xf ORBvoc.txt.tar.gz 24 | cd .. 25 | 26 | echo "Building Jetson-SLAM..." 27 | 28 | mkdir build 29 | cd build 30 | cmake .. -DCMAKE_BUILD_TYPE=Release 31 | make -j 32 | -------------------------------------------------------------------------------- /include/KeyFrameDatabase.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is part of ORB-SLAM2. 3 | * 4 | * Copyright (C) 2014-2016 Raúl Mur-Artal (University of Zaragoza) 5 | * For more information see 6 | * 7 | * ORB-SLAM2 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * ORB-SLAM2 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with ORB-SLAM2. If not, see . 19 | */ 20 | 21 | /** 22 | * This file is part of Jetson-SLAM and is taken from ORB-SLAM2 repo. See above. 23 | */ 24 | 25 | #ifndef KEYFRAMEDATABASE_H 26 | #define KEYFRAMEDATABASE_H 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | #include "KeyFrame.h" 33 | #include "Frame.h" 34 | #include "ORBVocabulary.h" 35 | 36 | #include 37 | 38 | 39 | namespace Jetson_SLAM 40 | { 41 | 42 | class KeyFrame; 43 | class Frame; 44 | 45 | 46 | class KeyFrameDatabase 47 | { 48 | public: 49 | 50 | KeyFrameDatabase(const ORBVocabulary &voc); 51 | 52 | void add(KeyFrame* pKF); 53 | 54 | void erase(KeyFrame* pKF); 55 | 56 | void clear(); 57 | 58 | // Loop Detection 59 | std::vector DetectLoopCandidates(KeyFrame* pKF, float minScore); 60 | 61 | // Relocalization 62 | std::vector DetectRelocalizationCandidates(Frame* F); 63 | 64 | protected: 65 | 66 | // Associated vocabulary 67 | const ORBVocabulary* mpVoc; 68 | 69 | // Inverted file 70 | std::vector > mvInvertedFile; 71 | 72 | // Mutex 73 | std::mutex mMutex; 74 | }; 75 | 76 | } //namespace ORB_SLAM 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /include/MapDrawer.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is part of ORB-SLAM2. 3 | * 4 | * Copyright (C) 2014-2016 Raúl Mur-Artal (University of Zaragoza) 5 | * For more information see 6 | * 7 | * ORB-SLAM2 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * ORB-SLAM2 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with ORB-SLAM2. If not, see . 19 | */ 20 | 21 | /** 22 | * This file is part of Jetson-SLAM and is taken from ORB-SLAM2 repo. See above. 23 | */ 24 | 25 | #ifndef MAPDRAWER_H 26 | #define MAPDRAWER_H 27 | 28 | #include"Map.h" 29 | #include"MapPoint.h" 30 | #include"KeyFrame.h" 31 | #include 32 | 33 | #include 34 | 35 | namespace Jetson_SLAM 36 | { 37 | 38 | class MapDrawer 39 | { 40 | public: 41 | MapDrawer(Map* pMap, const string &strSettingPath); 42 | 43 | Map* mpMap; 44 | 45 | void DrawMapPoints(); 46 | void DrawKeyFrames(const bool bDrawKF, const bool bDrawGraph); 47 | void DrawCurrentCamera(pangolin::OpenGlMatrix &Twc); 48 | void SetCurrentCameraPose(const cv::Mat &Tcw); 49 | void SetReferenceKeyFrame(KeyFrame *pKF); 50 | void GetCurrentOpenGLCameraMatrix(pangolin::OpenGlMatrix &M); 51 | 52 | private: 53 | 54 | float mKeyFrameSize; 55 | float mKeyFrameLineWidth; 56 | float mGraphLineWidth; 57 | float mPointSize; 58 | float mCameraSize; 59 | float mCameraLineWidth; 60 | 61 | cv::Mat mCameraPose; 62 | 63 | std::mutex mMutexCamera; 64 | }; 65 | 66 | } //namespace ORB_SLAM 67 | 68 | #endif // MAPDRAWER_H 69 | -------------------------------------------------------------------------------- /include/ORBVocabulary.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is part of ORB-SLAM2. 3 | * 4 | * Copyright (C) 2014-2016 Raúl Mur-Artal (University of Zaragoza) 5 | * For more information see 6 | * 7 | * ORB-SLAM2 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * ORB-SLAM2 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with ORB-SLAM2. If not, see . 19 | */ 20 | 21 | 22 | #ifndef ORBVOCABULARY_H 23 | #define ORBVOCABULARY_H 24 | 25 | #include"Thirdparty/DBoW2/DBoW2/FORB.h" 26 | #include"Thirdparty/DBoW2/DBoW2/TemplatedVocabulary.h" 27 | 28 | namespace Jetson_SLAM 29 | { 30 | 31 | typedef DBoW2::TemplatedVocabulary 32 | ORBVocabulary; 33 | 34 | } //namespace ORB_SLAM 35 | 36 | #endif // ORBVOCABULARY_H 37 | -------------------------------------------------------------------------------- /include/cuda/orb_matcher.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __ORB_MATCHER_GPU_HPP__ 2 | #define __ORB_MATCHER_GPU_HPP__ 3 | 4 | 5 | #include 6 | 7 | namespace orb_cuda{ 8 | 9 | 10 | 11 | void ORB_Search_by_projection_project_on_frame(int n_points, 12 | float* Px_gpu, float* Py_gpu, float* Pz_gpu, 13 | float* Rcw_gpu, float* tcw_gpu, 14 | float& fx, float& fy, float& cx, float& cy, 15 | float &minX, float &maxX, float &minY, float &maxY, 16 | float* u_gpu, float* v_gpu, float* invz_gpu, 17 | unsigned char* is_valid_gpu); 18 | 19 | void ORB_compute_distances(int n_points, 20 | int* idx_left, int* idx_right, 21 | unsigned char* descriptor_left, 22 | unsigned char* descriptor_right, 23 | int* distance); 24 | 25 | 26 | } 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /include/cuda/synced_mem_holder.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __SYNCED_MEM_HOLDER_HPP__ 2 | #define __SYNCED_MEM_HOLDER_HPP__ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace orb_cuda { 9 | 10 | template 11 | class SyncedMem { 12 | 13 | public: 14 | 15 | SyncedMem(void); 16 | 17 | ~SyncedMem(); 18 | 19 | 20 | void resize(int count); 21 | 22 | Dtype* cpu_data(); 23 | Dtype* gpu_data(); 24 | 25 | void to_cpu(void); 26 | void to_gpu(void); 27 | 28 | void to_cpu(int count); 29 | void to_gpu(int count); 30 | 31 | void to_cpu_async(void); 32 | void to_gpu_async(void); 33 | 34 | void to_cpu_async(cudaStream_t& cu_stream); 35 | void to_gpu_async(cudaStream_t& cu_stream); 36 | 37 | void to_cpu_async(int count); 38 | void to_gpu_async(int count); 39 | 40 | void to_cpu_async(cudaStream_t& cu_stream, int count); 41 | void to_gpu_async(cudaStream_t& cu_stream, int count); 42 | 43 | void resize_pitched(size_t width, size_t height); 44 | 45 | void sync_stream(void); 46 | 47 | void set_zero_gpu(void); 48 | void set_zero_gpu_async(void); 49 | 50 | void set_zero_cpu(void); 51 | 52 | //private: 53 | 54 | int count_; 55 | int capacity_; 56 | 57 | Dtype* cpu_data_; 58 | Dtype* gpu_data_; 59 | 60 | size_t pitch_; 61 | 62 | cudaStream_t cu_stream_; 63 | cudaError_t cu_error_; 64 | 65 | }; 66 | 67 | } 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /include/tictoc.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __DJI_TICTOC_HPP___ 2 | #define __DJI_TICTOC_HPP___ 3 | 4 | #include 5 | #include 6 | 7 | class tictoc 8 | { 9 | public: 10 | void tic(void) 11 | { 12 | t1 = std::chrono::steady_clock::now(); 13 | } 14 | 15 | float toc(void) 16 | { 17 | t2 = std::chrono::steady_clock::now(); 18 | time_ms = std::chrono::duration_cast >(t2 - t1).count() * 1000.0; 19 | return time_ms; 20 | } 21 | 22 | void toc_print(void) 23 | { 24 | t2 = std::chrono::steady_clock::now(); 25 | time_ms = std::chrono::duration_cast >(t2 - t1).count() * 1000.0; 26 | std::cout << time_ms << " ms\n"; 27 | } 28 | 29 | void print(void) 30 | { 31 | std::cout << time_ms << " ms\n"; 32 | } 33 | 34 | float time(void) 35 | { 36 | return time_ms; 37 | } 38 | 39 | private: 40 | std::chrono::steady_clock::time_point t1; 41 | std::chrono::steady_clock::time_point t2; 42 | float time_ms; 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /include/tictoc_cuda.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __TICTOC_CUDA_HPP___ 2 | #define __TICTOC_CUDA_HPP___ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | class tictoc 11 | { 12 | public: 13 | 14 | tictoc() 15 | { 16 | cudaEventCreate(&t1); 17 | cudaEventCreate(&t2); 18 | 19 | stream = NULL; 20 | } 21 | 22 | ~tictoc() 23 | { 24 | cudaEventDestroy(t1); 25 | cudaEventDestroy(t2); 26 | } 27 | 28 | 29 | void tic(void) 30 | { 31 | cudaEventRecord(t1,stream); 32 | } 33 | 34 | float toc(void) 35 | { 36 | cudaEventRecord(t2,stream); 37 | cudaEventSynchronize(t2); 38 | cudaEventElapsedTime(&time_ms, t1, t2); 39 | return time_ms; 40 | } 41 | 42 | void toc_print(void) 43 | { 44 | cudaEventRecord(t2,stream); 45 | cudaEventSynchronize(t2); 46 | cudaEventElapsedTime(&time_ms, t1, t2); 47 | std::cout << "Time elapsed = " << time_ms << " ms\n"; 48 | } 49 | 50 | void print(void) 51 | { 52 | std::cout << "Time elapsed = " << time_ms << " ms\n"; 53 | } 54 | 55 | float time(void) 56 | { 57 | return time_ms; 58 | } 59 | 60 | cudaStream_t stream; 61 | 62 | private: 63 | cudaEvent_t t1; 64 | cudaEvent_t t2; 65 | 66 | float time_ms; 67 | }; 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /lib/libJetson-SLAM.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishkumar822/Jetson-SLAM/6d47378bf40d2c344eb1a204c75bb16d9043f52a/lib/libJetson-SLAM.so -------------------------------------------------------------------------------- /src/cuda/orb_FAST_obtain_keypoints.cpp: -------------------------------------------------------------------------------- 1 | #include "cuda/orb_gpu.hpp" 2 | 3 | #include 4 | #include 5 | 6 | using namespace std; 7 | 8 | namespace orb_cuda { 9 | 10 | 11 | 12 | void ORB_GPU::FAST_obtain_keypoints(void) 13 | { 14 | if(!apply_nms_ms_) 15 | { 16 | for(int i=0;i 0) 39 | { 40 | if( j != count) 41 | { 42 | kp_x[count] = kp_x[j]; 43 | kp_y[count] = kp_y[j]; 44 | kp_score[count] = score; 45 | } 46 | 47 | 48 | count++; 49 | 50 | 51 | } 52 | } 53 | 54 | n_keypoints_[i] = count; 55 | } 56 | } 57 | 58 | 59 | 60 | } 61 | --------------------------------------------------------------------------------