syuntoku14 / fusion2urdf

A Fusion 360 Script to export URDF
MIT License
470 stars 158 forks source link

No longer runs on 2.0.20256 x86_64? #83

Open kadakadak opened 1 week ago

kadakadak commented 1 week ago

Doesn't sound like this is maintained anymore, but on the off chance someone is watching, I believe I've followed the instructions for creating a simple model to export, but when I run the script, nothing happens. No dialogs. No warnings. Not sure how to debug further. If my google translated Japanese is correct, the other person seems to be having a similar problem.

(sorry for the duplicate issue, I some how fat-fingered my return key and created an empty issue)

kadakadak commented 1 week ago

Text Commands window shows:

SCRIPT ERROR

Traceback (most recent call last): File "/Users/local/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Scripts/URDF_Exporter/URDF_Exporter.py", line 7, in from .utils import utils File "/Users/local/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Scripts/URDF_Exporter/utils/utils.py", line 12, in from distutils.dir_util import copy_tree ModuleNotFoundError: No module named 'distutils'

kadakadak commented 1 week ago

Perhaps the distutils copy_tree import needs to be swapped for the one in shutil?

kadakadak commented 1 week ago

index 10f6b1a..925b833 100644
--- a/URDF_Exporter/utils/utils.py
+++ b/URDF_Exporter/utils/utils.py
@@ -9,7 +9,7 @@ import adsk, adsk.core, adsk.fusion
 import os.path, re
 from xml.etree import ElementTree
 from xml.dom import minidom
-from distutils.dir_util import copy_tree
+from shutil import copytree
 import fileinput
 import sys

@@ -149,7 +149,7 @@ def copy_package(save_dir, package_dir):
     except: pass 
     try: os.mkdir(save_dir + '/urdf')
     except: pass 
-    copy_tree(package_dir, save_dir)
+    copytree(package_dir, save_dir, dirs_exist_ok=True)

 def update_cmakelists(save_dir, package_name):
     file_name = save_dir + '/CMakeLists.txt'```
Gautham-Ramkumar03 commented 3 days ago

Doesn't sound like this is maintained anymore, but on the off chance someone is watching, I believe I've followed the instructions for creating a simple model to export, but when I run the script, nothing happens. No dialogs. No warnings. Not sure how to debug further. If my google translated Japanese is correct, the other person seems to be having a similar problem.

(sorry for the duplicate issue, I some how fat-fingered my return key and created an empty issue)

it seems the URDF_Exporter_ros2 fork is also not working, nothing happens it seems like the local libraries like disutils is deprecated is there any solution?