Hello everyone,
I want to integrate machine vision camera (egg. Basler’s CMOS camera) with GigE vision interface into my ubuntu core system(ARM Cotex M4). The hardware include Gigbit network interface.
Now in my system. I can ping successfully with a GigE vision camera (ubuntu classic). I can run the sample program provided by Basler and connect to camera and grab a image successfully(ubuntu classic).
However, after I try to snapcraft the execuable program as a snap (plugin:dump, confinement: devmode), the program cannot find the camera device and exit with error!
So what’s the possible reason for that? How to connect to camera with GigE vision interface?
if the camera usually shows up as v4l device (/dev/videoX) you will need to add the camera plug to your app and also make sure to have manually connected it with:
Thanks for your reply. The camera with GigE Vision interface doesn’t shows up as v4l device. I can; t find /dev/videoX for my Basler camera.
GigE vision wiki: https://en.wikipedia.org/wiki/GigE_Vision
GigE vision interface actually runs on the UDP protocol. Physically it connected to ubuntu core system by Gigbit Ethernet interface.
oh, okay … do you happen to have your snapcraft.yaml public ?
this might be some missing stage package … libpcap (user level package capture) comes to mind here …
also … are the instructions for the sample program(s) public anywhere ?
Unzip it to ‘/opt/pylon’ or somewhere else according to INSTALL file in unziped Pylon software .
Go to a simple sample program directory. [/opt/pylon/share/pylon/Samples/C++/Grab
]
Set environment for makefile. export PYLON_ROOT=
make. And the result program runs successfully in ubuntu.
snapcraft init.
My snapcraft.yaml. It’s pretty simple.
name: hello-basler # you probably want to ‘snapcraft register ’
version: ‘5.7’ # just for humans, typically ‘1.2+git’ or ‘1.3.2’
summary: Grab a picture by basler camera # 79 char long summary
description: |
This is picture grab test in amd64.
grade: devel # must be ‘stable’ to release into candidate/stable channels
confinement: devmode # use ‘strict’ once you have the right plugs and slots
snapcraft. The program can be packaged to a snap app with warnings about some pylon libraries. But it still includes this libraries into snap directory.
However the snap cannot run successfully. In the source file Grab.c , the program can find all cameras connected in Gigbig ethernet interface. On one of my machine, the snap program can run but cannot find camera device and exit. On another machine, it cannot run at all(Error is core dump).
Result of another simple sample program similar with grab.
If you do the build in advance, outside of the snap environment, the environment variables used by snapcraft will not be injected into your snap…
I’d start with translating the build instructions into actual snapcraft commands using the make plugin so library search paths, linker and include paths are correct …
then it seems like PYLON_ROOT needs to point to the place where your install lives … so add something to your apps: entry for this: