PlatformUnitDynamicSimulation.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2013-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package ArmarXSimulation
19  * @author Valerij Wittenbeck, Nikolaus Vahrenkamp
20  * @date 2014
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 
25 
30 #include <Eigen/Geometry>
31 
32 #include <cmath>
33 
34 using namespace armarx;
35 
37 {
38  linearVelocityMax = getProperty<float>("LinearVelocityMax").getValue();
39  linearVelocityMin = getProperty<float>("LinearVelocityMin").getValue();
40  linearAccelerationMax = getProperty<float>("LinearAccelerationMax").getValue();
41  angularVelocityMax = getProperty<float>("AngularVelocityMax").getValue();
42  angularAccelerationMax = getProperty<float>("AngularAccelerationMax").getValue();
43  platformOrientationOffset = getProperty<float>("PlatformOrientationOffset").getValue();
44 
45 
46  robotName = getProperty<std::string>("RobotName").getValue();
47  platformName = getProperty<std::string>("PlatformName").getValue();
48 
49  simulatorPrxName = getProperty<std::string>("SimulatorProxyName").getValue();
50 
51  positionalAccuracy = 0.02f; //in m
52  orientationalAccuracy = 0.1f; //in rad
53 
54  intervalMs = getProperty<int>("IntervalMs").getValue();
55  ARMARX_VERBOSE << "Starting platform unit dynamic simulation with " << intervalMs << " ms interval";
57  simulationTask->setDelayWarningTolerance(100);
58 
59  if (!robotName.empty())
60  {
61  std::string robotTopicName = "Simulator_Robot_";
62  robotTopicName += robotName;
63  ARMARX_INFO << "Simulator Robot topic: " << robotTopicName;
64  usingTopic(robotTopicName);
65  }
66  else
67  {
68  ARMARX_WARNING << "No robot loaded...";
69  }
70 
72 
73  currentRotation = 0.0f;
74  targetRotation = 0.0f;
75 }
76 
78 {
79  ARMARX_INFO << "Stopping platform unit";
80  std::unique_lock<std::mutex> lock(currentPoseMutex);
81  simulationTask->stop();
82  simulatorPrx = nullptr;
83 }
84 
86 {
87  platformControlMode = eUnknown;
88 
89 
90  ARMARX_INFO << "Using simulator proxy: " << simulatorPrxName << flush;
91  simulatorPrx = getProxy<SimulatorInterfacePrx>(simulatorPrxName);
92 
93  {
94  std::unique_lock<std::mutex> lock(currentPoseMutex);
96  }
99 
100  simulationTask->start();
101 }
102 
103 
105 {
106  simulationTask->stop();
107 }
108 
109 
110 Eigen::Vector3f PlatformUnitDynamicSimulation::calculateLinearVelocity(Eigen::Vector3f distance, Eigen::Vector3f curV)
111 {
112  ARMARX_DEBUG << "calc platform vel, dist:" << distance.transpose() << ", curVel:" << curV.transpose() << ", linearVelocityMax:" << linearVelocityMax << ", linearAccelerationMax:" << linearAccelerationMax << flush;
113 
114  if (distance.norm() < positionalAccuracy)
115  {
116  ARMARX_DEBUG << "calc platform vel end: ZERO" << flush;
117  return Eigen::Vector3f::Zero();
118  }
119 
120  Eigen::Vector3f v = distance;
121  //make sure there is a minimum velocity so the platform doesn't slow down too much
122  v = clampf(v.norm(), linearVelocityMin, linearVelocityMax) * v.normalized();
123 
124  if (!std::isfinite(v(0)) || !std::isfinite(v(1)) || !std::isfinite(v(2)))
125  {
126 
127  ARMARX_ERROR << "NAN in platform calculation, v=" << v << ", distance=" << distance << ",distance.normalized()=" << distance.normalized() << flush;
128  return Eigen::Vector3f::Zero();
129  }
130 
131  //throttle speed if the change of current to desired is too large (> max. accel)
132  Eigen::Vector3f a = (v - curV);
133 
134  if ((v - curV).norm() > 1e-5)
135  {
136  a = std::min<float>(a.norm(), linearAccelerationMax) * a.normalized();
137 
138  if (!std::isfinite(a(0)) || !std::isfinite(a(1)) || !std::isfinite(a(2)))
139  {
140 
141  ARMARX_ERROR << "NAN in platform calculation, a=" << a << ", (v - curV)=" << (v - curV) << ",(v - curV).normalized()=" << (v - curV).normalized() << flush;
142  return Eigen::Vector3f::Zero();
143  }
144  }
145 
146  v = a + curV;
147  ARMARX_DEBUG << "calc platform vel end: " << v.transpose() << flush;
148  return v;
149 }
150 
152 {
153  ARMARX_DEBUG << "calc platform ang vel, from:" << source << " to:" << target << ", curVel:" << curV << flush;
154  const float M_2PI = 2 * M_PI;
155  float cw = fmod(source - target + M_2PI, M_2PI); //ensure that angle is in [0,2PI]
156  float ccw = fmod(target - source + M_2PI, M_2PI);
157  float minDist = (cw < ccw) ? -cw : ccw;
158 
159  if (fabs(minDist) < orientationalAccuracy)
160  {
161  ARMARX_DEBUG << "calc platform ang vel end: ZERO" << flush;
162  return 0.f;
163  }
164 
165  float v = (minDist < 0) ? -angularVelocityMax : angularVelocityMax;
166  float a = (v - curV);
168  v = a + curV;
169  ARMARX_DEBUG << "calc platform ang vel end:" << v << flush;
170  return v;
171 }
172 
173 void PlatformUnitDynamicSimulation::stopPlatform(const Ice::Current& current)
174 {
175  moveRelative(0, 0, 0, 500, 500, current);
176 }
177 
178 static Eigen::Vector2f transformToLocalVelocity(float currentRotation, float velX, float velY)
179 {
180  // Revert the rotation by rotating by the negative angle
181  return Eigen::Rotation2Df(-currentRotation) * Eigen::Vector2f(velX, velY);
182 }
183 
185 {
186  Eigen::Vector3f relTargetPosition;
187  Eigen::Vector3f curLinVel;
188  float curAngVel = 0.f;
189  {
190  std::unique_lock<std::mutex> lock(currentPoseMutex);
191 
192  if (!simulatorPrx)
193  {
194  return;
195  }
196 
197  if (platformControlMode == ePositionControl)
198  {
199 
200 
201  ARMARX_DEBUG << "Platform sim step" << flush;
202 
203  SimulatedRobotState state = simulatorPrx->getRobotState(robotName);
204 
205  if (!state.hasRobot)
206  {
207  ARMARX_ERROR << deactivateSpam(5) << "No robot with name " << robotName;
208  return;
209  }
210 
211  Vector3Ptr p = Vector3Ptr::dynamicCast(state.pose->position);
212  relTargetPosition << (targetPosition.x - p->x) / 1000.f, (targetPosition.y - p->y) / 1000.f, 0;
213 
214  Vector3BasePtr v = state.linearVelocity;
215  Vector3BasePtr o = state.angularVelocity;
216  currentVelocity.x = v->x;
217  currentVelocity.y = v->y;
219 
220  // The currentVelocity is in the global frame, we need to report the velocity in the platform local frame
221  Eigen::Vector2f localVelocity = transformToLocalVelocity(currentRotation, currentVelocity.x, currentVelocity.y);
222  listenerPrx->begin_reportPlatformVelocity(localVelocity.x(), localVelocity.y(), currentRotationVelocity);
223 
224  curLinVel = Eigen::Vector3f(currentVelocity.x / 1000.f, currentVelocity.y / 1000.f, 0.f);
225  curAngVel = currentRotationVelocity;
226 
227  const Eigen::Vector3f desiredLinVel = calculateLinearVelocity(relTargetPosition, curLinVel);
228  const float desiredAngVel = calculateAngularVelocity(currentRotation, targetRotation, curAngVel);
229 
230  simulatorPrx->begin_setRobotLinearVelocity(robotName, platformName, new Vector3(desiredLinVel));
231  simulatorPrx->begin_setRobotAngularVelocity(robotName, platformName, new Vector3(Eigen::Vector3f(0.f, 0.f, desiredAngVel)));
232  ARMARX_DEBUG << "Platform sim step end" << flush;
233  }
234  }
235 }
236 
237 void PlatformUnitDynamicSimulation::moveTo(Ice::Float targetPlatformPositionX, Ice::Float targetPlatformPositionY, Ice::Float targetPlatformRotation, Ice::Float positionalAccuracy, Ice::Float orientationalAccuracy, const Ice::Current& c)
238 {
239  std::unique_lock<std::mutex> lock(currentPoseMutex);
240  platformControlMode = ePositionControl;
241  ARMARX_DEBUG << "Platform move to" << flush;
242  targetPosition.x = targetPlatformPositionX;
243  targetPosition.y = targetPlatformPositionY;
244  targetRotation = targetPlatformRotation;
245  this->positionalAccuracy = positionalAccuracy * .001f;
246  this->orientationalAccuracy = orientationalAccuracy;
247  // listenerPrx->begin_reportNewTargetPose(targetPosition.x, targetPosition.y, targetRotation);
248  ARMARX_INFO << "New Target: " << targetPosition.x << " " << targetPosition.y << " " << targetRotation << flush;
249 }
250 
251 void PlatformUnitDynamicSimulation::move(float targetPlatformVelocityX, float targetPlatformVelocityY, float targetPlatformVelocityRotation, const Ice::Current& c)
252 {
253  std::unique_lock<std::mutex> lock(currentPoseMutex);
254  targetPlatformVelocityRotation *= 5;
255 
256  Eigen::Vector3f translationVel;
257  platformControlMode = eVelocityControl;
258  translationVel << targetPlatformVelocityX, targetPlatformVelocityY, 0;
259  translationVel *= .003;
260  // ARMARX_INFO << deactivateSpam(1) << "New Platformvelocity: " << translationVel << "\nrot vel: " << targetPlatformVelocityRotation;
261 
262  simulatorPrx->setRobotLinearVelocityRobotRootFrame(robotName, platformName, new Vector3(translationVel));
263  simulatorPrx->setRobotAngularVelocityRobotRootFrame(robotName, platformName, new Vector3(Eigen::Vector3f(0.f, 0.f, targetPlatformVelocityRotation)));
264 }
265 
266 void PlatformUnitDynamicSimulation::moveRelative(float targetPlatformOffsetX, float targetPlatformOffsetY, float targetPlatformOffsetRotation, float positionalAccuracy, float orientationalAccuracy, const Ice::Current& c)
267 {
268  float targetPositionX, targetPositionY, targetRotation;
269  {
270  std::unique_lock<std::mutex> lock(currentPoseMutex);
271  platformControlMode = ePositionControl;
272  ARMARX_DEBUG << "Platform move relative" << flush;
273  targetPositionX = currentPosition.x + targetPlatformOffsetX;
274  targetPositionY = currentPosition.y + targetPlatformOffsetY;
275  targetRotation = currentRotation + targetPlatformOffsetRotation;
276  }
277  moveTo(targetPositionX, targetPositionY, targetRotation, positionalAccuracy, orientationalAccuracy);
278 }
279 
280 void PlatformUnitDynamicSimulation::setMaxVelocities(float linearVelocity, float angularVelocity, const Ice::Current& c)
281 {
282  linearVelocityMax = linearVelocity;
283  angularVelocityMax = angularVelocity;
284 }
285 
286 
287 void PlatformUnitDynamicSimulation::updateCurrentPose(const PoseBasePtr& newPose)
288 {
289  ARMARX_DEBUG << "Update new platform pose" << flush;
290 
291  if (!newPose)
292  {
293  return;
294  }
295 
296  Vector3Ptr newPosition = Vector3Ptr::dynamicCast(newPose->position);
297 
298  if (newPosition)
299  {
300  currentPosition = Vector3(newPosition->toEigen());
301  }
302 
303  QuaternionPtr newOrientation = QuaternionPtr::dynamicCast(newPose->orientation);
304 
305  if (newOrientation)
306  {
307  //axis is assumed to be z (fixed)
308  Eigen::Matrix3f rotMat = newOrientation->toEigen();
309  currentRotation = copysign(std::acos(rotMat(0, 0)), std::asin(rotMat(1, 0)));
310  //for some really odd reason, currentRotation can be nan when it should be 0
312 
314  }
315 }
316 
317 void PlatformUnitDynamicSimulation::updateCurrentVelocity(const Vector3BasePtr& translationVel, const Vector3BasePtr& rotationVel)
318 {
319  ARMARX_DEBUG << "Update new platform vel" << flush;
320 
321  if (translationVel)
322  {
323  currentVelocity = *Vector3Ptr::dynamicCast(translationVel);
324  ARMARX_DEBUG << "currentVelocity: " << currentVelocity.x << "," << currentVelocity.y << "," << currentVelocity.z;
325  }
326  if (rotationVel)
327  {
328  ARMARX_DEBUG << "currentRotationVelocity (only z is used): " << rotationVel->x << "," << rotationVel->x << "," << rotationVel->z;
329  currentRotationVelocity = rotationVel->z;
330  }
331 }
332 
333 void PlatformUnitDynamicSimulation::reportState(SimulatedRobotState const& state, const Ice::Current&)
334 {
335  std::unique_lock<std::mutex> lock(currentPoseMutex);
336 
337  // Pose
338  updateCurrentPose(state.pose);
339 
340  ::armarx::TransformStamped transformStamped;
341 
342  FrameHeader header;
343  header.parentFrame = GlobalFrame;
344  header.frame = "root";
345  header.agent = robotName;
346  header.timestampInMicroSeconds = state.timestampInMicroSeconds;
347 
348  TransformStamped globalRobotPose;
349  globalRobotPose.header = header;
350  globalRobotPose.transform = armarx::fromIce(state.pose);
351 
352  globalPosePrx->reportGlobalRobotPose(globalRobotPose);
353 
354  // Velocity
355  updateCurrentVelocity(state.linearVelocity, state.angularVelocity);
356 
357  if (platformControlMode != ePositionControl)
358  {
359  // The currentVelocity is in the global frame, we need to report the velocity in the platform local frame
360  Eigen::Vector2f localVelocity = transformToLocalVelocity(currentRotation, currentVelocity.x, currentVelocity.y);
361  listenerPrx->reportPlatformVelocity(localVelocity.x(), localVelocity.y(), currentRotationVelocity);
362  }
363 }
364 
366 {
368 
369  def->defineOptionalProperty<int>("IntervalMs", 100, "The time in milliseconds between two calls to the simulation method.");
370 
371  //assures that the platform still gets some amount of velocity when near target
372  def->defineOptionalProperty<float>("LinearVelocityMin", 0.5, "Minimum Linear velocity of the platform (unit: m/sec).");
373  def->defineOptionalProperty<float>("LinearVelocityMax", 1.5, "Maximum Linear velocity of the platform (unit: m/sec).");
374  def->defineOptionalProperty<float>("LinearAccelerationMax", 0.9, "Maximum Linear Acceleration (unit: m/sec^2");
375  def->defineOptionalProperty<float>("AngularVelocityMax", 0.8, "Maximum Angular velocity of the platform (unit: rad/sec).");
376  def->defineOptionalProperty<float>("AngularAccelerationMax", 1.9, "Maximum Angular Acceleration (unit: rad/sec^2");
377  def->defineOptionalProperty<float>("PlatformOrientationOffset", 0, "Rotation offset of the platform (unit: rad).");
378  def->defineOptionalProperty<std::string>("RobotName", "Armar3", "Name of the Robot to use.");
379  def->defineOptionalProperty<std::string>("PlatformName", "Platform", "Name of the Platform node to use.");
380  def->defineOptionalProperty<std::string>("SimulatorProxyName", "Simulator", "Name of the simulator proxy to use.");
381 
382  return def;
383 }
armarx::PlatformUnitDynamicSimulation::positionalAccuracy
::Ice::Float positionalAccuracy
Definition: PlatformUnitDynamicSimulation.h:118
armarx::PlatformUnitDynamicSimulation::updateCurrentVelocity
void updateCurrentVelocity(const Vector3BasePtr &translationVel, const Vector3BasePtr &rotationVel)
Definition: PlatformUnitDynamicSimulation.cpp:317
ARMARX_VERBOSE
#define ARMARX_VERBOSE
Definition: Logging.h:180
armarx::PlatformUnitDynamicSimulation::reportState
void reportState(SimulatedRobotState const &state, const Ice::Current &) override
Definition: PlatformUnitDynamicSimulation.cpp:333
armarx::VariantType::Float
const VariantTypeId Float
Definition: Variant.h:918
armarx::PlatformUnitDynamicSimulation::currentPoseMutex
std::mutex currentPoseMutex
Definition: PlatformUnitDynamicSimulation.h:97
armarx::PlatformUnitDynamicSimulation::linearAccelerationMax
::Ice::Float linearAccelerationMax
Definition: PlatformUnitDynamicSimulation.h:112
armarx::PlatformUnitDynamicSimulation::simulatorPrxName
std::string simulatorPrxName
Definition: PlatformUnitDynamicSimulation.h:122
armarx::PlatformUnitDynamicSimulation::onStopPlatformUnit
void onStopPlatformUnit() override
Definition: PlatformUnitDynamicSimulation.cpp:77
armarx::PlatformUnitDynamicSimulation::platformOrientationOffset
::Ice::Float platformOrientationOffset
Definition: PlatformUnitDynamicSimulation.h:113
armarx::PlatformUnitDynamicSimulation::simulationFunction
void simulationFunction()
Definition: PlatformUnitDynamicSimulation.cpp:184
armarx::PlatformUnitDynamicSimulation::stopPlatform
void stopPlatform(const Ice::Current &current) override
Definition: PlatformUnitDynamicSimulation.cpp:173
Pose.h
armarx::PlatformUnitDynamicSimulation::updateCurrentPose
void updateCurrentPose(const PoseBasePtr &newPose)
Definition: PlatformUnitDynamicSimulation.cpp:287
armarx::PlatformUnitDynamicSimulation::simulationTask
PeriodicTask< PlatformUnitDynamicSimulation >::pointer_type simulationTask
Definition: PlatformUnitDynamicSimulation.h:131
armarx::GlobalFrame
const std::string GlobalFrame
Definition: FramedPose.h:62
boost::target
Vertex target(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Definition: point_cloud_graph.h:688
armarx::PlatformUnitDynamicSimulation::calculateAngularVelocity
float calculateAngularVelocity(float source, float target, float curV)
Definition: PlatformUnitDynamicSimulation.cpp:151
armarx::PlatformUnit::listenerPrx
PlatformUnitListenerPrx listenerPrx
PlatformUnitListener proxy for publishing state updates.
Definition: PlatformUnit.h:124
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::PlatformUnitDynamicSimulation::onExitPlatformUnit
void onExitPlatformUnit() override
Definition: PlatformUnitDynamicSimulation.cpp:104
armarx::PlatformUnitDynamicSimulation::currentRotationVelocity
::Ice::Float currentRotationVelocity
Definition: PlatformUnitDynamicSimulation.h:108
armarx::PlatformUnitDynamicSimulation::orientationalAccuracy
::Ice::Float orientationalAccuracy
Definition: PlatformUnitDynamicSimulation.h:119
armarx::PlatformUnitDynamicSimulation::angularAccelerationMax
::Ice::Float angularAccelerationMax
Definition: PlatformUnitDynamicSimulation.h:116
armarx::PlatformUnitDynamicSimulation::platformName
std::string platformName
Definition: PlatformUnitDynamicSimulation.h:124
IceInternal::Handle< Vector3 >
std::isfinite
bool isfinite(const std::vector< T, Ts... > &v)
Definition: algorithm.h:327
armarx::PlatformUnitDynamicSimulation::move
void move(float targetPlatformVelocityX, float targetPlatformVelocityY, float targetPlatformVelocityRotation, const Ice::Current &c=Ice::emptyCurrent) override
Definition: PlatformUnitDynamicSimulation.cpp:251
armarx::PlatformUnitDynamicSimulation::moveTo
void moveTo(Ice::Float targetPlatformPositionX, Ice::Float targetPlatformPositionY, Ice::Float targetPlatformRotation, Ice::Float positionalAccuracy, Ice::Float orientationalAccuracy, const Ice::Current &c=Ice::emptyCurrent) override
Definition: PlatformUnitDynamicSimulation.cpp:237
armarx::PlatformUnitDynamicSimulation::simulatorPrx
SimulatorInterfacePrx simulatorPrx
Definition: PlatformUnitDynamicSimulation.h:129
armarx::ctrlutil::a
double a(double t, double a0, double j)
Definition: CtrlUtil.h:45
M_PI
#define M_PI
Definition: MathTools.h:17
FramedPose.h
armarx::PlatformUnitDynamicSimulation::linearVelocityMax
::Ice::Float linearVelocityMax
Definition: PlatformUnitDynamicSimulation.h:111
armarx::flush
const LogSender::manipulator flush
Definition: LogSender.h:251
ARMARX_DEBUG
#define ARMARX_DEBUG
Definition: Logging.h:177
armarx::PlatformUnitDynamicSimulation::createPropertyDefinitions
PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: PlatformUnitDynamicSimulation.cpp:365
armarx::PlatformUnitDynamicSimulation::currentVelocity
Vector3 currentVelocity
Definition: PlatformUnitDynamicSimulation.h:107
armarx::PlatformUnitDynamicSimulation::targetRotation
::Ice::Float targetRotation
Definition: PlatformUnitDynamicSimulation.h:105
PlatformUnitDynamicSimulation.h
armarx::PlatformUnitDynamicSimulation::onInitPlatformUnit
void onInitPlatformUnit() override
Definition: PlatformUnitDynamicSimulation.cpp:36
ARMARX_ERROR
#define ARMARX_ERROR
Definition: Logging.h:189
boost::source
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Definition: point_cloud_graph.h:681
armarx::PlatformUnitDynamicSimulation::intervalMs
int intervalMs
Definition: PlatformUnitDynamicSimulation.h:99
armarx::fromIce
void fromIce(const std::map< IceKeyT, IceValueT > &iceMap, boost::container::flat_map< CppKeyT, CppValueT > &cppMap)
Definition: ice_conversions_boost_templates.h:26
armarx::PlatformUnitDynamicSimulation::currentRotation
::Ice::Float currentRotation
Definition: PlatformUnitDynamicSimulation.h:103
ExpressionException.h
armarx::ManagedIceObject::usingTopic
void usingTopic(const std::string &name, bool orderedPublishing=false)
Registers a proxy for subscription after initialization.
Definition: ManagedIceObject.cpp:248
armarx::ctrlutil::v
double v(double t, double v0, double a0, double j)
Definition: CtrlUtil.h:39
GfxTL::Matrix3f
MatrixXX< 3, 3, float > Matrix3f
Definition: MatrixXX.h:600
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
armarx::PlatformUnitDynamicSimulation::targetPosition
Vector3 targetPosition
Definition: PlatformUnitDynamicSimulation.h:102
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::PlatformUnitDynamicSimulation::moveRelative
void moveRelative(float targetPlatformOffsetX, float targetPlatformOffsetY, float targetPlatformOffsetRotation, float positionalAccuracy, float orientationalAccuracy, const Ice::Current &c=Ice::emptyCurrent) override
Definition: PlatformUnitDynamicSimulation.cpp:266
armarx::PlatformUnitDynamicSimulation::currentPosition
Vector3 currentPosition
Definition: PlatformUnitDynamicSimulation.h:101
memoryx::KBM::Vector3
Eigen::Vector3d Vector3
Definition: kbm.h:41
armarx::PlatformUnitDynamicSimulation::platformControlMode
ControlMode platformControlMode
Definition: PlatformUnitDynamicSimulation.h:126
armarx::PlatformUnitDynamicSimulation::onStartPlatformUnit
void onStartPlatformUnit() override
Definition: PlatformUnitDynamicSimulation.cpp:85
armarx::PlatformUnitDynamicSimulation::setMaxVelocities
void setMaxVelocities(float linearVelocity, float angularVelocity, const Ice::Current &c=Ice::emptyCurrent) override
Definition: PlatformUnitDynamicSimulation.cpp:280
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
distance
double distance(const Point &a, const Point &b)
Definition: point.hpp:88
armarx::PeriodicTask
Definition: ArmarXManager.h:70
armarx::PlatformUnitDynamicSimulation::calculateLinearVelocity
Eigen::Vector3f calculateLinearVelocity(Eigen::Vector3f distance, Eigen::Vector3f curV)
Definition: PlatformUnitDynamicSimulation.cpp:110
ARMARX_WARNING
#define ARMARX_WARNING
Definition: Logging.h:186
armarx::PlatformUnit::createPropertyDefinitions
PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: PlatformUnit.cpp:35
armarx::PlatformUnitDynamicSimulation::linearVelocityMin
::Ice::Float linearVelocityMin
Definition: PlatformUnitDynamicSimulation.h:110
armarx::PlatformUnitDynamicSimulation::angularVelocityMax
::Ice::Float angularVelocityMax
Definition: PlatformUnitDynamicSimulation.h:115
armarx::ManagedIceObject::usingProxy
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
Definition: ManagedIceObject.cpp:151
armarx::PlatformUnitDynamicSimulation::clampf
float clampf(float x, float min, float max)
Definition: PlatformUnitDynamicSimulation.h:92
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::PlatformUnit::globalPosePrx
GlobalRobotPoseLocalizationListenerPrx globalPosePrx
Definition: PlatformUnit.h:126
armarx::PlatformUnitDynamicSimulation::robotName
std::string robotName
Definition: PlatformUnitDynamicSimulation.h:123