Skip to content

Commit

Permalink
Merge pull request #1233 from fspindle/fix_various_next_release
Browse files Browse the repository at this point in the history
Fix various for next release
  • Loading branch information
fspindle authored Sep 18, 2023
2 parents cb394fe + c05bdd9 commit bd8598e
Show file tree
Hide file tree
Showing 14 changed files with 94 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@
"C_Cpp.formatting": "vcFormat",
"C_Cpp.vcFormat.space.aroundBinaryOperator": "ignore",
"editor.comments.insertSpace": true,
"C_Cpp.vcFormat.indent.preserveComments": false,
"C_Cpp.vcFormat.indent.preserveComments": true,
"C_Cpp.doxygen.generatedStyle": "/*!"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1>ViSP: Open source Visual Servoing Platform</h1>

[![Github Releases](https://img.shields.io/github/release/lagadic/visp.svg)](https://github.com/lagadic/visp/releases)
[![License](https://img.shields.io/badge/License-GPLv2-bright)](https://opensource.org/licenses/GPL-2.0)
[![License](https://eddelbuettel.github.io/badges/GPL2+.svg)](https://opensource.org/license/gpl-2-0/)

Platform | Build Status |
-------- | ------------ |
Expand Down
3 changes: 1 addition & 2 deletions cmake/FindMyOpenCV.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ macro(vp_get_opencv_version_from_hpp FILENAME DEFINE VAR)
set(${__var} 0)
endif()
else()
message("Warning: Cannot retrive OpenCV version from non existing file ${FILENAME}. This may produce build issues.")
message("Warning: Cannot retrieve OpenCV version from non existing file ${FILENAME}. This may produce build issues.")
set(${__var} 0)
endif()
endmacro()
Expand Down Expand Up @@ -201,4 +201,3 @@ if(CMAKE_TOOLCHAIN_FILE AND I_AM_A_ROBOT)
endforeach()
endif()
endif()

1 change: 0 additions & 1 deletion cmake/FindWS2_32.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ if(WIN32 AND NOT CYGWIN)
set(WS2_32_LIBNAME "ws2_32.lib")
check_library_exists(${WS2_32_LIBNAME} getch "" HAVE_LIBWS2_32) # for inet_ntoa() and socket functionalities
if(HAVE_LIBWS2_32)
message("-----------> ${WS2_32_LIBNAME} is found")
set(WS2_32_LIBRARY ${WS2_32_LIBNAME})
set(WS2_32_FOUND TRUE)
else()
Expand Down
96 changes: 76 additions & 20 deletions cmake/templates/VISPConfig.root-WIN32.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,57 @@
# include(${VISP_USE_FILE})
# endif()
#
#
#############################################################################

if(NOT DEFINED VISP_STATIC)
# look for global setting
if (NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
set(VISP_STATIC OFF)
else()
set(VISP_STATIC ON)
endif()
endif()

function(check_one_config RES)
set($ { RES } "" PARENT_SCOPE)
if (NOT VISP_RUNTIME OR NOT VISP_ARCH)
return()
endif()
set(candidates)
if (VISP_STATIC)
list(APPEND candidates "${VISP_ARCH}/${VISP_RUNTIME}/staticlib")
endif()
list(APPEND candidates "${VISP_ARCH}/${VISP_RUNTIME}/lib")
foreach(c $ { candidates })
set(p "${VISP_CONFIG_PATH}/${c}")
if (EXISTS "${p}/VISPConfig.cmake")
set($ { RES } "${p}" PARENT_SCOPE)
return()
endif()
endforeach()
endfunction()

get_filename_component(VISP_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)

function(check_one_config RES)
set(${RES} "" PARENT_SCOPE)
if(NOT VISP_RUNTIME OR NOT VISP_ARCH)
return()
endif()
set(candidates)
if(VISP_STATIC)
list(APPEND candidates "${VISP_ARCH}/${VISP_RUNTIME}/staticlib")
endif()
list(APPEND candidates "${VISP_ARCH}/${VISP_RUNTIME}/lib")
foreach(c ${candidates})
set(p "${VISP_CONFIG_PATH}/${c}")
if(EXISTS "${p}/VISPConfig.cmake")
set(${RES} "${p}" PARENT_SCOPE)
return()
endif()
endforeach()
endfunction()

# similar code exist in VISPDetectPlatform.cmake
if(DEFINED VISP_ARCH AND DEFINED VISP_RUNTIME)
# custom overridden values
Expand All @@ -92,10 +140,34 @@ elseif(MSVC)
set(VISP_RUNTIME vc14)
elseif(MSVC_VERSION MATCHES "^191[0-9]$")
set(VISP_RUNTIME vc15)
check_one_config(has_VS2017)
if(NOT has_VS2017)
set(VISP_RUNTIME vc14) # selecting previous compatible runtime version
endif()
elseif(MSVC_VERSION MATCHES "^192[0-9]$")
set(VISP_RUNTIME vc16)
check_one_config(has_VS2019)
if(NOT has_VS2019)
set(VISP_RUNTIME vc15) # selecting previous compatible runtime version
check_one_config(has_VS2017)
if(NOT has_VS2017)
set(VISP_RUNTIME vc14) # selecting previous compatible runtime version
endif()
endif()
elseif(MSVC_VERSION MATCHES "^193[0-9]$")
set(VISP_RUNTIME vc17)
check_one_config(has_VS2022)
if(NOT has_VS2022)
set(VISP_RUNTIME vc16)
check_one_config(has_VS2019)
if(NOT has_VS2019)
set(VISP_RUNTIME vc15) # selecting previous compatible runtime version
check_one_config(has_VS2017)
if(NOT has_VS2017)
set(VISP_RUNTIME vc14) # selecting previous compatible runtime version
endif()
endif()
endif()
else()
message(WARNING "ViSP does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set VISP_RUNTIME")
endif()
Expand All @@ -109,33 +181,17 @@ elseif(MINGW)
endif()
endif()

if(CMAKE_VERSION VERSION_GREATER 2.6.2)
unset(VISP_CONFIG_PATH CACHE)
endif()
check_one_config(VISP_LIB_PATH)

if(NOT VISP_FIND_QUIETLY)
message(STATUS "ViSP ARCH: ${VISP_ARCH}")
message(STATUS "ViSP RUNTIME: ${VISP_RUNTIME}")
endif()

get_filename_component(VISP_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH CACHE)
if(VISP_RUNTIME AND VISP_ARCH)
if(NOT DEFINED VISP_STATIC AND EXISTS "${VISP_CONFIG_PATH}/${VISP_ARCH}/${VISP_RUNTIME}/lib/VISPConfig.cmake")
set(VISP_LIB_PATH "${VISP_CONFIG_PATH}/${VISP_ARCH}/${VISP_RUNTIME}/lib")
elseif(NOT DEFINED VISP_STATIC AND EXISTS "${VISP_CONFIG_PATH}/${VISP_ARCH}/${VISP_RUNTIME}/staticlib/VISPConfig.cmake")
set(VISP_LIB_PATH "${VISP_CONFIG_PATH}/${VISP_ARCH}/${VISP_RUNTIME}/staticlib")
elseif(VISP_STATIC AND EXISTS "${VISP_CONFIG_PATH}/${VISP_ARCH}/${VISP_RUNTIME}/staticlib/VISPConfig.cmake")
set(VISP_LIB_PATH "${VISP_CONFIG_PATH}/${VISP_ARCH}/${VISP_RUNTIME}/staticlib")
elseif(VISP_STATIC AND EXISTS "${VISP_CONFIG_PATH}/${VISP_ARCH}/${VISP_RUNTIME}/lib/VISPConfig.cmake")
set(VISP_LIB_PATH "${VISP_CONFIG_PATH}/${VISP_ARCH}/${VISP_RUNTIME}/lib")
endif()
message(STATUS "ViSP STATIC: ${VISP_STATIC}")
endif()

if(VISP_LIB_PATH AND EXISTS "${VISP_LIB_PATH}/VISPConfig.cmake")
include("${VISP_LIB_PATH}/VISPConfig.cmake")

set(VISP_FOUND TRUE CACHE BOOL "" FORCE)

if(NOT VISP_FIND_QUIETLY)
message(STATUS "Found VISP ${VISP_VERSION} in ${VISP_LIB_PATH}")
if(NOT VISP_LIB_PATH MATCHES "/staticlib")
Expand All @@ -151,5 +207,5 @@ else()
You should manually point CMake variable VISP_DIR to your build of ViSP library."
)
endif()
set(VISP_FOUND FALSE CACHE BOOL "" FORCE)
set(VISP_FOUND FALSE)
endif()
2 changes: 2 additions & 0 deletions modules/core/include/visp3/core/vpCannyEdgeDetection.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ class VISP_EXPORT vpCannyEdgeDetection
* linked somehow to a strong edge point.
*
* \param[in] lowerThresh : The lower threshold: each point whose gradient is below this threshold is discarded.
* When lower threshold value is negative, Canny recommendation is applied to have the lower threshold 3 times lower
* than the upper threshold.
* \param[in] upperThresh : The upper threshold: each point whose gradient is greater than this threshold is
* said to be a strong edge point and is kept.
*/
Expand Down
2 changes: 1 addition & 1 deletion modules/core/include/visp3/core/vpMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ vpMatrix M(R);
/** @name Eigen values */

//@{
// compute the eigen values using Lapack
// Compute the eigen values using Lapack.
vpColVector eigenValues() const;
void eigenValues(vpColVector &evalue, vpMatrix &evector) const;
//@}
Expand Down
6 changes: 3 additions & 3 deletions modules/core/src/math/matrix/vpColVector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1492,9 +1492,9 @@ double vpColVector::sumSquare() const { return SimdVectorSumSquare(data, rowNum)


/*!
Compute and return the Fronebius norm \f$ ||v|| = \sqrt{ \sum{v_{i}^2}} \f$.
Compute and return the Frobenius norm \f$ ||v|| = \sqrt{ \sum{v_{i}^2}} \f$.
\return The Fronebius norm if the vector is initialized, 0 otherwise.
\return The Frobenius norm if the vector is initialized, 0 otherwise.
\sa infinityNorm()
Expand Down Expand Up @@ -1746,7 +1746,7 @@ void vpColVector::insert(const vpColVector &v, unsigned int r, unsigned int c)
/*!
\deprecated This function is deprecated. You should rather use frobeniusNorm().
Compute and return the Euclidean norm also called Fronebius norm \f$ ||v|| = \sqrt{ \sum{v_{i}^2}} \f$.
Compute and return the Euclidean norm also called Frobenius norm \f$ ||v|| = \sqrt{ \sum{v_{i}^2}} \f$.
\return The Euclidean norm if the vector is initialized, 0 otherwise.
Expand Down
6 changes: 3 additions & 3 deletions modules/core/src/math/matrix/vpRowVector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1087,9 +1087,9 @@ double vpRowVector::sumSquare() const
}

/*!
Compute and return the Fronebius norm \f$ ||v|| = \sqrt{ \sum{v_{i}^2}} \f$.
Compute and return the Frobenius norm \f$ ||v|| = \sqrt{ \sum{v_{i}^2}} \f$.
\return The Fronebius norm if the vector is initialized, 0 otherwise.
\return The Frobenius norm if the vector is initialized, 0 otherwise.
*/
double vpRowVector::frobeniusNorm() const
{
Expand All @@ -1102,7 +1102,7 @@ double vpRowVector::frobeniusNorm() const
/*!
\deprecated This function is deprecated. You should rather use frobeniusNorm().
Compute and return the Euclidean norm also called Fronebius norm \f$ ||v|| = \sqrt{ \sum{v_{i}^2}} \f$.
Compute and return the Euclidean norm also called Frobenius norm \f$ ||v|| = \sqrt{ \sum{v_{i}^2}} \f$.
\return The Euclidean norm if the vector is initialized, 0 otherwise.
Expand Down
6 changes: 3 additions & 3 deletions modules/core/src/math/transformation/vpTranslationVector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ vpRowVector vpTranslationVector::t() const
/*!
\deprecated This function is deprecated. You should rather use frobeniusNorm().
Compute and return the Euclidean norm also called Fronebius nom of the translation vector
Compute and return the Euclidean norm also called Frobenius nom of the translation vector
\f$ ||t|| = \sqrt{ \sum{t_{i}^2}} \f$.
\return The Euclidean norm if the vector is initialized, 0 otherwise.
Expand All @@ -726,9 +726,9 @@ double vpTranslationVector::euclideanNorm() const { return frobeniusNorm(); }
#endif

/*!
Compute and return the Fronebius norm \f$ ||t|| = \sqrt{ \sum{t_{i}^2}} \f$.
Compute and return the Frobenius norm \f$ ||t|| = \sqrt{ \sum{t_{i}^2}} \f$.
\return The Fronebius norm if the vector is initialized, 0 otherwise.
\return The Frobenius norm if the vector is initialized, 0 otherwise.
*/
double vpTranslationVector::frobeniusNorm() const
{
Expand Down
2 changes: 1 addition & 1 deletion modules/imgproc/src/vpCircleHoughTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ vpCircleHoughTransform::edgeDetection(const vpImage<unsigned char> &I)
upperCannyThresh = vpImageFilter::computeCannyThreshold(I, lowerCannyThresh);
}
else if (m_algoParams.m_lowerCannyThresh < 0) {
lowerCannyThresh = upperCannyThresh / 3.;
lowerCannyThresh = upperCannyThresh / 3.f;
}
vpImageFilter::canny(I, m_edgeMap, m_algoParams.m_gaussianKernelSize, lowerCannyThresh, upperCannyThresh, m_algoParams.m_sobelKernelSize);
#else
Expand Down
2 changes: 1 addition & 1 deletion modules/robot/src/real-robot/viper/vpRobotViper850.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ void vpRobotViper850::init(void)
throw(vpException(vpException::ioError, "ATI F/T calib file \"%s\" doesn't exist", calibfile.c_str()));
#else
throw(vpException(vpException::ioError, "You don't have access to Viper850 "
"data to retrive ATI F/T calib "
"data to retrieve ATI F/T calib "
"file"));
#endif
m_ati.setCalibrationFile(calibfile);
Expand Down
3 changes: 0 additions & 3 deletions modules/vs/include/visp3/vs/vpServoData.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@
*/
class VISP_EXPORT vpServoData
{

private:
char baseDirectory[FILENAME_MAX];

std::ofstream velocityFile;
std::ofstream errorFile;
std::ofstream errorNormFile;
Expand Down
2 changes: 1 addition & 1 deletion script/megapose_server/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_megapose_env_path(megapose_env: str) -> Union[Path, None]:

def get_megapose_bin_conda_env(megapose_env: str) -> Path:
'''
Retrive the bin folder of a conda environment
Retrieve the bin folder of a conda environment
'''
megapose_env_path = get_megapose_env_path(megapose_env)
assert megapose_env_path is not None
Expand Down

0 comments on commit bd8598e

Please sign in to comment.