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 
34 namespace 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, Eigen::Matrix4f rightPose, Eigen::Vector3f leftExtent, Eigen::Vector3f rightExtent);
56 
57  void getIntersectingPrimitives(memoryx::EnvironmentalPrimitiveBaseList& primitives, memoryx::EnvironmentalPrimitiveBasePtr primitive, memoryx::EnvironmentalPrimitiveBaseList& intersectingPrimitives, float eps = 0.0f);
58 
59  void getIntersectingSimilarPrimitives(memoryx::EnvironmentalPrimitiveBaseList& primitives, memoryx::EnvironmentalPrimitiveBasePtr primitive, memoryx::EnvironmentalPrimitiveBaseList& intersectingPrimitives, float eps = 0.0f);
60 
61  bool isSimilar(memoryx::EnvironmentalPrimitiveBasePtr leftPrimitive, memoryx::EnvironmentalPrimitiveBasePtr rightPrimitive);
62 
63  void findBoxPrimitives(memoryx::EnvironmentalPrimitiveBaseList& primitives, std::vector<memoryx::EntityBasePtr>& boxes, memoryx::EnvironmentalPrimitiveSegmentBasePrx environmentalPrimitiveSegment);
64 
65  private:
66 
67 
68  Eigen::Vector3f projectVector(Eigen::Vector3f axis, Eigen::Vector3f u);
69 
70  bool testPlane(memoryx::EnvironmentalPrimitiveBasePtr leftPrimitive, memoryx::EnvironmentalPrimitiveBasePtr rightPrimitive);
71  bool testCylinder(memoryx::EnvironmentalPrimitiveBasePtr leftPrimitive, memoryx::EnvironmentalPrimitiveBasePtr rightPrimitive);
72 
73  };
74 }
armarx::PrimitiveFusion::~PrimitiveFusion
~PrimitiveFusion()
PrimitiveFusion Destructor.
Definition: PrimitiveFusion.cpp:38
armarx::PrimitiveFusion::testBoxIntersection
bool testBoxIntersection(Eigen::Matrix4f leftPose, Eigen::Matrix4f rightPose, Eigen::Vector3f leftExtent, Eigen::Vector3f rightExtent)
Definition: PrimitiveFusion.cpp:45
armarx::PrimitiveFusion::PrimitiveFusion
PrimitiveFusion()
PrimitiveFusion Constructor.
Definition: PrimitiveFusion.cpp:33
armarx::PrimitiveFusion::getIntersectingPrimitives
void getIntersectingPrimitives(memoryx::EnvironmentalPrimitiveBaseList &primitives, memoryx::EnvironmentalPrimitiveBasePtr primitive, memoryx::EnvironmentalPrimitiveBaseList &intersectingPrimitives, float eps=0.0f)
Definition: PrimitiveFusion.cpp:113
EnvironmentalPrimitiveSegment.h
armarx::PrimitiveFusion::getIntersectingSimilarPrimitives
void getIntersectingSimilarPrimitives(memoryx::EnvironmentalPrimitiveBaseList &primitives, memoryx::EnvironmentalPrimitiveBasePtr primitive, memoryx::EnvironmentalPrimitiveBaseList &intersectingPrimitives, float eps=0.0f)
Definition: PrimitiveFusion.cpp:139
armarx::PrimitiveFusion::findBoxPrimitives
void findBoxPrimitives(memoryx::EnvironmentalPrimitiveBaseList &primitives, std::vector< memoryx::EntityBasePtr > &boxes, memoryx::EnvironmentalPrimitiveSegmentBasePrx environmentalPrimitiveSegment)
Definition: PrimitiveFusion.cpp:283
armarx::PrimitiveFusion::isSimilar
bool isSimilar(memoryx::EnvironmentalPrimitiveBasePtr leftPrimitive, memoryx::EnvironmentalPrimitiveBasePtr rightPrimitive)
Definition: PrimitiveFusion.cpp:238
armarx::PrimitiveFusion
A brief description.
Definition: PrimitiveFusion.h:42
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28