Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[noetic]Synchronizing two Blackfly S using the same external Trigger #182

Open
jiheddachraoui opened this issue Jun 6, 2024 · 0 comments

Comments

@jiheddachraoui
Copy link

jiheddachraoui commented Jun 6, 2024

Hello,

I'm trying to synchronize two BFS cameras with an external trigger (20 Hz). The cameras are connected to the external signal on Line 3, but they are not interconnected. I configured the launch files (see below) and everything else, but when I start both cameras, I get laggy and glitchy images (see warnings in the logs). However, if I launch only one camera, it synchronizes well with the external signal. The issue arises when both cameras are launched with the same configuration to synchronize with the external trigger.

When they are launched together without the trigger mode, they work fine. I have tried many configurations on SpinView, but when I run them simultaneously with the trigger mode on, the images start to flicker.

Should I change the hardware setup, or are there parameters I should adjust?

Thank you in advance.

System details

  • operating system/version: Ubuntu 20.04
  • ROS version: [noetic]
  • camera model: Blackfly S GigE: BFS-PGE-13Y3C-C
  • spinnaker version : 2.2.0.48

Logs

[ INFO] [1717685386.339536748]: Initializing nodelet with 8 worker threads.
[ INFO] [1717685389.428924966]: [SpinnakerCamera]: Number of cameras detected: 4
[ INFO] [1717685389.482843204]: [SpinnakerCamera::connect]: Detected device type: GigEVision
[ INFO] [1717685390.490222433]: [SpinnakerCamera::connect]: Camera model name: Blackfly S BFS-PGE-13Y3C
[ INFO] [1717685390.501435637]: [SpinnakerCamera]: (23131403) DeviceLinkThroughputLimit set to 125000000.
[ INFO] [1717685390.744865897]: [SpinnakerCamera]: (23131403) BinningHorizontal set to 1.
[ INFO] [1717685390.763568755]: [SpinnakerCamera]: (23131403) BinningVertical set to 1.
[ INFO] [1717685390.779128197]: [SpinnakerCamera]: (23131403) DecimationHorizontal set to 1.
[ INFO] [1717685390.794567559]: [SpinnakerCamera]: (23131403) DecimationVertical set to 1.
[ INFO] [1717685390.807510434]: [SpinnakerCamera]: (23131403) ReverseX set to 0.
[ INFO] [1717685390.820444662]: [SpinnakerCamera]: (23131403) ReverseY set to 0.
[ INFO] [1717685390.832476654]: [SpinnakerCamera]: (23131403) OffsetX set to 0.
[ INFO] [1717685390.841824331]: [SpinnakerCamera]: (23131403) OffsetY set to 0.
[ INFO] [1717685390.851751191]: [SpinnakerCamera]: (23131403) Width set to 1280.
[ INFO] [1717685390.861546369]: [SpinnakerCamera]: (23131403) Height set to 720.
[ INFO] [1717685390.868522755]: [SpinnakerCamera]: (23131403) OffsetX set to 0.
[ INFO] [1717685390.875064701]: [SpinnakerCamera]: (23131403) OffsetY set to 304.
[ INFO] [1717685390.889973111]: [SpinnakerCamera]: (23131403) PixelFormat set to BayerRG8.
[ INFO] [1717685390.901132053]: [SpinnakerCamera]: (23131403) IspEnable set to 0.
[ INFO] [1717685390.905489157]: [SpinnakerCamera]: (23131403) AcquisitionFrameRateEnable set to 1.
[ INFO] [1717685390.914163441]: [SpinnakerCamera]: (23131403) AcquisitionFrameRate set to 19.9978.
[ INFO] [1717685390.918328246]: [SpinnakerCamera]: (23131403) AcquisitionFrameRateEnable set to 0.
[ INFO] [1717685390.922695532]: [SpinnakerCamera]: (23131403) TriggerMode set to Off.
[ INFO] [1717685390.928149059]: [SpinnakerCamera]: (23131403) TriggerSource set to Line3.
[ INFO] [1717685390.929198586]: [SpinnakerCamera]: (23131403) TriggerSelector set to FrameStart.
[ INFO] [1717685390.934202797]: [SpinnakerCamera]: (23131403) TriggerActivation set to RisingEdge.
[ INFO] [1717685390.938887781]: [SpinnakerCamera]: (23131403) TriggerOverlap set to ReadOut.
[ INFO] [1717685390.942905057]: [SpinnakerCamera]: (23131403) TriggerMode set to On.
[ INFO] [1717685390.945037976]: [SpinnakerCamera]: (23131403) LineSelector set to Line0.
[ INFO] [1717685390.948367791]: [SpinnakerCamera]: (23131403) LineMode set to Input.
[ INFO] [1717685390.952662644]: [SpinnakerCamera]: (23131403) LineSource set to Off.
[ INFO] [1717685390.956600780]: [SpinnakerCamera]: (23131403) ExposureMode set to Timed.
[ INFO] [1717685390.962752926]: [SpinnakerCamera]: (23131403) ExposureAuto set to Continuous.
[ INFO] [1717685390.969989013]: [SpinnakerCamera]: (23131403) AutoExposureExposureTimeUpperLimit set to 5000.
[ INFO] [1717685390.971028709]: [SpinnakerCamera]: (23131403) GainSelector set to All.
[ INFO] [1717685390.978873626]: [SpinnakerCamera]: (23131403) GainAuto set to Off.
[ INFO] [1717685390.984912210]: [SpinnakerCamera]: (23131403) Gain set to 0.
[ INFO] [1717685390.991968243]: [SpinnakerCamera]: (23131403) BlackLevel set to 1.7.
[ INFO] [1717685390.995348263]: [SpinnakerCamera]: (23131403) GammaEnable set to 1.
[ INFO] [1717685391.002579973]: [SpinnakerCamera]: (23131403) Gamma set to 1.
[ INFO] [1717685391.011360423]: [SpinnakerCamera]: (23131403) BalanceWhiteAuto set to Continuous.
[ INFO] [1717685391.011477427]: [SpinnakerCamera]: (23131403) AutoAlgorithmSelector set to Ae.
[ INFO] [1717685391.014533911]: [SpinnakerCamera]: (23131403) AasRoiEnable set to 1.
[ INFO] [1717685391.019711824]: [SpinnakerCamera]: (23131403) AutoExposureLightingMode set to Normal.
[ INFO] [1717685391.579729633]: [SpinnakerCamera::connect]: Detected device type: GigEVision
[ INFO] [1717685392.610569302]: [SpinnakerCamera::connect]: Camera model name: Blackfly S BFS-PGE-13Y3C
[ INFO] [1717685392.621982176]: [SpinnakerCamera]: (23131406) DeviceLinkThroughputLimit set to 125000000.
[ INFO] [1717685392.861310548]: [SpinnakerCamera]: (23131406) BinningHorizontal set to 1.
[ INFO] [1717685392.877985470]: [SpinnakerCamera]: (23131406) BinningVertical set to 1.
[ INFO] [1717685392.894211095]: [SpinnakerCamera]: (23131406) DecimationHorizontal set to 1.
[ INFO] [1717685392.910465206]: [SpinnakerCamera]: (23131406) DecimationVertical set to 1.
[ INFO] [1717685392.923327268]: [SpinnakerCamera]: (23131406) ReverseX set to 0.
[ INFO] [1717685392.936471224]: [SpinnakerCamera]: (23131406) ReverseY set to 0.
[ INFO] [1717685392.948863829]: [SpinnakerCamera]: (23131406) OffsetX set to 0.
[ INFO] [1717685392.958919553]: [SpinnakerCamera]: (23131406) OffsetY set to 0.
[ INFO] [1717685392.969226565]: [SpinnakerCamera]: (23131406) Width set to 1280.
[ INFO] [1717685392.979676346]: [SpinnakerCamera]: (23131406) Height set to 720.
[ INFO] [1717685392.986598478]: [SpinnakerCamera]: (23131406) OffsetX set to 0.
[ INFO] [1717685392.993226741]: [SpinnakerCamera]: (23131406) OffsetY set to 304.
[ INFO] [1717685393.008456117]: [SpinnakerCamera]: (23131406) PixelFormat set to BayerRG8.
[ INFO] [1717685393.022032344]: [SpinnakerCamera]: (23131406) IspEnable set to 0.
[ INFO] [1717685393.026894390]: [SpinnakerCamera]: (23131406) AcquisitionFrameRateEnable set to 1.
[ INFO] [1717685393.035834339]: [SpinnakerCamera]: (23131406) AcquisitionFrameRate set to 19.9978.
[ INFO] [1717685393.039929667]: [SpinnakerCamera]: (23131406) AcquisitionFrameRateEnable set to 0.
[ INFO] [1717685393.044182607]: [SpinnakerCamera]: (23131406) TriggerMode set to Off.
[ INFO] [1717685393.049787731]: [SpinnakerCamera]: (23131406) TriggerSource set to Line3.
[ INFO] [1717685393.051103332]: [SpinnakerCamera]: (23131406) TriggerSelector set to FrameStart.
[ INFO] [1717685393.056161293]: [SpinnakerCamera]: (23131406) TriggerActivation set to RisingEdge.
[ INFO] [1717685393.061046612]: [SpinnakerCamera]: (23131406) TriggerOverlap set to ReadOut.
[ INFO] [1717685393.064895176]: [SpinnakerCamera]: (23131406) TriggerMode set to On.
[ INFO] [1717685393.067170063]: [SpinnakerCamera]: (23131406) LineSelector set to Line0.
[ INFO] [1717685393.070612154]: [SpinnakerCamera]: (23131406) LineMode set to Input.
[ INFO] [1717685393.074718460]: [SpinnakerCamera]: (23131406) LineSource set to Off.
[ INFO] [1717685393.078613803]: [SpinnakerCamera]: (23131406) ExposureMode set to Timed.
[ INFO] [1717685393.084740437]: [SpinnakerCamera]: (23131406) ExposureAuto set to Continuous.
[ INFO] [1717685393.092447532]: [SpinnakerCamera]: (23131406) AutoExposureExposureTimeUpperLimit set to 5000.
[ INFO] [1717685393.093614241]: [SpinnakerCamera]: (23131406) GainSelector set to All.
[ INFO] [1717685393.100642601]: [SpinnakerCamera]: (23131406) GainAuto set to Off.
[ INFO] [1717685393.106686871]: [SpinnakerCamera]: (23131406) Gain set to 0.
[ INFO] [1717685393.113614517]: [SpinnakerCamera]: (23131406) BlackLevel set to 1.7.
[ INFO] [1717685393.116706430]: [SpinnakerCamera]: (23131406) GammaEnable set to 1.
[ INFO] [1717685393.123542207]: [SpinnakerCamera]: (23131406) Gamma set to 1.
[ INFO] [1717685393.132313045]: [SpinnakerCamera]: (23131406) BalanceWhiteAuto set to Continuous.
[ INFO] [1717685393.132435616]: [SpinnakerCamera]: (23131406) AutoAlgorithmSelector set to Ae.
[ INFO] [1717685393.135310186]: [SpinnakerCamera]: (23131406) AasRoiEnable set to 1.
[ INFO] [1717685393.140093798]: [SpinnakerCamera]: (23131406) AutoExposureLightingMode set to Normal.
[ WARN] [1717685501.202861187]: [SpinnakerCamera::grabImage] Image received from camera is incomplite 

Launch file:

`

    <!-- Frame rate -->
    <param name="acquisition_frame_rate_enable"   value="$(arg control_frame_rate)" />
    <param name="acquisition_frame_rate"          value="$(arg frame_rate)" />

    <!-- Use the camera_calibration package to create this file -->
    <param name="camera_info_url" if="$(arg left_camera_calibrated)"
           value="file://$(env HOME)/.ros/camera_info/$(arg left_camera_serial).yaml" />
           
    <!-- Image Triggering -->
  
   <param name="enable_trigger"       value="$(arg trigger_mode)" />
   <param name="auto_gain"                      value="$(arg gain_auto)" />
   <param name="trigger_source"              value="$(arg trigger_source)" />
   <param name="trigger_selector"       value="$(arg trigger_selector)" />
   <param name="trigger_activation_mode"       value="$(arg trigger_activation)" />
   <param name="trigger_overlap_mode"              value="$(arg trigger_overlap)" />
    <!-- Image Processing -->
<param name="isp_enable"                      value="$(arg isp_enable)" />
<param name="auto_white_balance"              value="$(arg color_balance)" />
<param name="image_format_color_coding"       value="$(arg encoding)" />
<param name="image_format_x_binning" value="1" />
    <param name="image_format_y_binning" value="1" />
    <param name="image_format_x_offset" value="0" />
    <param name="image_format_y_offset" value="664" /> 
    <param name="image_format_roi_width" value="1280" />
    <param name="image_format_roi_height" value="720" />
  </node>

  <!-- Debayering nodelet -->
  <node pkg="nodelet" type="nodelet" name="image_proc_debayer"
      args="load image_proc/debayer /camera_nodelet_manager">
  </node>
</group>

<group ns="right" >
  <!-- Camera nodelet -->
  <node pkg="nodelet" type="nodelet" name="camera_nodelet"
        args="load spinnaker_camera_driver/SpinnakerCameraNodelet /camera_nodelet_manager" >
    <param name="frame_id"                        value="camera_right" />
    <param name="serial"                          value="$(arg right_camera_serial)" />

    <!-- Frame rate -->
    <param name="acquisition_frame_rate_enable"   value="$(arg control_frame_rate)" />
    <param name="acquisition_frame_rate"          value="$(arg frame_rate)" />

    <!-- Use the camera_calibration package to create this file -->
    <param name="camera_info_url" if="$(arg right_camera_calibrated)"
           value="file://$(env HOME)/.ros/camera_info/$(arg right_camera_serial).yaml" />
    
    <!-- Image Triggering -->
  
   <param name="enable_trigger"       value="$(arg trigger_mode)" />
   <param name="auto_gain"                      value="$(arg gain_auto)" />
   <param name="trigger_source"              value="$(arg trigger_source)" />
   <param name="trigger_selector"       value="$(arg trigger_selector)" />
   <param name="trigger_activation_mode"       value="$(arg trigger_activation)" />
   <param name="trigger_overlap_mode"              value="$(arg trigger_overlap)" />
           
    <!-- Image Processing -->
<param name="isp_enable"                      value="$(arg isp_enable)" />
<param name="auto_white_balance"              value="$(arg color_balance)" />
<param name="image_format_color_coding"       value="$(arg encoding)" />
<param name="image_format_x_binning" value="1" />
    <param name="image_format_y_binning" value="1" />
    <param name="image_format_x_offset" value="0" />
    <param name="image_format_y_offset" value="664" /> 
    <param name="image_format_roi_width" value="1280" />
    <param name="image_format_roi_height" value="720" />
  </node>

  <!-- Debayering nodelet -->
  <node pkg="nodelet" type="nodelet" name="image_proc_debayer"
      args="load image_proc/debayer /camera_nodelet_manager">
  </node>
</group>

<!-- Stereo image processing nodelet -->
<group if="$(arg run_stereo_image_proc)" >
  <node pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc">
    <param name="approximate_sync" value="true"/>
  </node>
</group>
`
@berndpfrommer berndpfrommer changed the title Synchronizing two Blackfly S using the same external Trigger [noetic]Synchronizing two Blackfly S using the same external Trigger Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant