How to remove the existing point cloud from viewer created using ros3djs
I have multiple sub-clouds created after processing the parent cloud. The sub-clouds are being sent over the topics to be displayed on the 3D viewer in a browser using ros3djs, roslibjs. Since, the number of sub-clouds keeps varying i'll have to remove few clouds after unsubscription of topics.There is no function/option to remove an existing cloud from the viewer after unsubscription. Does anyone know how to do it?
I've tried the option of clearing all the objects in the viewer using "viewer.scene.children = [];" but it also removes other things like the co-ordinate frame, markers which i would like to retain.