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
38namespace 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
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>
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
constexpr T c
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
AbstractMotionModel(armarx::RobotStateComponentInterfacePrx robotStateProxy)
void ice_postUnmarshal() override
armarx::PeriodicTask< MotionModelKBM >::pointer_type updaterThreadTask
static void CreateSample(VirtualRobot::RobotNodeSetPtr nodeSet, Eigen::VectorXf jointMax, Eigen::VectorXf jointMin, VirtualRobot::RobotNodePtr root, VirtualRobot::RobotNodePtr TCP, Ice::DoubleSeq &prop, Ice::DoubleSeq &shape)
VirtualRobot::RobotPtr robot
armarx::LinkedPosePtr getPredictedPoseInternal() override
Eigen::MatrixXf getJointAngles(armarx::SharedRobotInterfacePrx robotPrx)
KBM::Models::KBM_ptr kbm
void setPoseAtLastLocalisation(const armarx::LinkedPoseBasePtr &poseAtLastLocalization, const armarx::PoseBasePtr &globalRobotPoseAtLastLocalization, const MultivariateNormalDistributionBasePtr &uncertaintyAtLastLocalization, const Ice::Current &c=Ice::emptyCurrent) override
static KBM::Models::KBM_ptr CreateKBMFromSamples(VirtualRobot::RobotPtr robot, VirtualRobot::RobotNodeSetPtr nodeSet, VirtualRobot::SceneObjectPtr referenceFrame)
MotionModelKBM(std::string referenceNodeName, std::string nodeSetName, armarx::RobotStateComponentInterfacePrx robotStateProxy, memoryx::LongtermMemoryInterfacePrx longtermMemoryPrx)
MultivariateNormalDistributionBasePtr getUncertaintyInternal() override
AbstractMotionModel::EMotionModelType getMotionModelType() override
std::shared_ptr< class Robot > RobotPtr
Definition Bus.h:19
IceInternal::Handle< LinkedPose > LinkedPosePtr
Definition LinkedPose.h:52
::IceInternal::ProxyHandle<::IceProxy::armarx::SharedRobotInterface > SharedRobotInterfacePrx
Definition FramedPose.h:59
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx
std::shared_ptr< KBM > KBM_ptr
Definition kbm.h:71
VirtualRobot headers.
IceInternal::Handle< MotionModelKBM > MotionModelKBMPtr