文章目录

  • 前言
  • 安装
    • 依赖项
  • 运行unit_test
  • 结语

前言

  最近对新版本的g2o进行学习,相关的安装我这里就稍微说一下,以作记录,最主要的倒是它的unit_test的那个项目测试,调试得我真的是一言难尽,最后才调试出来,但是在其中一部分的调试并运行中,感觉是自己的处理有问题,或者原g2o就没处理好。这部分只能一个个的改,需要一定的权限,这就是真的尴尬的局面了。
  我是在2018年12月21日进行的安装,晚上开始进行unit_test的代码查阅,主要是想看看新版本的g2o是如何操作的,因为新版本采用了c++11标准,有些地方甚至使用了move()函数进行右值引用部分的使用。
  我进行安装的版本号是"b226dcb" 。而以前的旧版本大概可以说和slam十四讲和ORB-SLAM2所给出的g2o版本一致,事实上他们两属于哪个版本我也不清楚,这个版本比较旧,所以对于slam十四讲中的g2o,大致只是让你能了解一下g2o的使用方式,对于新版本倒是不能照搬过来。我打算试试新版本的g2o,我在项目中使用了先使用g2o的旧版本,到时候再换成新版本。

安装

依赖项

  按照新版本的g2o的CMakelist.txt文件,应该需要这么安装。

git clone https://github.com/RainerKuemmerle/g2o.git
cd g2o
sudo apt-get install cmake libeigen3-dev
sudo apt-get install libsuitesparse-dev qtdeclarative5-dev qt5-qmake libqglviewer-dev libcholmod3.0.6 liblapack-dev libblas-dev
mkdir build
cd build
cmake ..
make
sudo make install

  最后输出安装的这些信息,请注意,这些信息才是最主要的信息!!!!因为它涉及到后面修改unit_test的依赖库链接时候的修改

-- Install configuration: "Release"
-- Installing: /usr/local/include/g2o/config.h
-- Installing: /usr/local/lib/cmake/g2o/g2oConfig.cmake
-- Installing: /usr/local/lib/cmake/g2o/g2oConfigVersion.cmake
-- Installing: /usr/local/lib/cmake/g2o/g2oTargets.cmake
-- Installing: /usr/local/lib/cmake/g2o/g2oTargets-release.cmake
-- Installing: /usr/local/lib/libg2o_ext_freeglut_minimal.so
-- Installing: /usr/local/include/g2o/freeglut/freeglut_minimal.h
-- Installing: /usr/local/lib/libdf -lh.so
-- Installing: /usr/local/lib/libg2o_opengl_helper.so
-- Installing: /usr/local/include/g2o/stuff/macros.h
-- Installing: /usr/local/include/g2o/stuff/scoped_pointer.h
-- Installing: /usr/local/include/g2o/stuff/os_specific.h
-- Installing: /usr/local/include/g2o/stuff/g2o_stuff_api.h
-- Installing: /usr/local/include/g2o/stuff/sampler.h
-- Installing: /usr/local/include/g2o/stuff/string_tools.h
-- Installing: /usr/local/include/g2o/stuff/misc.h
-- Installing: /usr/local/include/g2o/stuff/unscented.h
-- Installing: /usr/local/include/g2o/stuff/command_args.h
-- Installing: /usr/local/include/g2o/stuff/sparse_helper.h
-- Installing: /usr/local/include/g2o/stuff/timeutil.h
-- Installing: /usr/local/include/g2o/stuff/tictoc.h
-- Installing: /usr/local/include/g2o/stuff/filesys_tools.h
-- Installing: /usr/local/include/g2o/stuff/opengl_wrapper.h
-- Installing: /usr/local/include/g2o/stuff/color_macros.h
-- Installing: /usr/local/include/g2o/stuff/property.h
-- Installing: /usr/local/include/g2o/stuff/opengl_primitives.h
-- Installing: /usr/local/lib/libg2o_core.so
-- Set runtime path of "/usr/local/lib/libg2o_core.so" to ""
-- Installing: /usr/local/include/g2o/core/batch_stats.h
-- Installing: /usr/local/include/g2o/core/optimization_algorithm_gauss_newton.h
-- Installing: /usr/local/include/g2o/core/sparse_block_matrix_ccs.h
-- Installing: /usr/local/include/g2o/core/eigen_types.h
-- Installing: /usr/local/include/g2o/core/sparse_optimizer_terminate_action.h
-- Installing: /usr/local/include/g2o/core/sparse_block_matrix.h
-- Installing: /usr/local/include/g2o/core/ownership.h
-- Installing: /usr/local/include/g2o/core/hyper_graph_action.h
-- Installing: /usr/local/include/g2o/core/base_vertex.h
-- Installing: /usr/local/include/g2o/core/linear_solver.h
-- Installing: /usr/local/include/g2o/core/factory.h
-- Installing: /usr/local/include/g2o/core/base_edge.h
-- Installing: /usr/local/include/g2o/core/cache.h
-- Installing: /usr/local/include/g2o/core/sparse_optimizer.h
-- Installing: /usr/local/include/g2o/core/optimization_algorithm.h
-- Installing: /usr/local/include/g2o/core/base_multi_edge.h
-- Installing: /usr/local/include/g2o/core/optimization_algorithm_levenberg.h
-- Installing: /usr/local/include/g2o/core/hyper_dijkstra.h
-- Installing: /usr/local/include/g2o/core/jacobian_workspace.h
-- Installing: /usr/local/include/g2o/core/sparse_block_matrix_diagonal.h
-- Installing: /usr/local/include/g2o/core/estimate_propagator.h
-- Installing: /usr/local/include/g2o/core/openmp_mutex.h
-- Installing: /usr/local/include/g2o/core/robust_kernel.h
-- Installing: /usr/local/include/g2o/core/robust_kernel_factory.h
-- Installing: /usr/local/include/g2o/core/optimization_algorithm_property.h
-- Installing: /usr/local/include/g2o/core/g2o_core_api.h
-- Installing: /usr/local/include/g2o/core/marginal_covariance_cholesky.h
-- Installing: /usr/local/include/g2o/core/optimizable_graph.h
-- Installing: /usr/local/include/g2o/core/matrix_structure.h
-- Installing: /usr/local/include/g2o/core/solver.h
-- Installing: /usr/local/include/g2o/core/block_solver.h
-- Installing: /usr/local/include/g2o/core/hyper_graph.h
-- Installing: /usr/local/include/g2o/core/optimization_algorithm_dogleg.h
-- Installing: /usr/local/include/g2o/core/robust_kernel_impl.h
-- Installing: /usr/local/include/g2o/core/base_binary_edge.h
-- Installing: /usr/local/include/g2o/core/matrix_operations.h
-- Installing: /usr/local/include/g2o/core/parameter_container.h
-- Installing: /usr/local/include/g2o/core/base_unary_edge.h
-- Installing: /usr/local/include/g2o/core/creators.h
-- Installing: /usr/local/include/g2o/core/parameter.h
-- Installing: /usr/local/include/g2o/core/optimization_algorithm_factory.h
-- Installing: /usr/local/include/g2o/core/optimization_algorithm_with_hessian.h
-- Installing: /usr/local/include/g2o/core/base_binary_edge.hpp
-- Installing: /usr/local/include/g2o/core/base_unary_edge.hpp
-- Installing: /usr/local/include/g2o/core/base_multi_edge.hpp
-- Installing: /usr/local/include/g2o/core/base_vertex.hpp
-- Installing: /usr/local/include/g2o/core/block_solver.hpp
-- Installing: /usr/local/include/g2o/core/dynamic_aligned_buffer.hpp
-- Installing: /usr/local/include/g2o/core/sparse_block_matrix.hpp
-- Installing: /usr/local/lib/libg2o_cli.so
-- Set runtime path of "/usr/local/lib/libg2o_cli.so" to ""
-- Installing: /usr/local/bin/g2o
-- Set runtime path of "/usr/local/bin/g2o" to ""
-- Installing: /usr/local/include/g2o/apps/g2o_cli/g2o_cli_api.h
-- Installing: /usr/local/include/g2o/apps/g2o_cli/dl_wrapper.h
-- Installing: /usr/local/include/g2o/apps/g2o_cli/g2o_common.h
-- Installing: /usr/local/include/g2o/apps/g2o_cli/output_helper.h
-- Installing: /usr/local/lib/libg2o_hierarchical.so
-- Set runtime path of "/usr/local/lib/libg2o_hierarchical.so" to ""
-- Installing: /usr/local/include/g2o/apps/g2o_hierarchical/edge_types_cost_function.h
-- Installing: /usr/local/include/g2o/apps/g2o_hierarchical/simple_star_ops.h
-- Installing: /usr/local/include/g2o/apps/g2o_hierarchical/star.h
-- Installing: /usr/local/include/g2o/apps/g2o_hierarchical/backbone_tree_action.h
-- Installing: /usr/local/include/g2o/apps/g2o_hierarchical/g2o_hierarchical_api.h
-- Installing: /usr/local/include/g2o/apps/g2o_hierarchical/edge_labeler.h
-- Installing: /usr/local/include/g2o/apps/g2o_hierarchical/edge_creator.h
-- Installing: /usr/local/lib/libg2o_simulator.so
-- Set runtime path of "/usr/local/lib/libg2o_simulator.so" to ""
-- Installing: /usr/local/bin/g2o_simulator2d
-- Set runtime path of "/usr/local/bin/g2o_simulator2d" to ""
-- Installing: /usr/local/bin/g2o_simulator3d
-- Set runtime path of "/usr/local/bin/g2o_simulator3d" to ""
-- Installing: /usr/local/bin/g2o_anonymize_observations
-- Set runtime path of "/usr/local/bin/g2o_anonymize_observations" to ""
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_line3d.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/simutils.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_pointxy.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/simulator3d.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/simulator2d.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/simulator3d_base.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_pose3d_offset.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_odometry3d.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_odometry2d.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/simulator2d_base.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_se3_prior.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_pose3d.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_pointxyz.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_pointxyz_disparity.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_odometry.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/g2o_simulator_api.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/simulator.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_segment2d_pointline.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_segment2d_line.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/pointsensorparameters.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_pose2d.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_pointxyz_depth.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_pointxy_offset.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_segment2d.h
-- Installing: /usr/local/include/g2o/apps/g2o_simulator/sensor_pointxy_bearing.h
-- Installing: /usr/local/bin/g2o_viewer
-- Set runtime path of "/usr/local/bin/g2o_viewer" to ""
-- Installing: /usr/local/lib/libg2o_viewer.so
-- Set runtime path of "/usr/local/lib/libg2o_viewer.so" to ""
-- Installing: /usr/local/include/g2o/apps/g2o_viewer/properties_widget.h
-- Installing: /usr/local/include/g2o/apps/g2o_viewer/run_g2o_viewer.h
-- Installing: /usr/local/include/g2o/apps/g2o_viewer/main_window.h
-- Installing: /usr/local/include/g2o/apps/g2o_viewer/g2o_qglviewer.h
-- Installing: /usr/local/include/g2o/apps/g2o_viewer/gui_hyper_graph_action.h
-- Installing: /usr/local/include/g2o/apps/g2o_viewer/g2o_viewer_api.h
-- Installing: /usr/local/include/g2o/apps/g2o_viewer/stream_redirect.h
-- Installing: /usr/local/include/g2o/apps/g2o_viewer/viewer_properties_widget.h
-- Installing: /usr/local/include/g2o/apps/g2o_viewer/ui_base_main_window.h
-- Installing: /usr/local/include/g2o/apps/g2o_viewer/ui_base_properties_widget.h
-- Installing: /usr/local/lib/libg2o_types_data.so
-- Set runtime path of "/usr/local/lib/libg2o_types_data.so" to ""
-- Installing: /usr/local/include/g2o/types/data/g2o_types_data_api.h
-- Installing: /usr/local/include/g2o/types/data/types_data.h
-- Installing: /usr/local/include/g2o/types/data/laser_parameters.h
-- Installing: /usr/local/include/g2o/types/data/robot_data.h
-- Installing: /usr/local/include/g2o/types/data/data_queue.h
-- Installing: /usr/local/include/g2o/types/data/vertex_ellipse.h
-- Installing: /usr/local/include/g2o/types/data/raw_laser.h
-- Installing: /usr/local/include/g2o/types/data/vertex_tag.h
-- Installing: /usr/local/include/g2o/types/data/robot_laser.h
-- Installing: /usr/local/lib/libg2o_types_slam2d.so
-- Set runtime path of "/usr/local/lib/libg2o_types_slam2d.so" to ""
-- Installing: /usr/local/include/g2o/types/slam2d/edge_se2_twopointsxy.h
-- Installing: /usr/local/include/g2o/types/slam2d/edge_se2_offset.h
-- Installing: /usr/local/include/g2o/types/slam2d/edge_se2_pointxy_bearing.h
-- Installing: /usr/local/include/g2o/types/slam2d/edge_se2_lotsofxy.h
-- Installing: /usr/local/include/g2o/types/slam2d/edge_se2.h
-- Installing: /usr/local/include/g2o/types/slam2d/types_slam2d.h
-- Installing: /usr/local/include/g2o/types/slam2d/edge_se2_xyprior.h
-- Installing: /usr/local/include/g2o/types/slam2d/edge_xy_prior.h
-- Installing: /usr/local/include/g2o/types/slam2d/vertex_point_xy.h
-- Installing: /usr/local/include/g2o/types/slam2d/g2o_types_slam2d_api.h
-- Installing: /usr/local/include/g2o/types/slam2d/edge_se2_pointxy_calib.h
-- Installing: /usr/local/include/g2o/types/slam2d/vertex_se2.h
-- Installing: /usr/local/include/g2o/types/slam2d/edge_pointxy.h
-- Installing: /usr/local/include/g2o/types/slam2d/parameter_se2_offset.h
-- Installing: /usr/local/include/g2o/types/slam2d/edge_se2_pointxy.h
-- Installing: /usr/local/include/g2o/types/slam2d/se2.h
-- Installing: /usr/local/include/g2o/types/slam2d/edge_se2_pointxy_offset.h
-- Installing: /usr/local/include/g2o/types/slam2d/edge_se2_prior.h
-- Installing: /usr/local/lib/libg2o_types_slam3d.so
-- Set runtime path of "/usr/local/lib/libg2o_types_slam3d.so" to ""
-- Installing: /usr/local/include/g2o/types/slam3d/edge_se3_offset.h
-- Installing: /usr/local/include/g2o/types/slam3d/edge_se3.h
-- Installing: /usr/local/include/g2o/types/slam3d/edge_xyz_prior.h
-- Installing: /usr/local/include/g2o/types/slam3d/isometry3d_mappings.h
-- Installing: /usr/local/include/g2o/types/slam3d/isometry3d_gradients.h
-- Installing: /usr/local/include/g2o/types/slam3d/parameter_se3_offset.h
-- Installing: /usr/local/include/g2o/types/slam3d/edge_se3_pointxyz.h
-- Installing: /usr/local/include/g2o/types/slam3d/g2o_types_slam3d_api.h
-- Installing: /usr/local/include/g2o/types/slam3d/se3_ops.h
-- Installing: /usr/local/include/g2o/types/slam3d/edge_pointxyz.h
-- Installing: /usr/local/include/g2o/types/slam3d/edge_se3_pointxyz_disparity.h
-- Installing: /usr/local/include/g2o/types/slam3d/se3quat.h
-- Installing: /usr/local/include/g2o/types/slam3d/edge_se3_lotsofxyz.h
-- Installing: /usr/local/include/g2o/types/slam3d/vertex_pointxyz.h
-- Installing: /usr/local/include/g2o/types/slam3d/dquat2mat.h
-- Installing: /usr/local/include/g2o/types/slam3d/types_slam3d.h
-- Installing: /usr/local/include/g2o/types/slam3d/vertex_se3.h
-- Installing: /usr/local/include/g2o/types/slam3d/edge_se3_prior.h
-- Installing: /usr/local/include/g2o/types/slam3d/edge_se3_pointxyz_depth.h
-- Installing: /usr/local/include/g2o/types/slam3d/parameter_camera.h
-- Installing: /usr/local/include/g2o/types/slam3d/parameter_stereo_camera.h
-- Installing: /usr/local/include/g2o/types/slam3d/se3_ops.hpp
-- Installing: /usr/local/lib/libg2o_types_sba.so
-- Set runtime path of "/usr/local/lib/libg2o_types_sba.so" to ""
-- Installing: /usr/local/include/g2o/types/sba/sbacam.h
-- Installing: /usr/local/include/g2o/types/sba/types_sba.h
-- Installing: /usr/local/include/g2o/types/sba/g2o_types_sba_api.h
-- Installing: /usr/local/include/g2o/types/sba/types_six_dof_expmap.h
-- Installing: /usr/local/lib/libg2o_types_sim3.so
-- Set runtime path of "/usr/local/lib/libg2o_types_sim3.so" to ""
-- Installing: /usr/local/include/g2o/types/sim3/sim3.h
-- Installing: /usr/local/include/g2o/types/sim3/types_seven_dof_expmap.h
-- Installing: /usr/local/lib/libg2o_types_icp.so
-- Set runtime path of "/usr/local/lib/libg2o_types_icp.so" to ""
-- Installing: /usr/local/include/g2o/types/icp/g2o_types_icp_api.h
-- Installing: /usr/local/include/g2o/types/icp/types_icp.h
-- Installing: /usr/local/lib/libg2o_types_sclam2d.so
-- Set runtime path of "/usr/local/lib/libg2o_types_sclam2d.so" to ""
-- Installing: /usr/local/include/g2o/types/sclam2d/edge_se2_sensor_calib.h
-- Installing: /usr/local/include/g2o/types/sclam2d/vertex_odom_differential_params.h
-- Installing: /usr/local/include/g2o/types/sclam2d/g2o_types_sclam2d_api.h
-- Installing: /usr/local/include/g2o/types/sclam2d/edge_se2_odom_differential_calib.h
-- Installing: /usr/local/include/g2o/types/sclam2d/odometry_measurement.h
-- Installing: /usr/local/include/g2o/types/sclam2d/types_sclam2d.h
-- Installing: /usr/local/lib/libg2o_types_slam2d_addons.so
-- Set runtime path of "/usr/local/lib/libg2o_types_slam2d_addons.so" to ""
-- Installing: /usr/local/include/g2o/types/slam2d_addons/vertex_segment2d.h
-- Installing: /usr/local/include/g2o/types/slam2d_addons/types_slam2d_addons.h
-- Installing: /usr/local/include/g2o/types/slam2d_addons/line_2d.h
-- Installing: /usr/local/include/g2o/types/slam2d_addons/vertex_line2d.h
-- Installing: /usr/local/include/g2o/types/slam2d_addons/edge_se2_segment2d.h
-- Installing: /usr/local/include/g2o/types/slam2d_addons/edge_se2_segment2d_line.h
-- Installing: /usr/local/include/g2o/types/slam2d_addons/edge_se2_line2d.h
-- Installing: /usr/local/include/g2o/types/slam2d_addons/edge_line2d_pointxy.h
-- Installing: /usr/local/include/g2o/types/slam2d_addons/edge_se2_segment2d_pointLine.h
-- Installing: /usr/local/include/g2o/types/slam2d_addons/g2o_types_slam2d_addons_api.h
-- Installing: /usr/local/include/g2o/types/slam2d_addons/edge_line2d.h
-- Installing: /usr/local/lib/libg2o_types_slam3d_addons.so
-- Set runtime path of "/usr/local/lib/libg2o_types_slam3d_addons.so" to ""
-- Installing: /usr/local/include/g2o/types/slam3d_addons/vertex_se3_euler.h
-- Installing: /usr/local/include/g2o/types/slam3d_addons/edge_se3_euler.h
-- Installing: /usr/local/include/g2o/types/slam3d_addons/g2o_types_slam3d_addons_api.h
-- Installing: /usr/local/include/g2o/types/slam3d_addons/line3d.h
-- Installing: /usr/local/include/g2o/types/slam3d_addons/vertex_plane.h
-- Installing: /usr/local/include/g2o/types/slam3d_addons/edge_se3_calib.h
-- Installing: /usr/local/include/g2o/types/slam3d_addons/vertex_line3d.h
-- Installing: /usr/local/include/g2o/types/slam3d_addons/edge_plane.h
-- Installing: /usr/local/include/g2o/types/slam3d_addons/plane3d.h
-- Installing: /usr/local/include/g2o/types/slam3d_addons/types_slam3d_addons.h
-- Installing: /usr/local/include/g2o/types/slam3d_addons/edge_se3_line.h
-- Installing: /usr/local/include/g2o/types/slam3d_addons/edge_se3_plane_calib.h
-- Installing: /usr/local/lib/libg2o_solver_pcg.so
-- Set runtime path of "/usr/local/lib/libg2o_solver_pcg.so" to ""
-- Installing: /usr/local/include/g2o/solvers/pcg/linear_solver_pcg.h
-- Installing: /usr/local/include/g2o/solvers/pcg/linear_solver_pcg.hpp
-- Installing: /usr/local/lib/libg2o_solver_dense.so
-- Set runtime path of "/usr/local/lib/libg2o_solver_dense.so" to ""
-- Installing: /usr/local/include/g2o/solvers/dense/linear_solver_dense.h
-- Installing: /usr/local/lib/libg2o_solver_structure_only.so
-- Set runtime path of "/usr/local/lib/libg2o_solver_structure_only.so" to ""
-- Installing: /usr/local/include/g2o/solvers/structure_only/structure_only_solver.h
-- Installing: /usr/local/lib/libg2o_solver_csparse.so
-- Set runtime path of "/usr/local/lib/libg2o_solver_csparse.so" to ""
-- Installing: /usr/local/lib/libg2o_csparse_extension.so
-- Installing: /usr/local/include/g2o/solvers/csparse/g2o_csparse_extension_api.h
-- Installing: /usr/local/include/g2o/solvers/csparse/g2o_csparse_api.h
-- Installing: /usr/local/include/g2o/solvers/csparse/csparse_helper.h
-- Installing: /usr/local/include/g2o/solvers/csparse/csparse_extension.h
-- Installing: /usr/local/include/g2o/solvers/csparse/linear_solver_csparse.h
-- Installing: /usr/local/lib/libg2o_solver_slam2d_linear.so
-- Set runtime path of "/usr/local/lib/libg2o_solver_slam2d_linear.so" to ""
-- Installing: /usr/local/include/g2o/solvers/slam2d_linear/g2o_slam2d_linear_api.h
-- Installing: /usr/local/include/g2o/solvers/slam2d_linear/solver_slam2d_linear.h
-- Installing: /usr/local/lib/libg2o_solver_cholmod.so
-- Set runtime path of "/usr/local/lib/libg2o_solver_cholmod.so" to ""
-- Installing: /usr/local/include/g2o/solvers/cholmod/linear_solver_cholmod.h
-- Installing: /usr/local/lib/libg2o_solver_eigen.so
-- Set runtime path of "/usr/local/lib/libg2o_solver_eigen.so" to ""
-- Installing: /usr/local/include/g2o/solvers/eigen/linear_solver_eigen.h
-- Installing: /usr/local/lib/libg2o_parser.so
-- Installing: /usr/local/include/g2o/examples/interactive_slam/slam_parser/parser/bison_parser.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/slam_parser/parser/slam_context.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/slam_parser/parser/FlexLexer.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/slam_parser/parser/commands.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/slam_parser/parser/driver.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/slam_parser/parser/scanner.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/slam_parser/parser/location.hh
-- Installing: /usr/local/include/g2o/examples/interactive_slam/slam_parser/parser/position.hh
-- Installing: /usr/local/include/g2o/examples/interactive_slam/slam_parser/parser/stack.hh
-- Installing: /usr/local/lib/libg2o_interface.so
-- Set runtime path of "/usr/local/lib/libg2o_interface.so" to ""
-- Installing: /usr/local/include/g2o/examples/interactive_slam/slam_parser/interface/slam_context_interface.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/slam_parser/interface/parser_interface.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/slam_parser/interface/abstract_slam_interface.h
-- Installing: /usr/local/lib/libg2o_interactive.so
-- Set runtime path of "/usr/local/lib/libg2o_interactive.so" to ""
-- Installing: /usr/local/bin/g2o_online
-- Set runtime path of "/usr/local/bin/g2o_online" to ""
-- Installing: /usr/local/include/g2o/examples/interactive_slam/g2o_interactive/types_slam3d_online.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/g2o_interactive/g2o_interactive_api.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/g2o_interactive/graph_optimizer_sparse_online.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/g2o_interactive/fast_output.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/g2o_interactive/g2o_slam_interface.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/g2o_interactive/types_slam2d_online.h
-- Installing: /usr/local/lib/libg2o_incremental.so
-- Set runtime path of "/usr/local/lib/libg2o_incremental.so" to ""
-- Installing: /usr/local/bin/g2o_incremental
-- Set runtime path of "/usr/local/bin/g2o_incremental" to ""
-- Installing: /usr/local/include/g2o/examples/interactive_slam/g2o_incremental/g2o_incremental_api.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/g2o_incremental/graph_optimizer_sparse_incremental.h
-- Installing: /usr/local/include/g2o/examples/interactive_slam/g2o_incremental/linear_solver_cholmod_online.h

  为了方便起见,我把其中的.so文件的名字罗列成表单,以方便查询。

链接名 链接名 链接名
libg2o_calibration_odom_laser.so libg2o_cil.so libg2o_core.so
libg2o_csparse_extension.so libg2o_ext_freeglut_minimal.so libg2o_hierarchical.so
libg2o_incremental.so libg2o_interactive.so libg2o_interface.so
libg2o_opengl_helper.so libg2o_parser.so libg2o_simulator.so
libg2o_solver_cholmod.so libg2o_solver_csparse.so libg2o_solver_dense.so
libg2o_solver_eigen.so libg2o_solver_pcg.so libg2o_solver_slam2d_linear.so
libg2o_solver_structure_only.so libg2o_stuff.so libg2o_tutorial_slam2d.so
libg2o_types_data.so libg2o_types_icp.so libg2o_types_sba.so
libg2o_types_sim3.so libg2o_types_slam2d.so libg2o_types_slam2d_addons.so
libg2o_types_slam3d.so libg2o_types_slam3d_addons.so libg2o_viewer.so

  也许会有遗漏,如果有遗漏之处,请指出。

运行unit_test

  接着进行更改,我们先进入g2o下面的unit_test,然后运行下面的命令:

mkdir build
cd build
cmake ..
make

  你会发现它会报错,报错有哪些我具体已经忘记了,但是大体上分为这几类,按照这几种进行修改,基本上一般都修改出来了。

  •   和你说/usr/local/include/g2o/core的"xx.h"有问题,那么一般指出来的是<Eigen/core>没有这个文件啊,其实是文件路径问题,我最愚蠢的办法,当然我能力不足,不知道怎么修改g2o原始的CMakelist.txt,然后我就是进入/usr/local/include/g2o/core目录下,修改<Eigen/core><eigen3/Eigen/core>,这种原因而报错的文件超级的多,所以比较麻烦,我也没想到比较好的解决方案。
  •   当你这上面的修改完了,再显示DSO missing from command line,这种问题的产生有好几个,最主要的是比如说某个libstuff.so找不到,这其实是新版本的g2o下,根本不会产生这个了,而是g2o_stuff。这类相关问题主要是出现在几个子文件项目中,比如stuffslam3dslam2d等等,你需要修改的仅仅是它们对应的CMakelist.txt,这里举例子说明。

  •   第三个是它自己本身项目内部,而不是在安装目录下进行报错,文件找不到。那么我这里是使用相对路径修改,比如:

  一般就是这么三个比较重大的错误,其他小错误倒是没发现了,如果还有其他错误,欢迎一起交流,毕竟是我在运行过程中的记录,并不是很完善。
  最后的结果就是这么的。

结语

  本次运行新版本的g2o就到这里结束了,后面我一步步做记录学习g2o也不知道有没有时间上来发发贴,嗯,祝大家也能运行成功新版本的g2o,一起进步一起学习。

g2o学习记录(1)安装和运行其下面的unit_test项目相关推荐

  1. OMNeT学习之OMNeT安装与运行

    OMNeT学习之OMNeT安装与运行 前言 本文原创,创作不易,转载请注明!!! 本人为OMNet初学者,如有错误,请不吝请教! 最近学WSN(无线传感器网络),做传感器实验,老师强调了仿真平台Mat ...

  2. g2o学习记录(4)cmake-gui再次编译g2o及不太完美的处理cs.h错误[20190323已找到完美解决方案](非干货纯记录,可不看)

    文章目录 前言 第一次cmake-gui安装g2o 安装cmake-gui 第二次cmake-gui编译g2o 第三次cmake-gui安装 第四次cmake-gui安装g2o 不太完美的解决cs.h ...

  3. LRS+XAPI教育学习记录(安装lrs,以及用xapi传输数据到lrs)

    此LRS團隊出了最新版的LRS,是node寫的.運行速度是本文寫的這個版本的無數倍,待我整理好再發出來. 关于lrs跟xapi国内基本用的少,质料基本都是英文的,中文的也就只有繁体的一些少少的资料.新 ...

  4. 达梦数据库学习记录-包含安装、创建、体系结构、表空间用户模式对象管理备份与还原等

    达梦数据库DCA学习记录 目录 达梦数据库以及认证体系简单介绍 安装DM8数据库及常见问题解决办法 创建数据库.数据库实例及相关知识点介绍 数据库连接 数据库启动与关闭 DM8线程 DM8逻辑存储结构 ...

  5. Linux 学习记录 一(安装、基本文件操作).

         Linux distributions主要分为两大系统,一种是RPM方式安装软件的系统,包括Red Hat,Fedora,SuSE等都是这类:一种则是使用Debian的dpkg方式安装软件的 ...

  6. PyTorch学习记录-1PyTorch安装

    学习建议里有PyTorch,所以我就开始了PyTorch的学习. 首先就是安装啦,去官网很清楚,可以选择自己的版本和平台,然后下面就会出现 Run this command:  后面跟着的命令复制运行 ...

  7. [UE][UE5]零基础学习-学习记录1-UE5安装与基本使用方法

    [UE5]学习1-UE5安装与基本使用方法 写在前面 01.作者碎碎念 2.UE5安装方法 01.UE5需要的电脑配置 02.UE5安装方法 001.Epic下载 002.下载安装UE5 03.基本使 ...

  8. tcl学习---windows下安装及运行环境

    以前一直用tcl,但是面试的时候发现很多基本的概念竟然又忘记了. 有什么好说的,从头到尾再实践一遍吧~~~~ 1:下载windows版本 不方便UNIX/LINUX,所以直接下载windows版本,现 ...

  9. R语言学习记录之安装caret包与jupyter关联R内核

    1.安装caret包 #以下是caret包所依赖的所有包,可以用如下脚本进行安装预先依赖包 caret_needed_packages <- c("ps","pro ...

最新文章

  1. iOS自定义转场动画
  2. 从 WordCount 到 MapReduce 计算模型
  3. java 数组用字符做下表_JAVA字符串json数组使用Formatter格式化成表格形式
  4. 在ubuntu中安装minicom时出现device /dev/tty8 is locked解决办法
  5. 顺序结构实现【数据结构】
  6. mac terminal update management pack
  7. 【转载】异步调用与多线程的区别
  8. 贝叶斯概率推断:短信数据推断行为
  9. 201521123045 《Java程序设计》第7周学习总结
  10. 一元二次方程求根。当a=0时,输出“It is not a quadratic equation \n“;当a不等于0时,输出“一对共轭复根: “x1 = %.2f+%.2fi, x2 = %.2f
  11. linux 光盘刻录命令,Linux中使用命令进行光盘刻录
  12. ssm客户关系管理系统
  13. 困扰了已久的TCP/IP 协议,终于有人讲的明明白白,太强了
  14. 实时传输协议:RTP、RTCP、RTSP介绍
  15. Recent Trends in Deep Learning Based Natural Language Processing(arXiv)笔记
  16. Vue中登录验证成功后保存token,并每次请求携带并验证token操作
  17. 手把手带大家搭建一个java个人网站(腾讯云为例)
  18. Apache LICENSE 2.0 授权介绍
  19. 教师专用计算机等级考试,授课教师谈计算机等级考试
  20. SAP VF11冲销发票BADI

热门文章

  1. 全志 A83 芯片烧录方法(Linux + Windows)
  2. 彻底删除微软拼音输入法这个讨厌的家伙
  3. 免费pdf合并在线,这几个神仙网站请收好
  4. 数字图像处理 拜耳过滤器简介
  5. oracle apex 日志,Oracle Apex 调试技巧
  6. 【ava数据集可视化】ava数据集ID可视化 A Video Dataset of Spatio-temporally Localized Atomic Visual Actions
  7. 双塔模型-语义索引策略 [In-batch Negatives]
  8. 好用android平板,好用却不平凡,Remix OS让安卓平板活过来!
  9. Oracle_02查询函数
  10. CodeBlocks旧版下载