point cloud 2 in browser

asked 2020-06-07 14:12:30 -0500

roua gravatar image

I want to display point cloud 2 topic in the browser. This is what I wrote so far but It's not working! I get a black square with x,y,z arrows. Any ideas why ?

< html> < head> < meta charset="utf-8" />

< script type="text/javascript" src="http://static.robotwebtools.org/...> < script type="text/javascript" src="http://static.robotwebtools.org/...> < script type="text/javascript" src="http://static.robotwebtools.org/...> < script type="text/javascript" src="http://static.robotwebtools.org/...> <script type="text/javascript"></script>

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

var viewer = new ROS3D.Viewer({
 divID : 'webViewer',
  width : 800,
  height : 600,
  antialias : true
});

var cloudclient = new ROS3D.PointCloud2({ ros: ros, tfClient: tfClient, topic: '/camera/points', rootObject : viewer.scene }); }

var tfClient = new ROSLIB.TFClient({
  ros : ros,
  angularThres : 0.01,
  transThres : 0.01,
  rate : 10.0
});

<body onload="init()"> < h1>Simple pointcloud Example < div id="webViewer"> < /body> < /html>

edit retag flag offensive close merge delete