Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved docstrings and error messages #2300

Merged
merged 1 commit into from
May 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/include/pcl/common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ namespace pcl

/** \brief Get the point at maximum distance from a given point and a given pointcloud
* \param cloud the point cloud data message
* \param pivot_pt the point from where to compute the distance
* \param indices the vector of point indices to use from \a cloud
* \param pivot_pt the point from where to compute the distance
* \param max_pt the point in cloud that is the farthest point away from pivot_pt
* \ingroup common
*/
Expand Down
6 changes: 3 additions & 3 deletions common/include/pcl/common/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
namespace pcl
{
/** \brief Get the index of a specified field (i.e., dimension/channel)
* \param[in] cloud the the point cloud message
* \param[in] cloud the point cloud message
* \param[in] field_name the string defining the field name
* \ingroup common
*/
Expand All @@ -66,7 +66,7 @@ namespace pcl
}

/** \brief Get the index of a specified field (i.e., dimension/channel)
* \param[in] cloud the the point cloud message
* \param[in] cloud the point cloud message
* \param[in] field_name the string defining the field name
* \param[out] fields a vector to the original \a PCLPointField vector that the raw PointCloud message contains
* \ingroup common
Expand Down Expand Up @@ -100,7 +100,7 @@ namespace pcl
getFields (std::vector<pcl::PCLPointField> &fields);

/** \brief Get the list of all fields available in a given cloud
* \param[in] cloud the the point cloud message
* \param[in] cloud the point cloud message
* \ingroup common
*/
template <typename PointT> inline std::string
Expand Down
2 changes: 1 addition & 1 deletion common/include/pcl/common/poses_from_matches.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
namespace pcl
{
/**
* \brief calculate 3D transformation based on point correspondencdes
* \brief calculate 3D transformation based on point correspondences
* \author Bastian Steder
* \ingroup common
*/
Expand Down
6 changes: 3 additions & 3 deletions common/include/pcl/correspondence.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
namespace pcl
{
/** \brief Correspondence represents a match between two entities (e.g., points, descriptors, etc). This is
* represesented via the indices of a \a source point and a \a target point, and the distance between them.
* represented via the indices of a \a source point and a \a target point, and the distance between them.
*
* \author Dirk Holz, Radu B. Rusu, Bastian Steder
* \ingroup common
Expand Down Expand Up @@ -104,7 +104,7 @@ namespace pcl
* By default (true), vectors are internally sorted before determining their difference.
* If the order of correspondences in \a correspondences_after is not different (has not been changed)
* from the order in \b correspondences_before this pre-processing step can be disabled
* in order to gain efficiency. In order to disable pre-sorting set \a presorting_requered to false.
* in order to gain efficiency. In order to disable pre-sorting set \a presorting_required to false.
*/
void
getRejectedQueryIndices (const pcl::Correspondences &correspondences_before,
Expand Down Expand Up @@ -134,7 +134,7 @@ namespace pcl

/**
* \brief Representation of a (possible) correspondence between two points (e.g. from feature matching),
* that encode complete 6DOF transoformations.
* that encode complete 6DOF transformations.
* \ingroup common
*/
struct PointCorrespondence6D : public PointCorrespondence3D
Expand Down
6 changes: 3 additions & 3 deletions filters/include/pcl/filters/conditional_removal.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ namespace pcl
* \param op the operator to use when making the comparison
* \param compare_val the constant value to compare the field value too
*/
FieldComparison (std::string field_name, ComparisonOps::CompareOp op, double compare_val);
FieldComparison (const std::string &field_name, ComparisonOps::CompareOp op, double compare_val);

/** \brief Copy constructor.
* \param[in] src the field comparison object to copy into this
Expand Down Expand Up @@ -204,7 +204,7 @@ namespace pcl
* \param op the operator to use when making the comparison
* \param compare_val the constant value to compare the component value too
*/
PackedRGBComparison (std::string component_name, ComparisonOps::CompareOp op, double compare_val);
PackedRGBComparison (const std::string &component_name, ComparisonOps::CompareOp op, double compare_val);

/** \brief Destructor. */
virtual ~PackedRGBComparison () {}
Expand Down Expand Up @@ -251,7 +251,7 @@ namespace pcl
* \param op the operator to use when making the comparison
* \param compare_val the constant value to compare the component value too
*/
PackedHSIComparison (std::string component_name, ComparisonOps::CompareOp op, double compare_val);
PackedHSIComparison (const std::string &component_name, ComparisonOps::CompareOp op, double compare_val);

/** \brief Destructor. */
virtual ~PackedHSIComparison () {}
Expand Down
14 changes: 7 additions & 7 deletions filters/include/pcl/filters/impl/conditional_removal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
//////////////////////////////////////////////////////////////////////////
template <typename PointT>
pcl::FieldComparison<PointT>::FieldComparison (
std::string field_name, ComparisonOps::CompareOp op, double compare_val)
const std::string &field_name, ComparisonOps::CompareOp op, double compare_val)
: ComparisonBase<PointT> ()
, compare_val_ (compare_val), point_data_ (NULL)
{
Expand Down Expand Up @@ -106,7 +106,7 @@ pcl::FieldComparison<PointT>::evaluate (const PointT &point) const
{
if (!this->capable_)
{
PCL_WARN ("[pcl::FieldComparison::evaluate] invalid compariosn!\n");
PCL_WARN ("[pcl::FieldComparison::evaluate] invalid comparison!\n");
return (false);
}

Expand Down Expand Up @@ -138,7 +138,7 @@ pcl::FieldComparison<PointT>::evaluate (const PointT &point) const
//////////////////////////////////////////////////////////////////////////
template <typename PointT>
pcl::PackedRGBComparison<PointT>::PackedRGBComparison (
std::string component_name, ComparisonOps::CompareOp op, double compare_val) :
const std::string &component_name, ComparisonOps::CompareOp op, double compare_val) :
component_name_ (component_name), component_offset_ (), compare_val_ (compare_val)
{
// get all the fields
Expand Down Expand Up @@ -230,7 +230,7 @@ pcl::PackedRGBComparison<PointT>::evaluate (const PointT &point) const
//////////////////////////////////////////////////////////////////////////
template <typename PointT>
pcl::PackedHSIComparison<PointT>::PackedHSIComparison (
std::string component_name, ComparisonOps::CompareOp op, double compare_val) :
const std::string &component_name, ComparisonOps::CompareOp op, double compare_val) :
component_name_ (component_name), component_id_ (), compare_val_ (compare_val), rgb_offset_ ()
{
// Get all the fields
Expand Down Expand Up @@ -287,7 +287,7 @@ pcl::PackedHSIComparison<PointT>::PackedHSIComparison (
}
else
{
PCL_WARN ("[pcl::PackedRGBComparison::PackedRGBComparison] unrecognized component name!\n");
PCL_WARN ("[pcl::PackedHSIComparison::PackedHSIComparison] unrecognized component name!\n");
capable_ = false;
return;
}
Expand Down Expand Up @@ -527,7 +527,7 @@ pcl::TfQuadraticXYZComparison<PointT>::evaluate (const PointT &point) const
case pcl::ComparisonOps::EQ:
return (myVal == 0);
default:
PCL_WARN ("[pcl::transformableQuadricXYZComparison::evaluate] unrecognized op_!\n");
PCL_WARN ("[pcl::TfQuadraticXYZComparison::evaluate] unrecognized op_!\n");
return (false);
}
}
Expand Down Expand Up @@ -595,7 +595,7 @@ pcl::PointDataAtOffset<PointT>::compare (const PointT& p, const double& val)
return (pt_val > val) - (pt_val < val);
}
default :
PCL_WARN ("[pcl::pcl::PointDataAtOffset::compare] unknown data_type!\n");
PCL_WARN ("[pcl::PointDataAtOffset::compare] unknown data_type!\n");
return (0);
}
}
Expand Down
4 changes: 2 additions & 2 deletions filters/include/pcl/filters/passthrough.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ namespace pcl
* structure. By default, points are removed.
*
* \param[in] val set to true whether the filtered points should be kept and
* set to a given user value (default: NaN)
* set to a user given value (default: NaN)
*/
inline void
setKeepOrganized (bool val)
Expand Down Expand Up @@ -351,7 +351,7 @@ namespace pcl

private:
/** \brief Keep the structure of the data organized, by setting the
* filtered points to the a user given value (NaN by default).
* filtered points to a user given value (NaN by default).
*/
bool keep_organized_;

Expand Down
6 changes: 3 additions & 3 deletions surface/include/pcl/surface/gp3.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ namespace pcl
* when taking into account the segment between the points S1 and S2
* \param X 2D coordinate of the point
* \param S1 2D coordinate of the segment's first point
* \param S2 2D coordinate of the segment's secont point
* \param R 2D coorddinate of the reference point (defaults to 0,0)
* \param S2 2D coordinate of the segment's second point
* \param R 2D coordinate of the reference point (defaults to 0,0)
* \ingroup surface
*/
inline bool
Expand Down Expand Up @@ -416,7 +416,7 @@ namespace pcl
/** \brief 2D coordinates of the second fringe neighbor of the next point **/
Eigen::Vector2f uvn_next_sfn_;

/** \brief Temporary variable to store 3 coordiantes **/
/** \brief Temporary variable to store 3 coordinates **/
Eigen::Vector3f tmp_;

/** \brief The actual surface reconstruction method.
Expand Down