You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
URDF files tend to use a "package:/" keyword in file names to indicate that the path is relative to the current package directory. This is tied into ROS's catkin packaging system.
Currently, DART's urdf parsing utility does not support any files that use this method for describing file names. Presumably the "best" way to handle the "package:/" keyword would be to do whatever ROS does to resolve package names. However, I have no idea what exactly that would entail. I would guess it might require a ROS master to be running or to attempt to parse the user's filesystem for a package.xml and try to figure out packaging information by reading those metafiles. Whatever the case, it's currently a mystery and probably not worth solving at the moment.
As a stopgap solution, I've added a function to the dart::utils::DartLoader for URDFs that allows the user to manually specify the package directory path. If the "package:/" keyword is found in a filename, it will be replaced with the user-specified directory path. Otherwise, it will behave as it used to. If a URDF uses the "package:/" keyword but the user has not specified a package directory, a warning will be printed (and the program will most likely segfault).
The commit with these changes is available here: 9900053
Also note that this commit will print out a warning if assimp failed to load a file. Previous behavior was to simply segfault with no indication of why.
I tested the operationalSpaceControl app with this commit (because it uses URDFs), and it is still loading URDFs without a problem.
The text was updated successfully, but these errors were encountered:
URDF files tend to use a "package:/" keyword in file names to indicate that the path is relative to the current package directory. This is tied into ROS's catkin packaging system.
Currently, DART's urdf parsing utility does not support any files that use this method for describing file names. Presumably the "best" way to handle the "package:/" keyword would be to do whatever ROS does to resolve package names. However, I have no idea what exactly that would entail. I would guess it might require a ROS master to be running or to attempt to parse the user's filesystem for a package.xml and try to figure out packaging information by reading those metafiles. Whatever the case, it's currently a mystery and probably not worth solving at the moment.
As a stopgap solution, I've added a function to the dart::utils::DartLoader for URDFs that allows the user to manually specify the package directory path. If the "package:/" keyword is found in a filename, it will be replaced with the user-specified directory path. Otherwise, it will behave as it used to. If a URDF uses the "package:/" keyword but the user has not specified a package directory, a warning will be printed (and the program will most likely segfault).
The commit with these changes is available here: 9900053
Also note that this commit will print out a warning if assimp failed to load a file. Previous behavior was to simply segfault with no indication of why.
I tested the operationalSpaceControl app with this commit (because it uses URDFs), and it is still loading URDFs without a problem.
The text was updated successfully, but these errors were encountered: