Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while compiling LoopClosing.cc #27

Open
PabloAsensio opened this issue Dec 18, 2020 · 3 comments
Open

Error while compiling LoopClosing.cc #27

PabloAsensio opened this issue Dec 18, 2020 · 3 comments

Comments

@PabloAsensio
Copy link

In file included from /usr/include/c++/9/map:61,
                 from /home/pablo/Desktop/master/SDslam/src/KeyFrame.h:28,
                 from /home/pablo/Desktop/master/SDslam/src/LoopClosing.h:30,
                 from /home/pablo/Desktop/master/SDslam/src/LoopClosing.cc:25:
/usr/include/c++/9/bits/stl_map.h: In instantiation of ‘class std::map<SD_SLAM::KeyFrame*, g2o::Sim3, std::less<SD_SLAM::KeyFrame*>, Eigen::aligned_allocator<std::pair<const SD_SLAM::KeyFrame*, g2o::Sim3> > >’:
/home/pablo/Desktop/master/SDslam/src/LoopClosing.cc:402:19:   required from here
/usr/include/c++/9/bits/stl_map.h:122:71: error: static assertion failed: std::map must have the same value_type as its allocator
  122 |       static_assert(is_same<typename _Alloc::value_type, value_type>::value,
      |                                                                       ^~~~~
make[2]: *** [CMakeFiles/SD_SLAM.dir/build.make:115: CMakeFiles/SD_SLAM.dir/src/LoopClosing.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:192: CMakeFiles/SD_SLAM.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
@PabloAsensio
Copy link
Author

I think it comes from LoopClosing.h lines 45 and 46

  typedef std::map<KeyFrame*,g2o::Sim3, std::less<KeyFrame*>,
    Eigen::aligned_allocator<std::pair<const KeyFrame*, g2o::Sim3> > > KeyFrameAndPose;

I see this on: (http://www.cplusplus.com/reference/map/map/)

@PabloAsensio
Copy link
Author

@PabloAsensio
Copy link
Author

Let's leave this open until we fixed it in the code.

@PabloAsensio PabloAsensio reopened this Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant