ros3djs does not display the laser scan via rosbridge, ros3d.js:21217

  javascript, ros, web

I’m having a problem displaying the laser scan on my browser using ros3djs. here is my code:

 // Create the main viewer.
var viewer = new ROS3D.Viewer({
  divID : 'scan',
  width : 800,
  height : 600,
  background: '#444444',
  antialias : true

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

var scanclient = new ROS3D.LaserScan({
    ros: ros,
    topic: '/scanR',
    tfClient: tfClient,
    rootObject: viewer.scene,
    material: { size: 0.05, color: 0xff00ff }

I’m running the tf2_web_republisher, in Rviz the laser scan can be displayed perfectly. and I’m having this message on the console:

THREE.WebGLRenderer 89 ros3d.js:21217

Source: Ask Javascript Questions