On my computer, it takes about 600ms to load a urdf using URDFpy. This can be cumbersome when I want to load a robot object and do some quick fk within a function. The main bottleneck is the mesh loading.
This PR adds a flag to the URDF.load function which allows for lazy mesh loading. If set to true, the meshes will only be loaded when they are required (e.g. when calling visual_trimesh_fk). If they are never required, they will never be loaded.
With lazy loading on, it takes ~6ms to load the same URDF (vs the 600 described above).
On my computer, it takes about 600ms to load a urdf using URDFpy. This can be cumbersome when I want to load a robot object and do some quick fk within a function. The main bottleneck is the mesh loading.
This PR adds a flag to the
URDF.load
function which allows for lazy mesh loading. If set to true, the meshes will only be loaded when they are required (e.g. when callingvisual_trimesh_fk
). If they are never required, they will never be loaded.With lazy loading on, it takes ~6ms to load the same URDF (vs the 600 described above).