humanoid-path-planner / hpp-fcl

An extension of the Flexible Collision Library
Other
272 stars 80 forks source link

Python bindings for `hppfcl.Contact` do not include nearest points attributes or methods #587

Closed sea-bass closed 1 month ago

sea-bass commented 1 month ago

I just loaded up the latest version of the Python bindings (version 2.4.4) and tried this out:

import hppfcl
c = hppfcl.Contact()
c.getNearestPoint1()

which yields:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Contact' object has no attribute 'getNearestPoint1'

Indeed, the nearest_points attribute and the getNearestPoint1() and getNearestPoint2() methods are not present in this class.

This is odd because the bindings do point at this: https://github.com/humanoid-path-planner/hpp-fcl/blob/devel/python/collision.cc#L188-L195

Also, the Python example in this repo's README shows the existence of these methods.

Conversely, DistanceResult works totally fine:

d = hppfcl.DistanceResult()
d.getNearestPoint1()
array([nan, nan, nan])

Any idea what may be going on?

sea-bass commented 1 month ago

ah, I see! The devel branch has this, but not the master branch from which the releases seem to be cut?

https://github.com/humanoid-path-planner/hpp-fcl/blob/master/python/collision.cc

lmontaut commented 1 month ago

Hi @sea-bass, The plan is to release the devel branch into a new version of hpp-fcl (version 3). We have just released Pinocchio 3, so we'll tackle hpp-fcl 3 soon!

sea-bass commented 1 month ago

Perfect, thanks @lmontaut -- will stay posted for these releases and upgrade when the time comes.