프로그램 사용/ros2025. 5. 21. 00:07

다시 보니 이상한(?) 저장소 걸 받아놓고 고생중.. -_-

 

[링크 : https://github.com/YuLiHN/kinect2_ros2] << 요걸로 고생중

[링크 : https://github.com/krepa098/kinect2_ros2]

    [링크 : https://github.com/paul-shuvo/iai_kinect2_opencv4/tree/master]

    [링크 : https://github.com/code-iai/iai_kinect2]

 

---

 

시도중..

[링크 : https://github.com/krepa098/kinect2_ros2]

 

step 1. colcon을 설치한다.

$ sudo apt-get install colcon

 

step 2. 프로젝트를 다운로드 한다.

$ git clone https://github.com/krepa098/kinect2_ros2.git
$ cd kinect2_ros2

 

step3. 빌드한다.

$ colcon build

 

step 4. 런쳐 스크립트 명을 찾고

/opt/ros/jazzy$ find . -name *launch.py | grep kinect
./share/kinect2_bridge/launch/kinect2_bridge.launch.py
./src/kinect2_bridge/launch/kinect2_bridge.launch.py

 

step 5. 실행한다

$ ros2 launch kinect2_bridge kinect2_bridge.launch.py 
[INFO] [launch]: All log files can be found below /home/minimonk/.ros/log/2025-05-20-23-46-49-643834-minimonk-900X3N-7825
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [kinect2_bridge-1]: process started with pid [7842]
[INFO] [component_container-2]: process started with pid [7843]
[kinect2_bridge-1] [INFO] [1747752410.192080072] [kinect2_bridge]: parameter:
[kinect2_bridge-1]         base_name: kinect2
[kinect2_bridge-1]            sensor: 004436460547
[kinect2_bridge-1]         fps_limit: -1
[kinect2_bridge-1]        calib_path: /home/minimonk/src/kinect2_ros2/kinect2_bridge/data/
[kinect2_bridge-1]           use_png: false
[kinect2_bridge-1]      jpeg_quality: 90
[kinect2_bridge-1]         png_level: 1
[kinect2_bridge-1]      depth_method: default
[kinect2_bridge-1]      depth_device: -1
[kinect2_bridge-1]        reg_method: default
[kinect2_bridge-1]        reg_device: -1
[kinect2_bridge-1]         max_depth: 12
[kinect2_bridge-1]         min_depth: 0.1
[kinect2_bridge-1]        queue_size: 5
[kinect2_bridge-1]  bilateral_filter: true
[kinect2_bridge-1] edge_aware_filter: true
[kinect2_bridge-1]        publish_tf: true
[kinect2_bridge-1]      base_name_tf: kinect2
[kinect2_bridge-1]    worker_threads: 4
[component_container-2] [INFO] [1747752410.226624281] [container]: Load Library: /opt/ros/jazzy/lib/libdepth_image_proc.so
[component_container-2] [INFO] [1747752410.334243907] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::ConvertMetricNode>
[component_container-2] [INFO] [1747752410.334300468] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::CropForemostNode>
[component_container-2] [INFO] [1747752410.334307756] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::DisparityNode>
[component_container-2] [INFO] [1747752410.334312374] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzNode>
[component_container-2] [INFO] [1747752410.334318127] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzRadialNode>
[component_container-2] [INFO] [1747752410.334323834] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziNode>
[component_container-2] [INFO] [1747752410.334329282] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziRadialNode>
[component_container-2] [INFO] [1747752410.334334605] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbNode>
[component_container-2] [INFO] [1747752410.334340889] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbNode>
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/pointcloud' in container '/container'
[kinect2_bridge-1] libva info: VA-API version 1.20.0
[kinect2_bridge-1] libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
[kinect2_bridge-1] libva info: Found init function __vaDriverInit_1_20
[kinect2_bridge-1] libva info: va_openDriver() returns 0
[kinect2_bridge-1] [Info] [VaapiRgbPacketProcessorImpl] driver: Intel iHD driver for Intel(R) Gen Graphics - 24.1.0 ()
[kinect2_bridge-1] [Info] [Freenect2Impl] enumerating devices...
[kinect2_bridge-1] [Info] [Freenect2Impl] 6 usb devices connected
[kinect2_bridge-1] [Info] [Freenect2Impl] found 0 devices
[kinect2_bridge-1] [ERROR] [1747752410.372478119] [kinect2_bridge]: no Kinect2 devices found!
[INFO] [kinect2_bridge-1]: process has finished cleanly [pid 7842]
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[component_container-2] [INFO] [1747752410.727331969] [rclcpp]: signal_handler(signum=2)
[INFO] [component_container-2]: process has finished cleanly [pid 7843]
^[[Aminimonk@minimonk-900X3N:~/src/kinect2_ros2$ ros2 launch kinect2_bridge kinect2_bridge.launch
file 'kinect2_bridge.launch' was not found in the share directory of package 'kinect2_bridge' which is at '/opt/ros/jazzy/share/kinect2_bridge'

 

$ ros2 launch kinect2_bridge kinect2_bridge.launch.py -
malformed launch argument '-', expected format ':='
minimonk@minimonk-900X3N:~/src/kinect2_ros2$ ros2 launch kinect2_bridge kinect2_bridge.launch.py
[INFO] [launch]: All log files can be found below /home/minimonk/.ros/log/2025-05-20-23-47-06-104462-minimonk-900X3N-7896
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [kinect2_bridge-1]: process started with pid [7913]
[INFO] [component_container-2]: process started with pid [7914]
[kinect2_bridge-1] [INFO] [1747752426.554975848] [kinect2_bridge]: parameter:
[kinect2_bridge-1]         base_name: kinect2
[kinect2_bridge-1]            sensor: 004436460547
[kinect2_bridge-1]         fps_limit: -1
[kinect2_bridge-1]        calib_path: /home/minimonk/src/kinect2_ros2/kinect2_bridge/data/
[kinect2_bridge-1]           use_png: false
[kinect2_bridge-1]      jpeg_quality: 90
[kinect2_bridge-1]         png_level: 1
[kinect2_bridge-1]      depth_method: default
[kinect2_bridge-1]      depth_device: -1
[kinect2_bridge-1]        reg_method: default
[kinect2_bridge-1]        reg_device: -1
[kinect2_bridge-1]         max_depth: 12
[kinect2_bridge-1]         min_depth: 0.1
[kinect2_bridge-1]        queue_size: 5
[kinect2_bridge-1]  bilateral_filter: true
[kinect2_bridge-1] edge_aware_filter: true
[kinect2_bridge-1]        publish_tf: true
[kinect2_bridge-1]      base_name_tf: kinect2
[kinect2_bridge-1]    worker_threads: 4
[component_container-2] [INFO] [1747752426.621145906] [container]: Load Library: /opt/ros/jazzy/lib/libdepth_image_proc.so
[component_container-2] [INFO] [1747752426.706050975] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752426.706103036] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752426.706109780] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752426.706114307] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752426.706119654] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752426.706124832] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752426.706130184] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752426.706135440] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752426.706140757] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate
[kinect2_bridge-1] libva info: VA-API version 1.20.0
[kinect2_bridge-1] libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
[kinect2_bridge-1] libva info: Found init function __vaDriverInit_1_20
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/pointcloud' in container '/container'
[kinect2_bridge-1] libva info: va_openDriver() returns 0
[kinect2_bridge-1] [Info] [VaapiRgbPacketProcessorImpl] driver: Intel iHD driver for Intel(R) Gen Graphics - 24.1.0 ()
[kinect2_bridge-1] [Info] [Freenect2Impl] enumerating devices...
[kinect2_bridge-1] [Info] [Freenect2Impl] 6 usb devices connected
[kinect2_bridge-1] [Info] [Freenect2Impl] found 0 devices
[kinect2_bridge-1] [ERROR] [1747752426.730865489] [kinect2_bridge]: no Kinect2 devices found!
[INFO] [kinect2_bridge-1]: process has finished cleanly [pid 7913]
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[component_container-2] [INFO] [1747752437.540751727] [rclcpp]: signal_handler(signum=2)
[INFO] [component_container-2]: process has finished cleanly [pid 7914]
minimonk@minimonk-900X3N:~/src/kinect2_ros2$ ros2 launch kinect2_bridge kinect2_bridge.launch.py
[INFO] [launch]: All log files can be found below /home/minimonk/.ros/log/2025-05-20-23-47-37-594228-minimonk-900X3N-7960
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [kinect2_bridge-1]: process started with pid [7982]
[INFO] [component_container-2]: process started with pid [7983]
[component_container-2] [INFO] [1747752458.147532554] [container]: Load Library: /opt/ros/jazzy/lib/libdepth_image_proc.so
[component_container-2] [INFO] [1747752458.226638107] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752458.226688745] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752458.226695944] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752458.226700120] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752458.226705339] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752458.226710495] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752458.226715741] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752458.226720836] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752458.226726217] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/pointcloud' in container '/container'
[kinect2_bridge-1] [INFO] [1747752461.903116963] [kinect2_bridge]: parameter:
[kinect2_bridge-1]         base_name: kinect2
[kinect2_bridge-1]            sensor: 004436460547
[kinect2_bridge-1]         fps_limit: -1
[kinect2_bridge-1]        calib_path: /home/minimonk/src/kinect2_ros2/kinect2_bridge/data/
[kinect2_bridge-1]           use_png: false
[kinect2_bridge-1]      jpeg_quality: 90
[kinect2_bridge-1]         png_level: 1
[kinect2_bridge-1]      depth_method: default
[kinect2_bridge-1]      depth_device: -1
[kinect2_bridge-1]        reg_method: default
[kinect2_bridge-1]        reg_device: -1
[kinect2_bridge-1]         max_depth: 12
[kinect2_bridge-1]         min_depth: 0.1
[kinect2_bridge-1]        queue_size: 5
[kinect2_bridge-1]  bilateral_filter: true
[kinect2_bridge-1] edge_aware_filter: true
[kinect2_bridge-1]        publish_tf: true
[kinect2_bridge-1]      base_name_tf: kinect2
[kinect2_bridge-1]    worker_threads: 4
[kinect2_bridge-1] libva info: VA-API version 1.20.0
[kinect2_bridge-1] libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
[kinect2_bridge-1] libva info: Found init function __vaDriverInit_1_20
[kinect2_bridge-1] libva info: va_openDriver() returns 0
[kinect2_bridge-1] [Info] [VaapiRgbPacketProcessorImpl] driver: Intel iHD driver for Intel(R) Gen Graphics - 24.1.0 ()
[kinect2_bridge-1] [Info] [Freenect2Impl] enumerating devices...
[kinect2_bridge-1] [Info] [Freenect2Impl] 9 usb devices connected
[kinect2_bridge-1] [Info] [Freenect2Impl] found valid Kinect v2 @1:7 with serial 501441643042
[kinect2_bridge-1] [Info] [Freenect2Impl] found 1 devices
[kinect2_bridge-1] [INFO] [1747752462.073844064] [kinect2_bridge]: Kinect2 devices found: 
[kinect2_bridge-1] [INFO] [1747752462.073923803] [kinect2_bridge]:   0: 501441643042
[kinect2_bridge-1] [ERROR] [1747752462.073942832] [kinect2_bridge]: Device with serial '004436460547' not found!
[INFO] [kinect2_bridge-1]: process has finished cleanly [pid 7982]

 

step 6. 파일을 수정한다. (둘다)

$ sudo vi ./src/kinect2_bridge/launch/kinect2_bridge.launch.py
$ sudo vi ./share/kinect2_bridge/launch/kinect2_bridge.launch.py

import os

from ament_index_python import get_package_share_directory

from launch import LaunchDescription
from launch_ros.actions import Node, LoadComposableNodes, ComposableNodeContainer
from launch_ros.descriptions import ComposableNode


parameters=[    {'base_name': 'kinect2',
                'sensor': '004436460547',
                'fps_limit': -1.0,
                'use_png': False,
                'jpeg_quality': 90,
                'png_level': 1,
                'depth_method': 'default',
                'depth_device': -1,
                'reg_method': 'default',
                'reg_device': -1,
                'max_depth': 12.0,
                'min_depth': 0.1,
                'queue_size': 5,
                'bilateral_filter': True,
                'edge_aware_filter': True,
                'worker_threads': 4,
                'publish_tf': True}]

 

Step 7. 다시 실행한다. 

src 쪽만 수정하였을 경우

$ ros2 launch kinect2_bridge kinect2_bridge.launch.py
[INFO] [launch]: All log files can be found below /home/minimonk/.ros/log/2025-05-20-23-56-08-038469-minimonk-900X3N-8222
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [kinect2_bridge-1]: process started with pid [8239]
[INFO] [component_container-2]: process started with pid [8240]
[kinect2_bridge-1] [INFO] [1747752968.497895081] [kinect2_bridge]: parameter:
[kinect2_bridge-1]         base_name: kinect2
[kinect2_bridge-1]            sensor: 004436460547
[kinect2_bridge-1]         fps_limit: -1
[kinect2_bridge-1]        calib_path: /home/minimonk/src/kinect2_ros2/kinect2_bridge/data/
[kinect2_bridge-1]           use_png: false
[kinect2_bridge-1]      jpeg_quality: 90
[kinect2_bridge-1]         png_level: 1
[kinect2_bridge-1]      depth_method: default
[kinect2_bridge-1]      depth_device: -1
[kinect2_bridge-1]        reg_method: default
[kinect2_bridge-1]        reg_device: -1
[kinect2_bridge-1]         max_depth: 12
[kinect2_bridge-1]         min_depth: 0.1
[kinect2_bridge-1]        queue_size: 5
[kinect2_bridge-1]  bilateral_filter: true
[kinect2_bridge-1] edge_aware_filter: true
[kinect2_bridge-1]        publish_tf: true
[kinect2_bridge-1]      base_name_tf: kinect2
[kinect2_bridge-1]    worker_threads: 4
[component_container-2] [INFO] [1747752968.582669845] [container]: Load Library: /opt/ros/jazzy/lib/libdepth_image_proc.so
[kinect2_bridge-1] libva info: VA-API version 1.20.0
[kinect2_bridge-1] libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
[kinect2_bridge-1] libva info: Found init function __vaDriverInit_1_20
[kinect2_bridge-1] libva info: va_openDriver() returns 0
[kinect2_bridge-1] [Info] [VaapiRgbPacketProcessorImpl] driver: Intel iHD driver for Intel(R) Gen Graphics - 24.1.0 ()
[kinect2_bridge-1] [Info] [Freenect2Impl] enumerating devices...
[kinect2_bridge-1] [Info] [Freenect2Impl] 9 usb devices connected
[kinect2_bridge-1] [Info] [Freenect2Impl] found valid Kinect v2 @1:7 with serial 501441643042
[kinect2_bridge-1] [Info] [Freenect2Impl] found 1 devices
[kinect2_bridge-1] [INFO] [1747752968.679076989] [kinect2_bridge]: Kinect2 devices found: 
[kinect2_bridge-1] [INFO] [1747752968.679151068] [kinect2_bridge]:   0: 501441643042
[kinect2_bridge-1] [ERROR] [1747752968.679166289] [kinect2_bridge]: Device with serial '004436460547' not found!
[component_container-2] [INFO] [1747752968.707510234] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::ConvertMetricNode>
[component_container-2] [INFO] [1747752968.707583082] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::CropForemostNode>
[component_container-2] [INFO] [1747752968.707598835] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::DisparityNode>
[component_container-2] [INFO] [1747752968.707605559] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzNode>
[component_container-2] [INFO] [1747752968.707613423] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzRadialNode>
[component_container-2] [INFO] [1747752968.707620795] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziNode>
[component_container-2] [INFO] [1747752968.707628710] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziRadialNode>
[component_container-2] [INFO] [1747752968.707636427] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbNode>
[component_container-2] [INFO] [1747752968.707644371] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbNode>
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/pointcloud' in container '/container'
[INFO] [kinect2_bridge-1]: process has finished cleanly [pid 8239]

 

둘다 수정하였을 경우

$ ros2 launch kinect2_bridge kinect2_bridge.launch.py
[INFO] [launch]: All log files can be found below /home/minimonk/.ros/log/2025-05-20-23-56-39-190964-minimonk-900X3N-8308
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [kinect2_bridge-1]: process started with pid [8325]
[INFO] [component_container-2]: process started with pid [8326]
[kinect2_bridge-1] [INFO] [1747752999.650865409] [kinect2_bridge]: parameter:
[kinect2_bridge-1]         base_name: kinect2
[kinect2_bridge-1]            sensor: 501441643042
[kinect2_bridge-1]         fps_limit: -1
[kinect2_bridge-1]        calib_path: /home/minimonk/src/kinect2_ros2/kinect2_bridge/data/
[kinect2_bridge-1]           use_png: false
[kinect2_bridge-1]      jpeg_quality: 90
[kinect2_bridge-1]         png_level: 1
[kinect2_bridge-1]      depth_method: default
[kinect2_bridge-1]      depth_device: -1
[kinect2_bridge-1]        reg_method: default
[kinect2_bridge-1]        reg_device: -1
[kinect2_bridge-1]         max_depth: 12
[kinect2_bridge-1]         min_depth: 0.1
[kinect2_bridge-1]        queue_size: 5
[kinect2_bridge-1]  bilateral_filter: true
[kinect2_bridge-1] edge_aware_filter: true
[kinect2_bridge-1]        publish_tf: true
[kinect2_bridge-1]      base_name_tf: kinect2
[kinect2_bridge-1]    worker_threads: 4
[component_container-2] [INFO] [1747752999.717016720] [container]: Load Library: /opt/ros/jazzy/lib/libdepth_image_proc.so
[kinect2_bridge-1] libva info: VA-API version 1.20.0
[kinect2_bridge-1] libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
[kinect2_bridge-1] libva info: Found init function __vaDriverInit_1_20
[kinect2_bridge-1] libva info: va_openDriver() returns 0
[kinect2_bridge-1] [Info] [VaapiRgbPacketProcessorImpl] driver: Intel iHD driver for Intel(R) Gen Graphics - 24.1.0 ()
[kinect2_bridge-1] [Info] [Freenect2Impl] enumerating devices...
[kinect2_bridge-1] [Info] [Freenect2Impl] 9 usb devices connected
[kinect2_bridge-1] [Info] [Freenect2Impl] found valid Kinect v2 @1:7 with serial 501441643042
[kinect2_bridge-1] [Info] [Freenect2Impl] found 1 devices
[kinect2_bridge-1] [INFO] [1747752999.802972778] [kinect2_bridge]: Kinect2 devices found: 
[kinect2_bridge-1] [INFO] [1747752999.803048663] [kinect2_bridge]:   0: 501441643042 (selected)
[component_container-2] [INFO] [1747752999.817716799] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752999.817762782] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752999.817772723] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752999.817781495] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752999.817789789] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752999.817798000] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752999.817806268] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752999.817814680] [container]: Found class: rclcpp_components::NodeFactoryTemplate
[component_container-2] [INFO] [1747752999.817823560] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/pointcloud' in container '/container'
[kinect2_bridge-1] [Info] [Freenect2Impl] re-enumerating devices after reset
[kinect2_bridge-1] [Info] [Freenect2Impl] enumerating devices...
[kinect2_bridge-1] [Info] [Freenect2Impl] 9 usb devices connected
[kinect2_bridge-1] [Info] [Freenect2Impl] found valid Kinect v2 @2:10 with serial 501441643042
[kinect2_bridge-1] [Info] [Freenect2Impl] found 1 devices
[kinect2_bridge-1] [Info] [Freenect2DeviceImpl] opening...
[kinect2_bridge-1] [Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 60*8*33792
[kinect2_bridge-1] [Info] [Freenect2DeviceImpl] opened
[kinect2_bridge-1] [Info] [Freenect2DeviceImpl] starting...
[kinect2_bridge-1] [INFO] [1747753001.475900709] [kinect2_bridge]: starting kinect2
[kinect2_bridge-1] [Info] [Freenect2DeviceImpl] submitting rgb transfers...
[kinect2_bridge-1] [Info] [Freenect2DeviceImpl] submitting depth transfers...
[kinect2_bridge-1] [Info] [Freenect2DeviceImpl] started
[kinect2_bridge-1] [INFO] [1747753002.096109296] [kinect2_bridge]: device serial: 501441643042
[kinect2_bridge-1] [INFO] [1747753002.096174412] [kinect2_bridge]: device firmware: 4.0.3911.0
[kinect2_bridge-1] [Info] [Freenect2DeviceImpl] stopping...
[kinect2_bridge-1] [Info] [Freenect2DeviceImpl] canceling rgb transfers...
[kinect2_bridge-1] [Info] [Freenect2DeviceImpl] canceling depth transfers...
[kinect2_bridge-1] [Info] [Freenect2DeviceImpl] stopped
[kinect2_bridge-1] [INFO] [1747753002.311498664] [kinect2_bridge]: default ir camera parameters: 
[kinect2_bridge-1] [INFO] [1747753002.311621920] [kinect2_bridge]: fx: 365.719, fy: 365.719, cx: 259.505, cy: 210.078
[kinect2_bridge-1] [INFO] [1747753002.311683407] [kinect2_bridge]: k1: 0.0949663, k2: -0.274613, p1: 0, p2: 0, k3: 0.093757
[kinect2_bridge-1] [INFO] [1747753002.311724585] [kinect2_bridge]: default color camera parameters: 
[kinect2_bridge-1] [INFO] [1747753002.311769717] [kinect2_bridge]: fx: 1081.37, fy: 1081.37, cx: 959.5, cy: 539.5
[kinect2_bridge-1] [WARN] [1747753002.314247853] [kinect2_bridge]: using sensor defaults for color intrinsic parameters.
[kinect2_bridge-1] [WARN] [1747753002.314319452] [kinect2_bridge]: using sensor defaults for ir intrinsic parameters.
[kinect2_bridge-1] [WARN] [1747753002.314351830] [kinect2_bridge]: using defaults for rotation and translation.
[kinect2_bridge-1] [WARN] [1747753002.314370819] [kinect2_bridge]: using defaults for depth shift.
[kinect2_bridge-1] Using CPU registration method!
[kinect2_bridge-1] Using CPU registration method!
[kinect2_bridge-1] [INFO] [1747753002.374909053] [kinect2_bridge]: waiting for clients to connect

 

step 8. 먼가 실행해본다. (실패)

$ ros2 launch kinect2_bridge rtabmap.launch.py
file 'rtabmap.launch.py' was not found in the share directory of package 'kinect2_bridge' which is at '/opt/ros/jazzy/share/kinect2_bridge'

 

step 9. 깔아본다.

$ apt-cache search rtabmap
ros-jazzy-rtabmap - RTAB-Map's standalone library.
ros-jazzy-rtabmap-conversions - RTAB-Map's conversions package.
ros-jazzy-rtabmap-conversions-dbgsym - debug symbols for ros-jazzy-rtabmap-conversions
ros-jazzy-rtabmap-dbgsym - debug symbols for ros-jazzy-rtabmap
ros-jazzy-rtabmap-demos - RTAB-Map's demo launch files.
ros-jazzy-rtabmap-examples - RTAB-Map's example launch files.
ros-jazzy-rtabmap-launch - RTAB-Map's main launch files.
ros-jazzy-rtabmap-msgs - RTAB-Map's msgs package.
ros-jazzy-rtabmap-msgs-dbgsym - debug symbols for ros-jazzy-rtabmap-msgs
ros-jazzy-rtabmap-odom - RTAB-Map's odometry package.
ros-jazzy-rtabmap-odom-dbgsym - debug symbols for ros-jazzy-rtabmap-odom
ros-jazzy-rtabmap-python - RTAB-Map's python package.
ros-jazzy-rtabmap-ros - RTAB-Map Stack
ros-jazzy-rtabmap-rviz-plugins - RTAB-Map's rviz plugins.
ros-jazzy-rtabmap-rviz-plugins-dbgsym - debug symbols for ros-jazzy-rtabmap-rviz-plugins
ros-jazzy-rtabmap-slam - RTAB-Map's SLAM package.
ros-jazzy-rtabmap-slam-dbgsym - debug symbols for ros-jazzy-rtabmap-slam
ros-jazzy-rtabmap-sync - RTAB-Map's synchronization package.
ros-jazzy-rtabmap-sync-dbgsym - debug symbols for ros-jazzy-rtabmap-sync
ros-jazzy-rtabmap-util - RTAB-Map's various useful nodes and nodelets.
ros-jazzy-rtabmap-util-dbgsym - debug symbols for ros-jazzy-rtabmap-util
ros-jazzy-rtabmap-viz - RTAB-Map's visualization package.
ros-jazzy-rtabmap-viz-dbgsym - debug symbols for ros-jazzy-rtabmap-viz

$ sudo apt-get install ros-jazzy-rtabmap
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libamd3 libbtf2 libcamd3 libccolamd3 libcholmod5 libcolamd3 libcxsparse4
  libgraphblas-dev libgraphblas7 libklu2 libldl3 libparu0 librbio4 libspex2
  libspqr4 libsuitesparse-dev libsuitesparse-mongoose3 libsuitesparseconfig7
  libumfpack6 ros-jazzy-gtsam ros-jazzy-libg2o ros-jazzy-libnabo
  ros-jazzy-libpointmatcher
The following NEW packages will be installed:
  libamd3 libbtf2 libcamd3 libccolamd3 libcholmod5 libcolamd3 libcxsparse4
  libgraphblas-dev libgraphblas7 libklu2 libldl3 libparu0 librbio4 libspex2
  libspqr4 libsuitesparse-dev libsuitesparse-mongoose3 libsuitesparseconfig7
  libumfpack6 ros-jazzy-gtsam ros-jazzy-libg2o ros-jazzy-libnabo
  ros-jazzy-libpointmatcher ros-jazzy-rtabmap
0 upgraded, 24 newly installed, 0 to remove and 1 not upgraded.
Need to get 40.6 MB of archives.
After this operation, 258 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

[링크 : https://index.ros.org/p/rtabmap_launch/]

 

step 10. 안된다!! 젠장!

$ ros2 launch kinect2_bridge rtabmap.launch.py
file 'rtabmap.launch.py' was not found in the share directory of package 'kinect2_bridge' which is at '/opt/ros/jazzy/share/kinect2_bridge'

 

---

실행시 필요한 launch.py 파일명 참조

[링크 : https://github.com/paul-shuvo/iai_kinect2_opencv4/blob/master/kinect2_bridge/launch/kinect2_bridge.launch]

[링크 : https://github.com/paul-shuvo/iai_kinect2_opencv4]

'프로그램 사용 > ros' 카테고리의 다른 글

ros2 with kinect v2 시도... 3회차  (0) 2025.05.22
ros2 with kinect v2 시도... 2회차  (0) 2025.05.22
ros2 uses concol  (0) 2025.05.20
ros 2 install on ubuntu 24.04, rviz  (2) 2025.05.17
ros...?  (0) 2025.04.08
Posted by 구차니