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 
26 
29 #include "AbstractMotionModel.h"
32 
33 #include <MemoryX/interface/components/LongtermMemoryInterface.h>
35 #include <VirtualRobot/VirtualRobot.h>
37 namespace memoryx
38 {
40  virtual public AbstractMotionModel,
41  virtual public MotionModelKBMBase
42  {
43  public:
44  MotionModelKBM(std::string referenceNodeName, std::string nodeSetName,
45  armarx::RobotStateComponentInterfacePrx robotStateProxy, memoryx::LongtermMemoryInterfacePrx longtermMemoryPrx);
47  {
49  }
50 
51  static void CreateSample(VirtualRobot::RobotNodeSetPtr nodeSet, Eigen::VectorXf jointMax, Eigen::VectorXf jointMin, VirtualRobot::RobotNodePtr root, VirtualRobot::RobotNodePtr TCP, Ice::DoubleSeq& prop, Ice::DoubleSeq& shape);
52  static KBM::Models::KBM_ptr CreateKBMFromSamples(VirtualRobot::RobotPtr robot, VirtualRobot::RobotNodeSetPtr nodeSet, VirtualRobot::SceneObjectPtr referenceFrame);
53  void setPoseAtLastLocalisation(const armarx::LinkedPoseBasePtr& poseAtLastLocalization, const armarx::PoseBasePtr& globalRobotPoseAtLastLocalization,
54  const MultivariateNormalDistributionBasePtr& uncertaintyAtLastLocalization, const Ice::Current& c = Ice::emptyCurrent) override;
55  protected:
56 
58  MultivariateNormalDistributionBasePtr getUncertaintyInternal() override;
59 
60  void ice_postUnmarshal() override;
61 
62 
63 
64  Eigen::MatrixXf getJointAngles(armarx::SharedRobotInterfacePrx robotPrx);
65 
66  void periodicUpdate();
67  // for the object factory
68  template <class IceBaseClass, class DerivedClass>
69  friend class armarx::GenericFactory;
71  KBM::Models::KBM_ptr kbm; // NICHT umziehen nach .ice
72  VirtualRobot::RobotPtr robot; // NICHT umziehen nach .ice
74  std::string memoryName;
75  private:
76  void init();
77 
78 
79 
80 
81 
82  };
84 }
85 
kbm.h
memoryx::MotionModelKBM::MotionModelKBM
MotionModelKBM()
Definition: MotionModelKBM.h:70
memoryx::KBM::Models::KBM_ptr
std::shared_ptr< KBM > KBM_ptr
Definition: kbm.h:68
MatrixVariant.h
memoryx::MotionModelKBM
Definition: MotionModelKBM.h:39
memoryx::MotionModelKBM::memoryName
std::string memoryName
Definition: MotionModelKBM.h:74
memoryx::MotionModelKBM::CreateKBMFromSamples
static KBM::Models::KBM_ptr CreateKBMFromSamples(VirtualRobot::RobotPtr robot, VirtualRobot::RobotNodeSetPtr nodeSet, VirtualRobot::SceneObjectPtr referenceFrame)
Definition: MotionModelKBM.cpp:257
memoryx::MotionModelKBM::getPredictedPoseInternal
armarx::LinkedPosePtr getPredictedPoseInternal() override
Definition: MotionModelKBM.cpp:81
PeriodicTask.h
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
memoryx::MotionModelKBM::getMotionModelType
AbstractMotionModel::EMotionModelType getMotionModelType() override
Definition: MotionModelKBM.h:46
FactoryCollectionBase.h
memoryx::MotionModelKBM::getJointAngles
Eigen::MatrixXf getJointAngles(armarx::SharedRobotInterfacePrx robotPrx)
Definition: MotionModelKBM.cpp:108
memoryx::MotionModelKBM::ice_postUnmarshal
void ice_postUnmarshal() override
Definition: MotionModelKBM.cpp:367
IceInternal::Handle
Definition: forward_declarations.h:8
memoryx::MotionModelKBM::getUncertaintyInternal
MultivariateNormalDistributionBasePtr getUncertaintyInternal() override
Definition: MotionModelKBM.cpp:343
memoryx::MotionModelKBM::robot
VirtualRobot::RobotPtr robot
Definition: MotionModelKBM.h:72
Eigen3VariantObjectFactories.h
memoryx::AbstractMotionModel
Definition: AbstractMotionModel.h:39
memoryx::MotionModelKBM::updaterThreadTask
armarx::PeriodicTask< MotionModelKBM >::pointer_type updaterThreadTask
Definition: MotionModelKBM.h:73
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:372
memoryx::MotionModelKBM::periodicUpdate
void periodicUpdate()
Definition: MotionModelKBM.cpp:122
memoryx::AbstractMotionModel::eMotionModelKBM
@ eMotionModelKBM
Definition: AbstractMotionModel.h:47
AbstractMotionModel.h
IceUtil::Handle
Definition: forward_declarations.h:29
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:51
memoryx::MotionModelKBM::kbm
KBM::Models::KBM_ptr kbm
Definition: MotionModelKBM.h:71
ChannelRef.h
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18
memoryx::AbstractMotionModel::EMotionModelType
EMotionModelType
Definition: AbstractMotionModel.h:42