Open lgzid opened 8 months ago
rl::mdl::UrdfFactory
only extracts kinematic data from a URDF file, for the geometry part you can take a look at rl::sg::UrdfFactory
. This class is able to extract meshes from STL file as long as SoSTLFileKit
is available, however filenames have to be absolute or relative paths instead of the package://
style. It does not have an API for extracting the filenames, but you could modify it accordingly for your needs or adapt the related XPath queries in your own program.
https://github.com/roboticslibrary/rl/blob/c2f8621da5625ad9f0e8c3148f888f1f53887610/src/rl/sg/UrdfFactory.cpp#L380-L395
I hope to use RL to obtain the path of the STL file corresponding to each link. How can I achieve this? Here is my code, and I hope to add a segment of code to implement the above functionality.
URDF file:
I wish to obtain the information like:
package://ur_description/meshes/ur5/collision/base.stl
MY CODE: