stella-cv / stella_vslam_ros

ROS package for stella_vslam
https://stella-cv.rtfd.io/en/latest/
Other
119 stars 80 forks source link

compilation error on melodic #80

Closed DavidePatria closed 2 years ago

DavidePatria commented 2 years ago

I need to use ros melodic since there is no way to compile another package I need on noetic. I am using docker with ubuntu 18.04 and ros melodic. After following the documentation installing all the required components and compiling openvslam I tried to go on with the build of the ros package, but I get the following error

catkin build openvslam_ros
------------------------------------------------------------
Profile:                     default
Extending:          [cached] /opt/ros/melodic
Workspace:                   /home/csermac/catkin_ws
------------------------------------------------------------
Build Space:        [exists] /home/csermac/catkin_ws/build
Devel Space:        [exists] /home/csermac/catkin_ws/devel
Install Space:      [unused] /home/csermac/catkin_ws/install
Log Space:          [exists] /home/csermac/catkin_ws/logs
Source Space:       [exists] /home/csermac/catkin_ws/src
DESTDIR:            [unused] None
------------------------------------------------------------
Devel Space Layout:          merged
Install Space Layout:        None
------------------------------------------------------------
Additional CMake Args:       -DCMAKE_BUILD_TYPE=Release
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
------------------------------------------------------------
Workspace configuration appears valid.
------------------------------------------------------------
[build] Found '3' packages in 0.0 seconds.                                                                                                                                                                                                   
[build] Package table is up to date.                                                                                                                                                                                                         
Starting  >>> cv_bridge                                                                                                                                                                                                                      
Finished  <<< cv_bridge                    [ 0.2 seconds ]                                                                                                                                                                                   
Starting  >>> openvslam_ros                                                                                                                                                                                                                  
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Errors     << openvslam_ros:make /home/csermac/catkin_ws/logs/openvslam_ros/build.make.002.log                                                                                                                                               
/home/csermac/catkin_ws/src/openvslam_ros/src/openvslam_ros.cc: In member function 'void openvslam_ros::system::publish_pointcloud(const ros::Time&)':
/home/csermac/catkin_ws/src/openvslam_ros/src/openvslam_ros.cc:78:72: error: no matching function for call to 'openvslam::publish::map_publisher::get_landmarks(std::vector<openvslam::data::landmark*>&, std::set<openvslam::data::landmark*>&)'
     SLAM_.get_map_publisher()->get_landmarks(landmarks, local_landmarks);
                                                                        ^
In file included from /home/csermac/catkin_ws/src/openvslam_ros/src/openvslam_ros.cc:2:0:
/usr/local/include/openvslam/publish/map_publisher.h:78:18: note: candidate: unsigned int openvslam::publish::map_publisher::get_landmarks(std::vector<std::shared_ptr<openvslam::data::landmark> >&, std::set<std::shared_ptr<openvslam::data::landmark> >&)
     unsigned int get_landmarks(std::vector<std::shared_ptr<data::landmark>>& all_landmarks,
                  ^~~~~~~~~~~~~
/usr/local/include/openvslam/publish/map_publisher.h:78:18: note:   no known conversion for argument 1 from 'std::vector<openvslam::data::landmark*>' to 'std::vector<std::shared_ptr<openvslam::data::landmark> >&'
/home/csermac/catkin_ws/src/openvslam_ros/src/openvslam_ros.cc: In member function 'void openvslam_ros::system::publish_pointcloud(const ros::Time&)':
/home/csermac/catkin_ws/src/openvslam_ros/src/openvslam_ros.cc:78:72: error: no matching function for call to 'openvslam::publish::map_publisher::get_landmarks(std::vector<openvslam::data::landmark*>&, std::set<openvslam::data::landmark*>&)'
     SLAM_.get_map_publisher()->get_landmarks(landmarks, local_landmarks);
                                                                        ^
In file included from /home/csermac/catkin_ws/src/openvslam_ros/src/openvslam_ros.cc:2:0:
/usr/local/include/openvslam/publish/map_publisher.h:78:18: note: candidate: unsigned int openvslam::publish::map_publisher::get_landmarks(std::vector<std::shared_ptr<openvslam::data::landmark> >&, std::set<std::shared_ptr<openvslam::data::landmark> >&)
     unsigned int get_landmarks(std::vector<std::shared_ptr<data::landmark>>& all_landmarks,
                  ^~~~~~~~~~~~~
/usr/local/include/openvslam/publish/map_publisher.h:78:18: note:   no known conversion for argument 1 from 'std::vector<openvslam::data::landmark*>' to 'std::vector<std::shared_ptr<openvslam::data::landmark> >&'
/home/csermac/catkin_ws/src/openvslam_ros/src/openvslam_ros.cc: In member function 'void openvslam_ros::system::publish_keyframes(const ros::Time&)':
/home/csermac/catkin_ws/src/openvslam_ros/src/openvslam_ros.cc:103:57: error: no matching function for call to 'openvslam::publish::map_publisher::get_keyframes(std::vector<openvslam::data::keyframe*>&)'
     SLAM_.get_map_publisher()->get_keyframes(all_keyfrms);
                                                         ^
In file included from /home/csermac/catkin_ws/src/openvslam_ros/src/openvslam_ros.cc:2:0:
/usr/local/include/openvslam/publish/map_publisher.h:70:18: note: candidate: unsigned int openvslam::publish::map_publisher::get_keyframes(std::vector<std::shared_ptr<openvslam::data::keyframe> >&)
     unsigned int get_keyframes(std::vector<std::shared_ptr<data::keyframe>>& all_keyfrms);
                  ^~~~~~~~~~~~~
/usr/local/include/openvslam/publish/map_publisher.h:70:18: note:   no known conversion for argument 1 from 'std::vector<openvslam::data::keyframe*>' to 'std::vector<std::shared_ptr<openvslam::data::keyframe> >&'
/home/csermac/catkin_ws/src/openvslam_ros/src/openvslam_ros.cc: In member function 'void openvslam_ros::system::publish_keyframes(const ros::Time&)':
/home/csermac/catkin_ws/src/openvslam_ros/src/openvslam_ros.cc:103:57: error: no matching function for call to 'openvslam::publish::map_publisher::get_keyframes(std::vector<openvslam::data::keyframe*>&)'
     SLAM_.get_map_publisher()->get_keyframes(all_keyfrms);
                                                         ^
In file included from /home/csermac/catkin_ws/src/openvslam_ros/src/openvslam_ros.cc:2:0:
/usr/local/include/openvslam/publish/map_publisher.h:70:18: note: candidate: unsigned int openvslam::publish::map_publisher::get_keyframes(std::vector<std::shared_ptr<openvslam::data::keyframe> >&)
     unsigned int get_keyframes(std::vector<std::shared_ptr<data::keyframe>>& all_keyfrms);
                  ^~~~~~~~~~~~~
/usr/local/include/openvslam/publish/map_publisher.h:70:18: note:   no known conversion for argument 1 from 'std::vector<openvslam::data::keyframe*>' to 'std::vector<std::shared_ptr<openvslam::data::keyframe> >&'
make[2]: *** [src/CMakeFiles/run_slam.dir/openvslam_ros.cc.o] Error 1
make[1]: *** [src/CMakeFiles/run_slam.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [src/CMakeFiles/run_localization.dir/openvslam_ros.cc.o] Error 1
make[1]: *** [src/CMakeFiles/run_localization.dir/all] Error 2
make: *** [all] Error 2
cd /home/csermac/catkin_ws/build/openvslam_ros; catkin build --get-env openvslam_ros | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
.............................................................................................................................................................................................................................................
Failed     << openvslam_ros:make           [ Exited with code 2 ]                                                                                                                                                                            
Failed    <<< openvslam_ros                [ 11.6 seconds ]                                                                                                                                                                                  
[build] Summary: 1 of 2 packages succeeded.                                                                                                                                                                                                  
[build]   Ignored:   1 packages were skipped or are blacklisted.                                                                                                                                                                             
[build]   Warnings:  None.                                                                                                                                                                                                                   
[build]   Abandoned: None.                                                                                                                                                                                                                   
[build]   Failed:    1 packages failed.                                                                                                                                                                                                      
[build] Runtime: 11.8 seconds total.

I have tried with different versions of openvslam, checking out at different commits, but the result stays the same. Any idea about what I could check?