jonnymaserati / welleng

A collection of Wells/Drilling Engineering tools, focused on well trajectory planning for the time being.
Apache License 2.0
113 stars 31 forks source link

Quick Start example doesn't work ,fcl.DistanceRequest __init__() got an unexpected keyword argument 'enable_signed_distance' #141

Closed Jaapin closed 1 year ago

Jaapin commented 1 year ago
508 
509         # Collide with manager's objects

--> 510 ddata = fcl.DistanceData(fcl.DistanceRequest(enable_signed_distance=True)) 511 if return_data: 512 ddata = fcl.DistanceData(

TypeError: init() got an unexpected keyword argument 'enable_signed_distance'

jonnymaserati commented 1 year ago

Hi @Jaapin

I just tried the example in colab with the current published package v0.5.1 and it runs the mesh calculations without error, but the results look off so I'll need to take a closer look. I think the fcl library may have updated since I wrote the code.

I think the code you're referencing is actually from the trimesh library?

If I look at the python-fcl library then there was a change made 4 months ago that added the enable_signed_distance param. it seems you might be running an older version of python-fcl with a newer version of trimesh? Maybe try upgrading the dependencies or starting a fresh python 3.10 env with the latest versions?

I've not been very disciplined with locking dependency versions with welleng versions so can see how this might have occurred - something for me to improve on going forwards.

Can you give me some info on what version and environment you're running?

Jaapin commented 1 year ago

Hi,@jonnymaserati Thanks for you answer,i was run the quick start example with python:3.9 trimesh :3.15.5 python-fcl:0.7.0.1

Jaapin commented 1 year ago

I compile fcl in this link, trimesh was installed by command pip install welleng[easy]

Jaapin commented 1 year ago

@jonnymaserati tank you ,i solve this problem by compile fcl in this link

jonnymaserati commented 1 year ago

Perfect, thanks @Jaapin. I'll see if the installation instructions should be updated with the link.

Indeed, if you pip install welleng[easy] then not all the dependencies get installed... the mesh clearance needs fcl installing manually. Need to follow the Advanced Installation instructions for the mesh calculations.