ROS2, galactic. Error then I tray to Install packages "image_pipeline, image_common, opencv_cam, ros2_shared" with colcon build

asked 2023-07-17 10:59:56 -0500

barney775 gravatar image

updated 2023-07-19 05:27:14 -0500

Can you help me? My system is Ubuntu 20.04.6 LTS, platform - Jetson Nano 4Gb. Clear installation of ROS2 Galatcic. All packages is cloning ok.

Cloning into 'ros2_shared'...
remote: Enumerating objects: 79, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 79 (delta 8), reused 20 (delta 5), pack-reused 50
Unpacking objects: 100% (79/79), 17.68 KiB | 238.00 KiB/s, done.

Then I make "$ colcon build" get this errors.

[5.091s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
    'image_transport' is in: /opt/ros/galactic
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 >>> camera_calibration                                                                
Starting >>> ros2_shared                                                                           
--- stderr: camera_calibration_parsers                                                                         
CMake Error at CMakeLists.txt:4 (find_package):
  By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "catkin", but
  CMake did not find one.

  Could not find a package configuration file provided by "catkin" with any
  of the following names:

    catkinConfig.cmake
    catkin-config.cmake

  Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set
  "catkin_DIR" to a directory containing one of the above files.  If "catkin"
  provides a separate development package or SDK, be sure it has been
  installed.

---
Failed   <<< camera_calibration_parsers [4.86s, exited with code 1]
Aborted  <<< image_transport [4.96s]
Aborted  <<< camera_calibration [4.90s]                                                                   
Aborted  <<< ros2_shared [10.1s]                              

Summary: 0 packages finished [11.9s]
  1 package failed: camera_calibration_parsers
  3 packages aborted: camera_calibration image_transport ros2_shared
  3 packages had stderr output: camera_calibration camera_calibration_parsers image_transport
  11 packages not processed

Please help. Tried to install twice.


UPDATE: After some research i understood that catkin for ROS1. In ROS2 this packages install with

sudo apt install ros-galactic-image-pipeline
sudo apt install ros-galactic-image-common

This two packages install ok.

But "opencv_cam" and "ros2_shared" still had to be installed using "colcon build".

"opencv_cam" need to fix https://shorturl.at/alvCG "CMakeLists.txt"

Everything install ok.

$ colcon build

Starting >>> ros2_shared
Finished <<< ros2_shared [0.75s]                  
Starting >>> opencv_cam
[Processing: opencv_cam]                             
Finished <<< opencv_cam [44.4s]                       

Summary: 2 packages finished [46.3s]

But not work...

$ source install/setup.bash $ ros2 run opencv_cam opencv_cam_main

INFO] [1689762027.724179701] [opencv_cam]: use_intra_process_comms=1
[INFO] [1689762027.725330336] [opencv_cam]: opencv_cam Parameters
camera_frame_id = camera_frame
camera_info_path = info.ini
file = false
filename = 
fps = 0
height = 0
index = 0
width = 0
[INFO] [1689762027.725479243] [opencv_cam]: OpenCV version ...
(more)
edit retag flag offensive close merge delete