Skip to content

Commit

Permalink
workaround for moveit/moveit#86 (moveit#581)
Browse files Browse the repository at this point in the history
* workaround for moveit/moveit#86

* leave original comment

* add more comment when failed to import pyassimp
  • Loading branch information
k-okada authored and v4hn committed Aug 19, 2017
1 parent 692488c commit f00addf
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@
from pyassimp import pyassimp
except:
# support pyassimp > 3.0
import pyassimp
try:
import pyassimp
except:
pyassimp = False
print("Failed to import pyassimp, see https://github.com/ros-planning/moveit/issues/86 for more info")

# This is going to have more functionality; (feel free to add some!)
# This class will include simple Python code for publishing messages for a planning scene
Expand Down Expand Up @@ -92,6 +96,8 @@ def __make_box(self, name, pose, size):

def __make_mesh(self, name, pose, filename, scale = (1, 1, 1)):
co = CollisionObject()
if pyassimp is False:
raise MoveItCommanderException("Pyassimp needs patch https://launchpadlibrarian.net/319496602/patchPyassim.txt")
scene = pyassimp.load(filename)
if not scene.meshes or len(scene.meshes) == 0:
raise MoveItCommanderException("There are no meshes in the file")
Expand Down

0 comments on commit f00addf

Please sign in to comment.