Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include new renderer based on Panda3D #1388

Merged
merged 67 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
a30f2bc
start panda3D cmake and integration
SamFlt Apr 16, 2024
5084153
Initial version of the Panda3D find cmake
SamFlt Apr 16, 2024
8a63d3e
Add VISP_HAVE_PANDA3D_FLAG
SamFlt Apr 16, 2024
ddb7f8e
Creating base panda3d classes, along with simple tutorial
SamFlt Apr 16, 2024
195105f
Basic rendering
SamFlt Apr 16, 2024
cb30042
working on RendererSet
SamFlt Apr 17, 2024
740203d
debugging lens projection matrix
SamFlt Apr 17, 2024
8e48284
normal and depth render working
SamFlt Apr 17, 2024
1201841
Normal rendering, workin on RGB rendering
SamFlt Apr 18, 2024
93280c1
Debugging RGB renderer
SamFlt Apr 18, 2024
49af00a
working rgb renderer
SamFlt Apr 18, 2024
968d252
Testing Camera space normals
SamFlt Apr 19, 2024
f21fd2f
Display all potential renders in tutorial, improve assert guards, man…
SamFlt Apr 19, 2024
64b3f6e
fix color ordering
SamFlt Apr 19, 2024
dcbe0b2
Disable auto_shader
SamFlt Apr 19, 2024
a37defc
Copy data folder
fspindle Apr 22, 2024
351ebd3
Better display positionning and click to quit
fspindle Apr 22, 2024
c5ed022
Improve Panda3d detection and version retrieval
fspindle Apr 22, 2024
0cc3133
Introduce copyright and remove empty lines
fspindle Apr 22, 2024
c66fc3b
Fix doxygen warnings
fspindle Apr 22, 2024
6e6895d
Improve warnings filter in cmake, fix depth and normal shaders to use…
SamFlt Apr 22, 2024
e24e134
Use ViSP frame for object and camera positioning instead of Panda3D f…
SamFlt Apr 22, 2024
fd89ed9
add small model, add argument parsing
SamFlt Apr 22, 2024
858afb6
document using ViSP convention for setting and retrieving object and …
SamFlt Apr 22, 2024
984c775
Working on adding resizable buffers
SamFlt Apr 22, 2024
ca6b537
Add step by step option
SamFlt Apr 22, 2024
1d88517
Add an interface to add lights to the scene
SamFlt Apr 23, 2024
7bb7029
fix argument parsing for model name
SamFlt Apr 23, 2024
4c7295c
Update tutorial model
SamFlt Apr 23, 2024
5f8113b
Debugging color rendering with different formats
SamFlt Apr 23, 2024
c3edefe
Add path to detect Panda from .dmg installation
fspindle Apr 23, 2024
8a7b365
Mute warning with Panda 1.10.14 SDK on macOS
fspindle Apr 23, 2024
c84a1e6
Fix build on macOS
fspindle Apr 23, 2024
83a6723
Fix segfault when -model option is not used (meaning default model is…
fspindle Apr 23, 2024
0612dca
debug light positioning, add failsafes on buffer setup
SamFlt Apr 23, 2024
0089620
Add another check on texture size when converting to vpImage
SamFlt Apr 23, 2024
d61af18
Add texture information debug print, Try and reparse uint texture dat…
SamFlt Apr 24, 2024
1953020
Add debug logging on panda/gl side
SamFlt Apr 24, 2024
186cf90
revert shaders to version 120
SamFlt Apr 24, 2024
e5fb416
Debugging on macos x86, some issues with p3d attribs
SamFlt Apr 24, 2024
6afe3ec
switch shaders to 330
SamFlt Apr 24, 2024
0caeea8
Enable build on windows
SamFlt Apr 24, 2024
34bf478
Improve usability
SamFlt Apr 25, 2024
36713ca
Remove cmake debug message that brings an issue on macOS
fspindle Apr 25, 2024
d16a322
Start work on RGB shader
SamFlt Apr 26, 2024
69a8f78
cook torrance seems to be working
SamFlt Apr 27, 2024
99916e0
more work on cook torrance model, weighting diffuse and specular terms
SamFlt Apr 29, 2024
1f55836
Fix cook torrance model, Add light contrib map example in tutorial
SamFlt Apr 29, 2024
0cb2f04
fix light contrib conversion
SamFlt Apr 29, 2024
ebfbdc8
Support for basic filters on output textures
SamFlt Apr 29, 2024
2e68182
fix texture rendering
SamFlt Apr 30, 2024
a066aa3
Add some documentation, grouping panda3D related classes
SamFlt May 2, 2024
be943e8
Add canny and gaussian blur filters
SamFlt May 3, 2024
52e571c
Merge branch 'feat_panda3d' of github.com:SamFlt/visp into feat_panda3d
SamFlt May 3, 2024
4f84919
Fix canny display, directional lighting, documentation and class goru…
SamFlt May 3, 2024
2971eb2
fix texture inversion
SamFlt May 3, 2024
5f6db92
change camera normal frame to be more coherent, update tutorial model
SamFlt May 3, 2024
626ed6a
setup tutorial
SamFlt May 3, 2024
a961249
Added ability to set backgorund image for RGB renderer
SamFlt May 24, 2024
5a143d3
Rename WORLD_NORMALS to OBJECT_NORMALS
SamFlt May 24, 2024
a6ff73a
resolve conflict
SamFlt May 24, 2024
29b667f
Merge branch 'master' into feat_panda3d
fspindle Jun 11, 2024
2468231
Improve Panda3D based rendered doxygen tutorial
fspindle Jun 11, 2024
f982611
Code indentation
fspindle Jun 11, 2024
a55bdbf
Various fixes
fspindle Jun 11, 2024
f287e3f
Fix build when ENABLE_VISP_NAMESPACE is turned ON
fspindle Jun 11, 2024
06791ed
Update with Panda3D changes
fspindle Jun 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading