Skip to content
Snippets Groups Projects
Commit a6c26d5a authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Merge branch 'armem/dev' into 41-follow-up-from-resolve-add-object-memory

parents 4a970004 d50c8157
No related branches found
No related tags found
No related merge requests found
...@@ -5,9 +5,6 @@ armarx_set_target("Library: ${LIB_NAME}") ...@@ -5,9 +5,6 @@ armarx_set_target("Library: ${LIB_NAME}")
find_package(Eigen3 QUIET) find_package(Eigen3 QUIET)
armarx_build_if(Eigen3_FOUND "Eigen3 not available") armarx_build_if(Eigen3_FOUND "Eigen3 not available")
if(Eigen3_FOUND)
include_directories(${Eigen3_INCLUDE_DIR})
endif()
find_package(Simox QUIET) find_package(Simox QUIET)
armarx_build_if(Simox_FOUND "Simox not available") armarx_build_if(Simox_FOUND "Simox not available")
...@@ -15,6 +12,9 @@ if(Simox_FOUND) ...@@ -15,6 +12,9 @@ if(Simox_FOUND)
include_directories(${Simox_INCLUDE_DIR}) include_directories(${Simox_INCLUDE_DIR})
endif() endif()
find_package(PCL QUIET COMPONENTS io common)
armarx_build_if(PCL_FOUND "PCL not available")
set(LIBS set(LIBS
ArmarXCoreInterfaces ArmarXCoreInterfaces
...@@ -22,6 +22,9 @@ set(LIBS ...@@ -22,6 +22,9 @@ set(LIBS
RobotAPIInterfaces RobotAPIInterfaces
cppgen cppgen
${Simox_LIBS} ${Simox_LIBS}
# System libraries
Eigen3::Eigen
# PCLInterface
) )
set(LIB_FILES set(LIB_FILES
...@@ -217,7 +220,17 @@ set(LIB_HEADERS ...@@ -217,7 +220,17 @@ set(LIB_HEADERS
codegenerator/typeReader/xml/Reader.h codegenerator/typeReader/xml/Reader.h
) )
armarx_add_library("${LIB_NAME}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}") armarx_add_library("${LIB_NAME}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}")
if(PCL_FOUND)
target_include_directories("${LIB_NAME}"
SYSTEM PUBLIC
"${PCL_INCLUDE_DIRS}"
)
endif()
# add unit tests # add unit tests
add_subdirectory(test) add_subdirectory(test)
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
// Header // Header
#include "PCLPointCloud.h" #include "PCLPointCloud.h"
#include <RobotAPI/libraries/core/pcl_point_types.h>
namespace armarx::aron::cppcodegenerator::serializer namespace armarx::aron::cppcodegenerator::serializer
{ {
...@@ -37,6 +39,7 @@ namespace armarx::aron::cppcodegenerator::serializer ...@@ -37,6 +39,7 @@ namespace armarx::aron::cppcodegenerator::serializer
{"PointXYZRGBL", {"pcl::PointXYZRGBL", 32}}, {"PointXYZRGBL", {"pcl::PointXYZRGBL", 32}},
{"PointXYZRGBA", {"pcl::PointXYZRGBA", 32}}, {"PointXYZRGBA", {"pcl::PointXYZRGBA", 32}},
{"PointXYZHSV", {"pcl::PointXYZHSV", 32}}, {"PointXYZHSV", {"pcl::PointXYZHSV", 32}},
{"PointPolar", {"pcl::PointPolar", 16}},
}; };
// constructors // constructors
......
...@@ -79,7 +79,8 @@ namespace armarx::aron::typenavigator ...@@ -79,7 +79,8 @@ namespace armarx::aron::typenavigator
{"PointXYZRGB", {"pcl::PointXYZRGB"}}, {"PointXYZRGB", {"pcl::PointXYZRGB"}},
{"PointXYZRGBL", {"pcl::PointXYZRGBL"}}, {"PointXYZRGBL", {"pcl::PointXYZRGBL"}},
{"PointXYZRGBA", {"pcl::PointXYZRGBA"}}, {"PointXYZRGBA", {"pcl::PointXYZRGBA"}},
{"PointXYZHSV", {"pcl::PointXYZHSV"}} {"PointXYZHSV", {"pcl::PointXYZHSV"}},
{"PointPolar", {"pcl::PointPolar"}}
}; };
const unsigned int ACCEPTED_DIMENSION_MIN_SIZE = 2; const unsigned int ACCEPTED_DIMENSION_MIN_SIZE = 2;
const unsigned int ACCEPTED_DIMENSION_MAX_SIZE = 2; const unsigned int ACCEPTED_DIMENSION_MAX_SIZE = 2;
......
/*
* 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment