Skip to content

Commit

Permalink
Improve doc and tutorials
Browse files Browse the repository at this point in the history
- fix broken links
- add missing include in tutorial
- change `find_package(PCL ...)` call to search for all components, instead of only two components. This is easier and less error-prone for CMake beginners, who may copy the command without fully understanding it, and later wonder why link errors appear when they use classes from other modules. The tutorial later also shows how to request some components only.
  • Loading branch information
mvieth committed Jun 11, 2023
1 parent 053995b commit 8fb956d
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 23 deletions.
9 changes: 4 additions & 5 deletions doc/tutorials/content/compiling_pcl_posix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,13 @@ The following code libraries are **required** for the compilation and usage of t
+---------------------------------------------------------------+-----------------+-------------------------+-------------------+
| Logo | Library | Minimum version | Mandatory |
+===============================================================+=================+=========================+===================+
| .. image:: images/posix_building_pcl/boost_logo.png | Boost | | 1.40 (without OpenNI) | pcl_* |
| | | | 1.47 (with OpenNI) | |
| .. image:: images/posix_building_pcl/boost_logo.png | Boost | 1.65 | pcl_* |
+---------------------------------------------------------------+-----------------+-------------------------+-------------------+
| .. image:: images/posix_building_pcl/eigen_logo.png | Eigen | 3.0 | pcl_* |
| .. image:: images/posix_building_pcl/eigen_logo.png | Eigen | 3.3 | pcl_* |
+---------------------------------------------------------------+-----------------+-------------------------+-------------------+
| .. image:: images/posix_building_pcl/flann_logo.png | FLANN | 1.7.1 | pcl_* |
| .. image:: images/posix_building_pcl/flann_logo.png | FLANN | 1.9.1 | pcl_* |
+---------------------------------------------------------------+-----------------+-------------------------+-------------------+
| .. image:: images/posix_building_pcl/vtk_logo.png | VTK | 5.6 | pcl_visualization |
| .. image:: images/posix_building_pcl/vtk_logo.png | VTK | 6.2 | pcl_visualization |
+---------------------------------------------------------------+-----------------+-------------------------+-------------------+

Optional
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/content/global_hypothesis_verification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Take a look at the full pipeline:
:lines: 245-374
:emphasize-lines: 6,9

For a full explanation of the above code see `3D Object Recognition based on Correspondence Grouping <http://pointclouds.org/documentation/tutorials/correspondence_grouping.php>`_.
For a full explanation of the above code see `3D Object Recognition based on Correspondence Grouping <https://pcl.readthedocs.io/projects/tutorials/en/master/correspondence_grouping.html>`_.


Model-in-Scene Projection
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/content/moment_of_inertia.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The code
--------

First of all you will need the point cloud for this tutorial.
`This <https://github.com/PointCloudLibrary/data/blob/master/tutorials/min_cut_segmentation_tutorial.pcd>`_ is the one presented on the screenshots.
`This <https://github.com/PointCloudLibrary/data/blob/master/tutorials/lamppost.pcd>`_ is the one presented on the screenshots.
Next what you need to do is to create a file ``moment_of_inertia.cpp`` in any editor you prefer and copy the following code inside of it:

.. literalinclude:: sources/moment_of_inertia/moment_of_inertia.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ The following normal estimation methods are available:
{
COVARIANCE_MATRIX,
AVERAGE_3D_GRADIENT,
AVERAGE_DEPTH_CHANGE
AVERAGE_DEPTH_CHANGE,
SIMPLE_3D_GRADIENT
};
The COVARIANCE_MATRIX mode creates 9 integral images to compute the normal for
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/content/registration_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ keypoints as well. The problem with "feeding two kinect datasets into a correspo
Feature descriptors
===================

Based on the keypoints found we have to extract [features](http://www.pointclouds.org/documentation/tutorials/how_features_work.php), where we assemble the information and generate vectors to compare them with each other. Again there
Based on the keypoints found we have to extract `features <https://pcl.readthedocs.io/projects/tutorials/en/master/how_features_work.html>`_, where we assemble the information and generate vectors to compare them with each other. Again there
is a number of feature options to choose from, for example NARF, FPFH, BRIEF or
SIFT.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <pcl/sample_consensus/model_types.h>
#include <pcl/segmentation/sac_segmentation.h>
#include <pcl/segmentation/extract_clusters.h>

#include <iomanip> // for setw, setfill

int
main ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
int
main (int argc, char** argv)
{
if (argc == 0 || argc % 2 == 0)
if (argc < 5 || argc % 2 == 0) // needs at least one training cloud with class id, plus testing cloud with class id (plus name of executable)
return (-1);

unsigned int number_of_training_clouds = (argc - 3) / 2;
Expand Down
6 changes: 3 additions & 3 deletions doc/tutorials/content/using_pcl_pcl_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CMakeLists.txt that contains:
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(MY_GRAND_PROJECT)
find_package(PCL 1.3 REQUIRED COMPONENTS common io)
find_package(PCL 1.3 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
Expand Down Expand Up @@ -53,7 +53,7 @@ invoking cmake (MY_GRAND_PROJECT_BINARY_DIR).

.. code-block:: cmake
find_package(PCL 1.3 REQUIRED COMPONENTS common io)
find_package(PCL 1.3 REQUIRED)
We are requesting to find the PCL package at minimum version 1.3. We
also say that it is ``REQUIRED`` meaning that cmake will fail
Expand Down Expand Up @@ -204,4 +204,4 @@ before this one:

.. code-block:: cmake
find_package(PCL 1.3 REQUIRED COMPONENTS common io)
find_package(PCL 1.3 REQUIRED)
18 changes: 9 additions & 9 deletions doc/tutorials/content/walkthrough.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Features
**Background**

A theoretical primer explaining how features work in PCL can be found in the `3D Features tutorial
<http://pointclouds.org/documentation/tutorials/how_features_work.php>`_.
<https://pcl.readthedocs.io/projects/tutorials/en/master/how_features_work.html>`_.

The *features* library contains data structures and mechanisms for 3D feature estimation from point cloud data. 3D features are representations at certain 3D points, or positions, in space, which describe geometrical patterns based on the information available around the point. The data space selected around the query point is usually referred to as the *k-neighborhood*.

Expand Down Expand Up @@ -247,7 +247,7 @@ Kd-tree

**Background**

A theoretical primer explaining how Kd-trees work can be found in the `Kd-tree tutorial <http://pointclouds.org/documentation/tutorials/kdtree_search.php#kdtree-search>`_.
A theoretical primer explaining how Kd-trees work can be found in the `Kd-tree tutorial <https://pcl.readthedocs.io/projects/tutorials/en/master/kdtree_search.html>`_.

The *kdtree* library provides the kd-tree data-structure, using `FLANN <http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN>`_, that allows for fast `nearest neighbor searches <https://en.wikipedia.org/wiki/Nearest_neighbor_search>`_.

Expand Down Expand Up @@ -331,7 +331,7 @@ Segmentation

The *segmentation* library contains algorithms for segmenting a point cloud into distinct clusters. These algorithms are best suited for processing a point cloud that is composed of a number of spatially isolated regions. In such cases, clustering is often used to break the cloud down into its constituent parts, which can then be processed independently.

A theoretical primer explaining how clustering methods work can be found in the `cluster extraction tutorial <http://pointclouds.org/documentation/tutorials/cluster_extraction.php#cluster-extraction>`_.
A theoretical primer explaining how clustering methods work can be found in the `cluster extraction tutorial <https://pcl.readthedocs.io/projects/tutorials/en/master/cluster_extraction.html>`_.
The two figures illustrate the results of plane model segmentation (left) and cylinder model segmentation (right).

.. image:: images/plane_model_seg.jpg
Expand Down Expand Up @@ -378,7 +378,7 @@ Sample Consensus

The *sample_consensus* library holds SAmple Consensus (SAC) methods like RANSAC and models like planes and cylinders. These can be combined freely in order to detect specific models and their parameters in point clouds.

A theoretical primer explaining how sample consensus algorithms work can be found in the `Random Sample Consensus tutorial <http://pointclouds.org/documentation/tutorials/random_sample_consensus.php#random-sample-consensus>`_
A theoretical primer explaining how sample consensus algorithms work can be found in the `Random Sample Consensus tutorial <https://pcl.readthedocs.io/projects/tutorials/en/master/random_sample_consensus.html>`_

Some of the models implemented in this library include: lines, planes, cylinders, and spheres. Plane fitting is often applied to the task of detecting common indoor surfaces, such as walls, floors, and table tops. Other models can be used to detect and segment objects with common geometric structures (e.g., fitting a cylinder model to a mug).

Expand Down Expand Up @@ -505,10 +505,10 @@ I/O

The *io* library contains classes and functions for reading and writing point cloud data (PCD) files, as well as capturing point clouds from a variety of sensing devices. An introduction to some of these capabilities can be found in the following tutorials:

* `The PCD (Point Cloud Data) file format <http://pointclouds.org/documentation/tutorials/pcd_file_format.php#pcd-file-format>`_
* `Reading PointCloud data from PCD files <http://pointclouds.org/documentation/tutorials/reading_pcd.php#reading-pcd>`_
* `Writing PointCloud data to PCD files <http://pointclouds.org/documentation/tutorials/writing_pcd.php#writing-pcd>`_
* `The OpenNI Grabber Framework in PCL <http://pointclouds.org/documentation/tutorials/openni_grabber.php#openni-grabber>`_
* `The PCD (Point Cloud Data) file format <https://pcl.readthedocs.io/projects/tutorials/en/master/pcd_file_format.html>`_
* `Reading PointCloud data from PCD files <https://pcl.readthedocs.io/projects/tutorials/en/master/reading_pcd.html>`_
* `Writing PointCloud data to PCD files <https://pcl.readthedocs.io/projects/tutorials/en/master/writing_pcd.html>`_
* `The OpenNI Grabber Framework in PCL <https://pcl.readthedocs.io/projects/tutorials/en/master/openni_grabber.html>`_


|
Expand Down Expand Up @@ -682,7 +682,7 @@ Binaries
This section provides a quick reference for some of the common tools in PCL.


* ``pcl_viewer``: a quick way for visualizing PCD (Point Cloud Data) files. More information about PCD files can be found in the `PCD file format tutorial <http://pointclouds.org/documentation/tutorials/pcd_file_format.php>`_.
* ``pcl_viewer``: a quick way for visualizing PCD (Point Cloud Data) files. More information about PCD files can be found in the `PCD file format tutorial <https://pcl.readthedocs.io/projects/tutorials/en/master/pcd_file_format.html>`_.

**Syntax is: pcl_viewer <file_name 1..N>.<pcd or vtk> <options>**, where options are:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ namespace pcl
* The description can be found in the article:
* "Min-Cut Based Segmentation of Point Clouds"
* \author: Aleksey Golovinskiy and Thomas Funkhouser.
* \ingroup segmentation
*/
template <typename PointT>
class PCL_EXPORTS MinCutSegmentation : public pcl::PCLBase<PointT>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ namespace pcl
* See OrganizedMultiPlaneSegmentation for an example application.
*
* \author Alex Trevor, Suat Gedikli
* \ingroup segmentation
*/
template <typename PointT, typename PointLT>
class OrganizedConnectedComponentSegmentation : public PCLBase<PointT>
Expand Down

0 comments on commit 8fb956d

Please sign in to comment.