fraunhoferiosb / camera_aravis Goto Github PK
View Code? Open in Web Editor NEWA ROS1 driver for GenICam based GigE and USB3 cameras.
License: Other
A ROS1 driver for GenICam based GigE and USB3 cameras.
License: Other
Hi,
I am an engineering grad student working on getting these Imperx cameras set up in ROS. I tried to follow the instructions to the best of my ability, but I still cannot get the drivers to work.
I am using an Imperx P67-C1911C GenICam-compliant industrial camera. I have the camera connected to the same network as the computer running ROS, and I am able to locate the camera using ping in the console.
First, I run the camera aravis node using the following command: (camnode must be deprecated, because it is nowhere in the package)
rosrun camera_aravis cam_aravis
The node/let starts as expected:
[ INFO] [{TIMESTAMP}]: Initializing nodelet with 4 worker threads.
[ INFO] [{TIMESTAMP}]: Attached cameras:
[ INFO] [{TIMESTAMP}]: # Interfaces: 3
[ INFO] [{TIMESTAMP}]: # Devices: 1
[ INFO] [{TIMESTAMP}]: Device0: Imperx, Inc-P67-C1911C-RC0000000-00310392
[ INFO] [{TIMESTAMP}]: Opening: (any)
[ INFO] [{TIMESTAMP}]: Opened: Imperx, Inc-00310392
[ INFO] [{TIMESTAMP}]: Feature Root is 1
[ INFO] [{TIMESTAMP}]: Feature SpecialFeatures is 1
[ INFO] [{TIMESTAMP}]: Feature AcquisitionFrameRateEnable_1 is 1
[ INFO] [{TIMESTAMP}]: Feature FixedFramePeriodEnableReg_1 is 1
[ INFO] [{TIMESTAMP}]: Feature Device is 1
[ INFO] [{TIMESTAMP}]: Feature TLParamsLocked is 1
[ INFO] [{TIMESTAMP}]: Feature ActionControl is 1
[ INFO] [{TIMESTAMP}]: Feature ActionGroupKey is 0
And then things totally go crazy. We see a torrent of messages that look like:
(process:83488): Aravis-CRITICAL **: 15:31:52.120: arv_gc_feature_node_is_available: assertion 'error == NULL || *error == NULL' failed
[ INFO] [{TIMESTAMP}]: Feature ActionGroupKeyReg is 0
This pattern repeats, except with different feature names, with each of the features set to 0.
At the bottom of this wave of errors, we get the following:
[ INFO] [{TIMESTAMP}]: Number of supported stream channels 0.
[ INFO] [{TIMESTAMP}]: Camera does not support ExposureTime.
[ INFO] [{TIMESTAMP}]: Camera does not support AcquisitionFrameRate.
[ INFO] [{TIMESTAMP}]: Camera does not support FocusPos.
[ INFO] [{TIMESTAMP}]: Using Camera Configuration:
[ INFO] [{TIMESTAMP}]: --------------------------------
[ INFO] [{TIMESTAMP}]: Vendor name = Imperx, Inc
[ INFO] [{TIMESTAMP}]: Model name = P67-C1911C-RC0000000
[ INFO] [{TIMESTAMP}]: Device id =
[ INFO] [{TIMESTAMP}]: Serial number = 00310392
[ INFO] [{TIMESTAMP}]: Type = GigEVision
After this gets printed, the node dies. I've also tried to get the nodelet running using the following command:
roslaunch camera_aravis camera_aravis.launch
This produced the exact same behavior.
Any ideas? Why isn't the library working? Is it the camera? Are we using the library wrong? Does the library require setting up some files beforehand? Literally any help, even just for further reading, would be appreciated.
I am using this github repo for my "The Imaging Source" GiGE Cameras (DFK 33 GX249e - 2,3MP and 48 fps).
I am getting:
[ WARN ] Frame error: ARV_BUFFER_STATUS_TIMEOUT
This happens by using 1 camera at 10 fps.
When using multiple cameras, then in addition I am getting afterwards:
[ ERROR ] Control to aravis device lost.
When I only decrease the framerate (fps) to around 2-4 fps then everything is running good.
I assume that there has to be made only some minor adjustments in the settings/parameters in the code.
I think that I have just to increase/decrease the parameter "Timeout-time" or "Buffer-size".
Maybe somebody already faced with issue and could tell where in the code or how to change those settings, if this is the issue.
Thanks
Best Regards
I have a system with multiple cameras attached. I want to start each in its own namespace and set these settings.
List cameras with aravis:
/# arv-tool-0.6
Lucid Vision Labs-ATL314S-C-seriala (192.168.1.102)
Lucid Vision Labs-TRI023S-C-serialb (192.168.1.101)
Lucid Vision Labs-TRI023S-C-serialc (192.168.1.100)
Running ROS1 Aravis node via dockerfile:
ARG DISTRO=noetic-ros-base-buster
FROM ros:${DISTRO} as ros-base
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
libaravis-dev \
ros-noetic-camera-aravis \
&& rm -rf /var/lib/apt/lists/*
ENV ROS_NAMESPACE=cam1
CMD ["rosrun", "camera_aravis", "cam_aravis"]
This is launched via docker compose roughly as follows:
version: '3.6'
services:
ros1-core:
ports:
- "11311:11311"
extra_hosts:
- "goodhostname.local.com:10.20.100.40"
- "goodhostname:10.20.100.40"
image: ros:noetic-ros-base-buster
command: "roscore"
ros1-aravis:
network_mode: "host"
depends_on:
- ros1-core
build:
dockerfile: ros/aravis.node.dockerfile
context: ./docker
environment:
- "ROS_HOSTNAME=goodhostname.local.com"
- "ROS_MASTER_URI=http://goodhostname.local.com:11311"
command: [ "bash", "-c", "sleep infinity"] # manually start node via shell
Then manually start a node:
docker compose exec ros1-aravis bash -l -c "source /opt/ros/noetic/setup.bash && ROS_NAMESPACE=cam1 rosrun camera_aravis cam_aravis seriala"
The node starts up, and starts publishing images from any camera. However any attempt to set guid
has no effect. Neither does using rosparam to change any settings while the node is running. Some work while the node is restarted.
Logs:
[ INFO] [1653957072.307098973]: Attached cameras:
[ INFO] [1653957073.403662509]: # Interfaces: 3
[ INFO] [1653957073.403732943]: # Devices: 4
[ INFO] [1653957073.403760086]: Device0: Chronoptics-KeaC1RevB/6mm/NIFilter/RGB-2020029
[ INFO] [1653957073.403838693]: Device1: Lucid Vision Labs-ATL314S-C-seriala
[ INFO] [1653957073.403896977]: Device2: Lucid Vision Labs-TRI023S-C-serialb
[ INFO] [1653957073.404050028]: Device3: Lucid Vision Labs-TRI023S-C-serialc
[ INFO] [1653957073.406840509]: Opening: (any)
...
[ INFO] [1653957100.207206133]: Reset Camera Info Manager
[ INFO] [1653957100.207248499]: Calib URL:
[ INFO] [1653957102.233234327]: Using Camera Configuration:
[ INFO] [1653957102.233271154]: ---------------------------
[ INFO] [1653957102.234824771]: Vendor name = Lucid Vision Labs
[ INFO] [1653957102.236332493]: Model name = TRI023S-C
[ INFO] [1653957102.236393343]: Device id = (null)
[ INFO] [1653957102.236415168]: Serial number = (null)
[ INFO] [1653957102.236485485]: Type = GigEVision
[ INFO] [1653957102.236566031]: Sensor width = 1920
[ INFO] [1653957102.236585465]: Sensor height = 1200
[ INFO] [1653957102.236627291]: ROI x,y,w,h = 0, 0, 1920, 1200
[ INFO] [1653957102.236647522]: Pixel format = BayerRG8
[ INFO] [1653957102.236660032]: BitsPerPixel = 8
[ INFO] [1653957102.237948815]: Acquisition Mode = Continuous
[ INFO] [1653957102.239273982]: Trigger Mode = Off
[ INFO] [1653957102.264795946]: Trigger Source = Line0
[ INFO] [1653957102.264859688]: Can set FrameRate: True
[ INFO] [1653957102.264882523]: AcquisitionFrameRate = 45.7373 hz
[ INFO] [1653957102.264899668]: Can set Exposure: True
[ INFO] [1653957102.264920867]: Can set ExposureAuto: True
[ INFO] [1653957102.264945091]: Exposure = 1998.62 us in range [-1.79769e+308,1.79769e+308]
[ INFO] [1653957102.264964181]: Can set Gain: True
[ INFO] [1653957102.264978158]: Can set GainAuto: True
[ INFO] [1653957102.265069427]: Gain = 1.000000
[ INFO] [1653957102.265091319]: Can set FocusPos: False
[ INFO] [1653957102.266464274]: Network mtu = 1400
[ INFO] [1653957102.266502275]: ---------------------------
Attempt to set guid
:
docker compose exec ros1-aravis bash -l -c "source /opt/ros/noetic/setup.bash && ROS_NAMESPACE=cam1 rosparam set guid seriala"
docker compose exec ros1-aravis bash -l -c "source /opt/ros/noetic/setup.bash && ROS_NAMESPACE=cam1 rosparam set camera_aravis/guid seriala"
docker compose exec ros1-aravis bash -l -c "source /opt/ros/noetic/setup.bash && rosparam set /guid seriala"
Then get the params:
/# docker compose exec ros1-aravis bash -l -c "source /opt/ros/noetic/setup.bash && rosparam list"
/cam1/camera_aravis/AcquisitionFrameRate
/cam1/camera_aravis/AcquisitionMode
/cam1/camera_aravis/AutoMaster
/cam1/camera_aravis/AutoSlave
/cam1/camera_aravis/ExposureAuto
/cam1/camera_aravis/ExposureTime
/cam1/camera_aravis/FocusPos
/cam1/camera_aravis/Gain
/cam1/camera_aravis/GainAuto
/cam1/camera_aravis/TriggerMode
/cam1/camera_aravis/TriggerSource
/cam1/camera_aravis/frame_id
/cam1/camera_aravis/guid
/cam1/camera_aravis/mtu
/cam1/camera_aravis/softwaretriggerrate
/cam1/guid
/guid
/rosdistro
/roslaunch/uris/host_e6414cf92187__38477
/rosversion
/run_id
Then start a camera node again:
[ INFO] [1653957355.259305141]: Initializing nodelet with 4 worker threads.
[ INFO] [1653957355.262769510]: Attached cameras:
[ INFO] [1653957356.302984375]: # Interfaces: 3
[ INFO] [1653957356.303088037]: # Devices: 4
[ INFO] [1653957356.303125200]: Device0: Chronoptics-KeaC1RevB/6mm/NIFilter/RGB-2020029
[ INFO] [1653957356.303156596]: Device1: Lucid Vision Labs-ATL314S-C-seriala
[ INFO] [1653957356.303235173]: Device2: Lucid Vision Labs-TRI023S-C-serialb
[ INFO] [1653957356.303278690]: Device3: Lucid Vision Labs-TRI023S-C-serialc
[ INFO] [1653957356.306734201]: Opening: (any)
Opening: (any)
should be Opening: seriala
I am not sure, but possibly something around this: https://github.com/FraunhoferIOSB/camera_aravis/blob/master/src/camera_aravis_nodelet.cpp#L512
Hi,
I had a couple of issues with a specifc camera/ laser profiler (MLSL124). With aravis 0.8 the camera seems to work so I started porting the library to this version. It compiles and publishes frames, the code is here https://github.com/alexswerner/camera_aravis/tree/aravis_0.8 . It was mostly trivial migration focussed on error handling. Not sure if everything is correct. One issue I'm aware of is that with our setup, the first frame is published repeatedly but new data from the camera does not reach the subscriber.
Alex
I'm trying to use your node with the camera in object on Linux PC with Ubuntu 20.04 and ROS noetic.
These are the packages I installed:
~$ dpkg -l | grep aravis
ii aravis-tools 0.6.0-3 amd64 Aravis based tools for GenICam cameras
ii gir1.2-aravis-0.6 0.6.0-3 amd64 GObject introspection data for Aravis
ii libaravis-0.6-0 0.6.0-3 amd64 glib/gobject based library for video acquisition using GenICam cameras
ii libaravis-dev 0.6.0-3 amd64 Development files for aravis library
ii ros-noetic-camera-aravis 4.0.1-2focal.20220325.173956 amd64 camera_aravis: A complete and comfortable GenICam (USB3Vision and GigEVision) based camera driver for ROS (ethernet and usb).
The camera gets recognized but the node crashes when it attempts to discover the camera features:
~$ roslaunch camera_aravis camera_aravis.launch serial_no:="Allied Vision-01M0C"
... logging to /home/outrider/.ros/log/08616f2e-bb4f-11ec-85ec-c1a96e210007/roslaunch-instrumentedtrailer1-2613.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://instrumentedtrailer1:37391/
SUMMARY
========
PARAMETERS
* /aravis_cam/aravis_cam/AcquisitionFrameRate: 25.0
* /aravis_cam/aravis_cam/AutoFunctionsROIPreset: AutoFunctionsROIP...
* /aravis_cam/aravis_cam/BalanceWhiteAuto: Continuous
* /aravis_cam/aravis_cam/ExposureAuto: Continuous
* /aravis_cam/aravis_cam/Gain: 0.0
* /aravis_cam/aravis_cam/GainAuto: Continuous
* /aravis_cam/aravis_cam/Gamma: 0.41
* /aravis_cam/aravis_cam/Height: 480
* /aravis_cam/aravis_cam/PixelFormat: BGR8
* /aravis_cam/aravis_cam/Width: 640
* /aravis_cam/aravis_cam/camera_info_url:
* /aravis_cam/aravis_cam/frame_id: aravis_cam
* /aravis_cam/aravis_cam/guid: Allied Vision-01M0C
* /aravis_cam/aravis_cam/publish_tf: True
* /aravis_cam/aravis_cam/tf_publish_rate: 25
* /aravis_cam/debayer/debayer: 0
* /camera_manager/num_worker_threads: 4
* /rosdistro: noetic
* /rosversion: 1.15.14
NODES
/
camera_manager (nodelet/nodelet)
/aravis_cam/
aravis_cam (nodelet/nodelet)
debayer (nodelet/nodelet)
auto-starting new master
process[master]: started with pid [2622]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 08616f2e-bb4f-11ec-85ec-c1a96e210007
process[rosout-1]: started with pid [2632]
started core service [/rosout]
process[camera_manager-2]: started with pid [2639]
process[aravis_cam/aravis_cam-3]: started with pid [2640]
process[aravis_cam/debayer-4]: started with pid [2641]
type is camera_aravis/CameraAravisNodelet
[ INFO] [1649870866.706411837]: Initializing nodelet with 4 worker threads.
[ INFO] [1649870866.713460871]: Attached cameras:
[ INFO] [1649870867.721932608]: # Interfaces: 1
[ INFO] [1649870867.722119062]: # Devices: 1
[ INFO] [1649870867.722267865]: Device0: Allied Vision-01M0C
[ INFO] [1649870867.731710779]: Opening: Allied Vision-01M0C
[ INFO] [1649870868.785383629]: Opened: (null)-(null)
[ INFO] [1649870868.810612901]: Feature Root is 1
[ INFO] [1649870868.810732567]: Feature ImageProcessingControl is 1
[ INFO] [1649870868.810776252]: Feature Sharpness is 1
[ INFO] [1649870868.811218410]: Feature RegSharpnessInc is 1
[ INFO] [1649870868.811256221]: Feature Device is 1
[ INFO] [1649870868.811282067]: Feature RegSharpnessIncAvail is 1
[ INFO] [1649870868.811317984]: Feature RegSharpnessIncImpl is 1
[ INFO] [1649870868.811514756]: Feature RegSharpnessMax is 1
[ INFO] [1649870868.811543625]: Feature Device is 1
[ INFO] [1649870868.811562254]: Feature RegSharpnessMaxAvail is 1
[ INFO] [1649870868.811591239]: Feature RegSharpnessMaxImpl is 1
[ INFO] [1649870868.811786999]: Feature RegSharpnessMin is 1
[ INFO] [1649870868.811827015]: Feature Device is 1
[ INFO] [1649870868.811870273]: Feature RegSharpnessMinAvail is 1
[ INFO] [1649870868.811917480]: Feature RegSharpnessMinImpl is 1
[ INFO] [1649870868.812107523]: Feature RegSharpness is 1
[ INFO] [1649870868.812143097]: Feature Device is 1
[ INFO] [1649870868.812170726]: Feature SharpnessLocked is 1
[ INFO] [1649870868.812197910]: Feature TLParamsLocked is 1
[ INFO] [1649870868.812241484]: Feature RegSharpnessLocked is 1
[ INFO] [1649870868.812273276]: Feature RegSharpnessAvail is 1
[ INFO] [1649870868.812313234]: Feature RegSharpnessImpl is 1
[ INFO] [1649870868.812359330]: Feature ContrastControl is 1
[ INFO] [1649870868.812397638]: Feature ContrastAuto is 1
[ INFO] [1649870868.812845963]: Feature RegContrastAuto is 0
(process:2640): Aravis-CRITICAL **: 11:27:48.812: arv_gc_feature_node_is_available: assertion 'error == NULL || *error == NULL' failed
[ INFO] [1649870868.813022927]: Feature Device is 0
(process:2640): Aravis-CRITICAL **: 11:27:48.813: arv_gc_feature_node_is_available: assertion 'error == NULL || *error == NULL' failed
[ INFO] [1649870868.813098286]: Feature ContrastAutoAvail is 0
(process:2640): Aravis-CRITICAL **: 11:27:48.813: arv_gc_feature_node_is_available: assertion 'error == NULL || *error == NULL' failed
[ INFO] [1649870868.813192016]: Feature RegContrastAutoContinuousAvail is 0
(process:2640): Aravis-CRITICAL **: 11:27:48.813: arv_gc_feature_node_is_available: assertion 'error == NULL || *error == NULL' failed
[ INFO] [1649870868.813260616]: Feature RegContrastAutoOnceAvail is 0
(process:2640): Aravis-CRITICAL **: 11:27:48.813: arv_gc_feature_node_is_available: assertion 'error == NULL || *error == NULL' failed
[ INFO] [1649870868.813329013]: Feature RegContrastAutoOffAvail is 0
(process:2640): Aravis-CRITICAL **: 11:27:48.813: arv_gc_feature_node_is_available: assertion 'error == NULL || *error == NULL' failed
[ INFO] [1649870868.813399785]: Feature RegContrastAutoAvail is 0
(process:2640): Aravis-CRITICAL **: 11:27:48.813: arv_gc_feature_node_is_available: assertion 'error == NULL || *error == NULL' failed
...
(process:2732): Aravis-CRITICAL **: 11:29:38.391: arv_gc_feature_node_is_implemented: assertion 'ARV_IS_GC_FEATURE_NODE (gc_feature_node)' failed
[ WARN] [1649870978.391943830]: Publishing dynamic camera transforms (/tf) at 25 Hz
[ INFO] [1649870980.400364162]: Camera does not support ExposureTime.
[ INFO] [1649870980.400528066]: Camera does not support AcquisitionFrameRate.
[ INFO] [1649870980.400723945]: Camera does not support FocusPos.
[ INFO] [1649870980.432362732]: Using Camera Configuration:
[ INFO] [1649870980.432513401]: ---------------------------
[ INFO] [1649870980.432658741]: Vendor name = (null)
[ INFO] [1649870980.432806207]: Model name = (null)
[ INFO] [1649870980.432950366]: Device id = (null)
[ INFO] [1649870980.433085305]: Serial number = (null)
[ INFO] [1649870980.433256625]: Type = Other
[aravis_cam/aravis_cam-3] process has died [pid 2732, exit code -11, cmd /opt/ros/noetic/lib/nodelet/nodelet standalone camera_aravis/CameraAravisNodelet __name:=aravis_cam __log:=/home/outrider/.ros/log/49841a24-bb4f-11ec-85ec-c1a96e210007/aravis_cam-aravis_cam-3.log].
log file: /home/outrider/.ros/log/49841a24-bb4f-11ec-85ec-c1a96e210007/aravis_cam-aravis_cam-3*.log
How do the maintainers feel about a port to ROS2?
I would be willing to participate.
Hi,
I am new to ROS and I want to stream videos from two cameras simultaneously. I am using camera_aravis library and cameras from "The Imaging Source".
When I try to run the first camera using $ rosrun camera_aravis cam_aravis _guid:=<camera name 1>-<serial no. 1>, it works. For second camera I am again using $ rosrun camera_aravis cam_aravis _guid:=<camera name 2>-<serial no. 2> and it works but first one gets shutdown and gives the following messages.
[ WARN] [1671529604.510871557]: Shutdown request received.
[ WARN] [1671529604.510957263]: Reason given for shutdown: [[/camera_aravis] Reason: new node registered with same name]
I changed the name of the node for one camera by using $ rosrun camera_aravis cam_aravis _guid:=<camera name 1>-<serial no. 1> __name:="cam1 and it works. I can use both the cameras for streaming but after some time I get the following:
[ERROR] [1671529153.848003630]: Control to aravis device lost.
[ INFO] [1671529153.850028770]: Completed buffers = 58
[ INFO] [1671529153.850081113]: Failures = 99
[ INFO] [1671529153.850117464]: Underruns = 907
[ INFO] [1671529153.850153579]: Resent buffers = 40086
[ INFO] [1671529153.850186774]: Missing = 16697
(process:20266): GLib-ERROR **: 10:39:14.376: file ../../../../glib/gthread-posix.c: line 1219 (g_system_thread_wait): error 'Resource deadlock avoided' during 'pthread_join (pt->system_thread, NULL)'
Trace/breakpoint trap (core dumped)
Any leads on how to fix this?
Also, $ roslaunch camera_aravis cam_aravis.launch is detecting 2 cameras but starting/opening only 1 camera. How to start/open both the cameras using launch file alone?
Thank you in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.