Skip to content

Latest commit

 

History

History

point_cloud

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Visualization with WebGL (and Three.js) - Point Cloud

This example shows how to visualize 3D point clouds with with yarp.js using the Three.js library (a wrapper for WebGL). (Demo suggested by Pattacini in issue #3).

To set up the demo, follow the setup instructions in here.

The application opens a port /yarpjs/3Dpoints:i where 3D points can be sent and visualized in the browser. You can write to this port by running the command

$> yarp write ... /yarpjs/3Dpoints:i

on a shell. You can then add new points to the scene visualized in the browser by sending a bottle with format

>> (x y z R G B size)

where x y z are the cartesian coordinates of the point, the R G B colour defaults to black, namely (0 0 0) and the point size defaults to 5 pixels. You can send multiple points at the same time by concatenating bottles (e.g. (b1) (b2) ... (bn)). Try it out!

Example of dynamic creation of point cloud

Run the shell command $> node examples/point_cloud/send_point_cloud.js from the directory where you cloned yarp.js. (Thanks to Seanfa for the point cloud data).