Description
From version 2024.0.0, importing URDF and Xacro files will be deprecated (see #815). It is now already possible to import robot strings using the Ros2Supervisor (which uses the importMFNodeFromString
API function).
However, this feature is very limited as PROTOs can't be imported by providing a file path and can't be declared in the robot string without declaring their URLs as IMPORTABLE in the world file.
Implementation blueprint
The new PROTOSpawner
node should replace the current URDFSpawner
. As argument, it should take a list of PROTO URLs to add to the IMPORTABLE list and a node string with a list of URLs. The current robot_string service created by the Ros2Supervisor
should be enhanced to be called with those arguments.
The Ros2Supervisor
(in the service callback) is then responsible to add the URLs to the IMPORTABLE list (using a new API function described in cyberbotics/webots#6316). In the same way as the URDFSpawner
callback, it must update intern URLs and copy PROTO files (if needed) to the correct location in function of the platform (WSL, macOS, Linux).
Finally, the robot string should be imported.
Detailed tasks are given in the open PR #819.