ObjectLocalizerDynamicSimulation.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2013-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 ArmarXSimulation::ArmarXObjects::ObjectLocalizerDynamicSimulation
19 * @author welke ( welke at kit dot edu )
20 * @date 2013
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25#pragma once
26
27
29#include <ArmarXCore/interface/observers/ObserverInterface.h>
30
31#include <ArmarXSimulation/interface/simulator/SimulatorInterface.h>
32
33#include <MemoryX/interface/workingmemory/WorkingMemoryUpdaterBase.h>
34//#include <Calibration/StereoCalibration.h>
35//#include <Calibration/Calibration.h>
38
39namespace armarx
40{
47
48 /**
49 * @class ObjectLocalizerDynamicSimulation
50 * @brief This component connects to the ArmarX Simulator and reports object poses from the physics world.
51 * By default it uses the simulator topic with name "Simulator".
52 *
53 * @ingroup ArmarXSimulatorComponents
54 *
55 */
57 virtual public armarx::Component,
58 virtual public memoryx::ObjectLocalizerInterface
59 {
60 public:
61 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
62
63 /// @see PropertyUser::createPropertyDefinitions()
65
66
67 protected:
68 void onInitComponent() override;
69 void onConnectComponent() override;
70
71 void
73 {
74 }
75
76 void
77 onExitComponent() override
78 {
79 }
80
81 /**
82 * localizes simulated object instances
83 *
84 * @param objectClassNames names of the class to localize
85 *
86 * @return list of object instances
87 */
88 memoryx::ObjectLocalizationResultList
89 localizeObjectClasses(const memoryx::ObjectClassNameList& objectClassNames,
90 const Ice::Current& c = Ice::emptyCurrent) override;
91
92 /// @see armarx::ManagedIceObject::getDefaultName()
93 std::string getDefaultName() const override;
94
96 computePositionNoise(const Eigen::Vector3f& pos);
97
98
99 private:
100 //memoryx::MultivariateNormalDistributionPtr calculateLocalizationUncertainty(Vec2d left_point, Vec2d right_point);
101 //memoryx::MultivariateNormalDistributionPtr calculateLocalizationUncertainty(const Eigen::Vector3f& position);
102 //void getImagePositions(const Eigen::Vector3f& position, Vec2d& left_point, Vec2d& right_point);
103 //bool isVisible(const Eigen::Vector3f& position);
104
105 std::string robotName;
106 std::string frameName;
107 float recognitionCertainty;
108 bool performVisibilityCheck;
109
110 SimulatorInterfacePrx simulatorPrx;
111 //CStereoCalibration stereoCalibration;
112
113 // noise
114 //Eigen::Vector2d imageNoiseLeft;
115 //Eigen::Vector2d imageNoiseRight;
116 };
117} // namespace armarx
constexpr T c
Default component property definition container.
Definition Component.h:70
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
This component connects to the ArmarX Simulator and reports object poses from the physics world.
void onInitComponent() override
Pure virtual hook for the subclass.
memoryx::ObjectLocalizationResultList localizeObjectClasses(const memoryx::ObjectClassNameList &objectClassNames, const Ice::Current &c=Ice::emptyCurrent) override
localizes simulated object instances
void onConnectComponent() override
Pure virtual hook for the subclass.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
::memoryx::MultivariateNormalDistributionPtr computePositionNoise(const Eigen::Vector3f &pos)
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
IceInternal::Handle< MultivariateNormalDistribution > MultivariateNormalDistributionPtr