ros3djs icon indicating copy to clipboard operation
ros3djs copied to clipboard

MarkerArrayClient out of memory

Open chenfubiao opened this issue 5 years ago • 4 comments

Call 'MarkerArrayClient' and the memory will keep rising until it runs out of memory.

chenfubiao avatar Jul 20 '20 09:07 chenfubiao

I found the reason,The texture not dispose.

chenfubiao avatar Jul 21 '20 08:07 chenfubiao

@chenfubiao Hi, could you show me how to use MarkerArrayClient? I am trying to use this client to show "trajectory_node_list", but nothing displayed on the viewer

roddc avatar Jul 27 '20 12:07 roddc

@chenfubiao Hi, could you show me how to use MarkerArrayClient? I am trying to use this client to show "trajectory_node_list", but nothing displayed on the viewer

var ros = new ROSLIB.Ros({
   url : 'ws://localhost:9090'
});

var viewer = new ROS3D.Viewer({
  divID : 'viewer',
  width : window.innerWidth,
  height : window.innerHeight,
  antialias : true,
  cameraPose : { 
    x: 0,
    y: 0,
    z: 80
  }
});

// Setup a client to listen to TFs.
var tfClient = new ROSLIB.TFClient({
  ros : ros,
  angularThres : 0.01,
  transThres : 0.01,
  rate : 10.0,
  fixedFrame : '/camera_link'
});

var markers = new ROS3D.MarkerArrayClient({
  ros: ros,
  tfClient: tfClient,
  rootObject: viewer.scene,
  topic: '/your_topic'
});

if you have to install rosbridge_server and tf2_web_republisher

chenfubiao avatar Jul 30 '20 06:07 chenfubiao

Hi @chenfubiao how did you work around with the texture?

haoming29 avatar Jun 15 '22 02:06 haoming29