i3drobotics / phase_rtabmap_ros2

0 stars 0 forks source link

Build Error #10

Closed Rob-Otics closed 1 year ago

Rob-Otics commented 1 year ago

Seems to be missing a resources folder in the repo, tried adding it manually but still didnt build successfully.

~/dev_ws$ colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=release --executor parallel 
[0.411s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
    'image_transport' is in: /opt/ros/foxy
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
    --allow-overriding image_transport

This may be promoted to an error in a future release of colcon-override-check.
Starting >>> image_transport
Starting >>> camera_calibration_parsers
Starting >>> tracetools_image_pipeline
Starting >>> camera_calibration
Starting >>> rtabmap
Finished <<< tracetools_image_pipeline [0.38s]                            
Finished <<< camera_calibration_parsers [0.41s]
Starting >>> camera_info_manager
Finished <<< image_transport [0.44s]
Starting >>> image_proc
Starting >>> depth_image_proc
Starting >>> image_rotate
Starting >>> image_view
Starting >>> phase_rtabmap_foxy
Finished <<< camera_info_manager [0.88s]                          
Starting >>> image_publisher                                      
Finished <<< camera_calibration [1.73s]                           
Starting >>> image_common
--- stderr: phase_rtabmap_foxy                                 
error: can't copy 'resource/phase_rtabmap_foxy': doesn't exist or not a regular file
---
Failed   <<< phase_rtabmap_foxy [2.02s, exited with code 1]
Aborted  <<< image_common [0.76s]                                         
Aborted  <<< depth_image_proc [2.70s]                                     
Aborted  <<< rtabmap [3.12s]
Aborted  <<< image_publisher [8.85s]                                           
Aborted  <<< image_rotate [10.5s]                  
Aborted  <<< image_view [21.5s]                    
Aborted  <<< image_proc [23.9s]                                    

Summary: 5 packages finished [24.6s]
  1 package failed: phase_rtabmap_foxy
  7 packages aborted: depth_image_proc image_common image_proc image_publisher image_rotate image_view rtabmap
  1 package had stderr output: phase_rtabmap_foxy
  3 packages not processed
Rob-Otics commented 1 year ago

Also seems to be an issue with a version on another of the packages

  --- stderr: rtabmap_ros                                           
CMake Error at CMakeLists.txt:62 (find_package):
  Could not find a configuration file for package "RTABMap" that is
  compatible with requested version "0.21.0".

  The following configuration files were considered but not accepted:

    /home/ugv/dev_ws/install/rtabmap/lib/rtabmap-0.20/RTABMapConfig.cmake, version: 0.20.23

---
Failed   <<< rtabmap_ros [2.61s, exited with code 1]
Rob-Otics commented 1 year ago
ugv@ugv-meditel:~/dev_ws$ colcon build 
[0.411s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
    'image_transport' is in: /opt/ros/foxy
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
    --allow-overriding image_transport

This may be promoted to an error in a future release of colcon-override-check.
Starting >>> image_transport
Starting >>> camera_calibration_parsers
Starting >>> tracetools_image_pipeline
Starting >>> camera_calibration
Starting >>> rtabmap
Finished <<< camera_calibration [0.93s]                                                                                                                 
Finished <<< tracetools_image_pipeline [1.18s]                                                                 
Finished <<< camera_calibration_parsers [8.68s]                                                                                               
Starting >>> camera_info_manager
Finished <<< camera_info_manager [14.5s]                                                                                                   
Finished <<< image_transport [30.9s]                                                               
Starting >>> image_proc
Starting >>> depth_image_proc                                                     
Starting >>> image_rotate
Starting >>> image_view                                                                                                           
Starting >>> image_publisher
Starting >>> phase_rtabmap_foxy
Starting >>> image_common                                                                                                                                 
Finished <<< phase_rtabmap_foxy [7.36s]                                                                                                                 
Finished <<< image_common [8.27s]                                                                                                                       
Finished <<< image_publisher [31.7s]                                                                                                           
Finished <<< image_rotate [35.0s]                                                                                                              
Finished <<< image_proc [49.5s]                                                                                                                   
Starting >>> stereo_image_proc
Finished <<< image_view [1min 4s]                                                                                                                         
Finished <<< depth_image_proc [1min 12s]                                                                                                                  
Finished <<< stereo_image_proc [35.8s]                                                                           
Starting >>> image_pipeline
Finished <<< image_pipeline [0.85s]                                                                     
[Processing: rtabmap]                                         
[Processing: rtabmap]                                         
[Processing: rtabmap]                                         
[Processing: rtabmap]                                         
[Processing: rtabmap]                                         
[Processing: rtabmap]                                         
[Processing: rtabmap]                                         
[Processing: rtabmap]                                         
[Processing: rtabmap]                                         
[Processing: rtabmap]                                         
[Processing: rtabmap]                                         
[Processing: rtabmap]                                         
--- stderr: rtabmap                                            
CMake Deprecation Warning at CMakeLists.txt:72 (cmake_policy):
  The OLD behavior for policy CMP0043 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

CMake Warning at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:39 (message):
  Failed to find Qt5 component "Svg" config file at
  "/usr/lib/x86_64-linux-gnu/cmake/Qt5Svg/Qt5SvgConfig.cmake"
Call Stack (most recent call first):
  CMakeLists.txt:300 (FIND_PACKAGE)

CMake Warning (dev) at /usr/share/cmake-3.16/Modules/FindOpenGL.cmake:275 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  /opt/ros/foxy/lib/cmake/g2o/g2oConfig.cmake:4 (find_dependency)
  CMakeLists.txt:449 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

In file included from /usr/include/string.h:495,
                 from /usr/include/c++/9/cstring:42,
                 from /usr/include/eigen3/Eigen/Core:283,
                 from /home/ugv/dev_ws/src/rtabmap/corelib/include/rtabmap/core/Transform.h:35,
                 from /home/ugv/dev_ws/src/rtabmap/corelib/include/rtabmap/core/Odometry.h:33,
                 from /home/ugv/dev_ws/src/rtabmap/examples/WifiMapping/main.cpp:28:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘virtual void WifiThread::mainLoop()’ at /home/ugv/dev_ws/src/rtabmap/examples/WifiMapping/WifiThread.h:180:11:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 16 equals destination size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
Finished <<< rtabmap [8min 19s]
Starting >>> rtabmap_ros
--- stderr: rtabmap_ros                                 
CMake Error at CMakeLists.txt:62 (find_package):
  Could not find a configuration file for package "RTABMap" that is
  compatible with requested version "0.21.0".

  The following configuration files were considered but not accepted:

    /home/ugv/dev_ws/install/rtabmap/lib/rtabmap-0.20/RTABMapConfig.cmake, version: 0.20.23

---
Failed   <<< rtabmap_ros [2.48s, exited with code 1]

Summary: 15 packages finished [8min 22s]
  1 package failed: rtabmap_ros
  2 packages had stderr output: rtabmap rtabmap_ros
Rob-Otics commented 1 year ago

Fixed by changing the rtabmap branch from ros2 to foxy-devel