Make ament_cpplint pass (#298)
Collection of hand-made changes to make ament_cpplint pass consisting of: - whitespace between comments - line length - header ordering - include guard formats - remove a couple `using namespace std;` - using c++ casts instead of c-style casts Signed-off-by: Sean Kelly <sean@seankelly.dev>
This commit is contained in:
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_BOUNDARY_H_
|
||||
#define PCL_ROS_BOUNDARY_H_
|
||||
#ifndef PCL_ROS__FEATURES__BOUNDARY_HPP_
|
||||
#define PCL_ROS__FEATURES__BOUNDARY_HPP_
|
||||
|
||||
#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET true
|
||||
|
||||
@@ -82,6 +82,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_BOUNDARY_H_
|
||||
#endif // PCL_ROS__FEATURES__BOUNDARY_HPP_
|
||||
|
||||
@@ -35,23 +35,24 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_FEATURE_H_
|
||||
#define PCL_ROS_FEATURE_H_
|
||||
#ifndef PCL_ROS__FEATURES__FEATURE_HPP_
|
||||
#define PCL_ROS__FEATURES__FEATURE_HPP_
|
||||
|
||||
// PCL includes
|
||||
#include <pcl/features/feature.h>
|
||||
#include <pcl_msgs/PointIndices.h>
|
||||
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
#include <message_filters/pass_through.h>
|
||||
|
||||
// Dynamic reconfigure
|
||||
#include <dynamic_reconfigure/server.h>
|
||||
#include "pcl_ros/FeatureConfig.hpp"
|
||||
|
||||
// PCL conversions
|
||||
#include <pcl_conversions/pcl_conversions.h>
|
||||
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
#include "pcl_ros/FeatureConfig.hpp"
|
||||
|
||||
namespace pcl_ros
|
||||
{
|
||||
namespace sync_policies = message_filters::sync_policies;
|
||||
@@ -84,13 +85,15 @@ public:
|
||||
|
||||
protected:
|
||||
/** \brief The input point cloud dataset. */
|
||||
//PointCloudInConstPtr input_;
|
||||
// PointCloudInConstPtr input_;
|
||||
|
||||
/** \brief A pointer to the vector of point indices to use. */
|
||||
//IndicesConstPtr indices_;
|
||||
// IndicesConstPtr indices_;
|
||||
|
||||
/** \brief An input point cloud describing the surface that is to be used for nearest neighbors estimation. */
|
||||
//PointCloudInConstPtr surface_;
|
||||
/** \brief An input point cloud describing the surface that is to be used
|
||||
* for nearest neighbors estimation.
|
||||
*/
|
||||
// PointCloudInConstPtr surface_;
|
||||
|
||||
/** \brief A pointer to the spatial search object. */
|
||||
KdTreePtr tree_;
|
||||
@@ -108,7 +111,9 @@ protected:
|
||||
/** \brief The input PointCloud subscriber. */
|
||||
ros::Subscriber sub_input_;
|
||||
|
||||
/** \brief Set to true if the nodelet needs to listen for incoming point clouds representing the search surface. */
|
||||
/** \brief Set to true if the nodelet needs to listen for incoming point
|
||||
* clouds representing the search surface.
|
||||
*/
|
||||
bool use_surface_;
|
||||
|
||||
/** \brief Parameter for the spatial locator tree. By convention, the values represent:
|
||||
@@ -257,6 +262,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_FEATURE_H_
|
||||
#endif // PCL_ROS__FEATURES__FEATURE_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_FPFH_H_
|
||||
#define PCL_ROS_FPFH_H_
|
||||
#ifndef PCL_ROS__FEATURES__FPFH_HPP_
|
||||
#define PCL_ROS__FEATURES__FPFH_HPP_
|
||||
|
||||
#include <pcl/features/fpfh.h>
|
||||
#include "pcl_ros/features/pfh.hpp"
|
||||
@@ -94,6 +94,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_FPFH_H_
|
||||
#endif // PCL_ROS__FEATURES__FPFH_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_FPFH_OMP_H_
|
||||
#define PCL_ROS_FPFH_OMP_H_
|
||||
#ifndef PCL_ROS__FEATURES__FPFH_OMP_HPP_
|
||||
#define PCL_ROS__FEATURES__FPFH_OMP_HPP_
|
||||
|
||||
#include <pcl/features/fpfh_omp.h>
|
||||
#include "pcl_ros/features/fpfh.hpp"
|
||||
@@ -91,6 +91,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_FPFH_OMP_H_
|
||||
#endif // PCL_ROS__FEATURES__FPFH_OMP_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_MOMENT_INVARIANTS_H_
|
||||
#define PCL_ROS_MOMENT_INVARIANTS_H_
|
||||
#ifndef PCL_ROS__FEATURES__MOMENT_INVARIANTS_HPP_
|
||||
#define PCL_ROS__FEATURES__MOMENT_INVARIANTS_HPP_
|
||||
|
||||
#include <pcl/features/moment_invariants.h>
|
||||
#include "pcl_ros/features/feature.hpp"
|
||||
@@ -77,6 +77,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_MOMENT_INVARIANTS_H_
|
||||
#endif // PCL_ROS__FEATURES__MOMENT_INVARIANTS_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_NORMAL_3D_H_
|
||||
#define PCL_ROS_NORMAL_3D_H_
|
||||
#ifndef PCL_ROS__FEATURES__NORMAL_3D_HPP_
|
||||
#define PCL_ROS__FEATURES__NORMAL_3D_HPP_
|
||||
|
||||
#include <pcl/features/normal_3d.h>
|
||||
#include "pcl_ros/features/feature.hpp"
|
||||
@@ -81,6 +81,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_NORMAL_3D_H_
|
||||
#endif // PCL_ROS__FEATURES__NORMAL_3D_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_NORMAL_3D_OMP_H_
|
||||
#define PCL_ROS_NORMAL_3D_OMP_H_
|
||||
#ifndef PCL_ROS__FEATURES__NORMAL_3D_OMP_HPP_
|
||||
#define PCL_ROS__FEATURES__NORMAL_3D_OMP_HPP_
|
||||
|
||||
#include <pcl/features/normal_3d_omp.h>
|
||||
#include "pcl_ros/features/normal_3d.hpp"
|
||||
@@ -75,6 +75,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_NORMAL_3D_OMP_H_
|
||||
#endif // PCL_ROS__FEATURES__NORMAL_3D_OMP_HPP_
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_NORMAL_3D_TBB_H_
|
||||
#define PCL_ROS_NORMAL_3D_TBB_H_
|
||||
#ifndef PCL_ROS__FEATURES__NORMAL_3D_TBB_HPP_
|
||||
#define PCL_ROS__FEATURES__NORMAL_3D_TBB_HPP_
|
||||
|
||||
//#include "pcl_ros/pcl_ros_config.hpp"
|
||||
//#if defined(HAVE_TBB)
|
||||
// #include "pcl_ros/pcl_ros_config.hpp"
|
||||
// #if defined(HAVE_TBB)
|
||||
|
||||
#include <pcl/features/normal_3d_tbb.h>
|
||||
#include "pcl_ros/features/normal_3d.hpp"
|
||||
@@ -78,8 +78,8 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
//#endif // HAVE_TBB
|
||||
// #endif // HAVE_TBB
|
||||
|
||||
#endif //#ifndef PCL_ROS_NORMAL_3D_TBB_H_
|
||||
#endif // PCL_ROS__FEATURES__NORMAL_3D_TBB_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_PFH_H_
|
||||
#define PCL_ROS_PFH_H_
|
||||
#ifndef PCL_ROS__FEATURES__PFH_HPP_
|
||||
#define PCL_ROS__FEATURES__PFH_HPP_
|
||||
|
||||
#include <pcl/features/pfh.h>
|
||||
#include "pcl_ros/features/feature.hpp"
|
||||
@@ -94,6 +94,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_PFH_H_
|
||||
#endif // PCL_ROS__FEATURES__PFH_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_PRINCIPAL_CURVATURES_H_
|
||||
#define PCL_ROS_PRINCIPAL_CURVATURES_H_
|
||||
#ifndef PCL_ROS__FEATURES__PRINCIPAL_CURVATURES_HPP_
|
||||
#define PCL_ROS__FEATURES__PRINCIPAL_CURVATURES_HPP_
|
||||
|
||||
#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET true
|
||||
#include <pcl/features/principal_curvatures.h>
|
||||
@@ -80,6 +80,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_PRINCIPAL_CURVATURES_H_
|
||||
#endif // PCL_ROS__FEATURES__PRINCIPAL_CURVATURES_HPP_
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_SHOT_H_
|
||||
#define PCL_ROS_SHOT_H_
|
||||
#ifndef PCL_ROS__FEATURES__SHOT_HPP_
|
||||
#define PCL_ROS__FEATURES__SHOT_HPP_
|
||||
|
||||
#include <pcl/features/shot.h>
|
||||
#include "pcl_ros/features/pfh.hpp"
|
||||
@@ -74,6 +74,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_SHOT_H_
|
||||
#endif // PCL_ROS__FEATURES__SHOT_HPP_
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_SHOT_OMP_H_
|
||||
#define PCL_ROS_SHOT_OMP_H_
|
||||
#ifndef PCL_ROS__FEATURES__SHOT_OMP_HPP_
|
||||
#define PCL_ROS__FEATURES__SHOT_OMP_HPP_
|
||||
|
||||
#include <pcl/features/shot_omp.h>
|
||||
#include "pcl_ros/features/shot.hpp"
|
||||
@@ -73,6 +73,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_SHOT_OMP_H_
|
||||
#endif // PCL_ROS__FEATURES__SHOT_OMP_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_FEATURES_VFH_H_
|
||||
#define PCL_ROS_FEATURES_VFH_H_
|
||||
#ifndef PCL_ROS__FEATURES__VFH_HPP_
|
||||
#define PCL_ROS__FEATURES__VFH_HPP_
|
||||
|
||||
#include <pcl/features/vfh.h>
|
||||
#include "pcl_ros/features/fpfh.hpp"
|
||||
@@ -79,6 +79,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_FEATURES_VFH_H_
|
||||
#endif // PCL_ROS__FEATURES__VFH_HPP_
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_FILTERS_CROPBOX_H_
|
||||
#define PCL_ROS_FILTERS_CROPBOX_H_
|
||||
#ifndef PCL_ROS__FILTERS__CROP_BOX_HPP_
|
||||
#define PCL_ROS__FILTERS__CROP_BOX_HPP_
|
||||
|
||||
// PCL includes
|
||||
#include <pcl/filters/crop_box.h>
|
||||
@@ -58,7 +58,7 @@ class CropBox : public Filter
|
||||
{
|
||||
protected:
|
||||
/** \brief Pointer to a dynamic reconfigure service. */
|
||||
boost::shared_ptr<dynamic_reconfigure::Server<pcl_ros::CropBoxConfig>> srv_; // TODO
|
||||
boost::shared_ptr<dynamic_reconfigure::Server<pcl_ros::CropBoxConfig>> srv_; // TODO(xxx)
|
||||
|
||||
/** \brief Call the actual filter.
|
||||
* \param input the input point cloud dataset
|
||||
@@ -101,6 +101,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_FILTERS_CROPBOX_H_
|
||||
#endif // PCL_ROS__FILTERS__CROP_BOX_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_FILTERS_EXTRACTINDICES_H_
|
||||
#define PCL_ROS_FILTERS_EXTRACTINDICES_H_
|
||||
#ifndef PCL_ROS__FILTERS__EXTRACT_INDICES_HPP_
|
||||
#define PCL_ROS__FILTERS__EXTRACT_INDICES_HPP_
|
||||
|
||||
// PCL includes
|
||||
#include <pcl/filters/extract_indices.h>
|
||||
@@ -94,6 +94,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_FILTERS_EXTRACTINDICES_H_
|
||||
#endif // PCL_ROS__FILTERS__EXTRACT_INDICES_HPP_
|
||||
|
||||
@@ -35,23 +35,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_FILTER_H_
|
||||
#define PCL_ROS_FILTER_H_
|
||||
#ifndef PCL_ROS__FILTERS__FILTER_HPP_
|
||||
#define PCL_ROS__FILTERS__FILTER_HPP_
|
||||
|
||||
// PCL includes
|
||||
#include <pcl/filters/filter.h>
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
|
||||
// Dynamic reconfigure
|
||||
#include <dynamic_reconfigure/server.h>
|
||||
#include <string>
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
#include "pcl_ros/FilterConfig.hpp"
|
||||
|
||||
namespace pcl_ros
|
||||
{
|
||||
namespace sync_policies = message_filters::sync_policies;
|
||||
|
||||
/** \brief @b Filter represents the base filter class. Some generic 3D operations that are applicable to all filters
|
||||
* are defined here as static methods.
|
||||
/** \brief @b Filter represents the base filter class. Some generic 3D operations that are
|
||||
* applicable to all filters are defined here as static methods.
|
||||
* \author Radu Bogdan Rusu
|
||||
*/
|
||||
class Filter : public PCLNodelet
|
||||
@@ -79,16 +77,22 @@ protected:
|
||||
/** \brief The maximum allowed filter value a point will be considered from. */
|
||||
double filter_limit_max_;
|
||||
|
||||
/** \brief Set to true if we want to return the data outside (\a filter_limit_min_;\a filter_limit_max_). Default: false. */
|
||||
/** \brief Set to true if we want to return the data outside
|
||||
* (\a filter_limit_min_;\a filter_limit_max_). Default: false.
|
||||
*/
|
||||
bool filter_limit_negative_;
|
||||
|
||||
/** \brief The input TF frame the data should be transformed into, if input.header.frame_id is different. */
|
||||
/** \brief The input TF frame the data should be transformed into,
|
||||
* if input.header.frame_id is different.
|
||||
*/
|
||||
std::string tf_input_frame_;
|
||||
|
||||
/** \brief The original data input TF frame. */
|
||||
std::string tf_input_orig_frame_;
|
||||
|
||||
/** \brief The output TF frame the data should be transformed into, if input.header.frame_id is different. */
|
||||
/** \brief The output TF frame the data should be transformed into,
|
||||
* if input.header.frame_id is different.
|
||||
*/
|
||||
std::string tf_output_frame_;
|
||||
|
||||
/** \brief Internal mutex. */
|
||||
@@ -157,6 +161,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_FILTER_H_
|
||||
#endif // PCL_ROS__FILTERS__FILTER_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_FILTERS_PASSTHROUGH_H_
|
||||
#define PCL_ROS_FILTERS_PASSTHROUGH_H_
|
||||
#ifndef PCL_ROS__FILTERS__PASSTHROUGH_HPP_
|
||||
#define PCL_ROS__FILTERS__PASSTHROUGH_HPP_
|
||||
|
||||
// PCL includes
|
||||
#include <pcl/filters/passthrough.h>
|
||||
@@ -95,6 +95,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_FILTERS_PASSTHROUGH_H_
|
||||
#endif // PCL_ROS__FILTERS__PASSTHROUGH_HPP_
|
||||
|
||||
@@ -35,14 +35,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_FILTERS_PROJECT_INLIERS_H_
|
||||
#define PCL_ROS_FILTERS_PROJECT_INLIERS_H_
|
||||
#ifndef PCL_ROS__FILTERS__PROJECT_INLIERS_HPP_
|
||||
#define PCL_ROS__FILTERS__PROJECT_INLIERS_HPP_
|
||||
|
||||
// PCL includes
|
||||
#include <pcl/filters/project_inliers.h>
|
||||
#include <message_filters/subscriber.h>
|
||||
#include "pcl_ros/filters/filter.hpp"
|
||||
|
||||
#include <message_filters/subscriber.h>
|
||||
|
||||
namespace pcl_ros
|
||||
{
|
||||
@@ -115,6 +114,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_FILTERS_PROJECT_INLIERS_H_
|
||||
#endif // PCL_ROS__FILTERS__PROJECT_INLIERS_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_FILTERS_RADIUSOUTLIERREMOVAL_H_
|
||||
#define PCL_ROS_FILTERS_RADIUSOUTLIERREMOVAL_H_
|
||||
#ifndef PCL_ROS__FILTERS__RADIUS_OUTLIER_REMOVAL_HPP_
|
||||
#define PCL_ROS__FILTERS__RADIUS_OUTLIER_REMOVAL_HPP_
|
||||
|
||||
// PCL includes
|
||||
#include <pcl/filters/radius_outlier_removal.h>
|
||||
@@ -96,6 +96,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_FILTERS_RADIUSOUTLIERREMOVAL_H_
|
||||
#endif // PCL_ROS__FILTERS__RADIUS_OUTLIER_REMOVAL_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_FILTERS_STATISTICALOUTLIERREMOVAL_H_
|
||||
#define PCL_ROS_FILTERS_STATISTICALOUTLIERREMOVAL_H_
|
||||
#ifndef PCL_ROS__FILTERS__STATISTICAL_OUTLIER_REMOVAL_HPP_
|
||||
#define PCL_ROS__FILTERS__STATISTICAL_OUTLIER_REMOVAL_HPP_
|
||||
|
||||
// PCL includes
|
||||
#include <pcl/filters/statistical_outlier_removal.h>
|
||||
@@ -103,6 +103,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_FILTERS_STATISTICALOUTLIERREMOVAL_H_
|
||||
#endif // PCL_ROS__FILTERS__STATISTICAL_OUTLIER_REMOVAL_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_FILTERS_VOXEL_H_
|
||||
#define PCL_ROS_FILTERS_VOXEL_H_
|
||||
#ifndef PCL_ROS__FILTERS__VOXEL_GRID_HPP_
|
||||
#define PCL_ROS__FILTERS__VOXEL_GRID_HPP_
|
||||
|
||||
// PCL includes
|
||||
#include <pcl/filters/voxel_grid.h>
|
||||
@@ -86,6 +86,6 @@ protected:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_FILTERS_VOXEL_H_
|
||||
#endif // PCL_ROS__FILTERS__VOXEL_GRID_HPP_
|
||||
|
||||
@@ -34,10 +34,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef pcl_ros_IMPL_TRANSFORMS_H_
|
||||
#define pcl_ros_IMPL_TRANSFORMS_H_
|
||||
#ifndef PCL_ROS__IMPL__TRANSFORMS_HPP_
|
||||
#define PCL_ROS__IMPL__TRANSFORMS_HPP_
|
||||
|
||||
#include <pcl_conversions/pcl_conversions.h>
|
||||
#include <string>
|
||||
#include "pcl_ros/transforms.hpp"
|
||||
|
||||
using pcl_conversions::fromPCL;
|
||||
@@ -58,13 +59,13 @@ transformPointCloudWithNormals(
|
||||
// Rather that risking a mistake, we copy the quaternion, which is a small cost compared to
|
||||
// the conversion of the point cloud anyway. Idem for the origin.
|
||||
tf::Quaternion q = transform.getRotation();
|
||||
Eigen::Quaternionf rotation(q.w(), q.x(), q.y(), q.z()); // internally stored as (x,y,z,w)
|
||||
Eigen::Quaternionf rotation(q.w(), q.x(), q.y(), q.z()); // internally stored as (x,y,z,w)
|
||||
tf::Vector3 v = transform.getOrigin();
|
||||
Eigen::Vector3f origin(v.x(), v.y(), v.z());
|
||||
// Eigen::Translation3f translation(v);
|
||||
// Assemble an Eigen Transform
|
||||
//Eigen::Transform3f t;
|
||||
//t = translation * rotation;
|
||||
// Eigen::Transform3f t;
|
||||
// t = translation * rotation;
|
||||
transformPointCloudWithNormals(cloud_in, cloud_out, origin, rotation);
|
||||
}
|
||||
|
||||
@@ -81,13 +82,13 @@ transformPointCloud(
|
||||
// Rather that risking a mistake, we copy the quaternion, which is a small cost compared to
|
||||
// the conversion of the point cloud anyway. Idem for the origin.
|
||||
tf::Quaternion q = transform.getRotation();
|
||||
Eigen::Quaternionf rotation(q.w(), q.x(), q.y(), q.z()); // internally stored as (x,y,z,w)
|
||||
Eigen::Quaternionf rotation(q.w(), q.x(), q.y(), q.z()); // internally stored as (x,y,z,w)
|
||||
tf::Vector3 v = transform.getOrigin();
|
||||
Eigen::Vector3f origin(v.x(), v.y(), v.z());
|
||||
// Eigen::Translation3f translation(v);
|
||||
// Assemble an Eigen Transform
|
||||
//Eigen::Transform3f t;
|
||||
//t = translation * rotation;
|
||||
// Eigen::Transform3f t;
|
||||
// t = translation * rotation;
|
||||
transformPointCloud(cloud_in, cloud_out, origin, rotation);
|
||||
}
|
||||
|
||||
@@ -217,6 +218,5 @@ transformPointCloudWithNormals(
|
||||
cloud_out.header = toPCL(header);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace pcl_ros
|
||||
#endif
|
||||
#endif // PCL_ROS__IMPL__TRANSFORMS_HPP_
|
||||
|
||||
@@ -35,13 +35,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_IO_BAG_IO_H_
|
||||
#define PCL_ROS_IO_BAG_IO_H_
|
||||
#ifndef PCL_ROS__IO__BAG_IO_HPP_
|
||||
#define PCL_ROS__IO__BAG_IO_HPP_
|
||||
|
||||
#include <pcl_ros/pcl_nodelet.hpp>
|
||||
#include <sensor_msgs/PointCloud2.h>
|
||||
#include <rosbag/bag.h>
|
||||
#include <rosbag/view.h>
|
||||
#include <string>
|
||||
|
||||
namespace pcl_ros
|
||||
{
|
||||
@@ -120,12 +121,11 @@ private:
|
||||
PointCloudPtr output_;
|
||||
|
||||
/** \brief Signals that a new PointCloud2 message has been read from the file. */
|
||||
//bool cloud_received_;
|
||||
// bool cloud_received_;
|
||||
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
} // namespace pcl_ros
|
||||
|
||||
}
|
||||
|
||||
#endif //#ifndef PCL_ROS_IO_BAG_IO_H_
|
||||
#endif // PCL_ROS__IO__BAG_IO_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_IO_CONCATENATE_DATA_H_
|
||||
#define PCL_IO_CONCATENATE_DATA_H_
|
||||
#ifndef PCL_ROS__IO__CONCATENATE_DATA_HPP_
|
||||
#define PCL_ROS__IO__CONCATENATE_DATA_HPP_
|
||||
|
||||
// ROS includes
|
||||
#include <tf/transform_listener.h>
|
||||
@@ -46,6 +46,8 @@
|
||||
#include <message_filters/pass_through.h>
|
||||
#include <message_filters/sync_policies/exact_time.h>
|
||||
#include <message_filters/sync_policies/approximate_time.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace pcl_ros
|
||||
{
|
||||
@@ -71,7 +73,7 @@ public:
|
||||
/** \brief Empty constructor.
|
||||
* \param queue_size the maximum queue size
|
||||
*/
|
||||
PointCloudConcatenateDataSynchronizer(int queue_size)
|
||||
explicit PointCloudConcatenateDataSynchronizer(int queue_size)
|
||||
: maximum_queue_size_(queue_size), approximate_sync_(false) {}
|
||||
|
||||
/** \brief Empty destructor. */
|
||||
@@ -88,7 +90,9 @@ private:
|
||||
/** \brief The maximum number of messages that we can store in the queue. */
|
||||
int maximum_queue_size_;
|
||||
|
||||
/** \brief True if we use an approximate time synchronizer versus an exact one (false by default). */
|
||||
/** \brief True if we use an approximate time synchronizer
|
||||
* versus an exact one (false by default).
|
||||
*/
|
||||
bool approximate_sync_;
|
||||
|
||||
/** \brief A vector of message filters. */
|
||||
@@ -137,6 +141,6 @@ private:
|
||||
|
||||
void combineClouds(const PointCloud2 & in1, const PointCloud2 & in2, PointCloud2 & out);
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_IO_CONCATENATE_H_
|
||||
#endif // PCL_ROS__IO__CONCATENATE_DATA_HPP_
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_IO_CONCATENATE_FIELDS_H_
|
||||
#define PCL_IO_CONCATENATE_FIELDS_H_
|
||||
#ifndef PCL_ROS__IO__CONCATENATE_FIELDS_HPP_
|
||||
#define PCL_ROS__IO__CONCATENATE_FIELDS_HPP_
|
||||
|
||||
// ROS includes
|
||||
#include <nodelet_topic_tools/nodelet_lazy.h>
|
||||
@@ -47,6 +47,9 @@
|
||||
|
||||
#include <sensor_msgs/PointCloud2.h>
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
namespace pcl_ros
|
||||
{
|
||||
/** \brief @b PointCloudConcatenateFieldsSynchronizer is a special form of data synchronizer: it listens for a set of
|
||||
@@ -68,7 +71,7 @@ public:
|
||||
/** \brief Empty constructor.
|
||||
* \param queue_size the maximum queue size
|
||||
*/
|
||||
PointCloudConcatenateFieldsSynchronizer(int queue_size)
|
||||
explicit PointCloudConcatenateFieldsSynchronizer(int queue_size)
|
||||
: maximum_queue_size_(queue_size), maximum_seconds_(0) {}
|
||||
|
||||
/** \brief Empty destructor. */
|
||||
@@ -98,6 +101,6 @@ private:
|
||||
/** \brief A queue for messages. */
|
||||
std::map<ros::Time, std::vector<PointCloudConstPtr>> queue_;
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_IO_CONCATENATE_H_
|
||||
#endif // PCL_ROS__IO__CONCATENATE_FIELDS_HPP_
|
||||
|
||||
@@ -35,10 +35,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_IO_PCD_IO_H_
|
||||
#define PCL_ROS_IO_PCD_IO_H_
|
||||
#ifndef PCL_ROS__IO__PCD_IO_HPP_
|
||||
#define PCL_ROS__IO__PCD_IO_HPP_
|
||||
|
||||
#include <pcl/io/pcd_io.h>
|
||||
#include <string>
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
|
||||
namespace pcl_ros
|
||||
@@ -131,6 +132,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_IO_PCD_IO_H_
|
||||
#endif // PCL_ROS__IO__PCD_IO_HPP_
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef PCL_NODELET_H_
|
||||
#define PCL_NODELET_H_
|
||||
#ifndef PCL_ROS__PCL_NODELET_HPP_
|
||||
#define PCL_ROS__PCL_NODELET_HPP_
|
||||
|
||||
#include <sensor_msgs/PointCloud2.h>
|
||||
// PCL includes
|
||||
@@ -51,7 +51,6 @@
|
||||
#include <pcl/pcl_base.h>
|
||||
#include <pcl/point_types.h>
|
||||
#include <pcl_conversions/pcl_conversions.h>
|
||||
#include "pcl_ros/point_cloud.hpp"
|
||||
// ROS Nodelet includes
|
||||
#include <nodelet_topic_tools/nodelet_lazy.h>
|
||||
#include <message_filters/subscriber.h>
|
||||
@@ -62,6 +61,11 @@
|
||||
// Include TF
|
||||
#include <tf/transform_listener.h>
|
||||
|
||||
// STL
|
||||
#include <string>
|
||||
|
||||
#include "pcl_ros/point_cloud.hpp"
|
||||
|
||||
using pcl_conversions::fromPCL;
|
||||
|
||||
namespace pcl_ros
|
||||
@@ -69,7 +73,9 @@ namespace pcl_ros
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/** \brief @b PCLNodelet represents the base PCL Nodelet class. All PCL nodelets should inherit from this class. */
|
||||
/** \brief @b PCLNodelet represents the base PCL Nodelet class. All PCL nodelets should
|
||||
* inherit from this class.
|
||||
**/
|
||||
class PCLNodelet : public nodelet_topic_tools::NodeletLazy
|
||||
{
|
||||
public:
|
||||
@@ -128,7 +134,9 @@ protected:
|
||||
/** \brief The maximum queue size (default: 3). */
|
||||
int max_queue_size_;
|
||||
|
||||
/** \brief True if we use an approximate time synchronizer versus an exact one (false by default). */
|
||||
/** \brief True if we use an approximate time synchronizer
|
||||
* versus an exact one (false by default).
|
||||
**/
|
||||
bool approximate_sync_;
|
||||
|
||||
/** \brief TF listener object. */
|
||||
@@ -143,7 +151,8 @@ protected:
|
||||
{
|
||||
if (cloud->width * cloud->height * cloud->point_step != cloud->data.size()) {
|
||||
NODELET_WARN(
|
||||
"[%s] Invalid PointCloud (data = %zu, width = %d, height = %d, step = %d) with stamp %f, and frame %s on topic %s received!",
|
||||
"[%s] Invalid PointCloud (data = %zu, width = %d, height = %d, step = %d) "
|
||||
"with stamp %f, and frame %s on topic %s received!",
|
||||
getName().c_str(),
|
||||
cloud->data.size(), cloud->width, cloud->height, cloud->point_step,
|
||||
cloud->header.stamp.toSec(), cloud->header.frame_id.c_str(), pnh_->resolveName(
|
||||
@@ -163,7 +172,8 @@ protected:
|
||||
{
|
||||
if (cloud->width * cloud->height != cloud->points.size()) {
|
||||
NODELET_WARN(
|
||||
"[%s] Invalid PointCloud (points = %zu, width = %d, height = %d) with stamp %f, and frame %s on topic %s received!",
|
||||
"[%s] Invalid PointCloud (points = %zu, width = %d, height = %d) "
|
||||
"with stamp %f, and frame %s on topic %s received!",
|
||||
getName().c_str(), cloud->points.size(), cloud->width, cloud->height,
|
||||
fromPCL(cloud->header).stamp.toSec(), cloud->header.frame_id.c_str(),
|
||||
pnh_->resolveName(topic_name).c_str());
|
||||
@@ -182,7 +192,10 @@ protected:
|
||||
{
|
||||
/*if (indices->indices.empty ())
|
||||
{
|
||||
NODELET_WARN ("[%s] Empty indices (values = %zu) with stamp %f, and frame %s on topic %s received!", getName ().c_str (), indices->indices.size (), indices->header.stamp.toSec (), indices->header.frame_id.c_str (), pnh_->resolveName (topic_name).c_str ());
|
||||
NODELET_WARN ("[%s] Empty indices (values = %zu) "
|
||||
"with stamp %f, and frame %s on topic %s received!",
|
||||
getName ().c_str (), indices->indices.size (), indices->header.stamp.toSec (),
|
||||
indices->header.frame_id.c_str (), pnh_->resolveName (topic_name).c_str ());
|
||||
return (true);
|
||||
}*/
|
||||
return true;
|
||||
@@ -197,13 +210,18 @@ protected:
|
||||
{
|
||||
/*if (model->values.empty ())
|
||||
{
|
||||
NODELET_WARN ("[%s] Empty model (values = %zu) with stamp %f, and frame %s on topic %s received!", getName ().c_str (), model->values.size (), model->header.stamp.toSec (), model->header.frame_id.c_str (), pnh_->resolveName (topic_name).c_str ());
|
||||
NODELET_WARN ("[%s] Empty model (values = %zu) with stamp %f, "
|
||||
"and frame %s on topic %s received!",
|
||||
getName ().c_str (), model->values.size (), model->header.stamp.toSec (),
|
||||
model->header.frame_id.c_str (), pnh_->resolveName (topic_name).c_str ());
|
||||
return (false);
|
||||
}*/
|
||||
return true;
|
||||
}
|
||||
|
||||
/** \brief Lazy transport subscribe/unsubscribe routine. It is optional for backward compatibility. */
|
||||
/** \brief Lazy transport subscribe/unsubscribe routine.
|
||||
* It is optional for backward compatibility.
|
||||
**/
|
||||
virtual void subscribe() {}
|
||||
virtual void unsubscribe() {}
|
||||
|
||||
@@ -237,6 +255,6 @@ protected:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_NODELET_H_
|
||||
#endif // PCL_ROS__PCL_NODELET_HPP_
|
||||
|
||||
@@ -1,15 +1,71 @@
|
||||
#ifndef pcl_ROS_POINT_CLOUD_H_
|
||||
#define pcl_ROS_POINT_CLOUD_H_
|
||||
/*
|
||||
* Software License Agreement (BSD License)
|
||||
*
|
||||
* Copyright (c) 2009, Willow Garage, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
* * Neither the name of Willow Garage, Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS__POINT_CLOUD_HPP__
|
||||
#define PCL_ROS__POINT_CLOUD_HPP__
|
||||
|
||||
// test if testing machinery can be implemented
|
||||
#if defined(__cpp_rvalue_references) && defined(__cpp_constexpr)
|
||||
#define ROS_POINTER_COMPATIBILITY_IMPLEMENTED 1
|
||||
#else
|
||||
#define ROS_POINTER_COMPATIBILITY_IMPLEMENTED 0
|
||||
#endif
|
||||
|
||||
#include <ros/ros.h>
|
||||
#include <pcl/point_cloud.h>
|
||||
#include <pcl/point_traits.h>
|
||||
#include <pcl/for_each_type.h>
|
||||
#include <pcl/conversions.h>
|
||||
#if ROS_POINTER_COMPATIBILITY_IMPLEMENTED
|
||||
#include <pcl/pcl_config.h>
|
||||
#if PCL_VERSION_COMPARE(>=, 1, 11, 0)
|
||||
#include <pcl/memory.h>
|
||||
#elif PCL_VERSION_COMPARE(>=, 1, 10, 0)
|
||||
#include <pcl/make_shared.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <pcl_conversions/pcl_conversions.h>
|
||||
#include <sensor_msgs/PointCloud2.h>
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#if ROS_POINTER_COMPATIBILITY_IMPLEMENTED
|
||||
#include <type_traits>
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
namespace pcl
|
||||
{
|
||||
@@ -18,7 +74,7 @@ namespace detail
|
||||
template<typename Stream, typename PointT>
|
||||
struct FieldStreamer
|
||||
{
|
||||
FieldStreamer(Stream & stream)
|
||||
explicit FieldStreamer(Stream & stream)
|
||||
: stream_(stream) {}
|
||||
|
||||
template<typename U>
|
||||
@@ -59,8 +115,8 @@ struct FieldsLength
|
||||
|
||||
std::uint32_t length;
|
||||
};
|
||||
} // namespace pcl::detail
|
||||
} // namespace pcl
|
||||
} // namespace detail
|
||||
} // namespace pcl
|
||||
|
||||
namespace ros
|
||||
{
|
||||
@@ -161,7 +217,7 @@ struct FrameId<pcl::PointCloud<T>>
|
||||
static std::string value(const pcl::PointCloud<T> & m) {return m.header.frame_id;}
|
||||
};
|
||||
|
||||
} // namespace ros::message_traits
|
||||
} // namespace message_traits
|
||||
|
||||
namespace serialization
|
||||
{
|
||||
@@ -297,30 +353,11 @@ struct Serializer<pcl::PointCloud<T>>
|
||||
return length;
|
||||
}
|
||||
};
|
||||
} // namespace ros::serialization
|
||||
} // namespace serialization
|
||||
|
||||
/// @todo Printer specialization in message_operations
|
||||
|
||||
} // namespace ros
|
||||
|
||||
// test if testing machinery can be implemented
|
||||
#if defined(__cpp_rvalue_references) && defined(__cpp_constexpr)
|
||||
#define ROS_POINTER_COMPATIBILITY_IMPLEMENTED 1
|
||||
#else
|
||||
#define ROS_POINTER_COMPATIBILITY_IMPLEMENTED 0
|
||||
#endif
|
||||
|
||||
#if ROS_POINTER_COMPATIBILITY_IMPLEMENTED
|
||||
#include <type_traits> // for std::is_same
|
||||
#include <memory> // for std::shared_ptr
|
||||
|
||||
#include <pcl/pcl_config.h>
|
||||
#if PCL_VERSION_COMPARE(>=, 1, 11, 0)
|
||||
#include <pcl/memory.h>
|
||||
#elif PCL_VERSION_COMPARE(>=, 1, 10, 0)
|
||||
#include <pcl/make_shared.h>
|
||||
#endif
|
||||
#endif
|
||||
} // namespace ros
|
||||
|
||||
namespace pcl
|
||||
{
|
||||
@@ -341,7 +378,7 @@ struct Holder
|
||||
{
|
||||
SharedPointer p;
|
||||
|
||||
Holder(const SharedPointer & p)
|
||||
explicit Holder(const SharedPointer & p)
|
||||
: p(p) {}
|
||||
Holder(const Holder & other)
|
||||
: p(other.p) {}
|
||||
@@ -373,7 +410,7 @@ inline boost::shared_ptr<T> to_boost_ptr(const std::shared_ptr<T> & p)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} // namespace pcl::detail
|
||||
} // namespace detail
|
||||
|
||||
// add functions to convert to smart pointer used by ROS
|
||||
template<class T>
|
||||
@@ -420,6 +457,6 @@ inline boost::shared_ptr<T> pcl_ptr(const boost::shared_ptr<T> & p)
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
} // namespace pcl
|
||||
} // namespace pcl
|
||||
|
||||
#endif
|
||||
#endif // PCL_ROS__POINT_CLOUD_HPP__
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef PCL_ROS_PUBLISHER_H_
|
||||
#define PCL_ROS_PUBLISHER_H_
|
||||
#ifndef PCL_ROS__PUBLISHER_HPP_
|
||||
#define PCL_ROS__PUBLISHER_HPP_
|
||||
|
||||
#include <ros/ros.h>
|
||||
#include <sensor_msgs/PointCloud2.h>
|
||||
@@ -51,6 +51,8 @@
|
||||
|
||||
#include <pcl_conversions/pcl_conversions.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace pcl_ros
|
||||
{
|
||||
class BasePublisher
|
||||
@@ -82,7 +84,7 @@ public:
|
||||
|
||||
operator void *() const
|
||||
{
|
||||
return (pub_) ? (void *)1 : (void *)0;
|
||||
return (pub_) ? reinterpret_cast<void *>(1) : reinterpret_cast<void *>(0);
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -135,15 +137,15 @@ public:
|
||||
publish(const sensor_msgs::PointCloud2Ptr & point_cloud) const
|
||||
{
|
||||
pub_.publish(point_cloud);
|
||||
//pub_.publish (*point_cloud);
|
||||
// pub_.publish (*point_cloud);
|
||||
}
|
||||
|
||||
void
|
||||
publish(const sensor_msgs::PointCloud2 & point_cloud) const
|
||||
{
|
||||
pub_.publish(boost::make_shared<const sensor_msgs::PointCloud2>(point_cloud));
|
||||
//pub_.publish (point_cloud);
|
||||
// pub_.publish (point_cloud);
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif //#ifndef PCL_ROS_PUBLISHER_H_
|
||||
} // namespace pcl_ros
|
||||
#endif // PCL_ROS__PUBLISHER_HPP_
|
||||
|
||||
@@ -35,14 +35,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_EXTRACT_CLUSTERS_H_
|
||||
#define PCL_ROS_EXTRACT_CLUSTERS_H_
|
||||
#ifndef PCL_ROS__SEGMENTATION__EXTRACT_CLUSTERS_HPP_
|
||||
#define PCL_ROS__SEGMENTATION__EXTRACT_CLUSTERS_HPP_
|
||||
|
||||
#include <pcl/segmentation/extract_clusters.h>
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
|
||||
// Dynamic reconfigure
|
||||
#include <dynamic_reconfigure/server.h>
|
||||
#include <pcl/segmentation/extract_clusters.h>
|
||||
#include <limits>
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
#include "pcl_ros/EuclideanClusterExtractionConfig.hpp"
|
||||
|
||||
namespace pcl_ros
|
||||
@@ -109,6 +108,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_EXTRACT_CLUSTERS_H_
|
||||
#endif // PCL_ROS__SEGMENTATION__EXTRACT_CLUSTERS_HPP_
|
||||
|
||||
@@ -35,20 +35,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_EXTRACT_POLYGONAL_PRISM_DATA_H_
|
||||
#define PCL_ROS_EXTRACT_POLYGONAL_PRISM_DATA_H_
|
||||
#ifndef PCL_ROS__SEGMENTATION__EXTRACT_POLYGONAL_PRISM_DATA_HPP_
|
||||
#define PCL_ROS__SEGMENTATION__EXTRACT_POLYGONAL_PRISM_DATA_HPP_
|
||||
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
#include <message_filters/sync_policies/exact_time.h>
|
||||
#include <message_filters/sync_policies/approximate_time.h>
|
||||
#include <message_filters/pass_through.h>
|
||||
|
||||
// PCL includes
|
||||
#include <pcl/segmentation/extract_polygonal_prism_data.h>
|
||||
|
||||
// Dynamic reconfigure
|
||||
#include <dynamic_reconfigure/server.h>
|
||||
#include "pcl_ros/ExtractPolygonalPrismDataConfig.hpp"
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
|
||||
namespace pcl_ros
|
||||
{
|
||||
@@ -129,6 +125,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_EXTRACT_POLYGONAL_PRISM_DATA_H_
|
||||
#endif // PCL_ROS__SEGMENTATION__EXTRACT_POLYGONAL_PRISM_DATA_HPP_
|
||||
|
||||
@@ -35,17 +35,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_SAC_SEGMENTATION_H_
|
||||
#define PCL_ROS_SAC_SEGMENTATION_H_
|
||||
#ifndef PCL_ROS__SEGMENTATION__SAC_SEGMENTATION_HPP_
|
||||
#define PCL_ROS__SEGMENTATION__SAC_SEGMENTATION_HPP_
|
||||
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
#include <message_filters/pass_through.h>
|
||||
|
||||
// PCL includes
|
||||
#include <pcl/segmentation/sac_segmentation.h>
|
||||
|
||||
// Dynamic reconfigure
|
||||
#include <dynamic_reconfigure/server.h>
|
||||
#include <string>
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
#include "pcl_ros/SACSegmentationConfig.hpp"
|
||||
#include "pcl_ros/SACSegmentationFromNormalsConfig.hpp"
|
||||
|
||||
@@ -54,8 +51,9 @@ namespace pcl_ros
|
||||
namespace sync_policies = message_filters::sync_policies;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/** \brief @b SACSegmentation represents the Nodelet segmentation class for Sample Consensus methods and models, in
|
||||
* the sense that it just creates a Nodelet wrapper for generic-purpose SAC-based segmentation.
|
||||
/** \brief @b SACSegmentation represents the Nodelet segmentation class for Sample Consensus
|
||||
* methods and models, in the sense that it just creates a Nodelet wrapper for generic-purpose
|
||||
* SAC-based segmentation.
|
||||
* \author Radu Bogdan Rusu
|
||||
*/
|
||||
class SACSegmentation : public PCLNodelet
|
||||
@@ -69,7 +67,8 @@ public:
|
||||
SACSegmentation()
|
||||
: min_inliers_(0) {}
|
||||
|
||||
/** \brief Set the input TF frame the data should be transformed into before processing, if input.header.frame_id is different.
|
||||
/** \brief Set the input TF frame the data should be transformed into before processing,
|
||||
* if input.header.frame_id is different.
|
||||
* \param tf_frame the TF frame the input PointCloud should be transformed into before processing
|
||||
*/
|
||||
inline void setInputTFframe(std::string tf_frame) {tf_input_frame_ = tf_frame;}
|
||||
@@ -102,13 +101,17 @@ protected:
|
||||
/** \brief Pointer to a dynamic reconfigure service. */
|
||||
boost::shared_ptr<dynamic_reconfigure::Server<SACSegmentationConfig>> srv_;
|
||||
|
||||
/** \brief The input TF frame the data should be transformed into, if input.header.frame_id is different. */
|
||||
/** \brief The input TF frame the data should be transformed into,
|
||||
* if input.header.frame_id is different.
|
||||
*/
|
||||
std::string tf_input_frame_;
|
||||
|
||||
/** \brief The original data input TF frame. */
|
||||
std::string tf_input_orig_frame_;
|
||||
|
||||
/** \brief The output TF frame the data should be transformed into, if input.header.frame_id is different. */
|
||||
/** \brief The output TF frame the data should be transformed into,
|
||||
* if input.header.frame_id is different.
|
||||
*/
|
||||
std::string tf_output_frame_;
|
||||
|
||||
/** \brief Null passthrough filter, used for pushing empty elements in the
|
||||
@@ -180,8 +183,8 @@ public:
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/** \brief @b SACSegmentationFromNormals represents the PCL nodelet segmentation class for Sample Consensus methods and
|
||||
* models that require the use of surface normals for estimation.
|
||||
/** \brief @b SACSegmentationFromNormals represents the PCL nodelet segmentation class for
|
||||
* Sample Consensus methods and models that require the use of surface normals for estimation.
|
||||
*/
|
||||
class SACSegmentationFromNormals : public SACSegmentation
|
||||
{
|
||||
@@ -194,7 +197,8 @@ class SACSegmentationFromNormals : public SACSegmentation
|
||||
typedef boost::shared_ptr<const PointCloudN> PointCloudNConstPtr;
|
||||
|
||||
public:
|
||||
/** \brief Set the input TF frame the data should be transformed into before processing, if input.header.frame_id is different.
|
||||
/** \brief Set the input TF frame the data should be transformed into before processing,
|
||||
* if input.header.frame_id is different.
|
||||
* \param tf_frame the TF frame the input PointCloud should be transformed into before processing
|
||||
*/
|
||||
inline void setInputTFframe(std::string tf_frame) {tf_input_frame_ = tf_frame;}
|
||||
@@ -237,11 +241,15 @@ protected:
|
||||
* synchronizer */
|
||||
message_filters::PassThrough<PointIndices> nf_;
|
||||
|
||||
/** \brief The input TF frame the data should be transformed into, if input.header.frame_id is different. */
|
||||
/** \brief The input TF frame the data should be transformed into,
|
||||
* if input.header.frame_id is different.
|
||||
*/
|
||||
std::string tf_input_frame_;
|
||||
/** \brief The original data input TF frame. */
|
||||
std::string tf_input_orig_frame_;
|
||||
/** \brief The output TF frame the data should be transformed into, if input.header.frame_id is different. */
|
||||
/** \brief The output TF frame the data should be transformed into,
|
||||
* if input.header.frame_id is different.
|
||||
*/
|
||||
std::string tf_output_frame_;
|
||||
|
||||
/** \brief Nodelet initialization routine. */
|
||||
@@ -288,6 +296,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_SAC_SEGMENTATION_H_
|
||||
#endif // PCL_ROS__SEGMENTATION__SAC_SEGMENTATION_HPP_
|
||||
|
||||
@@ -35,15 +35,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_SEGMENT_DIFFERENCES_H_
|
||||
#define PCL_ROS_SEGMENT_DIFFERENCES_H_
|
||||
#ifndef PCL_ROS__SEGMENTATION__SEGMENT_DIFFERENCES_HPP_
|
||||
#define PCL_ROS__SEGMENTATION__SEGMENT_DIFFERENCES_HPP_
|
||||
|
||||
#include <pcl/segmentation/segment_differences.h>
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
|
||||
// Dynamic reconfigure
|
||||
#include <dynamic_reconfigure/server.h>
|
||||
#include "pcl_ros/SegmentDifferencesConfig.hpp"
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
|
||||
|
||||
namespace pcl_ros
|
||||
@@ -108,6 +106,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_SEGMENT_DIFFERENCES_H_
|
||||
#endif // PCL_ROS__SEGMENTATION__SEGMENT_DIFFERENCES_HPP_
|
||||
|
||||
@@ -35,16 +35,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_CONVEX_HULL_2D_H_
|
||||
#define PCL_ROS_CONVEX_HULL_2D_H_
|
||||
#ifndef PCL_ROS__SURFACE__CONVEX_HULL_HPP_
|
||||
#define PCL_ROS__SURFACE__CONVEX_HULL_HPP_
|
||||
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
|
||||
// PCL includes
|
||||
#include <pcl/surface/convex_hull.h>
|
||||
|
||||
// Dynamic reconfigure
|
||||
#include <dynamic_reconfigure/server.h>
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
|
||||
namespace pcl_ros
|
||||
{
|
||||
@@ -94,6 +90,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_CONVEX_HULL_2D_H_
|
||||
#endif // PCL_ROS__SURFACE__CONVEX_HULL_HPP_
|
||||
|
||||
@@ -35,25 +35,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_ROS_MOVING_LEAST_SQUARES_H_
|
||||
#define PCL_ROS_MOVING_LEAST_SQUARES_H_
|
||||
#ifndef PCL_ROS__SURFACE__MOVING_LEAST_SQUARES_HPP_
|
||||
#define PCL_ROS__SURFACE__MOVING_LEAST_SQUARES_HPP_
|
||||
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
|
||||
// PCL includes
|
||||
#include <pcl/surface/mls.h>
|
||||
#include <pcl/kdtree/kdtree.h> // for KdTree
|
||||
|
||||
// Dynamic reconfigure
|
||||
#include <dynamic_reconfigure/server.h>
|
||||
#include "pcl_ros/MLSConfig.h"
|
||||
#include "pcl_ros/pcl_nodelet.hpp"
|
||||
#include "pcl_ros/MLSConfig.hpp"
|
||||
|
||||
namespace pcl_ros
|
||||
{
|
||||
namespace sync_policies = message_filters::sync_policies;
|
||||
|
||||
/** \brief @b MovingLeastSquares represents a nodelet using the MovingLeastSquares implementation.
|
||||
* The type of the output is the same as the input, it only smooths the XYZ coordinates according to the parameters.
|
||||
* The type of the output is the same as the input, it only smooths the XYZ coordinates according
|
||||
* to the parameters.
|
||||
* Normals are estimated at each point as well and published on a separate topic.
|
||||
* \author Radu Bogdan Rusu, Zoltan-Csaba Marton
|
||||
*/
|
||||
@@ -71,7 +67,9 @@ class MovingLeastSquares : public PCLNodelet
|
||||
typedef pcl::KdTree<PointIn>::Ptr KdTreePtr;
|
||||
|
||||
protected:
|
||||
/** \brief An input point cloud describing the surface that is to be used for nearest neighbors estimation. */
|
||||
/** \brief An input point cloud describing the surface that is to be used for
|
||||
* nearest neighbors estimation.
|
||||
*/
|
||||
PointCloudInConstPtr surface_;
|
||||
|
||||
/** \brief A pointer to the spatial search object. */
|
||||
@@ -81,7 +79,7 @@ protected:
|
||||
double search_radius_;
|
||||
|
||||
/** \brief The number of K nearest neighbors to use for each point. */
|
||||
//int k_;
|
||||
// int k_;
|
||||
|
||||
/** \brief Whether to use a polynomial fit. */
|
||||
bool use_polynomial_fit_;
|
||||
@@ -89,7 +87,9 @@ protected:
|
||||
/** \brief The order of the polynomial to be fit. */
|
||||
int polynomial_order_;
|
||||
|
||||
/** \brief How 'flat' should the neighbor weighting gaussian be (the smaller, the more local the fit). */
|
||||
/** \brief How 'flat' should the neighbor weighting gaussian be
|
||||
* the smaller, the more local the fit).
|
||||
*/
|
||||
double gaussian_parameter_;
|
||||
|
||||
// ROS nodelet attributes
|
||||
@@ -147,6 +147,6 @@ private:
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
};
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif //#ifndef PCL_ROS_MOVING_LEAST_SQUARES_H_
|
||||
#endif // PCL_ROS__SURFACE__MOVING_LEAST_SQUARES_HPP_
|
||||
|
||||
@@ -34,13 +34,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef pcl_ROS_TRANSFORMS_H_
|
||||
#define pcl_ROS_TRANSFORMS_H_
|
||||
#ifndef PCL_ROS__TRANSFORMS_HPP_
|
||||
#define PCL_ROS__TRANSFORMS_HPP_
|
||||
|
||||
#include <sensor_msgs/PointCloud2.h>
|
||||
#include <pcl/common/transforms.h>
|
||||
#include <tf/transform_datatypes.h>
|
||||
#include <tf/transform_listener.h>
|
||||
#include <string>
|
||||
|
||||
namespace pcl_ros
|
||||
{
|
||||
@@ -176,6 +177,6 @@ transformPointCloud(
|
||||
*/
|
||||
void
|
||||
transformAsMatrix(const tf::Transform & bt, Eigen::Matrix4f & out_mat);
|
||||
}
|
||||
} // namespace pcl_ros
|
||||
|
||||
#endif // PCL_ROS_TRANSFORMS_H_
|
||||
#endif // PCL_ROS__TRANSFORMS_HPP_
|
||||
|
||||
Reference in New Issue
Block a user