LocalizationSubUnit.cpp
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::LocalizationSubUnit
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#include "LocalizationSubUnit.h"
23
24#include <Eigen/Core>
25#include <Eigen/Geometry>
26
27#include <SimoxUtility/math/convert/mat4f_to_rpy.h>
28#include <VirtualRobot/MathTools.h>
29
31#include <RobotAPI/interface/core/GeometryBase.h>
32#include <RobotAPI/interface/core/PoseBase.h>
34
35namespace armarx
36{
38
39 void
42 {
43 if (!getProxy())
44 {
45 //this unit is not initialized yet
46 ARMARX_IMPORTANT << deactivateSpam(1) << "not initialized yet - skipping this update";
47 return;
48 }
49 }
50
51 void
52 LocalizationSubUnit::reportGlobalRobotPoseCorrection(const TransformStamped& global_T_odom,
53 const Ice::Current&)
54 {
56 globalPositionCorrectionSensorDevice->updateGlobalPositionCorrection(
57 global_T_odom.transform);
58 }
59} // namespace armarx
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.
SpamFilterDataPtr deactivateSpam(float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const
disables the logging for the current line for the given amount of seconds.
Definition Logging.cpp:99
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
Definition Logging.h:190
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.