diff --git a/source/RobotAPI/libraries/core/pcl_point_types.h b/source/RobotAPI/libraries/core/pcl_point_types.h new file mode 100644 index 0000000000000000000000000000000000000000..e610f72fed7ac5051c8ec43a842b2f60e811281d --- /dev/null +++ b/source/RobotAPI/libraries/core/pcl_point_types.h @@ -0,0 +1,63 @@ +/* + * This file is part of ArmarX. + * + * ArmarX is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ArmarX is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * @package RobotAPI::Core + * @author Fabian Reister ( fabian dot reister at kit dot edu ) + * @date 2021 + * @copyright http://www.gnu.org/licenses/gpl-2.0.txt + * GNU General Public License + */ + +#pragma once + +#define PCL_NO_PRECOMPILE +#include <pcl/pcl_macros.h> +#include <pcl/point_types.h> +#include <pcl/point_cloud.h> +#include <pcl/io/pcd_io.h> +// #include <pcl/memory.h> + +#include <Eigen/Core> + +namespace pcl +{ + + /** + * @brief Point for polar coordinates + * + */ + struct PointPolar + { + // PCL_ADD_POINT4D; // preferred way of adding a XYZ+padding + + //! radial distance + float r; + + //! angle + float phi; + + EIGEN_MAKE_ALIGNED_OPERATOR_NEW + // PCL_MAKE_ALIGNED_OPERATOR_NEW // make sure our new allocators are aligned + } EIGEN_ALIGN16; // enforce SSE padding for correct memory alignment + + + +} // namespace pcl + + +POINT_CLOUD_REGISTER_POINT_STRUCT(pcl::PointPolar, + (float, r, r) + (float, phi, phi) + ) \ No newline at end of file