MotionModelKBM.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 General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package MemoryX::MotionModelKBM
17 * @author David Schiebener ( Schiebener at kit dot edu)
18 * @date 2013
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #pragma once
24 
25 #include <VirtualRobot/VirtualRobot.h>
26 
32 
33 #include "AbstractMotionModel.h"
34 #include <MemoryX/interface/components/LongtermMemoryInterface.h>
37 
38 namespace memoryx
39 {
40  class MotionModelKBM : virtual public AbstractMotionModel, virtual public MotionModelKBMBase
41  {
42  public:
43  MotionModelKBM(std::string referenceNodeName,
44  std::string nodeSetName,
46  memoryx::LongtermMemoryInterfacePrx longtermMemoryPrx);
47 
49  getMotionModelType() override
50  {
52  }
53 
54  static void CreateSample(VirtualRobot::RobotNodeSetPtr nodeSet,
55  Eigen::VectorXf jointMax,
56  Eigen::VectorXf jointMin,
57  VirtualRobot::RobotNodePtr root,
58  VirtualRobot::RobotNodePtr TCP,
59  Ice::DoubleSeq& prop,
60  Ice::DoubleSeq& shape);
63  VirtualRobot::RobotNodeSetPtr nodeSet,
64  VirtualRobot::SceneObjectPtr referenceFrame);
66  const armarx::LinkedPoseBasePtr& poseAtLastLocalization,
67  const armarx::PoseBasePtr& globalRobotPoseAtLastLocalization,
68  const MultivariateNormalDistributionBasePtr& uncertaintyAtLastLocalization,
69  const Ice::Current& c = Ice::emptyCurrent) override;
70 
71  protected:
73  MultivariateNormalDistributionBasePtr getUncertaintyInternal() override;
74 
75  void ice_postUnmarshal() override;
76 
77 
78  Eigen::MatrixXf getJointAngles(armarx::SharedRobotInterfacePrx robotPrx);
79 
80  void periodicUpdate();
81  // for the object factory
82  template <class IceBaseClass, class DerivedClass>
83  friend class armarx::GenericFactory;
84 
86  {
87  }
88 
89  KBM::Models::KBM_ptr kbm; // NICHT umziehen nach .ice
90  VirtualRobot::RobotPtr robot; // NICHT umziehen nach .ice
92  updaterThreadTask; // NICHT umziehen nach .ice
93  std::string memoryName;
94 
95  private:
96  void init();
97  };
98 
100 } // namespace memoryx
kbm.h
memoryx::MotionModelKBM::MotionModelKBM
MotionModelKBM()
Definition: MotionModelKBM.h:85
memoryx::KBM::Models::KBM_ptr
std::shared_ptr< KBM > KBM_ptr
Definition: kbm.h:71
MatrixVariant.h
memoryx::MotionModelKBM
Definition: MotionModelKBM.h:40
memoryx::MotionModelKBM::memoryName
std::string memoryName
Definition: MotionModelKBM.h:93
memoryx::MotionModelKBM::CreateKBMFromSamples
static KBM::Models::KBM_ptr CreateKBMFromSamples(VirtualRobot::RobotPtr robot, VirtualRobot::RobotNodeSetPtr nodeSet, VirtualRobot::SceneObjectPtr referenceFrame)
Definition: MotionModelKBM.cpp:283
memoryx::MotionModelKBM::getPredictedPoseInternal
armarx::LinkedPosePtr getPredictedPoseInternal() override
Definition: MotionModelKBM.cpp:91
PeriodicTask.h
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:46
memoryx::MotionModelKBM::getMotionModelType
AbstractMotionModel::EMotionModelType getMotionModelType() override
Definition: MotionModelKBM.h:49
FactoryCollectionBase.h
memoryx::MotionModelKBM::getJointAngles
Eigen::MatrixXf getJointAngles(armarx::SharedRobotInterfacePrx robotPrx)
Definition: MotionModelKBM.cpp:123
memoryx::MotionModelKBM::ice_postUnmarshal
void ice_postUnmarshal() override
Definition: MotionModelKBM.cpp:408
IceInternal::Handle
Definition: forward_declarations.h:8
memoryx::MotionModelKBM::getUncertaintyInternal
MultivariateNormalDistributionBasePtr getUncertaintyInternal() override
Definition: MotionModelKBM.cpp:372
memoryx::MotionModelKBM::robot
VirtualRobot::RobotPtr robot
Definition: MotionModelKBM.h:90
Eigen3VariantObjectFactories.h
memoryx::AbstractMotionModel
Definition: AbstractMotionModel.h:39
memoryx::MotionModelKBM::updaterThreadTask
armarx::PeriodicTask< MotionModelKBM >::pointer_type updaterThreadTask
Definition: MotionModelKBM.h:92
KBMData.h
memoryx::MotionModelKBM::CreateSample
static void CreateSample(VirtualRobot::RobotNodeSetPtr nodeSet, Eigen::VectorXf jointMax, Eigen::VectorXf jointMin, VirtualRobot::RobotNodePtr root, VirtualRobot::RobotNodePtr TCP, Ice::DoubleSeq &prop, Ice::DoubleSeq &shape)
Definition: MotionModelKBM.cpp:414
memoryx::MotionModelKBM::periodicUpdate
void periodicUpdate()
Definition: MotionModelKBM.cpp:138
memoryx::AbstractMotionModel::eMotionModelKBM
@ eMotionModelKBM
Definition: AbstractMotionModel.h:47
AbstractMotionModel.h
IceUtil::Handle
Definition: forward_declarations.h:30
IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface >
scene3D::SceneObjectPtr
boost::intrusive_ptr< SceneObject > SceneObjectPtr
Definition: PointerDefinitions.h:40
armarx::GenericFactory
Definition: FactoryCollectionBase.h:51
memoryx::MotionModelKBM::setPoseAtLastLocalisation
void setPoseAtLastLocalisation(const armarx::LinkedPoseBasePtr &poseAtLastLocalization, const armarx::PoseBasePtr &globalRobotPoseAtLastLocalization, const MultivariateNormalDistributionBasePtr &uncertaintyAtLastLocalization, const Ice::Current &c=Ice::emptyCurrent) override
Definition: MotionModelKBM.cpp:56
memoryx::MotionModelKBM::kbm
KBM::Models::KBM_ptr kbm
Definition: MotionModelKBM.h:89
ChannelRef.h
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:19
memoryx::AbstractMotionModel::EMotionModelType
EMotionModelType
Definition: AbstractMotionModel.h:42