Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
coal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coal
coal
Commits
cdb0a72d
Commit
cdb0a72d
authored
5 years ago
by
Joseph Mirabel
Browse files
Options
Downloads
Patches
Plain Diff
[Python] Update bindings with requirements from Pinocchio.
parent
3351029d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
python/collision-geometries.cc
+2
-0
2 additions, 0 deletions
python/collision-geometries.cc
python/collision.cc
+11
-1
11 additions, 1 deletion
python/collision.cc
python/distance.cc
+8
-0
8 additions, 0 deletions
python/distance.cc
with
21 additions
and
1 deletion
python/collision-geometries.cc
+
2
−
0
View file @
cdb0a72d
...
@@ -222,6 +222,8 @@ void exposeCollisionGeometries ()
...
@@ -222,6 +222,8 @@ void exposeCollisionGeometries ()
.
def
(
"computeMomentofInertia"
,
&
CollisionGeometry
::
computeMomentofInertia
)
.
def
(
"computeMomentofInertia"
,
&
CollisionGeometry
::
computeMomentofInertia
)
.
def
(
"computeVolume"
,
&
CollisionGeometry
::
computeVolume
)
.
def
(
"computeVolume"
,
&
CollisionGeometry
::
computeVolume
)
.
def
(
"computeMomentofInertiaRelatedToCOM"
,
&
CollisionGeometry
::
computeMomentofInertiaRelatedToCOM
)
.
def
(
"computeMomentofInertiaRelatedToCOM"
,
&
CollisionGeometry
::
computeMomentofInertiaRelatedToCOM
)
.
def_readwrite
(
"aabb_radius"
,
&
CollisionGeometry
::
aabb_radius
,
"AABB radius"
)
;
;
exposeShapes
();
exposeShapes
();
...
...
This diff is collapsed.
Click to expand it.
python/collision.cc
+
11
−
1
View file @
cdb0a72d
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
// POSSIBILITY OF SUCH DAMAGE.
// POSSIBILITY OF SUCH DAMAGE.
#include
<boost/python.hpp>
#include
<boost/python.hpp>
#include
<boost/python/suite/indexing/vector_indexing_suite.hpp>
#include
"fcl.hh"
#include
"fcl.hh"
...
@@ -65,7 +66,9 @@ void exposeCollisionAPI ()
...
@@ -65,7 +66,9 @@ void exposeCollisionAPI ()
.
def_readwrite
(
"break_distance"
,
&
CollisionRequest
::
break_distance
)
.
def_readwrite
(
"break_distance"
,
&
CollisionRequest
::
break_distance
)
;
;
class_
<
Contact
>
(
"Contact"
,
no_init
)
class_
<
Contact
>
(
"Contact"
,
init
<>
())
//.def(init<CollisionGeometryPtr_t, CollisionGeometryPtr_t, int, int>())
//.def(init<CollisionGeometryPtr_t, CollisionGeometryPtr_t, int, int, Vec3f, Vec3f, FCL_REAL>())
.
def_readonly
(
"o1"
,
&
Contact
::
o1
)
.
def_readonly
(
"o1"
,
&
Contact
::
o1
)
.
def_readonly
(
"o2"
,
&
Contact
::
o2
)
.
def_readonly
(
"o2"
,
&
Contact
::
o2
)
.
def_readwrite
(
"b1"
,
&
Contact
::
b1
)
.
def_readwrite
(
"b1"
,
&
Contact
::
b1
)
...
@@ -76,9 +79,16 @@ void exposeCollisionAPI ()
...
@@ -76,9 +79,16 @@ void exposeCollisionAPI ()
.
def
(
self
==
self
)
.
def
(
self
==
self
)
;
;
class_
<
std
::
vector
<
Contact
>
>
(
"StdVec_Contact"
)
.
def
(
vector_indexing_suite
<
std
::
vector
<
Contact
>
>
())
;
class_
<
CollisionResult
>
(
"CollisionResult"
,
init
<>
())
class_
<
CollisionResult
>
(
"CollisionResult"
,
init
<>
())
.
def
(
"isCollision"
,
&
CollisionResult
::
isCollision
)
.
def
(
"isCollision"
,
&
CollisionResult
::
isCollision
)
.
def
(
"numContacts"
,
&
CollisionResult
::
numContacts
)
.
def
(
"numContacts"
,
&
CollisionResult
::
numContacts
)
.
def
(
"getContact"
,
&
CollisionResult
::
getContact
,
return_value_policy
<
copy_const_reference
>
())
.
def
(
"getContacts"
,
&
CollisionResult
::
getContacts
,
return_internal_reference
<>
())
.
def
(
"addContact"
,
&
CollisionResult
::
addContact
)
.
def
(
"clear"
,
&
CollisionResult
::
clear
)
.
def
(
"clear"
,
&
CollisionResult
::
clear
)
;
;
...
...
This diff is collapsed.
Click to expand it.
python/distance.cc
+
8
−
0
View file @
cdb0a72d
...
@@ -45,6 +45,12 @@ using namespace hpp::fcl;
...
@@ -45,6 +45,12 @@ using namespace hpp::fcl;
using
boost
::
shared_ptr
;
using
boost
::
shared_ptr
;
using
boost
::
noncopyable
;
using
boost
::
noncopyable
;
struct
DistanceRequestWrapper
{
static
Vec3f
getNearestPoint1
(
const
DistanceResult
&
res
)
{
return
res
.
nearest_points
[
0
];
}
static
Vec3f
getNearestPoint2
(
const
DistanceResult
&
res
)
{
return
res
.
nearest_points
[
1
];
}
};
void
exposeDistanceAPI
()
void
exposeDistanceAPI
()
{
{
class_
<
DistanceRequest
>
(
"DistanceRequest"
,
init
<
optional
<
bool
,
FCL_REAL
,
FCL_REAL
>
>
())
class_
<
DistanceRequest
>
(
"DistanceRequest"
,
init
<
optional
<
bool
,
FCL_REAL
,
FCL_REAL
>
>
())
...
@@ -57,6 +63,8 @@ void exposeDistanceAPI ()
...
@@ -57,6 +63,8 @@ void exposeDistanceAPI ()
.
def_readwrite
(
"min_distance"
,
&
DistanceResult
::
min_distance
)
.
def_readwrite
(
"min_distance"
,
&
DistanceResult
::
min_distance
)
.
def_readwrite
(
"normal"
,
&
DistanceResult
::
normal
)
.
def_readwrite
(
"normal"
,
&
DistanceResult
::
normal
)
//.def_readwrite ("nearest_points", &DistanceResult::nearest_points)
//.def_readwrite ("nearest_points", &DistanceResult::nearest_points)
.
def
(
"getNearestPoint1"
,
&
DistanceRequestWrapper
::
getNearestPoint1
)
.
def
(
"getNearestPoint2"
,
&
DistanceRequestWrapper
::
getNearestPoint2
)
.
def_readonly
(
"o1"
,
&
DistanceResult
::
o1
)
.
def_readonly
(
"o1"
,
&
DistanceResult
::
o1
)
.
def_readonly
(
"o2"
,
&
DistanceResult
::
o2
)
.
def_readonly
(
"o2"
,
&
DistanceResult
::
o2
)
.
def_readwrite
(
"b1"
,
&
DistanceResult
::
b1
)
.
def_readwrite
(
"b1"
,
&
DistanceResult
::
b1
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment