diff --git a/.github/workflows/macos-ustk.yml b/.github/workflows/macos-ustk.yml deleted file mode 100644 index 7b08448971..0000000000 --- a/.github/workflows/macos-ustk.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: MacOS-ustk - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -on: - pull_request: - types: [opened, reopened, synchronize] - schedule: - - cron: '0 2 * * SUN' - -# https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre#comment133398800_72408109 -# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency -concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true - -jobs: - build-macos: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Print system information - run: | - sysctl -a | grep machdep.cpu - sysctl -a | grep logical - - - name: Print OS information - run: system_profiler SPSoftwareDataType - - - name: Install dependencies - run: brew install libpng libjpeg-turbo libdc1394 opencv pcl librealsense zbar pkg-config nlohmann-json - - - name: Clone visp-images - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ - run: | - git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images - echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV - echo ${VISP_INPUT_IMAGE_PATH} - - - name: Clone ustk-dataset - run: | - git clone --depth 1 https://github.com/lagadic/ustk-dataset ${HOME}/ustk-dataset - echo "USTK_DATASET_PATH=$HOME/ustk-dataset" >> $GITHUB_ENV - echo ${USTK_DATASET_PATH} - - - name: Clone ustk - run: | - git clone --depth 1 https://github.com/lagadic/ustk ${HOME}/ustk - - - name: Clone ustk-sample - run: | - git clone --depth 1 https://github.com/lagadic/ustk-sample ${HOME}/ustk-sample - - # Openblas location is exported explicitly because openblas is keg-only, - # which means it was not symlinked into /usr/local/. - # qt@5 is as a requested dependency for vtk and thus for pcl 1.12.1 - # qt@5 is keg-only, which means it was not symlinked into /usr/local that's why we need to set Qt5_DIR - - name: Configure CMake - run: | - export LDFLAGS="-L/usr/local/opt/openblas/lib" - export CPPFLAGS="-I/usr/local/opt/openblas/include" - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/usr/local -DVISP_CONTRIB_MODULES_PATH=${HOME}/ustk/modules - cat ViSP-third-party.txt - - - name: Compile - working-directory: build - run: make -j$(sysctl -n hw.logicalcpu) install - - - name: Run unit tests - working-directory: build - run: ctest -j$(sysctl -n hw.logicalcpu) --output-on-failure - - - name: ViSP + UsTK as 3rdparty with cmake - run: | - cd ${HOME}/ustk-sample - mkdir ustk-sample-build - cd ustk-sample-build - cmake .. -DVISP_DIR=/tmp/usr/local/lib/cmake/visp - make -j$(sysctl -n hw.logicalcpu) diff --git a/3rdparty/pololu/include/RPMSerialInterfaceWindows.h b/3rdparty/pololu/include/RPMSerialInterfaceWindows.h index 60b6b5de6c..01ce88d93a 100644 --- a/3rdparty/pololu/include/RPMSerialInterfaceWindows.h +++ b/3rdparty/pololu/include/RPMSerialInterfaceWindows.h @@ -26,7 +26,9 @@ #include "RPMSerialInterface.h" #define WIN32_LEAN_AND_MEAN +#ifndef NOMINMAX #define NOMINMAX +#endif #include class RPMSerialInterfaceWindows : public RPMSerialInterface diff --git a/example/particle-filter/pf-nonlinear-example.cpp b/example/particle-filter/pf-nonlinear-example.cpp index 4425be2d7a..d22255c8b6 100644 --- a/example/particle-filter/pf-nonlinear-example.cpp +++ b/example/particle-filter/pf-nonlinear-example.cpp @@ -1,5 +1,4 @@ -/**************************************************************************** - * +/* * ViSP, open source Visual Servoing Platform software. * Copyright (C) 2005 - 2024 by Inria. All rights reserved. * @@ -27,8 +26,7 @@ * * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * -*****************************************************************************/ + */ /** \example pf-nonlinear-example.cpp * Example on how to use a Particle Filter (PF) on a complex non-linear use-case. @@ -38,24 +36,24 @@ * fixed to the ceiling. * * The state vector of the PF is: - * \f{eqnarray*}{ - \textbf{x}[0] &=& {}^WX_x \\ - \textbf{x}[1] &=& {}^WX_y \\ - \textbf{x}[2] &=& {}^WX_z \\ - \textbf{x}[3] &=& \omega \Delta t - \f} - - The measurement \f$ \textbf{z} \f$ corresponds to the coordinates in pixels of the different markers. - Be \f$ u_i \f$ and \f$ v_i \f$ the horizontal and vertical pixel coordinates of the \f$ i^{th} \f$ marker. - The measurement vector can be written as: - \f{eqnarray*}{ - \textbf{z}[2i] &=& u_i \\ - \textbf{z}[2i+1] &=& v_i - \f} - + * \f{eqnarray*}{ + * \textbf{x}[0] &=& {}^WX_x \\ + * \textbf{x}[1] &=& {}^WX_y \\ + * \textbf{x}[2] &=& {}^WX_z \\ + * \textbf{x}[3] &=& \omega \Delta t + * \f} + * + * The measurement \f$ \textbf{z} \f$ corresponds to the coordinates in pixels of the different markers. + * Be \f$ u_i \f$ and \f$ v_i \f$ the horizontal and vertical pixel coordinates of the \f$ i^{th} \f$ marker. + * The measurement vector can be written as: + * \f{eqnarray*}{ + * \textbf{z}[2i] &=& u_i \\ + * \textbf{z}[2i+1] &=& v_i + * \f} + * * Some noise is added to the measurement vector to simulate measurements which are * not perfect. -*/ + */ // ViSP includes #include @@ -690,8 +688,6 @@ int main(const int argc, const char *argv[]) // Compute the pose using the noisy markers vpHomogeneousMatrix cMo_noisy = computePose(markersAsVpPoint, ip, cam); vpHomogeneousMatrix wMo_noisy = cMw.inverse() * cMo_noisy; - double wXnoisy = wMo_noisy[0][3]; - double wYnoisy = wMo_noisy[1][3]; //! [Noisy_pose] //! [Update_displays] @@ -705,6 +701,8 @@ int main(const int argc, const char *argv[]) plot->plot(0, 1, Xest[0], Xest[1]); // Plot the noisy pose + double wXnoisy = wMo_noisy[0][3]; + double wYnoisy = wMo_noisy[1][3]; plot->plot(0, 2, wXnoisy, wYnoisy); //! [Update_plot] diff --git a/modules/core/include/visp3/core/vpThread.h b/modules/core/include/visp3/core/vpThread.h index c6b0ba9917..362c2f7b8a 100644 --- a/modules/core/include/visp3/core/vpThread.h +++ b/modules/core/include/visp3/core/vpThread.h @@ -88,8 +88,9 @@ class VP_DEPRECATED vpThread /*! Construct a thread object that represents a new joinable thread of execution. The new thread of execution calls \e fn passing \e args as - arguments. \param fn : A pointer to a function. \param args : Arguments - passed to the call to \e fn (if any). + arguments. + \param fn : A pointer to a function. + \param args : Arguments passed to the call to \e fn (if any). */ vpThread(vpThread::Fn fn, vpThread::Args args = nullptr) : m_handle(), m_isCreated(false), m_isJoinable(false) { @@ -98,8 +99,9 @@ class VP_DEPRECATED vpThread /*! Creates a thread object that represents a new joinable thread of - execution. \param fn : A pointer to a function. \param args : Arguments - passed to the call to \e fn (if any). + execution. + \param fn : A pointer to a function. + \param args : Arguments passed to the call to \e fn (if any). */ void create(vpThread::Fn fn, vpThread::Args args = nullptr) {