Announcement: How to enable raspi cam in flytos?


#1

Hi,

This setup assumes, you have installed the latest FlytOS image available in https://my.flytbase.com/downloads/flytos/. No need to update your image if you downloaded it after 12th June 2017.

Now, to get raspi cam enabled, run the following command:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo raspi-config

In raspi-config window, enable camera from Interfacing Options. Once done, reboot your device.
Tada. your camera should be enabled now. Future FlytOS images, would have enabled camera support by default.

It would be better if you also upgrade your kernel, by running this command:

$ sudo rpi-update

Once, done reboot your device. Be patient, as it takes some time to boot up for the first time.

Once your device boots up, wait for around a minute and open up flytconsole to check video streaming.

EDIT: To configure camera capture options such as framerate, resolution etc., open up /flyt/flytos/flytcore/share/vision_apps/launch/cam_api.launch, and edit accordingly.


FlytOS 1.34b on Pi3, with Pixhawk loaded PX4 firmware is not displaying GPS, Flight mode in Flytconsole whereas with Ardupilot firmware its working fine
Issues in FlytOS 1.34b with Pi3
Raspberry Pi 3 Camera not showing up
#2

Great to hear this, I have updated the kernel of RPi3 as per process you suggested. Enabled Raspi Cam in raspi-config.

After that, you suggested “Once your device boots up, wait for around a minute and open up flytconsole to check video streaming.
To configure camera capture options, open up /flyt/flytos/flytcore/share/vision_apps/launch/cam_api.launch, and edit accordingly.”

Following is I am getting, pls let me know what I need to modify to get atleast 720p video in flytconsole from Raspi Cam (CSI Pi Camera) ?

RPi3 kernel update log.txt (2.0 KB)


FlytOS 1.34b on Pi3, with Pixhawk loaded PX4 firmware is not displaying GPS, Flight mode in Flytconsole whereas with Ardupilot firmware its working fine
Issues in FlytOS 1.34b with Pi3
#3

Oh!! I tried 320 x 240,640x480, 1920x1080. In the first two case, I could retrieve image at 30Hz, it dwindled to ~1Hz for the third case. When run with cheese, the results were similar. I would again check with raspivid and report back.


#4

Hi,
Thanks SRV. I shall be waiting to hear more from you.
Pls post screenshot of your setting in /flyt/flytos/flytcore/share/vision_apps/launch/cam_api.launch


#5

Launch file:

<launch>
  <arg name="camera_name" default="flytcam"/>
  <node pkg="usb_cam" name="$(arg camera_name)" type="usb_cam_node" output="screen">
    <param name="video_device" value="/dev/video0"/>
    <param name="image_width" value="640"/>
    <param name="image_height" value="480"/>
    <param name="framerate" value="30"/>
    <param name="pixel_format" value="yuyv"/>
    <param name="bightness" value="20" />
    <!--<param name="camera_info_url" value="file://$(find vision_apps)/calibration/ost.yaml"/>-->
  </node>

<!--  <node pkg="vision_apps" name="image_capture" type="image_capture"/>
  <node pkg="web_video_server" name="web_video_server" type="web_video_server" output="screen"/> -->
  <!--<group ns="$(arg camera_name)">
    <node pkg="image_proc" name="image_proc" type="image_proc"/>  
  </group>-->
</launch>

I don’t think we would be able to increase the resolution for now. Anyway our web video server won’t be able to handle 720p.

If you still want 720p video streaming, you shall try picamera library. I haven’t used it though. Moreover raspivid also provides API for streaming in udp/tcp. Again haven’t tried but seems like feasible solutions.


#6

Hi SRV, thanks for the reply. What is the setting Raspi CSI Cam rather than the USB Cam ?


#7

It’s okay, I will continue using one more pi for HD FPV via EZ_WifiBroadcast.


#8

Hi,

I am sorry I didn’t get you!
Are you familiar with ROS?


#9

Hi,

No I am not, pls let me know what changes I need to make in /flyt/flytos/flytcore/share/vision_apps/launch/cam_api.launch

to get video in FlytConsole from CSI Raspi Cam instead of USB Camera ?


#10

You don’t have to make any changes, just follow the above guide and you should get video streaming from raspi cam.

This was for cases wherein you would like to modify camera parameters such as frame rate, resolution etc.


#11

Can it be edited for CSI cam rather than USB Cam ?, If yes, then what need to be changed ?


#12

Hi,

As i said earlier, you don’t have to edit anything. It would work for your csi cam as it is.


#13

Hi,

Thanks, I would try and use CSI camera and report back if any issue.


#14

Yes, its working, thanks


FlytOS 1.34b (Console video images - 320x240 & 180x720)

FlytOS 1.34b (Getting 720p video @15fps from CSI Pi Camera with latest kernel update in Pi3)