UnimanualAffordanceArmarX.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as
6  * published by the Free Software Foundation; either version 2 of
7  * the License, or (at your option) any later version.
8  *
9  * ArmarX is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  *
17  * @package AffordanceKitArmarX
18  * @author Peter Kaiser ( peter dot kaiser at kit dot edu )
19  * @date 2016
20  * @copyright http://www.gnu.org/licenses/gpl.txt
21  * GNU General Public License
22  */
23 
24 #pragma once
25 
27 
28 #include <AffordanceKit/UnimanualAffordance.h>
29 #include <Inventor/nodes/SoCoordinate3.h>
30 #include <Inventor/nodes/SoLineSet.h>
31 #include <Inventor/nodes/SoMaterial.h>
32 
33 namespace AffordanceKitArmarX
34 {
35 
37  {
38  public:
39  UnimanualAffordanceArmarX(const AffordanceKit::UnimanualAffordancePtr& unimanualAffordance);
41 
42  void visualize(const armarx::DebugDrawerInterfacePrx& debugDrawer,
43  const std::string& layerName,
44  const std::string& id,
45  float minExpectedProbability,
46  const AffordanceKit::PrimitivePtr& primitive);
47 
48  void reset();
49 
50  protected:
51  Eigen::Vector3f computeSamplingPosition(const Eigen::Matrix4f& pose, float offset);
52  float computeSamplingDistance(const Eigen::Matrix4f& sampling1,
53  const Eigen::Matrix4f& sampling2);
54 
55  protected:
56  AffordanceKit::UnimanualAffordancePtr affordance;
57 
61  SoSeparator* visualizationNode;
62  };
63 
64  using UnimanualAffordanceArmarXPtr = std::shared_ptr<UnimanualAffordanceArmarX>;
65 
66 } // namespace AffordanceKitArmarX
DebugDrawerComponent.h
AffordanceKitArmarX::UnimanualAffordanceArmarX::affordance
AffordanceKit::UnimanualAffordancePtr affordance
Definition: UnimanualAffordanceArmarX.h:56
AffordanceKitArmarX::UnimanualAffordanceArmarX::computeSamplingDistance
float computeSamplingDistance(const Eigen::Matrix4f &sampling1, const Eigen::Matrix4f &sampling2)
Definition: UnimanualAffordanceArmarX.cpp:64
AffordanceKitArmarX::UnimanualAffordanceArmarX::computeSamplingPosition
Eigen::Vector3f computeSamplingPosition(const Eigen::Matrix4f &pose, float offset)
Definition: UnimanualAffordanceArmarX.cpp:57
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:650
AffordanceKitArmarX::UnimanualAffordanceArmarXPtr
std::shared_ptr< UnimanualAffordanceArmarX > UnimanualAffordanceArmarXPtr
Definition: UnimanualAffordanceArmarX.h:64
AffordanceKitArmarX::UnimanualAffordanceArmarX::visualizationMaterialNode
SoMaterial * visualizationMaterialNode
Definition: UnimanualAffordanceArmarX.h:59
AffordanceKitArmarX::UnimanualAffordanceArmarX::~UnimanualAffordanceArmarX
~UnimanualAffordanceArmarX()
Definition: UnimanualAffordanceArmarX.cpp:39
AffordanceKitArmarX::UnimanualAffordanceArmarX::visualize
void visualize(const armarx::DebugDrawerInterfacePrx &debugDrawer, const std::string &layerName, const std::string &id, float minExpectedProbability, const AffordanceKit::PrimitivePtr &primitive)
Definition: UnimanualAffordanceArmarX.cpp:77
AffordanceKitArmarX::UnimanualAffordanceArmarX::visualizationNode
SoSeparator * visualizationNode
Definition: UnimanualAffordanceArmarX.h:61
AffordanceKitArmarX::UnimanualAffordanceArmarX::visualizationCoordinateNode
SoCoordinate3 * visualizationCoordinateNode
Definition: UnimanualAffordanceArmarX.h:58
AffordanceKitArmarX::UnimanualAffordanceArmarX::visualizationLineSetNode
SoLineSet * visualizationLineSetNode
Definition: UnimanualAffordanceArmarX.h:60
IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface >
AffordanceKitArmarX::UnimanualAffordanceArmarX
Definition: UnimanualAffordanceArmarX.h:36
AffordanceKitArmarX::UnimanualAffordanceArmarX::UnimanualAffordanceArmarX
UnimanualAffordanceArmarX(const AffordanceKit::UnimanualAffordancePtr &unimanualAffordance)
Definition: UnimanualAffordanceArmarX.cpp:32
AffordanceKitArmarX
Definition: BimanualAffordanceArmarX.cpp:29
AffordanceKitArmarX::UnimanualAffordanceArmarX::reset
void reset()
Definition: UnimanualAffordanceArmarX.cpp:48