ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I have created this function to delete PointCloud2
removeObject3D(object3D) {
if (this.viewer === undefined)
return -1;
if (object3D.points.object === undefined)
return 2;
let parentScene = object3D.points.object.parent;
//this.viewer.scene.remove(parentScene);
this.viewer.scene.children = this.viewer.scene.children.filter(function(value, index, arr){
return value.uuid !== parentScene.uuid;
});
return 1;
}
It is working by searching for the scene that his the parent of the PointCloud2 object then we remove this scene from the main scene's childs.