1

I have a TurtleBot3 Burger robot which has a Raspberry Pi 3B+ on it. And the RPI has to run Ubuntu 20.04 OS, otherwise I can't use ROS and eventually the robot functionalities.

The RPI has a picamera v2.1 on it and my goal is to program using picamera python library. I am able to take a picture using raspistill command. But when I try to run a simple program on Python, which takes a picture and saves it, then I get the following error:

Code:

# source: https://picamera.readthedocs.io/en/release-1.13/recipes1.html
from time import sleep
from picamera import PiCamera

camera = PiCamera()
camera.resolution = (1024, 768)
camera.start_preview()
# Camera warm-up time
sleep(2)
camera.capture('foo.jpg')

Error:

mmal: mmal_component_create_core: could not find component 'vc.camera_info'
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    camera = PiCamera()
  File "/usr/local/lib/python3.8/dist-packages/picamera/camera.py", line 367, in __init__
    with mo.MMALCameraInfo() as camera_info:
  File "/usr/local/lib/python3.8/dist-packages/picamera/mmalobj.py", line 2346, in __init__
    super(MMALCameraInfo, self).__init__()
  File "/usr/local/lib/python3.8/dist-packages/picamera/mmalobj.py", line 631, in __init__
    mmal_check(
  File "/usr/local/lib/python3.8/dist-packages/picamera/exc.py", line 184, in mmal_check
    raise PiCameraMMALError(status, prefix)
picamera.exc.PiCameraMMALError: Failed to create MMAL component b'vc.camera_info': Function not implemented

Is there a way to use Picamera like this, or is it not possible with Ubuntu 20.04?

4
  • Why do people who use Ubuntu try to use Raspberry Pi OS tutorials and expect us to solve their problems?
    – Milliways
    Commented Nov 24, 2021 at 11:11
  • @Milliways So I followed this one, picamera.readthedocs.io/en/release-1.13/…, which has alternate distro installation section. What makes this Raspbian tutorial? I truely wanna learn.
    – JollyRoger
    Commented Nov 24, 2021 at 11:32
  • 1
    The error indicates that video core support is missing. Ubuntu does not support or use the closed source used by raspicam. Indeed these are no longer used by the latest Raspberry Pi OS - See raspberrypi.com/news/bullseye-camera-system
    – Milliways
    Commented Nov 24, 2021 at 23:28
  • @Milliways My understanding is that on the Pi-specific releases of Ubuntu, the legacy camera stack can be enabled by modifying the boot config and installing libraspberyypi-bin and libraspberyypi-dev; indeed, that seems to get raspistill and raspivid working. Is that not correct?
    – JMY1000
    Commented May 25, 2022 at 3:01

1 Answer 1

0

If you're using ROS, the easiest way to use the Pi camera is to use the raspicam_node from UbiquityRobotics. It's as optimised as can be, as it uses the RPi GPU for image compression and motion vector computing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.