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 
35 namespace 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  {
57  global_T_odom.transform);
58  }
59 } // namespace armarx
armarx::LocalizationSubUnit::globalPositionCorrectionSensorDevice
GlobalRobotPoseCorrectionSensorDevice * globalPositionCorrectionSensorDevice
This device partially holds the information about the robot's global pose.
Definition: LocalizationSubUnit.h:87
armarx::JointAndNJointControllers
Structure used by the RobotUnit to swap lists of Joint and NJoint controllers.
Definition: JointAndNJointControllers.h:32
ARMARX_IMPORTANT
#define ARMARX_IMPORTANT
Definition: Logging.h:190
armarx::LocalizationSubUnit::~LocalizationSubUnit
~LocalizationSubUnit() override
armarx::detail::ControlThreadOutputBufferEntry
Definition: ControlThreadOutputBuffer.h:182
armarx::GlobalRobotPoseCorrectionSensorDevice::updateGlobalPositionCorrection
void updateGlobalPositionCorrection(const SensorValueType::Transformation &global_T_odom)
Definition: GlobalRobotPoseSensorDevice.cpp:72
FramedPose.h
ARMARX_CHECK_EXPRESSION
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
Definition: ExpressionException.h:73
LocalizationSubUnit.h
GlobalRobotPoseSensorDevice.h
armarx::Logging::deactivateSpam
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
armarx::ManagedIceObject::getProxy
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
Definition: ManagedIceObject.cpp:407
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:52
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27