Closed DDman1984 closed 1 year ago
Have you read the documentation? It shows very specifically how to use the onComplete callback and add it to the scene:
import { LoadingManager } from 'three';
import URDFLoader from 'urdf-loader';
// ...init three.js scene...
const manager = new LoadingManager();
const loader = new URDFLoader( manager );
loader.packages = {
packageName : './package/dir/' // The equivalent of a (list of) ROS package(s):// directory
};
loader.load(
'T12/urdf/T12.URDF', // The path to the URDF within the package OR absolute
robot => {
// The robot is loaded!
scene.add( robot );
}
);
hi, I have a urdf and it describe the mtl and obj link relative, I can load the urdf and obj and mtl by below, but how to add this on scene?
Loading the robot object directly on the scene doesn't show anything.
Should I wait for all obj downloads to complete?
How to use onComplete callback?
I try to cache each obj and display them, but their positions are displayed abnormally. How do I make them display based on each link position parameter of urdf?
` const loadArm = async () => { const manager = new LoadingManager(); const loader = new URDFLoader(manager);
`