Skip to content

Commit d932e9a

Browse files
committed
stereo_camera: Fix usage of automatically adjusted parameters
For example, if auto exposure was enabled, the value calculated by the NxLib was not updated in the parameter set. This had the effect that the original start value was re-used when capturing the next time, and it took several frames again to obtain a good result. Save the parameter set after capture to update the automatically adjusted values.
1 parent 8f773e7 commit d932e9a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ensenso_camera/src/stereo_camera.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ void StereoCamera::onRequestData(ensenso::action::RequestDataGoalConstPtr const&
276276
loadParameterSet(goal->parameter_set, computeDisparityMap ? projectorOn : projectorOff);
277277
ensenso::ros::Time imageTimestamp = capture();
278278

279+
// Auto values like auto exposure might have changed. Save the parameters so that the updated values are used when
280+
// capturing the next time.
281+
saveParameterSet(goal->parameter_set, false);
282+
279283
PREEMPT_ACTION_IF_REQUESTED
280284

281285
feedback.images_acquired = true;

0 commit comments

Comments
 (0)