mrpt-ros-pkg / mrpt_slam

ROS wrappers for SLAM algorithms in MRPT
http://wiki.ros.org/mrpt_slam
BSD 3-Clause "New" or "Revised" License
114 stars 49 forks source link

"::Ptr" compile error #30

Closed Magnusgaertner closed 7 years ago

Magnusgaertner commented 7 years ago

I was trying to resolve all the errors stated below by replacing "*Ptr" with "::Ptr" appropriately, but even more errors show up. Is there a known version of the mrptlib to which this branch is compiling? Otherwise I could use some guidance to resolve these errors.

Thanks in advance

Errors     << mrpt_graphslam_2d:make /home/magnus/mg93xazo-dart18/catkin_ws/logs/mrpt_graphslam_2d/build.make.000.log                                                                                                                 
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/common.cpp: In function ‘std::__cxx11::string mrpt::graphslam::detail::getGridMapAlignmentResultsAsString(const mrpt::poses::CPosePDF&, const mrpt::slam::CGridMapAligner::TReturnInfo&)’:
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/common.cpp:23:19: error: variable ‘mrpt::poses::CPosePDFSOGPtr pdf_out’ has initializer but incomplete type
    CPosePDFSOGPtr pdf_out = CPosePDFSOG::Create();
                   ^
make[2]: *** [CMakeFiles/map_merger_node.dir/src/common.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:10:0:
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:50:44: error: ‘COccupancyGridMap2DPtr’ was not declared in this scope
  typedef std::map<TNeighborAgentMapProps*, COccupancyGridMap2DPtr> maps_t;
                                            ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:50:66: error: template argument 2 is invalid
  typedef std::map<TNeighborAgentMapProps*, COccupancyGridMap2DPtr> maps_t;
                                                                  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:50:66: error: template argument 4 is invalid
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:57:3: error: ‘CSetOfLinesPtr’ is not a member of ‘mrpt::opengl’
   mrpt::opengl::CSetOfLinesPtr> trajectories_t;
   ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:57:3: error: ‘CSetOfLinesPtr’ is not a member of ‘mrpt::opengl’
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:57:31: error: template argument 2 is invalid
   mrpt::opengl::CSetOfLinesPtr> trajectories_t;
                               ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:57:31: error: template argument 4 is invalid
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp: In function ‘bool removeObjectFrom3DScene(mrpt::gui::CDisplayWindow3D*, std::__cxx11::string)’:
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:38:2: error: ‘COpenGLScenePtr’ was not declared in this scope
  COpenGLScenePtr& scene = win->get3DSceneAndLock();
  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:38:19: error: ‘scene’ was not declared in this scope
  COpenGLScenePtr& scene = win->get3DSceneAndLock();
                   ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:45:3: error: ‘CRenderizablePtr’ was not declared in this scope
   CRenderizablePtr obj = scene->getByName(obj_name);
   ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:46:7: error: ‘obj’ was not declared in this scope
   if (obj) {
       ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp: In function ‘void addToWindow(mrpt::gui::CDisplayWindow3D*, const RENDERIZABLE_OBJECT&, const string&, const mrpt::poses::CPose3D&)’:
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:74:2: error: ‘COpenGLScenePtr’ was not declared in this scope
  COpenGLScenePtr &scene = win->get3DSceneAndLock();
  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:74:19: error: ‘scene’ was not declared in this scope
  COpenGLScenePtr &scene = win->get3DSceneAndLock();
                   ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:75:2: error: ‘CSetOfObjectsPtr’ was not declared in this scope
  CSetOfObjectsPtr obj = CSetOfObjects::Create();
  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:77:18: error: ‘obj’ was not declared in this scope
  o.getAs3DObject(obj);
                  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp: In function ‘void addAxis(mrpt::gui::CDisplayWindow3D*)’:
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:95:2: error: ‘COpenGLScenePtr’ was not declared in this scope
  COpenGLScenePtr &scene = win->get3DSceneAndLock();
  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:95:19: error: ‘scene’ was not declared in this scope
  COpenGLScenePtr &scene = win->get3DSceneAndLock();
                   ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:96:2: error: ‘CAxisPtr’ is not a member of ‘mrpt::opengl’
  opengl::CAxisPtr obj = opengl::CAxis::Create(-6, -6, -6, 6, 6, 6, 2, 2, true);
  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:97:2: error: ‘obj’ was not declared in this scope
  obj->setLocation(0, 0, 0);
  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp: In function ‘void addGrid(mrpt::gui::CDisplayWindow3D*)’:
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:108:2: error: ‘COpenGLScenePtr’ was not declared in this scope
  COpenGLScenePtr &scene = win->get3DSceneAndLock();
  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:108:19: error: ‘scene’ was not declared in this scope
  COpenGLScenePtr &scene = win->get3DSceneAndLock();
                   ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:109:2: error: ‘CGridPlaneXYPtr’ is not a member of ‘mrpt::opengl’
  opengl::CGridPlaneXYPtr obj = opengl::CGridPlaneXY::Create(-20, 20, -20, 20, 0, 1);
  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:110:2: error: ‘obj’ was not declared in this scope
  obj->setColor(0.7, 0.7, 0.7);
  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp: In member function ‘void mrpt::graphslam::CMapMerger::mergeMaps()’:
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:307:4: error: ‘COccupancyGridMap2DPtr’ was not declared in this scope
    COccupancyGridMap2DPtr map = COccupancyGridMap2D::Create();
    ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:310:35: error: missing template arguments before ‘)’ token
    convert(*neighbor.nav_map, *map);
                                   ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:313:47: error: missing template arguments before ‘)’ token
    addToWindow(neighbor_win_manager->win, *map);
                                               ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:314:18: error: request for member ‘insert’ in ‘mrpt_gridmaps’, which is of non-class type ‘mrpt::graphslam::CMapMerger::maps_t {aka int}’
    mrpt_gridmaps.insert(make_pair(*n_it, map));
                  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:314:45: error: missing template arguments before ‘)’ token
    mrpt_gridmaps.insert(make_pair(*n_it, map));
                                             ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:319:4: error: ‘CSetOfLinesPtr’ was not declared in this scope
    CSetOfLinesPtr curr_traj = CSetOfLines::Create();
    ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:320:4: error: ‘curr_traj’ was not declared in this scope
    curr_traj->setPose(CPose3D(0,0,0.3,0,0,0));
    ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:337:5: error: ‘COpenGLScenePtr’ was not declared in this scope
     COpenGLScenePtr &scene = neighbor_win_manager->win->get3DSceneAndLock();
     ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:337:22: error: ‘scene’ was not declared in this scope
     COpenGLScenePtr &scene = neighbor_win_manager->win->get3DSceneAndLock();
                      ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:348:5: error: ‘CObjectPtr’ was not declared in this scope
     CObjectPtr tmp = curr_traj->duplicateGetSmartPtr();
     ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:349:20: error: expected ‘;’ before ‘curr_traj’
     CSetOfLinesPtr curr_traj = static_cast<CSetOfLinesPtr>(tmp);
                    ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:351:23: error: request for member ‘insert’ in ‘mrpt_trajectories’, which is of non-class type ‘mrpt::graphslam::CMapMerger::trajectories_t {aka int}’
     mrpt_trajectories.insert(make_pair(&neighbor, curr_traj));
                       ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:358:20: error: request for member ‘size’ in ‘mrpt_gridmaps’, which is of non-class type ‘mrpt::graphslam::CMapMerger::maps_t {aka int}’
  if (mrpt_gridmaps.size() >= 2) {
                    ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:361:46: error: request for member ‘size’ in ‘mrpt_gridmaps’, which is of non-class type ‘mrpt::graphslam::CMapMerger::maps_t {aka int}’
     static_cast<unsigned long>(mrpt_gridmaps.size()));
                                              ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:386:3: error: ‘COccupancyGridMap2DPtr’ was not declared in this scope
   COccupancyGridMap2DPtr fused_map = COccupancyGridMap2D::Create();
   ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:387:3: error: ‘fused_map’ was not declared in this scope
   fused_map->copyMapContentFrom(*mrpt_gridmaps.begin()->second);
   ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:387:48: error: request for member ‘begin’ in ‘mrpt_gridmaps’, which is of non-class type ‘mrpt::graphslam::CMapMerger::maps_t {aka int}’
   fused_map->copyMapContentFrom(*mrpt_gridmaps.begin()->second);
                                                ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:392:4: error: ‘COpenGLScenePtr’ was not declared in this scope
    COpenGLScenePtr& fused_scene = m_fused_map_win_manager->win->get3DSceneAndLock();
    ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:392:21: error: ‘fused_scene’ was not declared in this scope
    COpenGLScenePtr& fused_scene = m_fused_map_win_manager->win->get3DSceneAndLock();
                     ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:399:4: error: ‘CSetOfObjectsPtr’ was not declared in this scope
    CSetOfObjectsPtr first_map_obj = CSetOfObjects::Create();
    ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:400:29: error: ‘first_map_obj’ was not declared in this scope
    fused_map->getAs3DObject(first_map_obj);
                             ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:404:21: error: request for member ‘begin’ in ‘mrpt_gridmaps’, which is of non-class type ‘mrpt::graphslam::CMapMerger::maps_t {aka int}’
       mrpt_gridmaps.begin()->first->agent.topic_namespace.data.c_str()));
                     ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:415:19: error: request for member ‘begin’ in ‘mrpt_gridmaps’, which is of non-class type ‘mrpt::graphslam::CMapMerger::maps_t {aka int}’
    (mrpt_gridmaps.begin()->second)->saveMetricMapRepresentationToFile(ss.str());
                   ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:443:5: error: qualified-id in declaration before ‘m_it’
     m_it = std::next(mrpt_gridmaps.begin());
     ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:443:5: error: expected ‘;’ before ‘m_it’
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:443:5: error: ‘m_it’ was not declared in this scope
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:443:36: error: request for member ‘begin’ in ‘mrpt_gridmaps’, which is of non-class type ‘mrpt::graphslam::CMapMerger::maps_t {aka int}’
     m_it = std::next(mrpt_gridmaps.begin());
                                    ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:444:27: error: request for member ‘end’ in ‘mrpt_gridmaps’, which is of non-class type ‘mrpt::graphslam::CMapMerger::maps_t {aka int}’
     m_it != mrpt_gridmaps.end();
                           ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:444:32: error: expected ‘)’ before ‘;’ token
     m_it != mrpt_gridmaps.end();
                                ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:445:7: error: ‘m_it’ was not declared in this scope
     ++m_it, ++merge_counter) {
       ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:525:5: error: qualified-id in declaration before ‘it’
     it = mrpt_trajectories.begin();
     ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:525:5: error: expected ‘;’ before ‘it’
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:525:5: error: ‘it’ was not declared in this scope
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:525:28: error: request for member ‘begin’ in ‘mrpt_trajectories’, which is of non-class type ‘mrpt::graphslam::CMapMerger::trajectories_t {aka int}’
     it = mrpt_trajectories.begin();
                            ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:526:29: error: request for member ‘end’ in ‘mrpt_trajectories’, which is of non-class type ‘mrpt::graphslam::CMapMerger::trajectories_t {aka int}’
     it != mrpt_trajectories.end();
                             ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:526:34: error: expected ‘)’ before ‘;’ token
     it != mrpt_trajectories.end();
                                  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:527:7: error: ‘it’ was not declared in this scope
     ++it) {
       ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:562:4: error: ‘COpenGLScenePtr’ was not declared in this scope
    COpenGLScenePtr fused_scene = m_fused_map_win_manager->win->get3DSceneAndLock();
    ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:564:4: error: ‘fused_scene’ was not declared in this scope
    fused_scene->saveToFile(fname);
    ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp: In member function ‘void mrpt::graphslam::CMapMerger::initWindowVisuals(mrpt::graphslam::CWindowManager*)’:
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:599:3: error: ‘COpenGLScenePtr’ was not declared in this scope
   COpenGLScenePtr &scene = win->get3DSceneAndLock();
   ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:599:20: error: ‘scene’ was not declared in this scope
   COpenGLScenePtr &scene = win->get3DSceneAndLock();
                    ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:600:3: error: ‘COpenGLViewportPtr’ was not declared in this scope
   COpenGLViewportPtr main_view = scene->getViewport("main");
   ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/CMapMerger.cpp:601:31: error: ‘main_view’ was not declared in this scope
   win_observer->observeBegin(*main_view);
                               ^
make[2]: *** [CMakeFiles/map_merger_node.dir/src/CMapMerger.cpp.o] Error 1
In file included from /home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/map_merger_node.cpp:16:0:
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:50:44: error: ‘COccupancyGridMap2DPtr’ was not declared in this scope
  typedef std::map<TNeighborAgentMapProps*, COccupancyGridMap2DPtr> maps_t;
                                            ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:50:66: error: template argument 2 is invalid
  typedef std::map<TNeighborAgentMapProps*, COccupancyGridMap2DPtr> maps_t;
                                                                  ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:50:66: error: template argument 4 is invalid
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:57:3: error: ‘CSetOfLinesPtr’ is not a member of ‘mrpt::opengl’
   mrpt::opengl::CSetOfLinesPtr> trajectories_t;
   ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:57:3: error: ‘CSetOfLinesPtr’ is not a member of ‘mrpt::opengl’
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:57:31: error: template argument 2 is invalid
   mrpt::opengl::CSetOfLinesPtr> trajectories_t;
                               ^
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CMapMerger.h:57:31: error: template argument 4 is invalid
make[2]: *** [CMakeFiles/map_merger_node.dir/src/map_merger_node.cpp.o] Error 1
make[1]: *** [CMakeFiles/map_merger_node.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/common.cpp: In function ‘std::__cxx11::string mrpt::graphslam::detail::getGridMapAlignmentResultsAsString(const mrpt::poses::CPosePDF&, const mrpt::slam::CGridMapAligner::TReturnInfo&)’:
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/common.cpp:23:19: error: variable ‘mrpt::poses::CPosePDFSOGPtr pdf_out’ has initializer but incomplete type
    CPosePDFSOGPtr pdf_out = CPosePDFSOG::Create();
                   ^
In file included from /home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/mrpt_graphslam_2d_mr_node.cpp:19:0:
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CGraphSlamHandler_ROS.h:38:33: fatal error: mrpt/system/threads.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/mrpt_graphslam_2d_mr_node.dir/src/mrpt_graphslam_2d_mr_node.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/mrpt_graphslam_2d_mr_node.dir/src/common.cpp.o] Error 1
make[1]: *** [CMakeFiles/mrpt_graphslam_2d_mr_node.dir/all] Error 2
make: *** [all] Error 2
cd /home/magnus/mg93xazo-dart18/catkin_ws/build/mrpt_graphslam_2d; catkin build --get-env mrpt_graphslam_2d | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
jlblancoc commented 7 years ago

Well, as you can see, it's pretty obvious we're busy with other projects and this repo drags behind...

Yes please: the instructions to port the code such as it builds against mrpt 1.5.4+ or 1.9.9+, are here: http://mrpt.ual.es/reference/master/porting_mrpt2.html

I would add: use the keyword auto whenever possible! It's shorter and more robust against smart pointer type changes.

Cheers.

Magnusgaertner commented 7 years ago

Thanks for providing the porting guide. I will give it a try. Cheers.

Magnusgaertner commented 7 years ago

I managed to compile all nodes but mrpt_graphslam_2d against mrpt2 :) however in mrpt_graphslam_2d i could not figure out how the parameter m_prev_nodes_for_ICP should be read in

context of line 62 CGraphSlamHandler_ROS_impl.h

template<class GRAPH_T>
void CLoopCloserERD_MR<GRAPH_T>::fetchNodeIDsForScanMatching(
        const mrpt::utils::TNodeID& curr_nodeID,
        std::set<mrpt::utils::TNodeID>* nodes_set) {
    ASSERT_(nodes_set);

    size_t fetched_nodeIDs = 0;
    for (int nodeID_i = static_cast<int>(curr_nodeID)-1;
//next line is l.62
            ((fetched_nodeIDs <= this->m_prev_nodes_for_ICP) &&
             (nodeID_i >= 0));
            --nodeID_i) {
        bool is_own = this->m_engine->isOwnNodeID(nodeID_i);
        if (is_own) {
            nodes_set->insert(nodeID_i);
            fetched_nodeIDs++;
        }
    }
}

catkin build log:

In file included from /home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/ERD/CLoopCloserERD_MR.h:71:0,
                 from /home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/TUserOptionsChecker_ROS.h:19,
                 from /home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/CGraphSlamHandler_ROS.h:48,
                 from /home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/src/mrpt_graphslam_2d_node.cpp:19:
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/ERD/CLoopCloserERD_MR_impl.h: In instantiation of ‘void mrpt::graphslam::deciders::CLoopCloserERD_MR<GRAPH_T>::fetchNodeIDsForScanMatching(const TNodeID&, std::set<long unsigned int>*) [with GRAPH_T = mrpt::graphs::CNetworkOfPoses<mrpt::poses::CPosePDFGaussianInf, mrpt::utils::map_traits_stdmap>; mrpt::utils::TNodeID = long unsigned int]’:
/usr/local/include/mrpt/slam/include/mrpt/slam/CGridMapAligner.h:78:20:   required from here
/home/magnus/mg93xazo-dart18/catkin_ws/src/mrpt_slam/mrpt_graphslam_2d/include/mrpt_graphslam_2d/ERD/CLoopCloserERD_MR_impl.h:62:22: error: ‘class mrpt::graphslam::deciders::CLoopCloserERD_MR<mrpt::graphs::CNetworkOfPoses<mrpt::poses::CPosePDFGaussianInf, mrpt::utils::map_traits_stdmap> >’ has no member named ‘m_prev_nodes_for_ICP’
    ((fetched_nodeIDs <= this->m_prev_nodes_for_ICP) &&
                      ^
jlblancoc commented 7 years ago

Thanks for your patches! I've merged your code... will give it a try to fix all remaining errors today.

jlblancoc commented 7 years ago

@bergercookie Hi Nikos!

What do you think about this error? I can see there is a similar named var prev_nodes_for_ICP but in another struct TLaserParams, not in CLoopCloserERD:

These are the lines: https://github.com/MRPT/mrpt/blob/master/libs/graphslam/include/mrpt/graphslam/ERD/CLoopCloserERD_impl.h#L167-L186

and the error is the last one mentioned above.

Thanks!

bergercookie commented 7 years ago

@jlblancoc Hey Jose,

Sorry for the long wait, apparently I'm not managing my time well enough.. :-)

Yup, at some point CLoopCloserERD::m_prev_nodes_for_ICP was moved to CLoopCloserERD::TLaserParams::prev_nodes_for_ICP

jlblancoc commented 7 years ago

@bergercookie

Sorry for the long wait, apparently I'm not managing my time well enough.. :-)

Classic! XD I bet you're working hard on OTHER stuff ;-)

@Magnusgaertner I'm closing this ticket, since all build error should be fixed now (though, we should verify it soon...).

Magnusgaertner commented 7 years ago

Thanks :)