March 2018
Intermediate to advanced
1396 pages
42h 14m
English
This section of code creates a URDF client, which is responsible for loading the robot's URDF file. For proper working of the URDF client, we should provide a ROS node object, TF client object, base URL for COLLADA files to load, and the 3D viewer scene object to render the URDF file. To load the meshes into the 3D viewer, we may have to use a mesh loader such as ROS3D.COLLADA_LOADER from Three.js, which is included in the beginning of the code. This loader can retrieve the COLLADA file from the robot_description parameter:
var urdfClient = new ROS3D.UrdfClient({
ros : ros,
tfClient : tfClient,
path : 'http://resources.robotwebtools.org/',
rootObject : viewer.scene,
loader : ROS3D.COLLADA_LOADER
});
After the init() ...