Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: string is not a file: #18

Open
Simontho001 opened this issue Mar 31, 2021 · 4 comments
Open

ValueError: string is not a file: #18

Simontho001 opened this issue Mar 31, 2021 · 4 comments

Comments

@Simontho001
Copy link

im trying to load in a urdf file into some simple code which is
from urdfpy import URDF robot= URDF.load("C:/Users/(put computer name here)/Desktop/python code/v2 robot arm - Copy/urdf/v2 robot arm - Copy.urdf")

but when i run it i get this error

ValueError: string is not a file: C:/Users/(put computer name here)/Desktop/python code/v2 robot arm - Copy/urdf\package://v2 robot arm - Copy/meshes/base_link.STL
how do i fix this?

@RitchieQi
Copy link

It means the directory of models provided in the .urdf doesn't exist. Check the directory of your mesh files.

@RayYoh
Copy link

RayYoh commented Nov 4, 2021

i have the same error.

@RitchieQi
Copy link

i have the same error.

You could either modify the directory in your .urdf file or change the directory of your robot models.

@cedriclmenard
Copy link

cedriclmenard commented Nov 24, 2021

@RitchieQi this issue seems to arise from using the package:// prefix, which is actually valid URDF description (see: http://wiki.ros.org/urdf/XML/link). Since urdfpy doesn't seem to support the package scheme, removing said prefix from the file path and thus using a relative path could be a possible workaround in urdfpy.

As a side note, see PR #2 for an implemented fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants