Reputation: 3
I am working through a short tutorial (see link below) to publish an image stream in ROS Raspberry Pi camera: https://www.theconstructsim.com/publish-image-stream-ros-kinetic-raspberry-pi/.
I have ignored the steps to install Ubuntu mate OS on the raspberry pi as I have already completed this when completing the Turtlebot3 tutorial from Robotis (see link below): https://emanual.robotis.com/docs/en/platform/turtlebot3/setup/#setup
I have completed the steps to "Get the LCD screen up and running" with no issues.
I was unsure if I should install the Full ROS Kinetic, as I completed this during the Turtlebot3 tutorials (link above). Am I incorrect in saying this? The Turtlebot tutorial set up both the Remote PC and the Turtlebot robot (including the raspberry pi and the OpenCR setup).
I am running into issues on the "Setting up raspberry pi camera" section.
This is the following code and error I am receiving;
sudo apt-get install libraspberrypi-dev
sudo pip install picamera
start_x=1
gpu_mem=128<span style="font-family: arial, helvetica, sans-serif; font-size: 14pt;"> </span>
sudo reboot
There are no errors/issues here.
import picamera
Error here
bash: import: command not found
Am I doing something incorrect? I am pretty new to Linux, Ubuntu and robotics in general so I apologise if this is a stupid question or easy fix.
Upvotes: 0
Views: 683
Reputation: 26
You need to run the import command inside a Python script. So you create a file called camera-test.py for example and enter the following lines:
import picamera
camera = picamera.PiCamera()
camera.capture('mytest_image.jpg')
camera.close()
Save this file and run it in your terminal with
python3 camera-test.py
I hope this helps.
Upvotes: 1