Robotics StackExchange | Archived questions

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

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 "opencvcam" and "ros2shared" 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 opencvcam opencvcam_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 4

(opencv_cam_main:12761): GStreamer-CRITICAL **: 13:20:27.970: 
Trying to dispose element pipeline0, but it is in PAUSED instead of the NULL state.
You need to explicitly set elements to the NULL state before
...
opencv_cam_main:12761): GStreamer-CRITICAL **: 13:20:27.981: gst_element_post_message: assertion 'GST_IS_ELEMENT (element)' failed
[ WARN:0@0.521] global /home/jetson/opencv/modules/videoio/src/cap_v4l.cpp (1927) getProperty VIDEOIO(V4L2:/dev/video0): Unable to get camera FPS
[INFO] [1689762028.171744440] [opencv_cam]: device 0 open, width 3264, height 2464, device fps -1
[ERROR] [1689762028.181348063] [camera_calibration_parsers]: Failed to detect content in .ini file
[ERROR] [1689762028.181443480] [opencv_cam]: cannot get camera info, will not publish
[INFO] [1689762028.201921101] [opencv_cam]: start publishing

ROS2 topic is present, but empty...

$ ros2 topic list

/image_raw
/parameter_events
/rosout

Thanks!

Asked by barney775 on 2023-07-17 10:59:56 UTC

Comments

Answers