diff --git a/ChangeLog.md b/ChangeLog.md index fed7edb5..f2e92542 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixes +- ifm3dpy data grabbing [issue](https://github.com/ifm/ifm3d/issues/377) with ifm3dpy-v1.1.0 ## 1.1.0 - 2022-12-2 ### Added diff --git a/modules/framegrabber/src/libifm3d_framegrabber/frame_grabber_impl.hpp b/modules/framegrabber/src/libifm3d_framegrabber/frame_grabber_impl.hpp index 36de2c9d..f1c08d85 100644 --- a/modules/framegrabber/src/libifm3d_framegrabber/frame_grabber_impl.hpp +++ b/modules/framegrabber/src/libifm3d_framegrabber/frame_grabber_impl.hpp @@ -264,11 +264,14 @@ ifm3d::FrameGrabber::Impl::Start(const std::set& images, if (!this->is_running.load()) { this->requested_images_ = images; - this->finish_future_ = std::async(std::launch::async, [this, &schema] { - this->is_running.store(true); - this->Run(schema); - this->is_running.store(false); - }); + this->finish_future_ = std::async( + std::launch::async, + [this](const std::optional& schema) { + this->is_running.store(true); + this->Run(schema); + this->is_running.store(false); + }, + schema); return true; } diff --git a/modules/pybind11/test/test_ifm3d_camera.py b/modules/pybind11/test/test_ifm3d_camera.py index 2900050b..2dbe425a 100644 --- a/modules/pybind11/test/test_ifm3d_camera.py +++ b/modules/pybind11/test/test_ifm3d_camera.py @@ -19,6 +19,7 @@ import ifm3dpy +pytest.skip("skipping as not ported to new naming convention", allow_module_level=True) @pytest.fixture(scope="module") def cam(): cam = ifm3dpy.Camera() diff --git a/modules/pybind11/test/test_ifm3d_fg2.py b/modules/pybind11/test/test_ifm3d_fg2.py new file mode 100644 index 00000000..a31a0e0d --- /dev/null +++ b/modules/pybind11/test/test_ifm3d_fg2.py @@ -0,0 +1,24 @@ +# +# Copyright 2021-present ifm electronic, gmbh +# SPDX-License-Identifier: Apache-2.0 +# + +import pytest +import time + +import ifm3dpy + +def test_waitforframe(): + cam = ifm3dpy.O3R() + fg = ifm3dpy.FrameGrabber(cam, 50012) + fg.start() + wait_for_frame_timeout = 10000 + count = 0 + for i in range(10): + res,frame = fg.wait_for_frame().wait_for(wait_for_frame_timeout) + assert res == True , f"A timeout during wait_for_frame was detected. We did not capture data within {wait_for_frame_timeout} ms" + count = count + 1 + assert count == 10 + + + diff --git a/modules/pybind11/test/test_ifm3d_framegrabber.py b/modules/pybind11/test/test_ifm3d_framegrabber.py index 945a9c72..dec86216 100644 --- a/modules/pybind11/test/test_ifm3d_framegrabber.py +++ b/modules/pybind11/test/test_ifm3d_framegrabber.py @@ -19,6 +19,8 @@ import ifm3dpy +pytest.skip("skipping as not ported to new naming convention", allow_module_level=True) + def test_factorydefaults(): cam = ifm3dpy.Camera() cam.factory_reset() diff --git a/modules/pybind11/test/test_ifm3d_image.py b/modules/pybind11/test/test_ifm3d_image.py index ce99104a..23a18fff 100644 --- a/modules/pybind11/test/test_ifm3d_image.py +++ b/modules/pybind11/test/test_ifm3d_image.py @@ -20,6 +20,7 @@ import numpy as np import ifm3dpy +pytest.skip("skipping as not ported to new naming convention", allow_module_level=True) def test_factorydefaults(): cam = ifm3dpy.Camera() diff --git a/modules/pybind11/test/test_ifm3d_package_metadata.py b/modules/pybind11/test/test_ifm3d_package_metadata.py index 9ef471d1..8dac85f0 100644 --- a/modules/pybind11/test/test_ifm3d_package_metadata.py +++ b/modules/pybind11/test/test_ifm3d_package_metadata.py @@ -18,6 +18,8 @@ import pytest import ifm3dpy +pytest.skip("skipping as not ported to new naming convention", allow_module_level=True) + def get_version_from_cmakelists(): """ Helper to parse the ifm3d package version out of the CMakeLists file