I’m trying to use the JuliaRobotics ecosystem with UR robotic arms and can not find a way to open the official URDF-s. My problem is, that .dae files are not supported, and if I convert those files to .obj, then the model is placed wrongly into the scene:
My question is that, is there a way to load these “original files” without modification? Or I have to modify/build my own URDF-s? I decided to post this question, because that’s the first time I use this format, so I’m not confident with it (yet).
Unfortunately, MeshIO.jl doesn’t support native loading of .dae files yet (see More formats · Issue #11 · JuliaIO/MeshIO.jl · GitHub), so conversion to .obj is necessary for now. MechanismGeometries.jl does automatically replace the .dae extension with .obj though, so you shouldn’t have to edit the URDF, but it prints a warning. If you want to get rid of that warning, you could do
using Logging # from stdlib
with_logger(ConsoleLogger(stderr, Base.CoreLogging.Error)) do
# load the URDF
end
In addition to what Twan said, I do have an experimental branch of MeshIO that adds .dae file support, and you’re welcome to try it out. You can add my branch with: pkg> add https://github.com/rdeits/MeshIO.jl#rd/dae-support .
Since this branch is still experimental, you’ll also need to tell FileIO that the .dae format exists and that MeshIO can handle it:
I’d be really curious to hear if that works well enough to load your UR10 model. If not, we can either try to fix the .dae loader or figure out what went wrong with your conversion to .obj.
$ cd universal_robot/ur_description/urdf
$ xacro --inorder u10_robot.urdf.xacro > ur10_original.urdf
(I have a feeling that is not the way that it should be done, but does the trick. Probably I should use ROS’s package environment variable or something like that.)
For converting the files, I used the first online tool I found: meshconvert.com. I know it’s not an ideal solution, I will definitely will check MeshLab!
I assume that this converter hacked the coordinate frames which caused my issue.
(I will check later your other responses too!)
I couldn’t get it working. Maybe it’s the issue with the LightXML dependency.
I got the “same” warning as before:
┌ Warning: Could not find the mesh file: package://ur_description/meshes/ur10/visual/wrist2.obj. I t
ried substituting the following folders for the 'package://' prefix: ["C:\\Users\\cstamas\\Documents
\\SZTAKI\\juhulia\\Julia-Mesh-Test"]. Note that I replaced the file's original extension with .obj t
o try to find a mesh in a format I can actually load.
If it’s not problem I wouldn’t go into debugging this on my installation as @tkoolen merged the “issue” into one repo.
To be clear, the repo I created is set up for debugging the native .dae file support (not working yet), not for loading the .objs.
Does the file C:\Users\cstamas\Documents\SZTAKI\juhulia\Julia-Mesh-Test\ur_description\meshes\ur10\visual\wrist2.obj exist?
You may have to use the package_path keyword argument for URDFVisuals (see GitHub - JuliaRobotics/MechanismGeometries.jl: Parsing and generation of 3D geometries for robot mechanisms in Julia), which defaults to ros_package_path() = split(get(ENV, "ROS_PACKAGE_PATH", ""), ':') (an empty string array if the ROS_PACKAGE_PATH environment variable isn’t set). But then again you were apparently able to load meshes (even if they weren’t the right ones) before, so not sure what’s going wrong now.
Ah, I thought you meant the .obj route wasn’t working.
Thanks, and glad to hear! I hope we can get the native .dae support working soonish. I’m afraid I’m stretched a little thin, so for anybody watching this thread, this would be a great way to contribute.