Code Monkey home page Code Monkey logo

Comments (10)

manuel-koch avatar manuel-koch commented on August 21, 2024 1

Thanks for the hint, I patched the installed python code and the assertion is gone :-)
Any plans to do a new release on PyPi for this issue ?

from distance3d.

AlexanderFabisch avatar AlexanderFabisch commented on August 21, 2024 1

Thanks. I will only expose aabb_overlap though. YAGNI.

I've pushed these changes to the master branch and I will now make a new release.

from distance3d.

AlexanderFabisch avatar AlexanderFabisch commented on August 21, 2024 1

... and I just released 0.8.0.

from distance3d.

AlexanderFabisch avatar AlexanderFabisch commented on August 21, 2024

Hi @manuel-koch ,

thanks for reporting. Unfortunately, I don't have any issue in my environment:

  • Python 3.9.13 (conda)
  • distance3d latest master
  • numba 0.57.0
  • numpy 1.23.5

Did you install distance3d via pip or from source code? (I'd suggest to install the latest master branch.)
Could you try numpy 1.23.5?

If all that does not work, could you try to debug this case? What are the values of the variables before this assert is reached, etc.?

from distance3d.

manuel-koch avatar manuel-koch commented on August 21, 2024

I installed distance3d via pip.
Retried with numpy==1.23.5 with same assertion error.

Will try to debug next week...

from distance3d.

AlexanderFabisch avatar AlexanderFabisch commented on August 21, 2024

Please test it with the latest commit from master. It contains this commit:

488db39

I found the assert to be too strict.

from distance3d.

AlexanderFabisch avatar AlexanderFabisch commented on August 21, 2024

I should do it as soon as possible. You can keep the issue open to remind me.

from distance3d.

manuel-koch avatar manuel-koch commented on August 21, 2024

While adapting to the latest commit, I noticed that functionality moved / API changed.

Could you make this aabb check a public method (again) ?

My former code looked like

# collider_a: colliders.ConvexCollider, collider_b: colliders.ConvexCollider
aabb_a: = collider_a.aabb()
aabb_b = collider_b.aabb()
if not aabb_a.overlaps(aabb_b):
    return False

and now I'm using this protected/internal method instead

from distance3d.aabb_tree import _aabb_overlap

# collider_a: colliders.ConvexCollider, collider_b: colliders.ConvexCollider
aabb_a: = collider_a.aabb()
aabb_b = collider_b.aabb()
if not _aabb_overlap(aabb_a, aabb_b):
    return False

from distance3d.

AlexanderFabisch avatar AlexanderFabisch commented on August 21, 2024

Previously, we used an external library for aabbtrees. Now we switched to our own implementation in numba.

@MaartenBehn is there any good reason why we did not make the function public? If not, I think we can just remove the underscore.

from distance3d.

MaartenBehn avatar MaartenBehn commented on August 21, 2024

_aabb_overlap, _sort_aabbs, _merge_aabb, _aabb_volume, _aabb_x_size, _aabb_y_size, _aabb_z_size
are all pure helper function used by the aabb_tree code. They don't have any side effects and could be made public if that is prefered.

from distance3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.