0
$\begingroup$

Rosanswers logo

Hi,

I want to capture images from a Basler acA1300-60gm and the ROS pylon_camera node. I can open and control the camera with Pylon's PylonViewerApp. But when I'm starting the ROS node with

roslaunch pylon_camera pylon_camera_node.launch

I get error messages that the frames can't be grabbed:

started roslaunch server http://192.168.1.2:45055/

SUMMARY
========

PARAMETERS
 * /pylon_camera_node/binning_x: 2
 * /pylon_camera_node/binning_y: 2
 * /pylon_camera_node/camera_frame: pylon_camera_node
 * /pylon_camera_node/camera_info_url: 
 * /pylon_camera_node/device_user_id: 1
 * /pylon_camera_node/image_encoding: mono8
 * /pylon_camera_node/inter_pkg_delay: 11772
 * /rosdistro: kinetic
 * /rosversion: 1.12.7

NODES
  /
    pylon_camera_node (pylon_camera/pylon_camera_node)

auto-starting new master
process[master]: started with pid [10507]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to ba1098f6-28e9-11e7-84cf-f44d30679130
process[rosout-1]: started with pid [10520]
started core service [/rosout]
process[pylon_camera_node-2]: started with pid [10529]
binning x is given and has value 2
binning y is given and has value 2
[ INFO] [1493036997.880801762]: Trying to open the following camera: 1
[ INFO] [1493036998.138585721]: Found the desired camera with DeviceUserID 1: acA1300-60gm
[ INFO] [1493036998.407568803]: Cam has binning range: x(hz) = [1 - 4], y(vt) = [1 - 4].
[ INFO] [1493036998.408075961]: Cam has exposure time range: [10 - 916000] measured in microseconds.
[ INFO] [1493036998.408277173]: Cam has gain range: [0 - 3] measured in device specific units.
[ INFO] [1493036998.411048207]: Cam has gammma range: [0 - 3.99998].
[ INFO] [1493036998.412463342]: Cam has pylon auto brightness range: [50 - 205] which is the average pixel intensity.
[ INFO] [1493036998.429420227]: Cam supports the following [GenAPI|ROS] image encodings: ['Mono8'|'mono8'] ['Mono12'|'NO_ROS_EQUIVALENT'] ['Mono12Packed'|'NO_ROS_EQUIVALENT'] ['YUV422Packed'|'NO_ROS_EQUIVALENT'] ['YUV422_YUYV_Packed'|'NO_ROS_EQUIVALENT'] 
[ERROR] [1493036998.676944253]: Error: 3774873620 The buffer was incompletely grabbed. This can be caused by performance problems of the network hardware used, i.e. network adapter, switch, or ethernet cable. To fix this, try increasing the camera's Inter-Packet Delay in the Transport Layer category to reduce the required bandwidth, and adjust the camera's Packet Size setting to the highest supported frame size.
[ INFO] [1493036998.729242950]: CameraInfoURL needed for rectification! ROS-Param: '/pylon_camera_node/camera_info_url' = '' is invalid!
[ WARN] [1493036998.729288645]: Will only provide distorted /image_raw images!
[ INFO] [1493036998.777814074]: Setting horizontal binning_x to 2
[ WARN] [1493036998.777900512]: The image width of the camera_info-msg will be adapted, so that the binning_x value in this msg remains 1
[ INFO] [1493036998.834390106]: Setting vertical binning_y to 2
[ WARN] [1493036998.834634538]: The image height of the camera_info-msg will be adapted, so that the binning_y value in this msg remains 1
[ INFO] [1493036998.839134313]: Startup settings: encoding = 'mono8', binning = [2, 2], exposure = 5000, gain = 0, gamma = 1, shutter mode = default_shutter_mode
[ INFO] [1493036998.840824354]: Start image grabbing if node connects to topic with a frame_rate of: 5 Hz
[ INFO] [1493036998.841150046]: Camera not calibrated

When I start the ROS image viewer roslaunch pylon_camera pylon_camera_node.launch I dont't get images but more error messages from the pylon_camera_node:

[ WARN] [1493037429.575879168]: Pylon camera returned invalid image! Skipping
[ERROR] [1493037429.784726148]: Error: 3774873620 The buffer was incompletely grabbed. This can be caused by performance problems of the network hardware used, i.e. network adapter, switch, or ethernet cable. To fix this, try increasing the camera's Inter-Packet Delay in the Transport Layer category to reduce the required bandwidth, and adjust the camera's Packet Size setting to the highest supported frame size.
[ERROR] [1493037429.784979476]: Error: Grab was not successful
[ WARN] [1493037429.785294487]: Pylon camera returned invalid image! Skipping
[ERROR] [1493037430.034649674]: Error: 3774873620 The buffer was incompletely grabbed. This can be caused by performance problems of the network hardware used, i.e. network adapter, switch, or ethernet cable. To fix this, try increasing the camera's Inter-Packet Delay in the Transport Layer category to reduce the required bandwidth, and adjust the camera's Packet Size setting to the highest supported frame size.
[ERROR] [1493037430.034807885]: Error: Grab was not successful

I tried different settings for package delay, binning, framerate and PoE switch and inserter but it's alway the same problem. After i started and closed the roslauncher I can't open the camera with PylonViewerApp until I replugged the device. The app prints these error messages to console:

Failed to get the node 'AcquisitionFrameRate' from the device's nodemap
Error while reading properties
onUpdateNode :  Exception occurred:
 Node is not readable. 
 /home/builder/jenkins_root/workspace/PylonLinux_ReleaseBuild/linux-build-tools/build/lsb-gcc-x86_64-release/build/genicam/Genicam/library/CPP/include/GenApi/impl/EnumerationT.h : 131 
 
Error while reading properties
onUpdateNode :  Exception occurred:
 Node is not readable. 
 /home/builder/jenkins_root/workspace/PylonLinux_ReleaseBuild/linux-build-tools/build/lsb-gcc-x86_64-release/build/genicam/Genicam/library/CPP/include/GenApi/impl/EnumerationT.h : 131 

Any idea what's the problem?


Originally posted by fehlfarbe on ROS Answers with karma: 108 on 2017-04-24

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I solved the problem by looking at the inter-pkg-delay and MTU in PylonViewerApp that was set to inter-pkg-delay: 0 and MTU: 1500 which works with ~85 fps and no errors. The pylon_camera driver doesn't work with these settings but when I increase the MTU of my network device from 1500 to 3000 with sudo ifconfig eth0 mtu 3000 up it's working.


Originally posted by fehlfarbe with karma: 108 on 2017-05-10

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by Void on 2017-08-11:
I increased the MTU to either 3000 or 8192; but pylon_camera is still not working for me

Comment by wasd on 2022-05-10:
This question and answer were published long ago, but i also wanted to share my experience. I m using Basler ace aCA1920-150uc, using combinations of only one and two cameras at the same time with object tracking algorithms. For one camera there is no issue (i should mention that this one camera part is out of question since i was using a custom_pylon_node). But for two cameras i started to receive errors (this part is a little bit complicated, so this relative question conditions and results were matched for just one part of my long experience) called "Grab was not successful", one random camera was randomly in stopping working, tried many ways and looked for the error in different parts, then i met this post/answer, tried it (increased to 3000) and it is still working for now. Even if MTU is especially noted down as "only used in GIGE cameras", i was not also using a GIGE camera. I wish this would help since i cannot present you a clear situation here but just a result of the answer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.