How to use pylon_camera to capture and publishing multiple GigE camera?
Hi~ I has more than three cameras need to capture. I can capture one camera by setting static ip in both network card port/camera, but I have no idea how to capture other camera by pylon_camera. Or is there has other ros package can do this?
(update) Setting camera ID can let pyloncmaera capture specific camera, but it still can't capture multiple cameras. Both camera is capture by pyloncamera_node, but using same node name and topic name, then first camera will be shoutdown. Anybody has solution for this case?
I testing result is shown in below:
first camera
$ rosrun pylon_camera pylon_camera_node _device_user_id:=itri_camera_01 _frame_rate:=30 _image_encoding:="bayer_rggb8" _shutter_mode:=global _mtu_size:=9000 _brightness:=100 _brightness_continuous:=true
brightness is given and has value 100
brightness is continuous
[ INFO] [1533792321.020960847]: Trying to open the following camera: itri_camera_01
[ INFO] [1533792321.275489043]: Found the desired camera with DeviceUserID itri_camera_01: acA2040-35gc
[ INFO] [1533792321.578151306]: Cam does not support binning.
[ INFO] [1533792321.578309167]: Cam has exposure time range: [26 - 1e+07] measured in microseconds.
[ INFO] [1533792321.578374596]: Cam has gain range: [0 - 360] measured in device specific units.
[ WARN] [1533792321.579069205]: Cam gamma not available, will keep the default (auto).
[ INFO] [1533792321.580351905]: Cam has pylon auto brightness range: [50 - 205] which is the average pixel intensity.
[ INFO] [1533792321.598550784]: Cam supports the following [GenAPI|ROS] image encodings: ['Mono8'|'mono8'] ['BayerRG8'|'bayer_rggb8'] ['BayerRG12'|'NO_ROS_EQUIVALENT'] ['BayerRG12Packed'|'NO_ROS_EQUIVALENT'] ['YUV422Packed'|'NO_ROS_EQUIVALENT'] ['YUV422_YUYV_Packed'|'NO_ROS_EQUIVALENT']
[ INFO] [1533792321.676964329]: CameraInfoURL needed for rectification! ROS-Param: '/pylon_camera_node/camera_info_url' = '' is invalid!
[ WARN] [1533792321.676986782]: Will only provide distorted /image_raw images!
[ WARN] [1533792327.085885375]: Did not reach the target brightness before timeout of 5 sec! Stuck at brightness 150.993 and exposure 76077us
[ INFO] [1533792327.085912056]: Setting brightness to: 100, reached: 150
[ WARN] [1533792327.092301178]: Error while trying to access gamma: cam.Gamma NodeMap is not available!
[ INFO] [1533792327.095777378]: Startup settings: encoding = 'bayer_rggb8', binning = [1, 1], exposure = 76077, gain = 0, gamma = -1, shutter mode = global
[ INFO] [1533792327.097469533]: Desired framerate 30.00 is higher than max possible. Will limit framerate to: 13.10 Hz
[ INFO] [1533792327.098611440]: Start image grabbing if node connects to topic with a frame_rate of: 13.1019 Hz
[ INFO] [1533792327.098684701]: Camera not calibrated
[ WARN] [1533792358.870899682]: Shutdown request received.
[ WARN] [1533792358.870922296]: Reason given for shutdown: [new node registered with same name]
second camera
$ rosrun pylon_camera pylon_camera_node _device_user_id:=itri_camera_02 _frame_rate:=30 _image_encoding:="bayer_rggb8" _shutter_mode:=global _mtu_size:=9000 _brightness:=100 _brightness_continuous:=true
brightness is given and has value 100
brightness is continuous
[ INFO] [1533792358.881529438]: Trying to open the following camera: itri_camera_02
[ INFO] [1533792359.137119795]: Found the desired camera with DeviceUserID itri_camera_02: acA2040-35gc
[ INFO] [1533792359.439378722]: Cam does not support binning.
[ INFO] [1533792359.439555281]: Cam has exposure time range: [26 - 1e+07] measured in microseconds.
[ INFO] [1533792359.439646724]: Cam has gain range: [0 - 360] measured in device specific units.
[ WARN] [1533792359.440372002]: Cam gamma not available, will keep the default (auto).
[ INFO] [1533792359.441665014]: Cam has pylon auto brightness range: [50 - 205] which is the average pixel intensity.
[ INFO] [1533792359.459087950]: Cam supports the following [GenAPI|ROS] image encodings: ['Mono8'|'mono8'] ['BayerRG8'|'bayer_rggb8'] ['BayerRG12'|'NO_ROS_EQUIVALENT'] ['BayerRG12Packed'|'NO_ROS_EQUIVALENT'] ['YUV422Packed'|'NO_ROS_EQUIVALENT'] ['YUV422_YUYV_Packed'|'NO_ROS_EQUIVALENT']
[ INFO] [1533792359.571834102]: CameraInfoURL needed for rectification! ROS-Param: '/pylon_camera_node/camera_info_url' = '' is invalid!
[ WARN] [1533792359.571924356]: Will only provide distorted /image_raw images!
[ WARN] [1533792366.021160165]: Did not reach the target brightness before timeout of 5 sec! Stuck at brightness 145.083 and exposure 127287us
[ INFO] [1533792366.021185469]: Setting brightness to: 100, reached: 145
[ WARN] [1533792366.027599787]: Error while trying to access gamma: cam.Gamma NodeMap is not available!
[ INFO] [1533792366.031153321]: Startup settings: encoding = 'bayer_rggb8', binning = [1, 1], exposure = 127287, gain = 0, gamma = -1, shutter mode = global
[ INFO] [1533792366.033004371]: Desired framerate 30.00 is higher than max possible. Will limit framerate to: 7.84 Hz
[ INFO] [1533792366.035445408]: Start image grabbing if node connects to topic with a frame_rate of: 7.84098 Hz
[ INFO] [1533792366.035582693]: Camera not calibrated
Asked by zhanD300 on 2018-08-02 00:39:42 UTC
Answers
You can use the device_user_id-parameter to tell the node which camera it should open. If you don't set this parameter, the node will open one of the cameras randomly.
Asked by NEngelhard on 2018-08-02 01:38:11 UTC
Comments
thanks the reply, I'll try this way and return the result later.
Asked by zhanD300 on 2018-08-05 20:50:04 UTC
Comments
Can you do it? I've the same problem. If I start rosrun pylon_camera pylon_camera_node _device_user_id:=left and then rosrun pylon_camera pylon_camera_node _device_user_id:=right the first one exit
Asked by alerizzi on 2018-09-03 13:52:12 UTC