PrimitiveFusion.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package VisionX
19 * @author Markus Grotz ( markus dot grotz at kit dot edu )
20 * @date 2015
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25#pragma once
26
27#include <Eigen/Core>
28#include <Eigen/Geometry>
29
30#include <pcl/common/angles.h>
31
33
34namespace armarx
35{
36 /**
37 * @class PrimitiveFusion
38 * @brief A brief description
39 *
40 * Detailed Description
41 */
43 {
44 public:
45 /**
46 * PrimitiveFusion Constructor
47 */
49
50 /**
51 * PrimitiveFusion Destructor
52 */
54
55 bool testBoxIntersection(Eigen::Matrix4f leftPose,
56 Eigen::Matrix4f rightPose,
57 Eigen::Vector3f leftExtent,
58 Eigen::Vector3f rightExtent);
59
60 void
61 getIntersectingPrimitives(memoryx::EnvironmentalPrimitiveBaseList& primitives,
62 memoryx::EnvironmentalPrimitiveBasePtr primitive,
63 memoryx::EnvironmentalPrimitiveBaseList& intersectingPrimitives,
64 float eps = 0.0f);
65
67 memoryx::EnvironmentalPrimitiveBaseList& primitives,
68 memoryx::EnvironmentalPrimitiveBasePtr primitive,
69 memoryx::EnvironmentalPrimitiveBaseList& intersectingPrimitives,
70 float eps = 0.0f);
71
72 bool isSimilar(memoryx::EnvironmentalPrimitiveBasePtr leftPrimitive,
73 memoryx::EnvironmentalPrimitiveBasePtr rightPrimitive);
74
76 memoryx::EnvironmentalPrimitiveBaseList& primitives,
77 std::vector<memoryx::EntityBasePtr>& boxes,
78 memoryx::EnvironmentalPrimitiveSegmentBasePrx environmentalPrimitiveSegment);
79
80 private:
81 Eigen::Vector3f projectVector(Eigen::Vector3f axis, Eigen::Vector3f u);
82
83 bool testPlane(memoryx::EnvironmentalPrimitiveBasePtr leftPrimitive,
84 memoryx::EnvironmentalPrimitiveBasePtr rightPrimitive);
85 bool testCylinder(memoryx::EnvironmentalPrimitiveBasePtr leftPrimitive,
86 memoryx::EnvironmentalPrimitiveBasePtr rightPrimitive);
87 };
88} // namespace armarx
~PrimitiveFusion()
PrimitiveFusion Destructor.
void getIntersectingSimilarPrimitives(memoryx::EnvironmentalPrimitiveBaseList &primitives, memoryx::EnvironmentalPrimitiveBasePtr primitive, memoryx::EnvironmentalPrimitiveBaseList &intersectingPrimitives, float eps=0.0f)
void getIntersectingPrimitives(memoryx::EnvironmentalPrimitiveBaseList &primitives, memoryx::EnvironmentalPrimitiveBasePtr primitive, memoryx::EnvironmentalPrimitiveBaseList &intersectingPrimitives, float eps=0.0f)
bool testBoxIntersection(Eigen::Matrix4f leftPose, Eigen::Matrix4f rightPose, Eigen::Vector3f leftExtent, Eigen::Vector3f rightExtent)
bool isSimilar(memoryx::EnvironmentalPrimitiveBasePtr leftPrimitive, memoryx::EnvironmentalPrimitiveBasePtr rightPrimitive)
PrimitiveFusion()
PrimitiveFusion Constructor.
void findBoxPrimitives(memoryx::EnvironmentalPrimitiveBaseList &primitives, std::vector< memoryx::EntityBasePtr > &boxes, memoryx::EnvironmentalPrimitiveSegmentBasePrx environmentalPrimitiveSegment)
This file offers overloads of toIce() and fromIce() functions for STL container types.