RobotWebTools / ros3djs

3D Visualization Library for use with the ROS JavaScript Libraries
https://robotwebtools.github.io/ros3djs
Other
360 stars 215 forks source link

MarkerArrayClient out of memory #322

Open chenfubiao opened 4 years ago

chenfubiao commented 4 years ago

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

chenfubiao commented 4 years ago

I found the reason,The texture not dispose.

roddc commented 4 years ago

@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

chenfubiao commented 4 years ago

@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

haoming29 commented 2 years ago

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