usb_cam
ROS1

usb_cam

테스트 환경

  • ROS Noetic
  • Webcam

QuickStart

ros 환경 설정 후 usb-cam 패키지를 설치합니다.

source /opt/ros/noetic/setup.bash
sudo apt install ros-noetic-usb-cam

 

usb_cam을 실행하기 전 roscore 실행

source /opt/ros/noetic/setup.bash
roscore

 

usb_cam을 실행

source /opt/ros/noetic/setup.bash
rosrun usb_cam usb_cam_node

 

Buliding from Source

저장소를 구성한 뒤 패키지를 다운 받습니다.

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/ros-drivers/usb_cam.git

 

빌드 진행

cd ~/catkin_ws

sudo rosdep init # if you have not done this before
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro noetic -y
*rosdep: command not found* 시 
sudo apt install python3-rosdep 진행
*gscam2: Cannot locate rosdep definition for [camera_info_manager]* 시 
sudo apt install ros-noetic-camera-info-manager

catkin_make

 

usb_cam 패키지를 실행시키기 위한 환경 설정

source ~/catkin_ws/devel/setup.bash

 

usb_cam 패키지를 실행하기 전 터미널을 열어 roscore 실행

source /opt/ros/noetic/setup/bash
roscore

 

usb_cam 패키지를 실행하기 위해 아래와 같이 진행

rosrun usb_cam usb_cam_node

 

usb_cam을 통해 전송되는 이미지를 보기위해서는 rqt_image_view를 실행

source /opt/ros/noetic/setup/bash
rosrun rqt_image_view rqt_image_view

 

 

출처 :

https://github.com/ros-drivers/usb_cam?tab=readme-ov-file

 

GitHub - ros-drivers/usb_cam: A ROS Driver for V4L2 USB Cameras

A ROS Driver for V4L2 USB Cameras. Contribute to ros-drivers/usb_cam development by creating an account on GitHub.

github.com

 

'ROS1' 카테고리의 다른 글

gscam  (0) 2024.01.15