diff --git a/exotica_python/package.xml b/exotica_python/package.xml
index c0b091c72..786500da8 100644
--- a/exotica_python/package.xml
+++ b/exotica_python/package.xml
@@ -20,6 +20,10 @@
python3-pyassimp
python3-tk
python3-rospkg
- python-trimesh-pip
- python3-trimesh-pip
+
+
diff --git a/exotica_python/test/test_mesh.py b/exotica_python/test/test_mesh.py
index f7034d5c4..ea0b155f6 100644
--- a/exotica_python/test/test_mesh.py
+++ b/exotica_python/test/test_mesh.py
@@ -1,18 +1,28 @@
import unittest
import pyexotica as exo
-import trimesh
+
+try:
+ import trimesh
+except ImportError:
+ from nose.plugins.skip import SkipTest
+
+ raise SkipTest("trimesh is not available, skipping related tests.")
+
def validate_mesh(mesh):
print(mesh, mesh.vertex_count, mesh.triangle_count)
assert mesh.vertex_count == 33
assert mesh.triangle_count == 62
+
class TestPythonMeshCreation(unittest.TestCase):
def test_create_mesh_from_resource_package_path(self):
# Load mesh from resource path
print(">>> Loading STL directly from package-path")
- mesh = exo.Mesh.createMeshFromResource("package://exotica_examples/resources/cone.stl")
+ mesh = exo.Mesh.createMeshFromResource(
+ "package://exotica_examples/resources/cone.stl"
+ )
validate_mesh(mesh)
def test_create_mesh_from_resource_exotica_resource_path(self):
@@ -42,5 +52,6 @@ def teset_create_mesh_from_vertices_and_triangles(self):
mesh = exo.Mesh.createMeshFromVertices(m.vertices, m.faces.flatten())
validate_mesh(mesh)
+
if __name__ == "__main__":
unittest.main()