This module is a thin wrapper to the aravis library for industrial cameras the use the GenICam standard. These include 1Gbit Ethernet, 10Gbit Ethernet, and USB3 cameras and detectors.
Support for USB3 cameras was added in R2-2 of this module, when it switched from aravis 0.4.1 to aravis 0.5.13. The module name aravisGigE is now a misnomer, but there are no plans to change the name.
GenICam cameras contain an XML file that can be downloaded via a URL. This XML file contains a description of all of the features that the camera supports, organized in categories. The aravisGigE driver can control any parameter exposed in this XML file. Python scripts are included for creating databases, edm screens, and medm screens from the XML file.
Tested working cameras:
Tested mostly working cameras:
The following is a summary of the files included in aravisGigE:
<camera-name>.edl
: Python generated camera-specific top-level screen<camera-name>-features.edl
: Python generated camera-specific screen with camera features. Can be very large.<camera-name>-features_[1,2,3..].adl
: Python generated camera-specific screens with camera features.
Multiple screens are generated so they are not too large.<camera-name>-features.adl
User-created screen that contains only the most important features.If you need to add a new camera, read the "Adding a new camera" section
This araviGigE repository module does not include the underlying aravis library. However, it does include an install.sh script that downloads a version of the aravis library into the aravisGigE/vendor subdirectory, and the top-level aravisGigE/Makefile builds the aravis library and tools, as well as the EPICS aravisGigE library and example IOC.
install.sh
in the top-level of aravisGigE.You are now ready to build the module.
In order to run Ethernet cameras without dropping frames it is usually necessary to increase a system buffer. This is particularly true if running multiple cameras from the same Linux machine. The following instructions were copied from a Point Grey/FLIR KnowledgeBase article.
Increase the amount of memory Linux uses for receive buffers using the sysctl interface.
Whereas the system standard (default) and maximum values for this buffer default to 128 KB and 120 KB respectively,
increasing both of these parameters to 1 MB significantly improves image streaming results.
Note: On some ARM boards, you may need to increase the receive buffer size to greater than 1 MB before noticing
improved streaming results. Increasing the buffer size can enhance receive performance, but it also uses more memory.
The following sysctl command updates the receive buffer memory settings:
sudo sysctl -w net.core.rmem_max=1048576 net.core.rmem_default=1048576
Note: In order for these changes to persist after system reboots, the following lines must be manually added
to the bottom of the /etc/sysctl.conf file:
net.core.rmem_max=1048576
net.core.rmem_default=1048576
Once changes are persisted, they can be reloaded at any time by running the following command in sysctl:
sudo sysctl -p
To use USB3 cameras on Linux, the Point Grey/FLIR KnowledgeBase article 10016 is helpful. It suggests the following (with some minor edits):
To set the maximum usbfs memory limit until the next reboot, run this command:
$ sudo modprobe usbcore usbfs_memory_mb=1000
This method does not work with Ubuntu 14.04 or newer. With Ubuntu 14.04, users must set the memory limit permanently.
To set the maximum usbfs memory limit permanently:
1. Open the /etc/default/grub file in any text editor. Find and replace:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
with this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=1000"
2. Update grub with these settings:
On some older Linux systems:
sudo update-grub
On Centos 7, for example:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
3. Reboot and test a USB 3.1 camera.
If this method fails to set the memory limit, run the following command:
$ sudo sh -c 'echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb'
To confirm that you have successfully updated the memory limit, run the following command:
cat /sys/module/usbcore/parameters/usbfs_memory_mb
In order for non-root users to access USB cameras on Linux a udev rule must be created to give read/write permission to the selected users or groups. Here is one way to do this:
Download the aravis.rules file from https://github.com/AravisProject/aravis/blob/master/aravis.rules.
Copy the aravis.rules file to /etc/udev/rules.d/.
Run sudo udevadm control -R
to restart the udev daemon on RHEL/Centos. The command may be different on other Linux systems.
If restarting the daemon is not sufficient then reboot the PC for the rules file to take effect.
bin/linux-x86/arv-tool-0.2 -n "<device_name>" genicam > "<camera_model>.xml"
to download the genicam xml data from the selected device cameras
bin/linux-x86/arv-tool-0.2 -n "Allied Vision Technologies-50-0503318719" genicam > AVT_Manta_G125B.xml
aravisGigEApp/src/makeDbAndEdl.py <genicam_xml> <camera_name>
aravisGigEApp/src/makeDbAndEdl.py AVT_Manta_G125B.xml AVT_Manta
aravisGigEApp/Db/<camera_name>.template
aravisGigEApp/opi/edl/<camera_name>.edl
aravisGigEApp/opi/edl/<camera_name>-features.edl
aravisGigEApp/src/makeAdl.py <genicam_xml> <camera_name>
.
This will generate pthread_attr_setstacksize error Invalid argument
error messages are caused by glib and can be ignoredAn IOC built using these build instructions is available in iocs/aravisGigEIOC