Rhoban / onshape-to-robot

Converting OnShape assembly to robot definition (SDF or URDF) through OnShape API
MIT License
237 stars 55 forks source link

onshape-to-robot #120

Closed dioufbb closed 4 months ago

dioufbb commented 5 months ago

hello i'm tryna to create a my robot urdf but i have as output this Traceback (most recent call last): File "/usr/local/bin/onshape-to-robot", line 8, in sys.exit(onshape_to_robot.main()) File "/usr/local/lib/python3.10/dist-packages/onshape_to_robot/onshape_to_robot.py", line 246, in main buildRobot(tree, np.matrix(np.identity(4))) File "/usr/local/lib/python3.10/dist-packages/onshape_to_robot/onshape_to_robot.py", line 206, in buildRobot addPart(occurrence, matrix) File "/usr/local/lib/python3.10/dist-packages/onshape_to_robot/onshape_to_robot.py", line 91, in addPart with open(config['outputDirectory']+'/'+stlFile, 'wb') as stream: PermissionError: [Errno 13] Permission denied: 'AGV_Project/part_1.stl' Someone can help me

Gregwar commented 5 months ago

Hello,

From the error message, it looks like you don't have permissions to write a STL file in the output directory

dioufbb commented 5 months ago

And how can I fixe that

dioufbb commented 5 months ago

and i remark something during the onshape to robot installation; i didnt acheive the clonage step ; it doesn't work; did you think it can affect my work I get something like that VirtualBox:~$ git clone git@github.com:Rhoban/onshape-to-robot.git Cloning into 'onshape-to-robot'... git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

Gregwar commented 5 months ago

You don't have to clone it if you installed it with pip

Edit: For your permission problem, what are the output directory permissions?

Gregwar commented 5 months ago

(for example, if you created the output directory and config.json with root user and are running onshape to robot as the user)

dioufbb commented 5 months ago

it work