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
30#include <RobotAPI/interface/core/RobotState.h>
31#include <RobotAPI/interface/units/LocalizationUnitInterface.h>
33
34#include "RobotUnitSubUnit.h"
35
36namespace armarx
37{
38
40 virtual public LocalizationUnitInterface,
41 virtual public SensorActorUnit
42 {
43 public:
44 // inherited from Component
45 std::string
46 getDefaultName() const override
47 {
48 return "LocalizationUnit";
49 }
50
51 void
52 onInitComponent() override
53 {
54 }
55
56 void
58 {
59 }
60 };
61
62
63 class GlobalRobotPoseCorrectionSensorDevice;
64
66
68 virtual public RobotUnitSubUnit,
69 virtual public LocalizationUnit,
70 virtual public LocalizationSubUnitInterface
71 {
72 public:
75
76 void update(const SensorAndControl& sc, const JointAndNJointControllers& c) override;
77
78 void reportGlobalRobotPoseCorrection(const TransformStamped& global_T_odom,
79 const Ice::Current& = Ice::emptyCurrent) override;
80
81 /**
82 * This device partially holds the information about the robot's global pose.
83 * It is the transformation from the `global` to the `odometry` frame which can be
84 * obtained by SLAM. In conjunction with the relative pose (pose within the `odometry` frame),
85 * the global pose can be obtained.
86 */
88
89 private:
90 std::string agentName;
91 std::string robotRootFrame;
92 };
93} // namespace armarx
#define TYPEDEF_PTRS_HANDLE(T)
constexpr T c
void reportGlobalRobotPoseCorrection(const TransformStamped &global_T_odom, const Ice::Current &=Ice::emptyCurrent) override
void update(const SensorAndControl &sc, const JointAndNJointControllers &c) override
GlobalRobotPoseCorrectionSensorDevice * globalPositionCorrectionSensorDevice
This device partially holds the information about the robot's global pose.
void onInitComponent() override
Pure virtual hook for the subclass.
void onConnectComponent() override
Pure virtual hook for the subclass.
std::string getDefaultName() const override
Retrieve default name of component.
SensorActorUnit()
Constructs a SensorActorUnit.
This file offers overloads of toIce() and fromIce() functions for STL container types.
detail::ControlThreadOutputBufferEntry SensorAndControl
Structure used by the RobotUnit to swap lists of Joint and NJoint controllers.