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

use when external trigger has no sync trigger msgs with ts and trigger_msgs are compiled on system #149

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/spinnaker_sdk_camera_driver/capture.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ namespace acquisition {
bool TIME_BENCHMARK_;
bool MASTER_TIMESTAMP_FOR_ALL_;
bool EXTERNAL_TRIGGER_;
bool USE_IMU_TS_EXTERNAL_TRIGGER_;
bool SAVE_;
bool SAVE_BIN_;
bool MANUAL_TRIGGER_;
Expand Down
14 changes: 8 additions & 6 deletions launch/acquisition.launch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<arg name="binning" default="1" doc="Binning for cameras, when changing from 2 to 1 cameras need to be unplugged and replugged"/>
<arg name="color" default="false" doc="Should color images be used (only works on models that support color images)"/>
<arg name="exposure_time" default="0" doc="Exposure_time setting for cameras"/>
<arg name="external_trigger" default="false" doc="External trigger (No camera is master)"/>
<arg name="external_trigger" default="true" doc="External trigger (No camera is master)"/>
<arg name="utstamps" default="false" doc="Flag whether each image should have Unique timestamps vs the master cams time stamp for all" />
<arg name="use_imu_ts" default="false" doc="If Trigger_msgs are present and if you dont have a timestamp info for triggering "/>
<arg name="gain" default="0" doc="Gain setting. Gain should be positive (full range - 0 - 18 dB for blackfly-s camera)
or zero (auto gain). if gain > max, it will be set to max allowed value.
Default is 0, auto gain which is set according to target grey value or autoexposure settings"/>
Expand All @@ -21,10 +23,9 @@
<arg name="save" default="false" doc="flag whether images should be saved or not"/>
<arg name="save_path" default="~" doc="location to save the image data"/>
<arg name="save_type" default="bmp" doc="Type of file type to save to when saving images locally: binary, tiff, bmp, jpeg etc." />
<arg name="soft_framerate" default="30" doc="When hybrid software triggering is used, this controls the FPS, 0=as fast as possible"/>
<arg name="soft_framerate" default="10" doc="When hybrid software triggering is used, this controls the FPS, 0=as fast as possible"/>
<arg name="time" default="false" doc="Show time/FPS on output"/>
<arg name="to_ros" default="true" doc="Flag whether images should be published to ROS" />
<arg name="utstamps" default="false" doc="Flag whether each image should have Unique timestamps vs the master cams time stamp for all" />
<arg name="max_rate_save" default="false" doc="Flag for max rate mode which is when the master triggerst the slaves and saves images at maximum rate possible" />


Expand All @@ -35,7 +36,7 @@

<!-- Capture nodelet params-->
<arg name="tf_prefix" default="" doc="will prefix (arg tf_prefix)/ to existing frame_id in Image msg and camerainfo msg" />
<arg name="config_file" default="$(find spinnaker_sdk_camera_driver)/params/test_params.yaml" doc="File specifying the parameters of the camera_array"/>
<arg name="config_file" default="$(find spinnaker_sdk_camera_driver)/params/calibration_files/stereo_17197554_17197553.yaml" doc="File specifying the parameters of the camera_array"/>

<!-- start the nodelet manager if $(arg start_nodelet_manager) is true-->
<node pkg="nodelet" type="nodelet" name="$(arg manager)" args="manager" output="screen" unless="$(arg external_manager)" />
Expand All @@ -50,6 +51,8 @@
<!-- Load parameters onto server using argument or default values above -->
<param name="exposure_time" value="$(arg exposure_time)" />
<param name="external_trigger" value="$(arg external_trigger)" />
<param name="utstamps" value="$(arg utstamps)" />
<param name="use_imu_ts" value="$(arg use_imu_ts)" />
<param name="gain" value="$(arg gain)"/>
<param name="target_grey_value" value="$(arg target_grey_value)" />
<param name="binning" value="$(arg binning)" />
Expand All @@ -62,11 +65,10 @@
<param name="save_path" value="$(arg save_path)" />
<param name="soft_framerate" value="$(arg soft_framerate)" />
<param name="time" value="$(arg time)" />
<param name="utstamps" value="$(arg utstamps)" />
<param name="to_ros" value="$(arg to_ros)"/>
<param name="max_rate_save" value="$(arg max_rate_save)" />
<param name="tf_prefix" value="$(arg tf_prefix)" />

</node>

</launch>
</launch>
6 changes: 4 additions & 2 deletions launch/acquisition_external_trigger.launch
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<arg name="binning" default="1" doc="Binning for cameras, when changing from 2 to 1 cameras need to be unplugged and replugged"/>
<arg name="color" default="false" doc="Should color images be used (only works on models that support color images)"/>
<arg name="exposure_time" default="0" doc="Exposure_time setting for cameras"/>
<arg name="utstamps" default="false" doc="Flag whether each image should have Unique timestamps vs the master cams time stamp for all"/>
<arg name="use_imu_ts" default="true" doc="If Trigger_msgs are present and if you dont have a timestamp info for triggering "/>
<arg name="external_trigger" default="true" doc="External trigger (No camera is master)"/>
<arg name="gain" default="0" doc="Gain setting. Gain should be positive (full range - 0 - 18 dB for blackfly-s camera)
or zero (auto gain). if gain > max, it will be set to max allowed value.
Expand All @@ -24,7 +26,6 @@
<arg name="soft_framerate" default="30" doc="When hybrid software triggering is used, this controls the FPS, 0=as fast as possible"/>
<arg name="time" default="false" doc="Show time/FPS on output"/>
<arg name="to_ros" default="true" doc="Flag whether images should be published to ROS" />
<arg name="utstamps" default="false" doc="Flag whether each image should have Unique timestamps vs the master cams time stamp for all" />
<arg name="max_rate_save" default="false" doc="Flag for max rate mode which is when the master triggerst the slaves and saves images at maximum rate possible" />


Expand All @@ -50,6 +51,8 @@
<!-- Load parameters onto server using argument or default values above -->
<param name="exposure_time" value="$(arg exposure_time)" />
<param name="external_trigger" value="$(arg external_trigger)" />
<param name="utstamps" value="$(arg utstamps)" />
<param name="use_imu_ts" value="$(arg use_imu_ts)" />
<param name="gain" value="$(arg gain)"/>
<param name="target_grey_value" value="$(arg target_grey_value)" />
<param name="binning" value="$(arg binning)" />
Expand All @@ -62,7 +65,6 @@
<param name="save_path" value="$(arg save_path)" />
<param name="soft_framerate" value="$(arg soft_framerate)" />
<param name="time" value="$(arg time)" />
<param name="utstamps" value="$(arg utstamps)" />
<param name="to_ros" value="$(arg to_ros)"/>
<param name="max_rate_save" value="$(arg max_rate_save)" />
<param name="tf_prefix" value="$(arg tf_prefix)" />
Expand Down
6 changes: 4 additions & 2 deletions launch/node_acquisition.launch
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<arg name="color" default="false" doc="Should color images be used (only works on models that support color images)"/>
<arg name="exposure_time" default="0" doc="Exposure_time setting for cameras"/>
<arg name="external_trigger" default="false" doc="External trigger (No camera is master)"/>
<arg name="utstamps" default="false" doc="Flag whether each image should have Unique timestamps vs the master cams time stamp for all" />
<arg name="use_imu_ts" default="true" doc="If Trigger_msgs are present and if you dont have a timestamp info for triggering "/>
<arg name="target_grey_value" default="0" doc="AutoExposureTargetGreyValue min: 4 max: 99 if set below 4, AutoExposureTargetGreyValueAuto will be set to continuous(auto) also available as dynamic reconfigurable parameter" />
<arg name="frames" default="3400" doc="Numer of frames to save/view 0=ON"/>
<arg name="live" default="false" doc="Show images on screen GUI"/>
Expand All @@ -19,7 +21,6 @@
<arg name="soft_framerate" default="20" doc="When hybrid software triggering is used, this controls the FPS, 0=as fast as possible"/>
<arg name="time" default="false" doc="Show time/FPS on output"/>
<arg name="to_ros" default="true" doc="Flag whether images should be published to ROS" />
<arg name="utstamps" default="false" doc="Flag whether each image should have Unique timestamps vs the master cams time stamp for all" />
<arg name="max_rate_save" default="false" doc="Flag for max rate mode which is when the master triggerst the slaves and saves images at maximum rate possible" />

<!-- acquisiton node params-->
Expand All @@ -37,6 +38,8 @@
<!-- Load parameters onto server using argument or default values above -->
<param name="exposure_time" value="$(arg exposure_time)" />
<param name="external_trigger" value="$(arg external_trigger)" />
<param name="utstamps" value="$(arg utstamps)" />
<param name="use_imu_ts" value="$(arg use_imu_ts)" />
<param name="target_grey_value" value="$(arg target_grey_value)" />
<param name="binning" value="$(arg binning)" />
<param name="color" value="$(arg color)" />
Expand All @@ -48,7 +51,6 @@
<param name="save_path" value="$(arg save_path)" />
<param name="soft_framerate" value="$(arg soft_framerate)" />
<param name="time" value="$(arg time)" />
<param name="utstamps" value="$(arg utstamps)" />
<param name="to_ros" value="$(arg to_ros)"/>
<param name="max_rate_save" value="$(arg max_rate_save)"/>
<param name="tf_prefix" value="$(arg tf_prefix)" />
Expand Down
41 changes: 41 additions & 0 deletions params/calibration_files/stereo_17197554_17197553.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
cam_ids:
- 17197553
- 17197554
cam_aliases:
- cam0
- cam1

#master_cam: 17197553
skip: 20
delay: 1.0

#Camera info message details
distortion_model: plumb_bob
image_height: 1024
image_width: 1280

distortion_coeffs:
- [-0.20450164833719758, 0.14743367885666747, 1.3691017237135784e-05, -0.00029960779673081914]
- [-0.19543806353197976, 0.12250750911745852, -0.0008848056641066484, -0.0021017501699217554]


#specified as [fx 0 cx 0 fy cy 0 0 1]
intrinsic_coeffs:
- [1275.5155246873633, 0.0, 656.6967116430126, 0.0, 1276.6709737523597, 506.5433446279619, 0.0, 0.0, 1.0]
- [1252.4067462338985, 0.0, 629.4308621564376, 0.0, 1250.9809134660086, 513.5942922153134, 0.0, 0.0, 1.0]

rectification_coeffs:
- [0.9665822150177287, 0.0568881655489388, 0.24996511402973415, -0.056811130425504716, 0.9983565526264057, -0.007529228891154418, -0.2499826335392076, -0.006923181955981874, 0.9682255690077631]
- [0.9627203218217302, 0.03938618350914482, 0.26761597579376367, -0.039468734667831934, 0.9992079277965503, -0.005073067340799848, -0.2676038133793774, -0.005678518918518859, 0.96351230064162]

projection_coeffs:
- [1445.214023875022, 0.0, 193.84015655517578, 0.0, 0.0, 1445.214023875022, 520.7913436889648, 0.0, 0.0, 0.0, 1.0, 0.0]
- [1445.214023875022, 0.0, 193.84015655517578, 296.6206626773398, 0.0, 1445.214023875022, 520.7913436889648, 0.0, 0.0, 0.0, 1.0, 0.0]

flip_horizontal:
- false
- false

flip_vertical:
- false
- false
40 changes: 40 additions & 0 deletions params/calibration_files/stereo_17197555_17197558.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
cam_ids:
- 17197555
- 17197558
cam_aliases:
- cam0
- cam1

#master_cam: 17197555
skip: 20
delay: 1.0

#Camera info message details
distortion_model: plumb_bob
image_height: 1024
image_width: 1280

distortion_coeffs:
- [-0.21133156450551877, 0.16554701015049214, 0.0006371203200430035, -0.0010939572806040086]
- [-0.19951712659266974, 0.14189320394813731, -0.002057441273332286, -0.00279936870291979]

#specified as [fx 0 cx 0 fy cy 0 0 1]
intrinsic_coeffs:
- [1255.7661285167007, 0.0, 633.6643372214643, 0.0, 1253.2470339107972, 521.0000311047382, 0.0, 0.0, 1.0]
- [1257.0217332659643, 0.0, 632.5753725217256, 0.0, 1256.1189388208545, 492.01565714778764, 0.0, 0.0, 1.0]

rectification_coeffs:
- [0.9957523783024181, -0.0281670698120689, -0.08765738578853412, 0.02769368284386981, 0.9995945878086233, -0.006612106642487861, 0.08780809208507502, 0.004156465073896091, 0.9961287380466786]
- [0.9956833380506718, -0.06025833095412615, -0.07059478648522698, 0.06063837181798097, 0.9981545070530874, 0.0032508326429390596, 0.07026861455540498, -0.007517552808667829, 0.997499778550468]

projection_coeffs:
- [1388.2617969436703, 0.0, 759.2249526977539, 0.0, 0.0, 1388.2617969436703, 507.6747169494629, 0.0, 0.0, 0.0, 1.0, 0.0]
- [1388.2617969436703, 0.0, 759.2249526977539, 278.81369985863324, 0.0, 1388.2617969436703, 507.6747169494629, 0.0, 0.0, 0.0, 1.0, 0.0]

flip_horizontal:
- true
- true

flip_vertical:
- true
- true
40 changes: 40 additions & 0 deletions params/calibration_files/stereo_17197556_17197557.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
cam_ids:
- 17197556
- 17197557
cam_aliases:
- cam0
- cam1

#master_cam: 17197556
skip: 20
delay: 1.0

#Camera info message details
distortion_model: plumb_bob
image_height: 1024
image_width: 1280

distortion_coeffs:
- [-0.20704574734171718, 0.1378606052753204, -0.00016623127312903865, -0.0014678552308168902]
- [-0.20315604562055115, 0.13925984473430503, 0.0011700633742295359, -0.002631592980875036]

#specified as [fx 0 cx 0 fy cy 0 0 1]
intrinsic_coeffs:
- [1253.702985566858, 0.0, 626.0038426699172, 0.0, 1253.5611530315684, 521.6826648653606, 0.0, 0.0, 1.0]
- [1249.0625547880688, 0.0, 633.4407842588579, 0.0, 1249.0308397534995, 535.9834578202574, 0.0, 0.0, 1.0]

rectification_coeffs:
- [0.999870166919909, 0.015624103543014101, -0.00394166107506912, -0.015616951626054152, 0.9998763572767314, 0.0018387443878286702, 0.0039699024500641535, -0.001776948927645647, 0.9999905411187876]
- [0.9999919133838011, 0.0028219174708584696, -0.002865300820562143, -0.0028270930622141884, 0.9999943768034167, -0.001803858742772549, 0.002860194367911154, 0.0018119446277301825, 0.9999942680559943]

projection_coeffs:
- [1242.8692771645083, 0.0, 630.979866027832, 0.0, 0.0, 1242.8692771645083, 531.3879089355469, 0.0, 0.0, 0.0, 1.0, 0.0]
- [1242.8692771645083, 0.0, 630.979866027832, 253.03796302310053, 0.0, 1242.8692771645083, 531.3879089355469, 0.0, 0.0, 0.0, 1.0, 0.0]

flip_horizontal:
- true
- true

flip_vertical:
- true
- true
40 changes: 40 additions & 0 deletions params/calibration_files/stereo_17197560_17197550.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
cam_ids:
- 17197560
- 17197550
cam_aliases:
- cam0
- cam1

#master_cam: 17197560
skip: 20
delay: 1.0

#Camera info message details
distortion_model: plumb_bob
image_height: 1024
image_width: 1280

distortion_coeffs:
- [-0.19646860778761444, 0.11966919829956081, 0.0007669487706857788, -0.0013965801592123956]
- [-0.1914413046332957, 0.11346023268077468, 0.0019526799897460604, -0.002542153300965656]

#specified as [fx 0 cx 0 fy cy 0 0 1]
intrinsic_coeffs:
- [1278.623621111693, 0.0, 634.8138812505675, 0.0, 1276.7310814743978, 535.3629837510302, 0.0, 0.0, 1.0]
- [1273.2817308511162, 0.0, 629.495280191018, 0.0, 1273.4616558529785, 537.4608865156434, 0.0, 0.0, 1.0]

rectification_coeffs:
- [0.999951055794313, -0.008506807285265669, 0.0050517566895154475, 0.008499995333857072, 0.999962938127486, 0.001368375229905995, -0.00506320996632779, -0.0013253683475786214, 0.9999863035579938]
- [0.9995596958074359, -0.029351275291735073, -0.004349385714674004, 0.02934538988112363, 0.9995683356052899, -0.001410867816356254, 0.004388919009400241, 0.001282612185801062, 0.9999895460933128]

projection_coeffs:
- [1251.7378592347225, 0.0, 627.0195465087891, 0.0, 0.0, 1251.7378592347225, 540.562442779541, 0.0, 0.0, 0.0, 1.0, 0.0]
- [1251.7378592347225, 0.0, 627.0195465087891, 256.12061596895546, 0.0, 1251.7378592347225, 540.562442779541, 0.0, 0.0, 0.0, 1.0, 0.0]

flip_horizontal:
- true
- true

flip_vertical:
- true
- true
6 changes: 5 additions & 1 deletion params/external_trigger_params.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
cam_ids:
- 17197559
- 17197557
- 17197555
cam_aliases:
- cam0
- cam1
skip: 20
delay: 1.0

flip_horizontal:
- false
- false

flip_vertical:
- false
- false

# Assign all the follwing via launch file to prevent confusion and conflict

Expand Down
8 changes: 2 additions & 6 deletions params/stereo_camera_example.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
cam_ids:
<<<<<<< HEAD
- 17197554
- 17197557
- 17197556
cam_aliases:
- cam0
- cam1
master_cam: 17197554
master_cam: 17197557
skip: 20
delay: 1.0

Expand Down Expand Up @@ -42,7 +41,6 @@ rectification_coeffs:
projection_coeffs:
- [913.700317, 0.000000, 953.448302, 0.000000, 0.000000, 1063.296631, 777.871993, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000]
- [913.700317, 0.000000, 953.448302, 0.000000, 0.000000, 1063.296631, 777.871993, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000]
<<<<<<< HEAD

flip_horizontal:
- false
Expand All @@ -51,5 +49,3 @@ flip_horizontal:
flip_vertical:
- false
- false
=======
>>>>>>> master
Loading