-
Notifications
You must be signed in to change notification settings - Fork 621
Closed
Description
I'm trying to run an example from https://trimsh.org/examples/ray.html. I'm using Python 3.7.3 on Raspberry Pi 4 with the newest RPi OS. This snippet:
import numpy as np
import trimesh
mesh = trimesh.creation.icosphere()
ray_origins = np.array([[0, 0, -3], [2, 2, -3]])
ray_directions = np.array([[0, 0, 1], [0, 0, 1]])
locations, index_ray, index_tri = mesh.ray.intersects_location(
ray_origins=ray_origins,
ray_directions=ray_directions)
print('The rays hit the mesh at coordinates:\n', locations)
produces:
Traceback (most recent call last):
File "/home/pi/pick/old/test-trimesh.py", line 10, in <module>
ray_directions=ray_directions)
File "/home/pi/.local/lib/python3.7/site-packages/trimesh/ray/ray_triangle.py", line 107, in intersects_location
**kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/trimesh/ray/ray_triangle.py", line 64, in intersects_id
tree=self.mesh.triangles_tree,
File "/home/pi/.local/lib/python3.7/site-packages/trimesh/caching.py", line 109, in get_cached
value = function(*args, **kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/trimesh/base.py", line 823, in triangles_tree
tree = triangles.bounds_tree(self.triangles)
File "/home/pi/.local/lib/python3.7/site-packages/trimesh/triangles.py", line 344, in bounds_tree
tree = util.bounds_tree(triangle_bounds)
File "/home/pi/.local/lib/python3.7/site-packages/trimesh/util.py", line 1756, in bounds_tree
import rtree
File "/home/pi/.local/lib/python3.7/site-packages/rtree/__init__.py", line 9, in <module>
from .index import Rtree, Index # noqa
File "/home/pi/.local/lib/python3.7/site-packages/rtree/index.py", line 6, in <module>
from . import core
File "/home/pi/.local/lib/python3.7/site-packages/rtree/core.py", line 77, in <module>
rt.Error_GetLastErrorNum.restype = ctypes.c_int
File "/usr/lib/python3.7/ctypes/__init__.py", line 369, in __getattr__
func = self.__getitem__(name)
File "/usr/lib/python3.7/ctypes/__init__.py", line 374, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/bin/python3: undefined symbol: Error_GetLastErrorNum
What is wrong?
Metadata
Metadata
Assignees
Labels
No labels