clydemcqueen / orca3

ROS2 AUV based on the BlueRobotics BlueROV2 and Navigation2
MIT License
68 stars 15 forks source link

colcon build #6

Closed Lunatik00 closed 3 years ago

Lunatik00 commented 3 years ago

When runing the docker if i add the colcon build process i get this error when it is installing orbslam2, when i run it a second time it is installed, i am not sure why

--- stderr: orb_slam2_ros
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc: In member function
cv::Mat ORB_SLAM2::Tracking::GrabImageStereo(const cv::Mat&, const cv::Mat&, const double&)’:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:180:137: warning: implicitly-declared ‘ORB_SLAM2::Frame& ORB_SLAM2::Frame::operator=(const ORB_SLAM2::Frame&)’ is deprecated [-Wdeprecated-copy]
  180 |     mCurrentFrame = Frame(mImGray,imGrayRight,timestamp,mpORBextractorLeft,mpORBextractorRight,mpORBVocabulary,mK,mDistCoef,mbf,mThDepth);
      |                                                                                                                                         ^
In file included from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/KeyFrame.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/MapPoint.h:24,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/FrameDrawer.h:25,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Tracking.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:22:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Frame.h:49:5: note: because
ORB_SLAM2::Frame’ has user-provided ‘ORB_SLAM2::Frame::Frame(const ORB_SLAM2::Frame&)’
   49 |     Frame(const Frame &frame);
      |     ^~~~~
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc: In member function
cv::Mat ORB_SLAM2::Tracking::GrabImageRGBD(const cv::Mat&, const cv::Mat&, const double&)’:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:211:113: warning: implicitly-declared ‘ORB_SLAM2::Frame& ORB_SLAM2::Frame::operator=(const ORB_SLAM2::Frame&)’ is deprecated [-Wdeprecated-copy]
  211 |     mCurrentFrame = Frame(mImGray,imDepth,timestamp,mpORBextractorLeft,mpORBVocabulary,mK,mDistCoef,mbf,mThDepth);
      |                                                                                                                 ^
In file included from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/KeyFrame.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/MapPoint.h:24,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/FrameDrawer.h:25,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Tracking.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:22:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Frame.h:49:5: note: because
ORB_SLAM2::Frame’ has user-provided ‘ORB_SLAM2::Frame::Frame(const ORB_SLAM2::Frame&)’
   49 |     Frame(const Frame &frame);
      |     ^~~~~
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc: In member function
cv::Mat ORB_SLAM2::Tracking::GrabImageMonocular(const cv::Mat&, const double&)’:/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:239:108: warning: implicitly-declared ‘ORB_SLAM2::Frame& ORB_SLAM2::Frame::operator=(const ORB_SLAM2::Frame&)’ is deprecated [-Wdeprecated-copy]
  239 |         mCurrentFrame = Frame(mImGray,timestamp,mpIniORBextractor,mpORBVocabulary,mK,mDistCoef,mbf,mThDepth);
      |                                                                                                            ^
In file included from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/KeyFrame.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/MapPoint.h:24,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/FrameDrawer.h:25,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Tracking.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:22:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Frame.h:49:5: note: because
ORB_SLAM2::Frame’ has user-provided ‘ORB_SLAM2::Frame::Frame(const ORB_SLAM2::Frame&)’
   49 |     Frame(const Frame &frame);
      |     ^~~~~
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:241:109: warning: implicitly-declared ‘ORB_SLAM2::Frame& ORB_SLAM2::Frame::operator=(const ORB_SLAM2::Frame&)’ is deprecated [-Wdeprecated-copy]
  241 |         mCurrentFrame = Frame(mImGray,timestamp,mpORBextractorLeft,mpORBVocabulary,mK,mDistCoef,mbf,mThDepth);
      |                                                                                                             ^
In file included from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/KeyFrame.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/MapPoint.h:24,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/FrameDrawer.h:25,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Tracking.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:22:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Frame.h:49:5: note: because
ORB_SLAM2::Frame’ has user-provided ‘ORB_SLAM2::Frame::Frame(const ORB_SLAM2::Frame&)’
   49 |     Frame(const Frame &frame);
      |     ^~~~~
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc: In member function
void ORB_SLAM2::Tracking::Track()’:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:466:41: warning: implicitly-declared ‘ORB_SLAM2::Frame& ORB_SLAM2::Frame::operator=(const ORB_SLAM2::Frame&)’ is deprecated [-Wdeprecated-copy]
  466 |         mLastFrame = Frame(mCurrentFrame);
      |                                         ^
In file included from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/KeyFrame.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/MapPoint.h:24,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/FrameDrawer.h:25,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Tracking.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:22:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Frame.h:49:5: note: because
ORB_SLAM2::Frame’ has user-provided ‘ORB_SLAM2::Frame::Frame(const ORB_SLAM2::Frame&)’
   49 |     Frame(const Frame &frame);
      |     ^~~~~
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc: In member function
void ORB_SLAM2::Tracking::StereoInitialization()’:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:525:41: warning: implicitly-declared ‘ORB_SLAM2::Frame& ORB_SLAM2::Frame::operator=(const ORB_SLAM2::Frame&)’ is deprecated [-Wdeprecated-copy]
  525 |         mLastFrame = Frame(mCurrentFrame);
      |                                         ^
In file included from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/KeyFrame.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/MapPoint.h:24,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/FrameDrawer.h:25,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Tracking.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:22:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Frame.h:49:5: note: because
ORB_SLAM2::Frame’ has user-provided ‘ORB_SLAM2::Frame::Frame(const ORB_SLAM2::Frame&)’
   49 |     Frame(const Frame &frame);
      |     ^~~~~
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc: In member function
void ORB_SLAM2::Tracking::MonocularInitialization()’:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:552:48: warning: implicitly-declared ‘ORB_SLAM2::Frame& ORB_SLAM2::Frame::operator=(const ORB_SLAM2::Frame&)’ is deprecated [-Wdeprecated-copy]
  552 |             mInitialFrame = Frame(mCurrentFrame);
      |                                                ^
In file included from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/KeyFrame.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/MapPoint.h:24,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/FrameDrawer.h:25,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Tracking.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:22:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Frame.h:49:5: note: because
ORB_SLAM2::Frame’ has user-provided ‘ORB_SLAM2::Frame::Frame(const ORB_SLAM2::Frame&)’
   49 |     Frame(const Frame &frame);
      |     ^~~~~
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:553:45: warning: implicitly-declared ‘ORB_SLAM2::Frame& ORB_SLAM2::Frame::operator=(const ORB_SLAM2::Frame&)’ is deprecated [-Wdeprecated-copy]
  553 |             mLastFrame = Frame(mCurrentFrame);
      |                                             ^
In file included from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/KeyFrame.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/MapPoint.h:24,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/FrameDrawer.h:25,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Tracking.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:22:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Frame.h:49:5: note: because
ORB_SLAM2::Frame’ has user-provided ‘ORB_SLAM2::Frame::Frame(const ORB_SLAM2::Frame&)’
   49 |     Frame(const Frame &frame);
      |     ^~~~~
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc: In member function
void ORB_SLAM2::Tracking::CreateInitialMapMonocular()’:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:709:37: warning: implicitly-declared ‘ORB_SLAM2::Frame& ORB_SLAM2::Frame::operator=(const ORB_SLAM2::Frame&)’ is deprecated [-Wdeprecated-copy]
  709 |     mLastFrame = Frame(mCurrentFrame);
      |                                     ^
In file included from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/KeyFrame.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/MapPoint.h:24,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/FrameDrawer.h:25,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Tracking.h:29,
                 from /root/orca_ws/src/orb_slam_2_ros/orb_slam2/src/Tracking.cc:22:
/root/orca_ws/src/orb_slam_2_ros/orb_slam2/include/Frame.h:49:5: note: because
ORB_SLAM2::Frame’ has user-provided ‘ORB_SLAM2::Frame::Frame(const ORB_SLAM2::Frame&)’
   49 |     Frame(const Frame &frame);
      |     ^~~~~
make[2]: *** No rule to make target '/root/orca_ws/src/orb_slam_2_ros/orb_slam2/Thirdparty/g2o/lib/libg2o.so', needed by '/root/orca_ws/src/orb_slam_2_ros/orb_slam2/lib/liborb_slam2_ros_core.so'.  Stop.
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:366: CMakeFiles/orb_slam2_ros_core.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< orb_slam2_ros [1min 9s, exited with code 2]
clydemcqueen commented 3 years ago

Thanks for pointing this out.

There was a race condition in the orb_slam2_ros build that would sometimes cause the build to fail.

I fixed the orb_slam2_ros build in my branch. I also uncommented the RUN ... colcon build ... line in the orca3 Dockerfile, since it now reliably builds.

Note that the orb_slam2_ros deprecation warnings can be ignored in Foxy. (They may need to be fixed for Galactic or Rolling.)