Quantcast
Channel: arm - openFrameworks
Viewing all 147 articles
Browse latest View live

RPi4 + Buster Lite + oF 0.11.0

$
0
0

@mattc wrote:

Hi!
Some time ago I’ve managed to run oF 0.11.0 examples on Buster Lite running on RPi3. Here’s some details: RPi3 + Buster Lite + oF 0.11.0 = can't run example

Now, I’m trying to do the same on RPi4 but with no luck.
Steps:

  1. SD card with fresh 2020-02-13-raspbian-buster-lite.img
  2. sudo raspi-config > Advanced > Memory Split > 256
  3. sudo apt-get clean && sudo apt-get update && sudo apt-get dist-upgrade
  4. wget https://openframeworks.cc/versions/v0.11.0/of_v0.11.0_linuxarmv6l_release.tar.gz
  5. sudo mkdir openFrameworks && sudo tar vxfz of_v0.11.0_linuxarmv6l_release.tar.gz -C openFrameworks --strip-components 1
  6. sudo rm of_v0.11.0_linuxarmv6l_release.tar.gz
  7. cd openFrameworks/scripts/linux/debian && sudo ./install_dependencies.sh && sudo ./install_codecs.sh
  8. sudo nano openframeworks/libs/openFrameworksCompiled/project/linuxarmv6l/config.linuxarmv6l.default.mk
    #USE_PI_LEGACY = 0 //commenting this out
  9. cd && sudo make Release -C openFrameworks/libs/openFrameworksCompiled/project
  10. sudo nano /openFrameworks/examples/3d/quaternionLatLongExample/src/main.cpp
    ofSetupOpenGL(800,480, OF_FULLSCREEN); //change project resolution
  11. cd … && sudo nano config.make
    PROJECT_LDFLAGS += -latomic //add the flag
  12. sudo make

Compiled without issue, but when trying to run i get:

**pi@raspberrypi** : **~/openFrameworks/examples/3d/quaternionLatLongExample $** make run
VER ID IS 10
using legacy build
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): screenRect: 1920x1080
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): windowRect: 1920x1080
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set 0x1
[notice ] ofAppEGLWindow: createSurface(): no current renderer selected
[notice ] ofAppEGLWindow: createSurface(): default renderer detected
[notice ] ofAppEGLWindow: createSurface(): surface created correctly
[notice ] ofAppEGLWindow: createSurface(): API bound correctly
[notice ] ofAppEGLWindow: createSurface(): -----EGL-----
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MAJOR = 1
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MINOR = 4
[notice ] ofAppEGLWindow: createSurface(): EGL_CLIENT_APIS = OpenGL_ES OpenVG
[notice ] ofAppEGLWindow: createSurface(): EGL_VENDOR = Broadcom
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION = 1.4
[notice ] ofAppEGLWindow: createSurface(): EGL_EXTENSIONS = EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_vg_parent_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_lock_surface
[notice ] ofAppEGLWindow: createSurface(): GL_RENDERER = VideoCore IV HW
[notice ] ofAppEGLWindow: createSurface(): GL_VERSION = OpenGL ES-CM 1.1
[notice ] ofAppEGLWindow: createSurface(): GL_VENDOR = Broadcom
[notice ] ofAppEGLWindow: createSurface(): -------------
[notice ] ofAppEGLWindow: setupPeripherals(): peripheral setup complete
[notice ] ofAppEGLWindow: setupNativeUDev(): created udev object
[notice ] ofAppEGLWindow: setupNativeInput()
[notice ] Got device
[notice ] - node:
[notice ] - sysname: input0
[notice ] - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:1915:1001.0001/input/input0
[notice ] - devtype:
[notice ] - driver:
[notice ] - devnum: 0
[notice ] - ID_INPUT_KEYBOARD: 1
[notice ] - ID_INPUT_MOUSE:
[notice ] Got device
[notice ] - node: /dev/input/event0
[notice ] - sysname: event0
[notice ] - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:1915:1001.0001/input/input0/event0
[notice ] - devtype:
[notice ] - driver:
[notice ] - devnum: 3392
[notice ] - ID_INPUT_KEYBOARD: 1
[notice ] - ID_INPUT_MOUSE:
[notice ] ofAppEGLWindow: addInput(): input device name = 123 COM Smart Control
[notice ] Got device
[notice ] - node:
[notice ] - sysname: input1
[notice ] - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:1915:1001.0002/input/input1
[notice ] - devtype:
[notice ] - driver:
[notice ] - devnum: 0
[notice ] - ID_INPUT_KEYBOARD:
[notice ] - ID_INPUT_MOUSE: 1
[notice ] Got device
[notice ] - node: /dev/input/event1
[notice ] - sysname: event1
[notice ] - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:1915:1001.0002/input/input1/event1
[notice ] - devtype:
[notice ] - driver:
[notice ] - devnum: 3393
[notice ] - ID_INPUT_KEYBOARD:
[notice ] - ID_INPUT_MOUSE: 1
[notice ] ofAppEGLWindow: addInput(): input device name = 123 COM Smart Control
[ error ] ofAppEGLWindow: ioctl GABS failed
[ error ] ofAppEGLWindow: ioctl GABS failed
[notice ] Got device
[notice ] - node: /dev/input/mouse0
[notice ] - sysname: mouse0
[notice ] - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:1915:1001.0002/input/input1/mouse0
[notice ] - devtype:
[notice ] - driver:
[notice ] - devnum: 3360
[notice ] - ID_INPUT_KEYBOARD:
[notice ] - ID_INPUT_MOUSE: 1
[notice ] Got device
[notice ] - node:
[notice ] - sysname: input2
[notice ] - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:1915:1001.0003/input/input2
[notice ] - devtype:
[notice ] - driver:
[notice ] - devnum: 0
[notice ] - ID_INPUT_KEYBOARD:
[notice ] - ID_INPUT_MOUSE:
[notice ] Got device
[notice ] - node: /dev/input/event2
[notice ] - sysname: event2
[notice ] - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:1915:1001.0003/input/input2/event2
[notice ] - devtype:
[notice ] - driver:
[notice ] - devnum: 3394
[notice ] - ID_INPUT_KEYBOARD:
[notice ] - ID_INPUT_MOUSE:
[notice ] Got device
[notice ] - node:
[notice ] - sysname: input3
[notice ] - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:1915:1001.0003/input/input3
[notice ] - devtype:
[notice ] - driver:
[notice ] - devnum: 0
[notice ] - ID_INPUT_KEYBOARD:
[notice ] - ID_INPUT_MOUSE:
[notice ] Got device
[notice ] - node: /dev/input/event3
[notice ] - sysname: event3
[notice ] - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:1915:1001.0003/input/input3/event3
[notice ] - devtype:
[notice ] - driver:
[notice ] - devnum: 3395
[notice ] - ID_INPUT_KEYBOARD:
[notice ] - ID_INPUT_MOUSE:
[notice ] Got device
[notice ] - node: /dev/input/mice
[notice ] - sysname: mice
[notice ] - devpath: /devices/virtual/input/mice
[notice ] - devtype:
[notice ] - driver:
[notice ] - devnum: 3391
[notice ] - ID_INPUT_KEYBOARD:
[notice ] - ID_INPUT_MOUSE:
[notice ] --- Input Device List ---:
[notice ] - /dev/input/event0
[notice ] - /dev/input/event1
[notice ] -------------------------:
[notice ] ofAppEGLWindow: setupPeripherals(): native event setup complete
make: *** [/home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:184: run] Interrupt

…and I need to kill it since it just hangs there. Any help?

Posts: 1

Participants: 1

Read full topic


RPI 3b + buster-full + OF 0.11.0

$
0
0

@jackjaquejack wrote:

logs.cpp (37.3 KB)

Hello, I’ve been trying to get OF to work on the pi.
the errors first occurred when i updated some software, but i’ve since started from the beginning and done a fresh reinstall.
Upon installing and compiling packages i got many, almost repetitive warnings such as

ofNode.cpp:2:
/home/pi/openFrameworks/libs/glm/include/glm/./ext/…/detail/type_vec2.hpp:17:9: note: ‘glm::i32vec2’ {aka ‘struct glm::vec<2, int, (glm::qualifier)0>’} declared here
struct vec<2, T, Q>
^~~~~~~~~~~~
ype_vec4.hpp:17:9: note: ‘glm::u16vec4’ {aka ‘struct glm::vec<4, short unsigned int, (glm::qualifier)0>’} declared here
struct vec<4, T, Q>

It did compile, and I was also able to build the polygon example but when I try to run it I got

VER ID IS 10

using legacy build

[ error ] ofAppGLFWWindow: 65544: X11: The DISPLAY environment variable is missing

[ error ] ofAppGLFWWindow: couldn’t init GLFW

[ error ] ofAppGLFWWindow: 65537: The GLFW library is not initialized

Segmentation fault

make: *** [/home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:184: run] Error 139

I have re-flashed the memory card and repeated the installation process on the OF-website, but the same thing happens. I’ve also tried many of the suggestions in this forum but to no avail. examples no-longer build. the attached logs.cpp file contains some of the terminal errors/logs from a ‘make run’ attempt of the polygon example, if anyone needs to see them. can anyone shed any light on the matter? I would be very grateful. thanks, jack

Posts: 1

Participants: 1

Read full topic

ofxSerial problem on Raspberry Pi 4 Buster Lite

$
0
0

@RobbertGroenendijk wrote:

Hi there,

I’ve been coding an installation for which I have a Teensy 4.0 (arduino-like thing) hooked up through FTDI drivers to a RaspBerry Pi 4 USB2 port. Because I already had some problems with the ofSerial class I decided to switch the communication to ofxSerial. Now all is fine when I just constant stings, but I need to ‘create’ the string dynamically as I’m sending over different pixel data. When I do this, my functions stop working. They might send a couple times, but after that communication is just halted. I feel like I’m looking over something…

Function that constructs the message;

void Comm::sendPixel(ofx::IO::SerialDevice& serial, int socket_index, std::shared_ptr<Pixel> pixel, unsigned int channel_idx) {
    std::string message = "I,PC," + std::to_string(pixel->index);
    sendPackage(serial, socket_index, message);
}

Sending function;

void Comm::sendPackage(ofx::IO::SerialDevice& serial, int socket_index, std::string message) {
    std::string msg = message;
    std::string idx = std::to_string(socket_index);
    ofx::IO::ByteBuffer socketBuffer(idx);
    ofx::IO::ByteBuffer messageBuffer(message);

    if (serial.isOpen()) {
        serial.writeByte(startMarker_);
        serial.writeBytes(socketBuffer);
        serial.writeByte(',');
        serial.writeBytes(messageBuffer);
        serial.writeByte(endMarker_);
        serial.writeByte('\n');
        serial.flush();
        serial.flushInput();
        serial.flushOutput();
    }
}

Currently I’m flushing everything as I was hopelessly trying to debug the thing the whole day. I detect begin & ends of messages by using beginmarker and endmarkers (’<’ and ‘>’) so the ‘\n’ isnt needed but gives some extra safety.

The use of ofxSerial here is based on the example at; https://github.com/bakercp/ofxSerial/blob/master/examples/basic/echo/src/ofApp.cpp

Any recommendations? I really feel like it has to do with the string that is constructed. Basically tried everything else.

Posts: 1

Participants: 1

Read full topic

RPI4 ofxVideoGrabber only black and white

$
0
0

@steeley wrote:

OF 0.11 Buster RPI4. Trying to get this working as ofxOMXCamera not usable on Pi4.

using the standard OF video grabber example works with the pi onboard camera, but
the frame rate is very slow, and it. looks like gstreamer is doing some sort of scaling.

if I do grabber.setPixelFormat(OF_PIXELS_NATIVE);
I get a good frame rate, no scaling but only black and white video. How to fix? console output below.

ofGstUtils: setPipelineWithSink(): gstreamer pipeline: v4l2src name=video_source device=/dev/video2 ! video/x-raw,framerate=24/1 ! appsink name=ofappsink enable-last-sample=0 caps=“video/x-raw,format={RGBA,BGRA,RGB,BGR,RGB16,GRAY8,YV12,I420,NV12,NV21,YUY2},
width=1024, height=720”
[notice ] ofGstVideoUtils: allocating with 1024x720 YUY2

Posts: 1

Participants: 1

Read full topic

Trouble getting to OF server

$
0
0

@angelo wrote:

Hei!
I’m using ofxHTTP and ofxJSONRPC to stream a video and some data packed in a Json file:

ofxHTTP::SimpleIPVideoServer videoServer port 3333

ofx::HTTP::JSONRPCServer jsonServer port 3333

Both servers are initialized in the same port, and on setup. Then, on the client side, when the address is then entered, sometimes the video is not shown or the data is not read. And from 10 tries, just a couple of them the client is connected to both of them.
Testing server on a Raspberry Pi 4.

The error on the browser console for the data is:

jquery.jsonrpcclient.js:225 WebSocket connection to 'ws://192.168.1.203:3333/' failed: Error during WebSocket handshake: Unexpected response code: 200

||$.JsonRpcClient._getSocket|@|jquery.jsonrpcclient.js:225|
| --- | --- | --- | --- |
||getSocket|@|jquery.jsonrpcclient.js:51|
||$.JsonRpcClient.call|@|jquery.jsonrpcclient.js:94|
||initConfig|@|main.js:44|
||(anonymous)|@|main.js:37|

While the one for the video is:
192.168.1.203/:32 GET http://192.168.1.203:3333/ipvideo/dual-screen net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)

When starting a single server, the client connection rate is 100% for both, so the main question is:

It’s possible to used both servers on the same port?

Or the server needs to be configured in a special way? I mean inside the addons?

Thanks in advance.

Posts: 4

Participants: 2

Read full topic

Hard time with shader and RPi

$
0
0

@siteswapjuggler wrote:

Hi there, i’m back trying to make things work on a RPi and it quiet a pain for now. I’m wanted to try shaders on Raspberry Pi but neither of ofx v0.10.1 or ofx v0.11 has produced valid compilation on the basic examples yet.

Raspberry Pi 3 B+ with Strecht, ofx v0.10.1 tried with legacy mode, ofx v0.11 tried on desktop with both full or fake kms option…

This is the log I get :
[ error ] ofShader: sorry, it looks like you can’t run ‘ARB_shader_objects’
[ error ] ofShader: please check the capabilites of your graphics card: http://www.ozone3d.net/gpu_caps_viewer
[ error ] ofShader: setupShaderFromSource(): failed creating GL_VERTEX_SHADER shader
[ error ] ofShader: sorry, it looks like you can’t run ‘ARB_shader_objects’
[ error ] ofShader: please check the capabilites of your graphics card: http://www.ozone3d.net/gpu_caps_viewer
[ error ] ofShader: setupShaderFromSource(): failed creating GL_FRAGMENT_SHADER shader
[ error ] ofShader: linkProgram(): trying to link GLSL program, but no shaders created yet

Spent hours tonight looking for answers on the forum and github but solution seems outdated or for previous version of openframeworks.

Any help would be greatly appreciated.

Posts: 1

Participants: 1

Read full topic

Raspberry Pi multichannel audio interface recommendations

Running Shader On Rpi 4

$
0
0

@RuolunWeng wrote:

Dear Community,

I want to implement Shader on new released Rpi 4, test with OF v0.11 and its own /examples/shaders folder.
It compiled and launched a blank window, with these errors in the console:

Any idea?

Thanks in advance!
Allen


VER ID IS 10
using newer build and GLFW window
[ error ] ofShader: sorry, it looks like you can't run 'ARB_shader_objects'
[ error ] ofShader: please check the capabilites of your graphics card: http://www.ozone3d.net/gpu_caps_viewer
[ error ] ofShader: setupShaderFromSource(): failed creating GL_VERTEX_SHADER shader
[ error ] ofShader: sorry, it looks like you can't run 'ARB_shader_objects'
[ error ] ofShader: please check the capabilites of your graphics card: http://www.ozone3d.net/gpu_caps_viewer
[ error ] ofShader: setupShaderFromSource(): failed creating GL_FRAGMENT_SHADER shader
[ error ] ofShader: linkProgram(): trying to link GLSL program, but no shaders created yet

Posts: 1

Participants: 1

Read full topic


Raspberry Pi / Libcamera / OS Buster / IMX477 HiQ Camera

$
0
0

@autr wrote:

Hello!

There was recently a RPi HiQ camera released based on a Sony IMX477 sensor, which allows C/CS-mount lenses to be attached. Using Buster and Pi4 I’ve been trying out different approaches with film and CCTV lenses for an upcoming project.

Here are some notes I made, in particular toward finding a solution for grabbing on RPi 4 and Buster, and a legacy MMAL addon ofxRaspicam.

Raspberry Pi / Libcamera / OS Buster / IMX477 HiQ Camera

MMAL

MMAL (Multi-Media-Abstraction-Layer) is an API layer on top of OpenMAX, which interfaces with Broadcom camera chips. On Raspberry Pi OS, the default CL tools are using MMAL, which is available in userland:

userland/host_applications/linux/apps

When using raspistill or raspivid, 2 channels are created, one for processing the frame, and another for preview.

With raspiraw, only a single channel is made, and no processing done to the raw Bayer pixels, which can be dumped to file or RAM. Afterwards this can be converted into a video, which is how 660FPS videos are achieved.

This is why it’s also helpful to think of the camera sensor less as a camera, and more as a sensor - where it might run straight into OpenCV for robotics, without touching the GPU.

V4L2 Drivers

The Linux kernel also includes drivers for various camera chips, which are loaded via boot/config.txt:

dtoverlay=ov5647 # v1 camera
dtoverlay=imx219 # v2 camera
dtoverlay=imx477 # HiQ camera
dtoverlay=adv7282m # for the heads ;)

Once loaded, MMAL (raspivid/cam/raw) ceases to work, but the camera is recognised as a connected webcam of sorts - such as via the default ofVideoGrabber and ofVideoPlayer which use GStreamer.

Camera settings can be directly controlled via the driver:

v4l2-ctl --list-ctrls-menus

NB: IMX477 driver is only supported on kernel >= 5.4 (see below)

OpenMAX + GPU-acceleration

@jvcleaves did amazing work with ofxOMXCamera and ofxOMXPlayer addons which go deeper into OpenMAX to do HW-accelerated playback and grabbing (textures).

jvcleave/ofxOMXPlayer
jvcleave/ofxOMXCamera

For a time things were good: but since Buster, this is gone with GLES (though still working on Pi 3B+ with Stretch):

Raspberry PI 4 support · Issue #11

Legacy MMAL

As a temporary fix, I made an addon ofxRaspicam

autr/ofxRaspicam
cedricve/raspicam

It wraps raspicam, itself a wrapper of MMAL, with added modes for IMX477. On Pi4 30FPS 1080p is possible, and individual control of framerate, shutter speed etc. Parameters are broken out into an ofParameterGroup for testing different settings (ie. via ofxGUI).

The layers of abstraction though are less than ideal: ie. via MMAL the preview channel is being used for pixel buffer, where preview is a second channel used to measure and produce auto-exposure modes or display on-screen.

On Pi 4 its a good way to plug the gap (documentation and examples will be forthcoming), but I will park it once done (due to libcamera, see below).

Kernel >= 5.4 + Libcamera

With the release of the HiQ camera RPi Foundation also announced libcamera:

libcamera - RPi Foundation
libcamera.git - Linux camera framework
libcamera Github Fork

A complex camera support library for Linux, Android, and ChromeOS
Cameras are complex devices that need heavy hardware image processing operations. Control of the processing is based on advanced algorithms that must run on a programmable processor. This has traditionally been implemented in a dedicated MCU in the camera, but in embedded devices algorithms have been moved to the main CPU to save cost. Blurring the boundary between camera devices and Linux often left the user with no other option than a vendor-specific closed-source solution.
To address this problem the Linux media community is collaborating with the industry to develop a camera stack that is open-source-friendly while still protecting vendor core IP. libcamera was born out of that collaboration and offers modern camera support to Linux-based systems, including traditional Linux distributions, ChromeOS and Android.

It’s exciting stuff! And with a quick look at the library; MMAL-less, communicating directly with the chip registers (+ V4L2 drivers and gstreamer implementations):

libcamera
raspberrypi
cam_helper_imx477.cpp

Raspberry Pi OS is not yet at 5.4 kernel, but you can test it out by updating Buster via the guide here (and experimenting with Qcam app which is a GUI equivalent to raspistill and raspivid):

libcamera installation for Raspberry Pi - Raspberry Pi Documentation
rpi-update - Raspberry Pi Documentation
libcamera/src/qcam at master · kbingham/libcamera · GitHub

Future Approach

Before seeing the libcamera library I’d planned to start a separate implementation based off raspiraw. This was for a couple of reasons:

a) I want to record CRT screens, which requires syncing to 50/60HZ, via GENLOCK (an old standard that sends 300mV blips on each scanline refresh)
b) varying contexts of needing pixels, cv Mats, GPU textures or encoding to a codec; and finding the fastest combination of that
c) OF seems to have some Bayer pixel handling already

With libcamera, this seems like the future, and it’s also reassuring to see config files like this:

libcamera/imx477.json

So I’m planning something along the lines of ofxLibcameraGrabber. If anyone would like to help out, especially with GPU-side: g@sinnott.cc :slight_smile:

Misc Links

Raspberry Pi Camera - Stamm-Wilbrandt - very thorough notes on everything pi-camera
Raspberry Pi/Camera Streaming – Wiki - streaming guides (nb: netcat approach is FAST)
UV4L for ARM (Raspberry Pi) - UV4L install guide (for WebRTC and localhost GUI)
A Guide to Recording 660FPS Video On A $6 Raspberry Pi Camera - 660FPS guide

Posts: 1

Participants: 1

Read full topic

Raspberry pi webcam size

$
0
0

@mindthegap wrote:

after I got OF started with the help of the forum, I have a problem with a webcam (microsoft HD) I get a maximum of 640x480 pixels.

Do I need special drivers for this. I installed the cam with fswebcam.

Posts: 1

Participants: 1

Read full topic

oF app running on Buildroot image

$
0
0

@Meach wrote:

Hello,

I am trying to have an OF app running on a raspberry pi using Buildroot.
Has anyone managed to do this?

I am lost in Buildroot libraries configuration. Some just don’t match the version I have on the Raspberry Pi I use for compiling my application originally.

Or does anyone know if just copying the library used by my app to the Buildroot image would just do the trick?

$ ldd myOfApp
linux-vdso.so.1 (0x7ef12000)
/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0x76fb4000)
libatomic.so.1 => /usr/lib/arm-linux-gnueabihf/libatomic.so.1 (0x76f75000)
libgstapp-1.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgstapp-1.0.so.0 (0x76f57000)
libgstvideo-1.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgstvideo-1.0.so.0 (0x76ec7000)
libgstbase-1.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgstbase-1.0.so.0 (0x76e49000)
...

I can list all libraries my app use with ldd. Then I could just copy them all in /lib/ folder of my buildroot image. From what I understand they only put shared libraries and no headers files on the image since they do not provide with a compiler on the target.

Cheers,

Posts: 1

Participants: 1

Read full topic

Error running the simpleTexturing shader example on Raspberry Pi 3

$
0
0

@Dazzid_of wrote:

I would like to test if it’s possible to run a video player on raspberry pi 3 that has the four adjustable corners (video warping, perspective correction).
First, I compiled the ofxWarp addon (https://github.com/prisonerjohn/ofxWarp ), which is an adaptation from Cinder-Warping block by @paulhoux.
It works well.

Second, I followed the OF instruction (https://openframeworks.cc/setup/raspberrypi/raspberry-pi-getting-started/) to install Raspbian on Rasberry Pi, and it also works well.

So far so good, however when testing the shader examples on RBP3, 04_ simpleTexturing, I have some issues as it doesn’t render the texture. The message I got is this one:
[notice ] ofAppEGLWindow: display(): eglSwapBuffers failed: �50

I have changed in the main file:

    ofGLESWindowSettings settings;
    settings.glesVersion=2;

I also have read some of the other related posts, but I don’t find the solution yet. When running the ofxWarp example (a simplified version with only one screen with four corners), I also get the same error related to [notice ] ofAppEGLWindow: display(): eglSwapBuffers failed.
Any suggestion?

Posts: 3

Participants: 2

Read full topic

Error compiling ofxOMXPlayer

$
0
0

@Dazzid_of wrote:

I’ve beed trying for some days to compile the ofxOMXPlayer in Raspberry Pi 3 B, however I can’t pass a compiler error:

/usr/bin/ld: /home/pi/openFrameworks/addons/obj/linuxarmv6l/Release/ofxOMXPlayer/src/ofxOMXPlayerEngine.o: undefined reference to symbol ‘eglCreateImageKHR’
/usr/bin/ld: //opt/vc/lib/libbrcmEGL.so: error adding symbols: DSO missing from command line

My OS version is:
PRETTY_NAME=“Raspbian GNU/Linux 10 (buster)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“10”
VERSION=“10 (buster)”
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian

Have someone resolved this issue?

Posts: 1

Participants: 1

Read full topic

grabScreen() not grabbing rotated screen

$
0
0

@mattc wrote:

Hi! While trying to take a screenshot I’m facing some trouble.
This code works fine when calling it:

screenshot.grabScreen(0, 0 , 1080, 1920);
screenshot.save("screenshot.png");
screenshot.clear();

But when I rotate my project by editing main.cpp and adding

ofSetOrientation(OF_ORIENTATION_90_LEFT);

…i get some kind of distorted image that is mostly transparent.
Is there something that I’m missing or a way to fix that?

RPi4B+, 8GB RAM, 16GB microSD with fresh RaspberryOS Lite, app called with sudo startx ./myProject -- -s off

Posts: 2

Participants: 1

Read full topic

RPi4 and constant screen tearing (no VSync)

$
0
0

@mattc wrote:

Hi! Another day, another problem :slight_smile:
It seams like vertical synchronization is not working for me at all. My ofApp::setup() starts with:

  ofSetVerticalSync(true);
  ofSetFrameRate(60);

As a test I’m running a simple project that is drawing 4 bars moving from side to side. It keeps stable 60fps but tearing is visible at all times. Mostly by the screens edge, but can also jump to the middle.

No temperature or voltage warnings. CPU at 20%.

Hardware: RPi4B+ 8GB RAM; 16GB microSD; FullHD 60Hz display.

Software: RaspberryOS Lite (Debian Buster), openFrameworks 0.11.0, GL fake KMS driver enabled, compositor disabled, forced turbo in config.txt.
Most of my setup described here: RPi4 + Buster Lite + oF 0.11.0

Mentioned it another thread (here: Arm video tearing), but no response and I’m still struggling finding solution.

Posts: 4

Participants: 2

Read full topic


CI, deployment, auto-update for RPi 4

$
0
0

@jefftimesten wrote:

I’m interested in using Github Actions to compile and deploy an oF project to a bunch of RPi 4s. I’m just starting my research, but I’m curious if anyone could share any likely pitfalls that I might encounter or tips that might be helpful.

For CI: I’m somewhat new to this so apologies for stupid questions/assumptions. But I think I can make my own Docker action using the raspbian/stretch docker image and then have it push the resulting artifacts to Github Releases. Or maybe it’s better to use the ubuntu github os and cross-compile? Does this make sense?

For auto-update: I know there are Github hooks, but I think using a hook assumes that the RPi will be online when the build is complete. I would rather the RPis have some sort of polling mechanism (or at least a check on startup) to make sure they always have the latest version. Is there a good existing tool for this? Or is it better to just roll my own.

Thanks in advance!

Posts: 1

Participants: 1

Read full topic

oF 0.11.0 on RPi 2 / ArchLinux following the rules…

$
0
0

@blausand wrote:

Hi there,
so i just setup a fresh Arch Linux on my RPi2 and successfully followed the nice

Getting your Raspberry Pi 2 B ready for openFrameworks

which went fine down to the Make process.
The error is immediately at start and says:

`*** recipe commences before first target. Stop`

Two differences i found were:

  • The subfolder called /Projects/ in .mk files is found as /project/ after extraction
  • Readme.md says $PLATFORM_ARCH=armv7l would be part of the makefile’s name, which is found containing linuxarm7l as the specified portion.

UPDATE: As stated on StackOverflow, this error is caused by make v4.0 on Arch as of dec. 2020, while the makefile included syntax is for make v3.81.

So: Can you please help me updating the makefiles to support make v4.0, @theo or @arturo ?

Posts: 1

Participants: 1

Read full topic

Gstreamer Segmentation Fault - IMX477 - Jetson Nano B01

$
0
0

@numu wrote:

Hello!

I got myself a Jetson Nano b01 (has 2 CSI-MIPI ports) and 2 Raspberry PI HQ Cameras (Sensor: IMX477).

When running the following command in the terminal, i can see that the camera(s) work:

gst-launch-1.0 nvarguscamerasrc sensor_id=1 ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, framerate=(fraction)60/1" ! nvvidconv flip-method=0 ! "video/x-raw, width=(int)1920, height=(int)1080" ! videoconvert ! xvimagesink

However in openframeworks the ofVideoGrabber throws a segmentation fault. As well when i try using the ofGstVideoUtils pipeline as followed:

gst.setPipeline("nvarguscamerasrc sensor_id=1 ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, framerate=(fraction)60/1 ! nvvidconv flip-method=1", OF_PIXELS_NATIVE, true);

Log:

[notice ] ofGstUtils: setPipelineWithSink(): gstreamer pipeline: nvarguscamerasrc sensor_id=1 ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, framerate=(fraction)60/1 ! nvvidconv flip-method=1 ! appsink name=ofappsink enable-last-sample=0 caps="video/x-raw,format={RGBA,BGRA,RGB,BGR,RGB16,GRAY8,YV12,I420,NV12,NV21,YUY2}"
[verbose] ofGstUtils: startPipeline(): attaching callbacks
[verbose] ofGstUtils: gstHandleMessage(): unhandled message from src
[verbose] Pipeline is live and does not need PREROLL waiting PLAY
[verbose] ofGstUtils: gstHandleMessage(): unhandled message from pipeline0
[verbose] ofGstUtils: gstHandleMessage(): unhandled message from src
[verbose] ofGstUtils: gstHandleMessage(): unhandled message from pipeline0
after INIT Grabber
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 4032 x 3040 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 2592 x 1944 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 2560 x 1440 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 1 
   Camera mode  = 1 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
[notice ] ofGstVideoUtils: allocating with 1080x1920 NV12
[verbose] ofGstUtils: gstHandleMessage(): async done
Segmentation fault (core dumped)

Would be glad for any help, hint towards a direction.
Thanks
numu

Posts: 1

Participants: 1

Read full topic

Get rid of menu bars in Ubuntu / Jetson Nano

$
0
0

@joeseeba wrote:

I am working on an app running on a Jetson Nano which requires a main monitor output and a second monitor output. Both monitors should be full screen, with no menu bars or window decorations.

Everything works very fine, the Nano is a really fast and nice board, but can’t figure out how to get rid of Ubuntu menu bars.

In main.cpp I set up the window this way:

ofGLFWWindowSettings settings;
settings.decorated = false;
settings.resizable = false;
settings.windowMode = OF_WINDOW;

This is the way how in Windows and MacOS I normally get a fullscreen on the second screen.

Then I tried also:

settings.decorated = false;
settings.resizable = false;
settings.windowMode = OF_FULLSCREEN;

but on the main monitor I only get an upwards shift of the window’s content, and on the second nothing changes.

Anyone knows how to do this or even has a clue?

Posts: 1

Participants: 1

Read full topic

Compile to raspberry pi - do I need a desktop or window manager

$
0
0

@ponnuki wrote:

I’m starting the work on a video synth for the raspberry pi and PiSound. I am wondering when I cross compile for the rPi, do I need to load a whole set of desktop manager/window manager etc? What is the minimal system need? Only X ?

I won’t need the mouse or keyboard access to the project, only Midi in, Video in (from usb cam) and Audio In. I am well versed in Linux system, but new to openFramework.

Posts: 3

Participants: 2

Read full topic

Viewing all 147 articles
Browse latest View live