Skip to content

Commit

Permalink
Merge branch 'dev-0.17.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
theseankelly committed Oct 16, 2019
2 parents a9bd63c + a99007b commit bba3c0a
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 37 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* Corrected handling of spurious wakes in FrameGrabber
* Fixed ComputeCartesian python unit test to properly blank out invalid
pixels
* Changed `build` Dockerfiles to use pip for numpy/pytest
* Fixed race condition in PCICClient unit tests
* Changed setup.py to honor the environment variables per the Windows installation instructions
* Updated installation documentation for Windows

## Changes between ifm3d 0.15.1 and 0.16.0
* Created new `framegrabberudp` module for consuming data over UDP interface
Expand Down
12 changes: 6 additions & 6 deletions doc/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,18 @@ The `pybind11` module takes one additional dependency:

#### [Pybind11](https://github.com/pybind/pybind11)
Download:
```
```
cd %IFM3D_BUILD_DIR%
git clone https://github.com/pybind/pybind11.git
cd pybind11
cd pybind11
git checkout tags/v2.3.0
```

Build:
```
mkdir build
cd build
cmake -A x64 -DPYBIND11_TEST=OFF -DCMAKE_INSTALL_PREFIX=%IFM3D_BUILD_DIR%\install ..
cmake -G %IFM3D_CMAKE_GENERATOR% -DPYBIND11_TEST=OFF -DCMAKE_INSTALL_PREFIX=%IFM3D_BUILD_DIR%\install ..
cmake --build . --clean-first --config %CONFIG% --target INSTALL
```

Expand Down Expand Up @@ -241,9 +241,9 @@ $ python -m pip install pytest

The tests can be executed as follows:

```
$ cd modules/pybind11/test
$ python -m pytest .
```
$ cd modules/pybind11/test
$ python -m pytest .
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion doc/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Build:
cd %IFM3D_BUILD_DIR%\opencv
mkdir build_cmake
cd build_cmake
cmake -G %IFM3D_CMAKE_GENERATOR% -DWITH_CUDA=OFF -DWITH_EIGEN=ON -DWITH_IPP=ON -DWITH_JASPTER=ON -DWITH_JPEG=ON -DWITH_OPENEXR=OFF -DWITH_OPENNI=OFF -DWITH_PNG=ON -DWITH_QT=OFF -DWITH_QT_OPENGL=OFF -DWITH_TBB=OFF -DWITH_TIFF=ON -DWITH_VIDEOINPUT=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PACKAGE=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_openvc_python=OFF -DCMAKE_PREFIX_PATH="%IFM3D_BUILD_DIR%\install" -DCMAKE_INSTALL_PREFIX=%IFM3D_BUILD_DIR%\install ..
cmake -G %IFM3D_CMAKE_GENERATOR% -DWITH_CUDA=OFF -DWITH_EIGEN=ON -DWITH_IPP=ON -DWITH_JASPTER=ON -DWITH_JPEG=ON -DWITH_OPENEXR=OFF -DWITH_OPENNI=OFF -DWITH_PNG=ON -DWITH_QT=OFF -DWITH_QT_OPENGL=OFF -DWITH_TBB=OFF -DWITH_TIFF=ON -DWITH_VIDEOINPUT=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PACKAGE=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DCMAKE_PREFIX_PATH="%IFM3D_BUILD_DIR%\install" -DCMAKE_INSTALL_PREFIX=%IFM3D_BUILD_DIR%\install ..
cmake --build . --clean-first --config %CONFIG% --target INSTALL
```

Expand Down
11 changes: 7 additions & 4 deletions docker/build/amd64/ubuntu-ros/16.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ RUN apt-get update && \
libxmlrpc-c++8-dev \
python-dev \
python3-dev \
python-pytest \
python3-pytest \
python-numpy \
python3-numpy \
python-pip \
python3-pip \
locales \
sudo

RUN yes | python -m pip install --upgrade pip setuptools
RUN yes | python -m pip install pytest numpy
RUN yes | python3 -m pip install --upgrade pip setuptools
RUN yes | python3 -m pip install pytest numpy

RUN mkdir -p /opt && \
cd /opt && \
git clone https://github.com/pybind/pybind11 && \
Expand Down
11 changes: 7 additions & 4 deletions docker/build/amd64/ubuntu-ros/18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ RUN apt-get update && \
libxmlrpc-c++8-dev \
python-dev \
python3-dev \
python-pytest \
python3-pytest \
python-numpy \
python3-numpy \
python-pip \
python3-pip \
locales \
sudo

RUN yes | python -m pip install --upgrade pip setuptools
RUN yes | python -m pip install pytest numpy
RUN yes | python3 -m pip install --upgrade pip setuptools
RUN yes | python3 -m pip install pytest numpy

RUN mkdir -p /opt && \
cd /opt && \
git clone https://github.com/pybind/pybind11 && \
Expand Down
11 changes: 7 additions & 4 deletions docker/build/amd64/ubuntu/16.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,20 @@ RUN apt-get update && \
libproj-dev \
python-dev \
python3-dev \
python-pytest \
python3-pytest \
python-numpy \
python3-numpy \
python-pip \
python3-pip \
build-essential \
coreutils \
findutils \
cmake \
locales \
sudo

RUN yes | python -m pip install --upgrade pip setuptools
RUN yes | python -m pip install pytest numpy
RUN yes | python3 -m pip install --upgrade pip setuptools
RUN yes | python3 -m pip install pytest numpy

RUN mkdir -p /opt && \
cd /opt && \
git clone https://github.com/pybind/pybind11 && \
Expand Down
9 changes: 5 additions & 4 deletions docker/build/amd64/ubuntu/18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,18 @@ RUN apt-get update && \
libproj-dev \
python-dev \
python3-dev \
python-pytest \
python3-pytest \
python-numpy \
python3-numpy \
python-pip \
python3-pip \
build-essential \
coreutils \
findutils \
cmake \
locales \
sudo

RUN yes | python -m pip install pytest numpy
RUN yes | python3 -m pip install pytest numpy

RUN mkdir -p /opt && \
cd /opt && \
git clone https://github.com/pybind/pybind11 && \
Expand Down
26 changes: 13 additions & 13 deletions modules/pcicclient/test/ifm3d-pcicclient-tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PCICClientTest : public ::testing::Test

virtual void TearDown()
{

}

ifm3d::Camera::Ptr cam_;
Expand Down Expand Up @@ -80,30 +80,30 @@ TEST_F(PCICClientTest, PCICTimeout)
EXPECT_THROW(std::make_shared<ifm3d::PCICClient>(cam_), ifm3d::error_t);
return;
}
ifm3d::PCICClient::Ptr pc = std::make_shared<ifm3d::PCICClient>(cam_);

ifm3d::PCICClient::Ptr pc = std::make_shared<ifm3d::PCICClient>(cam_);

std::unique_ptr<std::thread> reboot_thread_ = std::make_unique<std::thread>([&]{

EXPECT_NO_THROW(this->cam_->Reboot(ifm3d::Camera::boot_mode::PRODUCTIVE));

std::this_thread::sleep_for(std::chrono::seconds(1));

});
std::this_thread::sleep_for(std::chrono::seconds(5));

if(reboot_thread_ && reboot_thread_->joinable()) reboot_thread_->join();
});

if(reboot_thread_ && reboot_thread_->joinable()) reboot_thread_->join();

for(int i = 0; i < 20; ++i)
{
{
result.clear();

if(!pc->Call("V?",result,5000))
{
{
pc = std::make_shared<ifm3d::PCICClient>(cam_);
}
}
}

EXPECT_GT(result.size(), 0);
pc->Stop();

}
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,17 @@ def build_extension(self, ext):

if platform.system() == "Windows":
cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(cfg.upper(), extdir)]
if sys.maxsize > 2**32:

if 'IFM3D_BUILD_DIR' in os.environ:
cmake_args += ['-DCMAKE_PREFIX_PATH=' + os.environ['IFM3D_BUILD_DIR'] + '\\install']

# If a generator was specified, use it. Otherwise use the machine's
# architecture and the default generator.
if 'IFM3D_CMAKE_GENERATOR' in os.environ:
cmake_args += ['-G', os.environ['IFM3D_CMAKE_GENERATOR'].replace('"','')]
elif sys.maxsize > 2**32:
cmake_args += ['-A', 'x64']

build_args += ['--', '/m']
else:
cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg]
Expand Down

0 comments on commit bba3c0a

Please sign in to comment.