본문 바로가기

작업 일기

라즈베리파이 4B(Ubuntu 18.04)에 Pi Camera V2.1 연결하기

- 개발 환경 : Rasberry Pi 4B (Ubuntu 18.04 / ROS melodic)

- 준비물 : Pi Camera V2.1

- 참조 : https://chuckmails.medium.com/enable-pi-camera-with-raspberry-pi4-ubuntu-20-10-327208312f6e

https://larrylisky.com/2016/11/24/enabling-raspberry-pi-camera-v2-under-ubuntu-mate/

https://gist.github.com/xxl007/5db5a3625f3a5914541c84c37b380bfa

https://www.codetd.com/en/article/12943496

 

 

라즈베리파이 설정을 위한 raspi-config 설치

$ wget http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20200817_all.deb
$ dpkg -i raspi-config_20200817.deb
$ sudo apt --fix-broken install
$ rosdep install raspi-config_20200817.deb
$ sudo raspi-config

 

 

 

5 Interfacing Options - P1 Camera에 들어가서 Enable해줍니다.

 

 

※ firmware 에러 발생 시

Your firmwave appears to be out of date (no start_x.elf). Please update

해결법

$ sudo nano /boot/firmware/config.txt

#문구 추가
start_x=1
gpu_mem=128

그래도 안되면

$ df -h
$ mount /dev/mmcblk0p1 /boot
$ ls -al /dev/ | grep video

 

$ sudo apt-get install v4l-utils
$ v4l2-ctl --list-devices

 

$ sudo apt install ffmpeg
$ ffplay /dev/video0

D-bus 에러 발생 시

$ export DBUS_FATAL_WARNINGS=0
$ ffplay /dev/video0