Skip to content

Commit

Permalink
Merge pull request #1388 from SamFlt/feat_panda3d
Browse files Browse the repository at this point in the history
[WIP] Include new Panda3D
  • Loading branch information
fspindle authored Jun 11, 2024
2 parents 92b1ddc + 06791ed commit f217431
Show file tree
Hide file tree
Showing 41 changed files with 3,739 additions and 121 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ VP_OPTION(USE_DIRECTSHOW DIRECTSHOW "" "Include dshow support" "
VP_OPTION(USE_OPENMP OpenMP "" "Include openmp support" "" ON)
VP_OPTION(USE_EIGEN3 Eigen3 QUIET "Include eigen3 support" "" ON IF NOT WINRT AND NOT IOS)
VP_OPTION(USE_COIN3D "Coin3D;MyCoin3D" "" "Include coin3d support" "" ON IF OPENGL_FOUND AND NOT WINRT AND NOT IOS)
VP_OPTION(USE_PANDA3D "MyPanda3D" "" "Include Panda3D support" "" ON IF NOT IOS)
VP_OPTION(USE_YARP YARP QUIET "Include yarp support" "YARP_DIR" ON IF NOT WINRT AND NOT IOS)
VP_OPTION(USE_OGRE OGRE QUIET "Include Ogre support" "OGRE_DIR" ON IF NOT WINRT AND NOT IOS)
VP_OPTION(USE_OIS OIS QUIET "Include Ogre/ois support" "OIS_DIR" ON IF USE_OGRE AND NOT WINRT AND NOT IOS)
Expand Down Expand Up @@ -1089,6 +1090,7 @@ VP_SET(VISP_HAVE_SOWIN TRUE IF (BUILD_MODULE_visp_ar AND USE_SOWIN))
VP_SET(VISP_HAVE_SOXT TRUE IF (BUILD_MODULE_visp_ar AND USE_SOXT))
VP_SET(VISP_HAVE_SOQT TRUE IF (BUILD_MODULE_visp_ar AND USE_SOQT))
VP_SET(VISP_HAVE_QT TRUE IF (BUILD_MODULE_visp_ar AND USE_QT))
VP_SET(VISP_HAVE_PANDA3D TRUE IF (BUILD_MODULE_visp_ar AND USE_PANDA3D))

VP_SET(VISP_HAVE_ZBAR TRUE IF (BUILD_MODULE_visp_detection AND USE_ZBAR))
VP_SET(VISP_HAVE_DMTX TRUE IF (BUILD_MODULE_visp_detection AND USE_DMTX))
Expand Down Expand Up @@ -1729,13 +1731,15 @@ status(" \\- Use Coin3D:" USE_COIN3D THEN "yes (ver ${COIN3D_VE
status(" \\- Use SoWin:" USE_SOWIN THEN "yes" ELSE "no")
status(" \\- Use SoXt:" USE_SOXT THEN "yes" ELSE "no")
if(USE_SOQT AND SoQt_FOUND)
status(" \\- Use SoQt:" USE_SOQT AND SoQt_FOUND THEN "yes (ver ${SoQt_VERSION})" ELSE "no")
status(" \\- Use SoQt:" USE_SOQT AND SoQt_FOUND THEN "yes (ver ${SoQt_VERSION})" ELSE "no")
else()
status(" \\- Use SoQt:" USE_SOQT THEN "yes" ELSE "no")
endif()
status(" \\- Use Qt5:" USE_SOQT AND SoQt_FOUND THEN "yes" ELSE "no")
status(" \\- Use Qt4:" USE_QT AND DESIRED_QT_VERSION MATCHES 4 THEN "yes" ELSE "no")
status(" \\- Use Qt3:" USE_QT AND DESIRED_QT_VERSION MATCHES 3 THEN "yes" ELSE "no")
status(" Panda3D:" USE_PANDA3D THEN "yes (ver ${Panda3D_VERSION_STRING})" ELSE "no")

status("")
status(" Media I/O: ")
status(" Use JPEG:" USE_JPEG THEN "yes (ver ${JPEG_LIB_VERSION})" ELSE "no")
Expand Down
4 changes: 4 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ ViSP 3.x.x (Version in development)
. New vpImageTools::inRange() functions to ease binary mask computation by thresholding HSV channels
. New tutorials in tutorial/segmentation/color folder to show how to use HSV color segmentation to
extract the corresponding point cloud
. New scene renderer based on Panda3D. See inheritance diagram for vpPanda3DBaseRenderer class and corresponding
tutorial.
- Applications
. Migrate eye-to-hand tutorials in apps
- Tutorials
Expand All @@ -57,6 +59,8 @@ ViSP 3.x.x (Version in development)
https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-hsv-segmentation-live.html
. New tutorial: Point cloud segmentation using HSV color scale
https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-hsv-segmentation-pcl.html
. New tutorial: Rendering a 3D scene with Panda3D
https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-panda3d.html
- Bug fixed
. [#1251] Bug in vpDisplay::displayFrame()
. [#1270] Build issue around std::clamp and optional header which are not found with cxx17
Expand Down
96 changes: 96 additions & 0 deletions cmake/FindMyPanda3D.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#############################################################################
#
# ViSP, open source Visual Servoing Platform software.
# Copyright (C) 2005 - 2024 by Inria. All rights reserved.
#
# This software is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# See the file LICENSE.txt at the root directory of this source
# distribution for additional information about the GNU GPL.
#
# For using ViSP with software that can not be combined with the GNU
# GPL, please contact Inria about acquiring a ViSP Professional
# Edition License.
#
# See https://visp.inria.fr for more information.
#
# This software was developed at:
# Inria Rennes - Bretagne Atlantique
# Campus Universitaire de Beaulieu
# 35042 Rennes Cedex
# France
#
# If you have questions regarding the use of this file, please contact
# Inria at visp@inria.fr
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# Description:
# Try to find OpenCV framework.
#
# Panda3D_FOUND
# Panda3D_INCLUDE_DIRS
# Panda3D_LIBRARIES
#
#############################################################################

set(PANDA3D_INCLUDE_SEARCH_PATHS
$ENV{Panda3D_DIR}/include
$ENV{Panda3D_DIR}/built/include
${Panda3D_DIR}/include
${Panda3D_DIR}/built/include
/usr/include/panda3d
/usr/local/include/panda3d
/Library/Developer/Panda3D/include
)

set(PANDA3D_LIBRARIES_SEARCH_PATHS
$ENV{Panda3D_DIR}/lib
$ENV{Panda3D_DIR}/built/lib
$ENV{Panda3D_DIR}/bin
${Panda3D_DIR}/lib
${Panda3D_DIR}/built/lib
${Panda3D_DIR}/bin
/usr/lib/panda3d
/usr/local/lib/panda3d
/usr/lib/x86_64-linux-gnu/panda3d
/Library/Developer/Panda3D/lib
)

set(PANDA3D_LIBS
panda p3framework pandaexpress
p3dtoolconfig p3dtool p3direct
#pandaegg
#p3ffmpeg p3interrogatedb p3tinydisplay p3vision
#pandaai pandafx pandaphysics pandaskel
)

# Fetch all libraries
set(Panda3D_LIBRARIES "")
set(ALL_LIBS_FOUND TRUE)
foreach(lib_name ${PANDA3D_LIBS})
find_library(Panda3D_${lib_name}_LIBRARY NAMES "lib${lib_name}" ${lib_name} PATHS ${PANDA3D_LIBRARIES_SEARCH_PATHS})
if(NOT Panda3D_${lib_name}_LIBRARY)
set(ALL_LIBS_FOUND FALSE)
else()
list(APPEND Panda3D_LIBRARIES ${Panda3D_${lib_name}_LIBRARY})
endif()

mark_as_advanced(Panda3D_${lib_name}_LIBRARY)
endforeach()

find_path(Panda3D_INCLUDE_DIRS panda.h PATHS ${PANDA3D_INCLUDE_SEARCH_PATHS})
message(${Panda3D_INCLUDE_DIRS})
include(FindPackageHandleStandardArgs)
# Handle the QUIETLY and REQUIRED arguments and set the Panda3D_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(Panda3D DEFAULT_MSG ALL_LIBS_FOUND Panda3D_INCLUDE_DIRS)

if(Panda3D_FOUND)
vp_parse_header2(Panda3D "${Panda3D_INCLUDE_DIRS}/pandaVersion.h" PANDA_VERSION_STR)
endif()

mark_as_advanced(Panda3D_INCLUDE_DIRS)
1 change: 1 addition & 0 deletions cmake/templates/VISPConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ set(VISP_HAVE_OPENCV_NONFREE "@VISP_HAVE_OPENCV_NONFREE@")
set(VISP_HAVE_OPENCV_VERSION "@VISP_HAVE_OPENCV_VERSION@")
set(VISP_HAVE_OPENGL "@VISP_HAVE_OPENGL@")
set(VISP_HAVE_OPENMP "@VISP_HAVE_OPENMP@")
set(VISP_HAVE_PANDA3D "@VISP_HAVE_PANDA3D@")
set(VISP_HAVE_PARPORT "@VISP_HAVE_PARPORT@")
set(VISP_HAVE_PCL "@VISP_HAVE_PCL@")
set(VISP_HAVE_PIONEER "@VISP_HAVE_PIONEER@")
Expand Down
3 changes: 3 additions & 0 deletions cmake/templates/vpConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ namespace vp = VISP_NAMESPACE_NAME;
// Defined if OpenGL library available.
#cmakedefine VISP_HAVE_OPENGL

// Defined if Panda3D is available
#cmakedefine VISP_HAVE_PANDA3D

// Defined if Qt library available (either Qt-3 or Qt-4).
#cmakedefine VISP_HAVE_QT

Expand Down
1 change: 1 addition & 0 deletions doc/config-doxygen.in
Original file line number Diff line number Diff line change
Expand Up @@ -2411,6 +2411,7 @@ PREDEFINED = @DOXYGEN_SHOULD_SKIP_THIS@ \
HAVE_OPENCV_VIDEO \
HAVE_OPENCV_VIDEOIO \
VISP_HAVE_OPENGL \
VISP_HAVE_PANDA3D \
VISP_HAVE_PARPORT \
VISP_HAVE_PCL \
VISP_HAVE_PIONEER \
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions doc/mainpage.dox.in
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,27 @@ in different ways. This will motivate us to continue the efforts.
\defgroup group_ar_renderer Renderer
Renderer interfaces.
*/
/*!
\ingroup group_ar_renderer
\defgroup group_ar_renderer_panda3d Panda3D Renderer
Modular renderers based on the Panda3D framework.
*/
/*!
\ingroup group_ar_renderer_panda3d
\defgroup group_ar_renderer_panda3d_3d 3D scene renderers
Classes that render a 3D scene.
*/
/*!
\ingroup group_ar_renderer_panda3d
\defgroup group_ar_renderer_panda3d_filters Image processing
Shader-based image processing and filtering.
*/
/*!
\ingroup group_ar_renderer_panda3d
\defgroup group_ar_renderer_panda3d_lighting Lighting related classes
Light and Lightable implementations.
*/

/*!
\ingroup module_ar
\defgroup group_ar_simulator Simulator
Expand Down
Loading

0 comments on commit f217431

Please sign in to comment.