Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-fcl
Commits
3e759fbf
Verified
Commit
3e759fbf
authored
Nov 16, 2020
by
Justin Carpentier
Browse files
python/octree: add bindings
parent
94569f25
Changes
4
Hide whitespace changes
Inline
Side-by-side
python/CMakeLists.txt
View file @
3e759fbf
...
...
@@ -101,6 +101,10 @@ SET(${LIBRARY_NAME}_SOURCES
gjk.cc
)
IF
(
HPP_FCL_HAS_OCTOMAP
)
LIST
(
APPEND
${
LIBRARY_NAME
}
_SOURCES octree.cc
)
ENDIF
(
HPP_FCL_HAS_OCTOMAP
)
ADD_LIBRARY
(
${
LIBRARY_NAME
}
SHARED
${${
LIBRARY_NAME
}
_SOURCES
}
${${
LIBRARY_NAME
}
_HEADERS
}
)
TARGET_INCLUDE_DIRECTORIES
(
${
LIBRARY_NAME
}
SYSTEM PRIVATE
${
PYTHON_INCLUDE_DIRS
}
)
TARGET_INCLUDE_DIRECTORIES
(
${
LIBRARY_NAME
}
PRIVATE
"
${
CMAKE_SOURCE_DIR
}
/src"
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
...
...
python/fcl.cc
View file @
3e759fbf
...
...
@@ -98,4 +98,7 @@ BOOST_PYTHON_MODULE(hppfcl)
exposeCollisionAPI
();
exposeDistanceAPI
();
exposeGJK
();
#ifdef HPP_FCL_HAS_OCTOMAP
exposeOctree
();
#endif
}
python/fcl.hh
View file @
3e759fbf
...
...
@@ -18,3 +18,7 @@ void exposeCollisionAPI();
void
exposeDistanceAPI
();
void
exposeGJK
();
#ifdef HPP_FCL_HAS_OCTOMAP
void
exposeOctree
();
#endif
python/octree.cc
0 → 100644
View file @
3e759fbf
#include <boost/python.hpp>
#include <hpp/fcl/fwd.hh>
#include <hpp/fcl/octree.h>
#include "fcl.hh"
#ifdef HPP_FCL_HAS_DOXYGEN_AUTODOC
#include "doxygen_autodoc/functions.h"
#endif
#include "../doc/python/doxygen.hh"
#include "../doc/python/doxygen-boost.hh"
void
exposeOctree
()
{
using
namespace
hpp
::
fcl
;
namespace
bp
=
boost
::
python
;
namespace
dv
=
doxygen
::
visitor
;
bp
::
class_
<
OcTree
,
bp
::
bases
<
CollisionGeometry
>
>
(
"OcTree"
,
doxygen
::
class_doc
<
OcTree
>
(),
bp
::
no_init
)
.
def
(
dv
::
init
<
OcTree
,
FCL_REAL
>
())
.
def
(
dv
::
member_func
(
"getTreeDepth"
,
&
OcTree
::
getTreeDepth
))
.
def
(
dv
::
member_func
(
"getOccupancyThres"
,
&
OcTree
::
getOccupancyThres
))
.
def
(
dv
::
member_func
(
"getFreeThres"
,
&
OcTree
::
getFreeThres
))
.
def
(
dv
::
member_func
(
"getDefaultOccupancy"
,
&
OcTree
::
getDefaultOccupancy
))
.
def
(
dv
::
member_func
(
"setCellDefaultOccupancy"
,
&
OcTree
::
setCellDefaultOccupancy
))
.
def
(
dv
::
member_func
(
"setOccupancyThres"
,
&
OcTree
::
setOccupancyThres
))
.
def
(
dv
::
member_func
(
"setFreeThres"
,
&
OcTree
::
setFreeThres
))
.
def
(
dv
::
member_func
(
"getRootBV"
,
&
OcTree
::
getRootBV
))
;
doxygen
::
def
(
"makeOctree"
,
&
makeOctree
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment