LocalizationSubUnit.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 RobotAPI::ArmarXObjects::GlobalPoseSubUnit
17  * @author Raphael ( raphael dot grimm at kit dot edu )
18  * @date 2017
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 #include <mutex>
26 
27 #include <Eigen/Core>
28 
29 #include <VirtualRobot/MathTools.h>
30 
33 #include <RobotAPI/interface/core/RobotState.h>
34 #include <RobotAPI/interface/units/LocalizationUnitInterface.h>
35 
36 #include "RobotUnitSubUnit.h"
37 
38 namespace armarx
39 {
40 
42  virtual public LocalizationUnitInterface,
43  virtual public SensorActorUnit
44  {
45  public:
46  // inherited from Component
47  std::string getDefaultName() const override
48  {
49  return "LocalizationUnit";
50  }
51 
52  void onInitComponent() override {}
53  void onConnectComponent() override {}
54  };
55 
56 
57 
58  class GlobalRobotPoseCorrectionSensorDevice;
59 
60  TYPEDEF_PTRS_HANDLE(LocalizationSubUnit);
62  virtual public RobotUnitSubUnit,
63  virtual public LocalizationUnit,
64  virtual public LocalizationSubUnitInterface
65  {
66  public:
67  LocalizationSubUnit() = default;
68  ~LocalizationSubUnit() override;
69 
70  void update(const SensorAndControl& sc, const JointAndNJointControllers& c) override;
71 
72  void reportGlobalRobotPoseCorrection(const TransformStamped& global_T_odom, const Ice::Current& = Ice::emptyCurrent) override;
73 
81 
82  private:
83 
84  std::string agentName;
85  std::string robotRootFrame;
86 
87 
88  };
89 }
armarx::LocalizationSubUnit::globalPositionCorrectionSensorDevice
GlobalRobotPoseCorrectionSensorDevice * globalPositionCorrectionSensorDevice
This device partially holds the information about the robot's global pose.
Definition: LocalizationSubUnit.h:80
armarx::JointAndNJointControllers
Structure used by the RobotUnit to swap lists of Joint and NJoint controllers.
Definition: JointAndNJointControllers.h:31
armarx::TYPEDEF_PTRS_HANDLE
TYPEDEF_PTRS_HANDLE(NJointCartesianNaturalPositionController)
Pose.h
armarx::LocalizationSubUnit::LocalizationSubUnit
LocalizationSubUnit()=default
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::RobotUnitSubUnit
Definition: RobotUnitSubUnit.h:34
armarx::LocalizationSubUnit::~LocalizationSubUnit
~LocalizationSubUnit() override
armarx::detail::ControlThreadOutputBufferEntry
Definition: ControlThreadOutputBuffer.h:165
SensorActorUnit.h
RobotUnitSubUnit.h
armarx::LocalizationSubUnit
Definition: LocalizationSubUnit.h:61
armarx::LocalizationUnit
Definition: LocalizationSubUnit.h:41
armarx::GlobalRobotPoseCorrectionSensorDevice
Definition: GlobalRobotPoseSensorDevice.h:56
armarx::LocalizationUnit::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: LocalizationSubUnit.h:53
armarx::SensorActorUnit
Base Class for SensorActorUnits.
Definition: SensorActorUnit.h:42
armarx::LocalizationUnit::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: LocalizationSubUnit.h:52
armarx::LocalizationUnit::getDefaultName
std::string getDefaultName() const override
Retrieve default name of component.
Definition: LocalizationSubUnit.h:47
armarx::LocalizationSubUnit::update
void update(const SensorAndControl &sc, const JointAndNJointControllers &c) override
Definition: LocalizationSubUnit.cpp:40
armarx::LocalizationSubUnit::reportGlobalRobotPoseCorrection
void reportGlobalRobotPoseCorrection(const TransformStamped &global_T_odom, const Ice::Current &=Ice::emptyCurrent) override
Definition: LocalizationSubUnit.cpp:51
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28