ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You can create a temporary topic subscription and call the processMessage function of ROS3D.PointCloud2 class.
var tmpSub = new ROS3D.PointCloud2({
ros:ros,
2 | No.2 Revision |
You can create a temporary topic subscription and call the processMessage function of ROS3D.PointCloud2 class.class. In the below code call the displayCloud function with your sensor_msgs::PointCloud2 message.
var viewer = new ROS3D.Viewer({
divID : 'webViewer',
width : 800,
height : 600,
antialias : true,
background : '#111111'
});
var tmpSub = new ROS3D.PointCloud2({
ros:ros,
tfClient: tfClient,
rootObject: viewer.scene,
topic: '/tmp/points',
material: {size: 0.01, color: 0xeeeeee }
});
function displayCloud(msg){
tmpSub.processMessage(msg);
}
3 | No.3 Revision |
You can create a temporary topic subscription and call the processMessage function of ROS3D.PointCloud2 class. In the below code call the displayCloud function with your sensor_msgs::PointCloud2 message.
var viewer = new ROS3D.Viewer({
divID : 'webViewer',
width : 800,
height : 600,
antialias : true,
background : '#111111'
});
var tmpSub = new ROS3D.PointCloud2({
ros:ros,
tfClient: tfClient,
rootObject: viewer.scene,
topic: '/tmp/points',
material: {size: 0.01, color: 0xeeeeee }
});
function displayCloud(msg){
tmpSub.processMessage(msg);
}