I am working on a MATLAB toolbox to build URDF files for robots in an object-oriented fashion. One of the features I am planning to add to the toolbox is to create a reusable component that can be added to a robot definition multiple times as instances with their own set of parameter values.
I would appreciate feedback on this idea. Also, I would like to start a conversation on how we can introduce the idea of reusable components in a typical URDF file.
For some of the complex urdf definitions I am trying out, components would reduce the size of the urdf file by an order of magnitude and make it much more readable as well.
However, the problem with this approach is that the structural information provided in Xacro is lost after the conversion to URDF is performed. And personally, I haven’t seen any tools that would allow editing the robot model directly as Xacro. All robot model editors assume URDF. So if you generate the model from Xacro and do some edits, there is no automated way of getting these edits back to the source Xacro.
If there were some similar structural elements in URDF itself, it would be much easier to do this kind of composition. But as discussed elsewhere recently, the probability of some radical changes to the URDF format is quite low at this moment…
Yes, I have been looking at Xacro and have always felt its syntax is non-intuitive and has a difficult ramp-up for new users. That was the main reason for trying to build a toolkit that takes away some of that pain in having to understand xacro along with the urdf structure.
My end goal is to make a graphical editor that avoids having to edit the urdf file manually and treat urdf files as a final output which can be directly without having to go through an additional step of xacro compilation.
I am also planning to use the in-memory robot counterpart of the loaded urdf as the basis for developing further analytical tools.