Open HadrienRoy opened 1 year ago
Hi @HadrienRoy
Unfortunately, the Raspicam package does not support Raspberry Pi with 64bit Ubuntu. You may need to use OpenCV in order to access the camera. The installation / build process looks like below. Building the OpenCV may take more than an hour, so please be prepared for that.
$ sudo free -h
$ sudo apt-get install build-essential cmake gcc g++ git unzip pkg-config
$ sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libavcodec-dev libavformat-dev libswscale-dev libgtk2.0-dev libcanberra-gtk* libxvidcore-dev libx264-dev python3-dev python3-numpy python3-pip libtbb2 libtbb-dev libdc1394-22-dev libv4l-dev v4l-utils libopenblas-dev libatlas-base-dev libblas-dev liblapack-dev gfortran libhdf5-dev libprotobuf-dev libgoogle-glog-dev libgflags-dev protobuf-compiler
$ cd ~
$ wget -O opencv.zip https://github.com/opencv/opencv/archive/4.5.0.zip
$ wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.5.0.zip
$ unzip opencv.zip
$ unzip opencv_contrib.zip
$ mv opencv-4.5.0 opencv
$ mv opencv_contrib-4.5.0 opencv_contrib
$ cd opencv
$ mkdir build
$ cd build
$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules -D ENABLE_NEON=ON -D BUILD_TIFF=ON -D WITH_FFMPEG=ON -D WITH_GSTREAMER=ON -D WITH_TBB=ON -D BUILD_TBB=ON -D BUILD_TESTS=OFF -D WITH_EIGEN=OFF -D WITH_V4L=ON -D WITH_LIBV4L=ON -D WITH_VTK=OFF -D OPENCV_ENABLE_NONFREE=ON -D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=OFF -D BUILD_NEW_PYTHON_SUPPORT=ON -D BUILD_opencv_python3=TRUE -D OPENCV_GENERATE_PKGCONFIG=ON -D BUILD_EXAMPLES=OFF ..
$ cd ~/opencv/build
$ make -j4
$ sudo make install
$ sudo ldconfig
$ make clean
$ sudo apt-get update
Turn off Raspberry Pi, take out the microSD card and edit the config.txt in system-boot section. add start_x=1 before the enable_uart=1 line.
To test the camera, you can take a picture using ffmpeg.
$ sudo apt install ffmpeg
$ ffmpeg -f video4linux2 -s 640x480 -i /dev/video0 -ss 0:0:2 -frames 1 capture_test.jpg
Thank you very much for your reply. I proceeded and followed your steps and I got the camera test to work however my make compilation failed at 100% a few times. I also looked at issue #863 and it also was very helpful.
ISSUE TEMPLATE ver. 0.4.0
Which TurtleBot3 platform do you use?
Which ROS is working with TurtleBot3?
Which SBC(Single Board Computer) is working on TurtleBot3?
Which OS you installed on SBC?
Which OS you installed on Remote PC?
Specify the software and firmware version(Can be found from Bringup messages)
Specify the commands or instructions to reproduce the issue.
Copy and Paste the error messages on terminal.
Please describe the issue in detail.
This causes an error when launching the default bringup "Error: Could not parse inertial element for Link [image]". This means there in no image topic available.
I followed the instructions on "https://emanual.robotis.com/docs/en/platform/turtlebot3/appendix_raspi_cam/" to enable the camera however my raspi-config is not the same as in the instructions. I updated the tool but it says it is the latest version
I then looked into changing the /boot/config.txt file as I have seen online, and that also has not worked.
Is there another way to enable to the camera or is there a problem with the version of defualt ROBOTIS software I am using? Thank you for your assistance.