Skip to content

Conversation

@zkingston
Copy link
Contributor

No description provided.

@cohnt
Copy link

cohnt commented Sep 3, 2025

Looks like it has some issues with package paths. Not sure how easy it is to parse those, but it's not hard for a user to make all filepaths relative.

When I run it with relative paths only, it works*, but there seem to be some output issues:

  1. The default filename is spherized.urdf (should be spherized.sdf).
  2. The top level SDF tag has a path element, which shouldn't be present.
  3. Relative filepaths will be broken (again not the end of the world -- can be switched back with package:// syntax)
  4. Each <collision> tag needs a name, and names can't be repeated within a link.
    With these items fixed, I get the following working output:
image

I've also attached a zip file containing the original output and the fixed output.
sdfs.zip

@zkingston
Copy link
Contributor Author

Thanks for checking it out! Addressed everything you said, pulled in this package to resolve paths.

@cohnt
Copy link

cohnt commented Sep 4, 2025

That's great! Thanks for putting this together so quickly.

Like I said, long-term, it would be great if packages could also be resolved. (I've usually seen this done by reading an environment variable like ROS_PACKAGE_PATH.) But with relative filepaths only, everything looks right!

@zkingston
Copy link
Contributor Author

Oh, do the package URIs not work? There should resolution of the URIs now. If it doesn't work, no big deal, add that to the feature list to handle soon.

@cohnt
Copy link

cohnt commented Sep 4, 2025

Looks like paths aren't resolving correctly -- its currently concatenating the path to the sdf file and the path after the package:// bit. The command

resolve-robotics-uri-py --package_dirs $ROS_PACKAGE_PATH package://models/wsg_finray/meshes/one_piece_wide_grasp_finray_finger.obj

outputs

/home/tommy/Documents/programming/work/rlg/analytic-and-optimization-ik/codebase/models/wsg_finray/meshes/one_piece_wide_grasp_finray_finger.obj

which is correct. But when I call

python3 scripts/generate_sphere_sdf.py ~/Downloads/wsg50_110_finray_fingers_box_collision.sdf

I get the error message

FileNotFoundError: resolve-robotics-uri-py: No file corresponding to URI '/home/tommy/Downloads/combining_kinematics/models/wsg_finray/meshes/one_piece_wide_grasp_finray_finger.obj' found

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

Successfully merging this pull request may close these issues.

3 participants