Giter VIP home page Giter VIP logo

Comments (4)

lbhqw avatar lbhqw commented on August 16, 2024

home/l/bathymetric_slam/src/graph_optimization/src/ceres_optimizer.cpp:274:5: error: reference to ‘ceres’ is ambiguous
274 | ceres::optimizer::VectorOfConstraints constraints;
| ^~~~~
In file included from /usr/local/include/g2o/autodiff/fixed_array.h:41,
from /usr/local/include/g2o/core/base_fixed_sized_edge.h:36,
from /usr/local/include/g2o/core/base_binary_edge.h:30,
from /usr/local/include/g2o/types/slam3d/edge_se3.h:30,
from /home/l/bathymetric_slam/src/graph_optimization/include/graph_optimization/graph_construction.hpp:16,
from /home/l/bathymetric_slam/src/graph_optimization/include/graph_optimization/ceres_optimizer.hpp:23,
from /home/l/bathymetric_slam/src/graph_optimization/src/ceres_optimizer.cpp:12:

from bathymetric_slam.

luxiya01 avatar luxiya01 commented on August 16, 2024

Hi, I tested the master branch on Ubuntu 22.04 and ceres 2.1.0 and didn't experience compilation errors. Could it be that you have multiple ceres installed on your machine?

from bathymetric_slam.

lbhqw avatar lbhqw commented on August 16, 2024

No,I used Ubuntu 20.04 and ceres 2.1.0 ,some details list: it seems that errors between ceres and g2o
optimizer.cpp:12:
/home/l/bathymetric_slam/src/graph_optimization/src/ceres_optimizer.cpp:275:11: error: reference to ‘ceres’ is ambiguous
275 | CHECK(ceres::optimizer::ReadG2oFile(outFilename, &poses, &constraints))
| ^~~~~
In file included from /usr/local/include/g2o/autodiff/fixed_array.h:41,
from /usr/local/include/g2o/core/base_fixed_sized_edge.h:36,
from /usr/local/include/g2o/core/base_binary_edge.h:30,
from /usr/local/include/g2o/types/slam3d/edge_se3.h:30,
from /home/l/bathymetric_slam/src/graph_optimization/include/graph_optimization/graph_construction.hpp:16,
from /home/l/bathymetric_slam/src/graph_optimization/include/graph_optimization/ceres_optimizer.hpp:23,
from /home/l/bathymetric_slam/src/graph_optimization/src/ceres_optimizer.cpp:12:
/usr/local/include/g2o/autodiff/memory.h:44:11: note: candidates are: ‘namespace g2o::ceres { }’
44 | namespace ceres {
| ^~~~~
In file included from /usr/local/include/ceres/internal/fixed_array.h:41,
from /usr/local/include/ceres/internal/array_selector.h:38,
from /usr/local/include/ceres/internal/autodiff.h:147,
from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/l/bathymetric_slam/src/graph_optimization/include/graph_optimization/ceres_optimizer.hpp:19,
from /home/l/bathymetric_slam/src/graph_optimization/src/ceres_optimizer.cpp:12:
/usr/local/include/ceres/internal/memory.h:43:11: note: ‘namespace ceres { }’
43 | namespace ceres {
| ^~~~~
In file included from /usr/local/include/ceres/internal/fixed_array.h:42,
from /usr/local/include/ceres/internal/array_selector.h:38,
from /usr/local/include/ceres/internal/autodiff.h:147,
from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/l/bathymetric_slam/src/graph_optimization/include/graph_optimization/ceres_optimizer.hpp:19,
from /home/l/bathymetric_slam/src/graph_optimization/src/ceres_optimizer.cpp:12:
/home/l/bathymetric_slam/src/graph_optimization/src/ceres_optimizer.cpp:275:55: error: ‘poses’ was not declared in this scope
275 | CHECK(ceres::optimizer::ReadG2oFile(outFilename, &poses, &constraints))
| ^~~~~
/home/l/bathymetric_slam/src/graph_optimization/src/ceres_optimizer.cpp:275:63: error: ‘constraints’ was not declared in this scope; did you mean ‘Constraint3d’?
275 | CHECK(ceres::optimizer::ReadG2oFile(outFilename, &poses, &constraints))
| ^~~~~~~~~~~
/home/l/bathymetric_slam/src/graph_optimization/src/ceres_optimizer.cpp:278:11: error: reference to ‘ceres’ is ambiguous
278 | CHECK(ceres::optimizer::OutputPoses("poses_original.txt", poses))
| ^~~~~
In file included from /usr/local/include/g2o/autodiff/fixed_array.h:41,
from /usr/local/include/g2o/core/base_fixed_sized_edge.h:36,
from /usr/local/include/g2o/core/base_binary_edge.h:30,
from /usr/local/include/g2o/types/slam3d/edge_se3.h:30,
from /home/l/bathymetric_slam/src/graph_optimization/include/graph_optimization/graph_construction.hpp:16,
from /home/l/bathymetric_slam/src/graph_optimization/include/graph_optimization/ceres_optimizer.hpp:23,
from /home/l/bathymetric_slam/src/graph_optimization/src/ceres_optimizer.cpp:12:
/usr/local/include/g2o/autodiff/memory.h:44:11: note: candidates are: ‘namespace g2o::ceres { }’
44 | namespace ceres {
| ^~~~~
In file included from /usr/local/include/ceres/internal/fixed_array.h:41,
from /usr/local/include/ceres/internal/array_selector.h:38,
from /usr/local/include/ceres/internal/autodiff.h:147,
from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/l/bathymetric_slam/src/graph_optimization/include/graph_optimization/ceres_optimizer.hpp:19,
from /home/l/bathymetric_slam/src/graph_optimization/src/ceres_optimizer.cpp:12:
/usr/local/include/ceres/internal/memory.h:43:11: note: ‘namespace ceres { }’
43 | namespace ceres {
| ^~~~~
make[2]: *** [src/graph_optimization/CMakeFiles/graph_construction.dir/build.make:63:src/graph_optimization/CMakeFiles/graph_construction.dir/src/graph_construction.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:347:src/graph_optimization/CMakeFiles/graph_construction.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
make[2]: *** [src/graph_optimization/CMakeFiles/ceres_optimizer.dir/build.make:63:src/graph_optimization/CMakeFiles/ceres_optimizer.dir/src/ceres_optimizer.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:292:src/graph_optimization/CMakeFiles/ceres_optimizer.dir/all] 错误 2

from bathymetric_slam.

lbhqw avatar lbhqw commented on August 16, 2024

thank you for your suggestion,but i meet another problem ,sorry to trouble you again!
[ 78%] Built target read_auv_data
In file included from /home/l/bathymetric_slam/src/registration/include/registration/gicp_reg.hpp:25,
from /home/l/bathymetric_slam/src/registration/src/gicp_reg.cpp:12:
/usr/include/pcl-1.10/pcl/features/from_meshes.h: In function ‘void pcl::features::computeApproximateCovariances(const pcl::PointCloud&, const pcl::PointCloud&, std::vector<Eigen::Matrix<double, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3> > >&, double)’:
/usr/include/pcl-1.10/pcl/features/from_meshes.h:75:48: error: ‘i’ was not declared in this scope; did you mean ‘io’?
75 | Eigen::Vector3d normal (normals.points[i].normal_x,
| ^
| io
In file included from /home/l/bathymetric_slam/src/registration/include/registration/gicp_reg.hpp:27,
from /home/l/bathymetric_slam/src/registration/src/gicp_reg.cpp:12:
/home/l/bathymetric_slam/src/submaps_tools/include/submaps_tools/submaps.hpp: In constructor ‘MapObj::MapObj(const DRNoise&, PointCloudT&)’:
/home/l/bathymetric_slam/src/submaps_tools/include/submaps_tools/submaps.hpp:80:50: warning: unused parameter ‘map_pcl’ [-Wunused-parameter]
80 | MapObj(const DRNoise& dr_noise, PointCloudT& map_pcl) : SubmapObj(dr_noise) {};
| ~~~~~~~~~~~~~^~~~~~~
/home/l/bathymetric_slam/src/registration/src/gicp_reg.cpp: In member function ‘bool SubmapRegistration::gicpSubmapRegistration(SubmapObj&, SubmapObj&)’:
/home/l/bathymetric_slam/src/registration/src/gicp_reg.cpp:152:32: error: cannot convert ‘CovsVecPtr’ {aka ‘std::shared_ptr<std::vector<Eigen::Matrix<double, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3> > > >’} to ‘const MatricesVectorPtr&’ {aka ‘const boost::shared_ptr<std::vector<Eigen::Matrix<double, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3> > > >&’}
152 | gicp_.setSourceCovariances(covs_src_ptr);
| ^~~~~~~~~~~~
| |
| CovsVecPtr {aka std::shared_ptr<std::vector<Eigen::Matrix<double, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3> > > >}
In file included from /home/l/bathymetric_slam/src/registration/include/registration/gicp_reg.hpp:18,
from /home/l/bathymetric_slam/src/registration/src/gicp_reg.cpp:12:
/usr/include/pcl-1.10/pcl/registration/gicp.h:155:54: note: initializing argument 1 of ‘void pcl::GeneralizedIterativeClosestPoint<PointSource, PointTarget>::setSourceCovariances(const MatricesVectorPtr&) [with PointSource = pcl::PointXYZ; PointTarget = pcl::PointXYZ; pcl::GeneralizedIterativeClosestPoint<PointSource, PointTarget>::MatricesVectorPtr = boost::shared_ptr<std::vector<Eigen::Matrix<double, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3> > > >]’
155 | setSourceCovariances (const MatricesVectorPtr& covariances)
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/home/l/bathymetric_slam/src/registration/src/gicp_reg.cpp:153:32: error: cannot convert ‘CovsVecPtr’ {aka ‘std::shared_ptr<std::vector<Eigen::Matrix<double, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3> > > >’} to ‘const MatricesVectorPtr&’ {aka ‘const boost::shared_ptr<std::vector<Eigen::Matrix<double, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3> > > >&’}
153 | gicp_.setTargetCovariances(covs_trg_ptr);
| ^~~~~~~~~~~~
| |
| CovsVecPtr {aka std::shared_ptr<std::vector<Eigen::Matrix<double, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3> > > >}
In file included from /home/l/bathymetric_slam/src/registration/include/registration/gicp_reg.hpp:18,
from /home/l/bathymetric_slam/src/registration/src/gicp_reg.cpp:12:
/usr/include/pcl-1.10/pcl/registration/gicp.h:176:54: note: initializing argument 1 of ‘void pcl::GeneralizedIterativeClosestPoint<PointSource, PointTarget>::setTargetCovariances(const MatricesVectorPtr&) [with PointSource = pcl::PointXYZ; PointTarget = pcl::PointXYZ; pcl::GeneralizedIterativeClosestPoint<PointSource, PointTarget>::MatricesVectorPtr = boost::shared_ptr<std::vector<Eigen::Matrix<double, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3> > > >]’
176 | setTargetCovariances (const MatricesVectorPtr& covariances)
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
make[2]: *** [src/registration/CMakeFiles/gicp_registration.dir/build.make:63:src/registration/CMakeFiles/gicp_registration.dir/src/gicp_reg.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:405:src/registration/CMakeFiles/gicp_registration.dir/all] 错误 2
make: *** [Makefile:130:all] 错误 2

from bathymetric_slam.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.