Acquire point clouds of specific objects in the scene in order to save or stream them.
git clone https://github.com/fbottarel/point-cloud-read.git
cd point-cloud-read
mkdir build && cd build
cmake [-DUSE_PCL=ON] ../
make install
The user might want to use this module when they want to acquire point clouds of objects currently in the scene in front of the robot. point-cloud-read
takes care of interfacing with the modules in IOL to determine whether the queried object is in the scene, where it is, and retrieve the point cloud from the robot's stereo vision system.
Once the module is running and connected (the code is comprehensive of a .xml application file for yarpmanager
) it can be interacted with using the ports it opens:
/pointCloudRead/rpc
exposes an rpc interface to trigger acquisitions. See below for details/pointCloudRead/pointCloud:o
is ayarp::os::BufferedPort
where the module publishes the acquired point clouds as<yarp::sig::PointCloud<yarp::sig::DataXYZRGBA>>
Typing help
as rpc command returns a list of available commands, here briefly listed.
set_period periodInSeconds
sets the streaming period toperiodInSeconds
seconds. DefaultperiodInSeconds
is 1.0stream_start objectName
starts the point cloud stream of an object recognized asobjectName
in the scene with periodperiodInSeconds
. Empty point clouds are streamed if noobjectName
is found in the scenestream_stop
stops the point cloud streamstream_one objectName
triggers a one-shot acquisition and streaming. If noobjectName
is found in the scene, the command failsdump_one objectName format
commands the module to acquire a point cloud and dump it to a file in the.off
or.pcd
format. The resulting file will beobjectName_point_cloud_XXX.[off|pcd]
, whereXXX
is a zero-filled number that increases when more point clouds of the same object are dumped. Such file is easily readable with programs such as MeshLab. Note: the.pcd
format is available only if the support toPCL
is enabled.get_point_cloud objectName
returns ayarp::os::Bottle
containing the point cloud of the required object as ayarp::sig::PointCloud<yarp::sig::DataXYZRGBA>
.