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 
30 #include <RobotAPI/interface/core/GeometryBase.h>
31 #include <RobotAPI/interface/core/PoseBase.h>
33 
34 namespace armarx
35 {
37 
38  void
41  {
42  if (!getProxy())
43  {
44  //this unit is not initialized yet
45  ARMARX_IMPORTANT << deactivateSpam(1) << "not initialized yet - skipping this update";
46  return;
47  }
48  }
49 
50  void
51  LocalizationSubUnit::reportGlobalRobotPoseCorrection(const TransformStamped& global_T_odom,
52  const Ice::Current&)
53  {
56  global_T_odom.transform);
57  }
58 } // namespace armarx
armarx::LocalizationSubUnit::globalPositionCorrectionSensorDevice
GlobalRobotPoseCorrectionSensorDevice * globalPositionCorrectionSensorDevice
This device partially holds the information about the robot's global pose.
Definition: LocalizationSubUnit.h:89
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:183
armarx::LocalizationSubUnit::~LocalizationSubUnit
~LocalizationSubUnit() override
armarx::detail::ControlThreadOutputBufferEntry
Definition: ControlThreadOutputBuffer.h:177
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:92
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:393
armarx::LocalizationSubUnit::update
void update(const SensorAndControl &sc, const JointAndNJointControllers &c) override
Definition: LocalizationSubUnit.cpp:39
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