ForceTorqueObserver.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 ArmarX::
17 * @author Mirko Waechter ( mirko.waechter at kit dot edu)
18 * @date 2013
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #include "ForceTorqueObserver.h"
24 
36 
38 
39 #include <SimoxUtility/algorithm/string/string_tools.h>
40 
41 #define RAWFORCE "_rawforcevectors"
42 #define OFFSETFORCE "_forceswithoffsetvectors"
43 #define FILTEREDFORCE "_filteredforcesvectors"
44 #define RAWTORQUE "_rawtorquevectors"
45 #define OFFSETTORQUE "_torqueswithoffsetvectors"
46 #define FORCETORQUEVECTORS "_forceTorqueVectors"
47 #define POD_SUFFIX "_pod"
48 
49 
50 namespace armarx
51 {
53  {
54  }
55 
56  void ForceTorqueObserver::setTopicName(std::string topicName)
57  {
58  this->topicName = topicName;
59  }
60 
62  {
63  if (topicName.empty())
64  {
65  usingTopic(getProperty<std::string>("ForceTorqueTopicName").getValue());
66  }
67  else
68  {
69  usingTopic(topicName);
70  }
71 
72  // register all checks
77  offerConditionCheck("magnitudeinrange", new ConditionCheckMagnitudeInRange());
79  offerConditionCheck("magnitudelarger", new ConditionCheckMagnitudeLarger());
80  offerConditionCheck("magnitudesmaller", new ConditionCheckMagnitudeSmaller());
81 
82  usingProxy(getProperty<std::string>("RobotStateComponentName").getValue());
83  offeringTopic("DebugDrawerUpdates");
84 
85  auto sensorRobotNodeSplit = armarx::Split(getProperty<std::string>("SensorRobotNodeMapping").getValue(), ",");
86  for (auto& elem : sensorRobotNodeSplit)
87  {
88  simox::alg::trim(elem);
89  auto split = armarx::Split(elem, ":");
90  if (split.size() >= 2)
91  {
92  sensorRobotNodeMapping.emplace(
93  simox::alg::trim_copy(split.at(0)),
94  std::make_pair(simox::alg::trim_copy(split.at(1)),
95  split.size() >= 3 ? simox::alg::trim_copy(split.at(2)) : ""));
96  }
97  }
98  }
99 
101  {
102  robot = getProxy<RobotStateComponentInterfacePrx>(getProperty<std::string>("RobotStateComponentName").getValue());
103  localRobot = RemoteRobot::createLocalCloneFromFile(robot, VirtualRobot::RobotIO::eStructure);
104  debugDrawer = getTopic<DebugDrawerInterfacePrx>("DebugDrawerUpdates");
105  if (getProperty<bool>("VisualizeForce").getValue())
106  {
107  visualizerTask = new PeriodicTask<ForceTorqueObserver>(this, &ForceTorqueObserver::visualizerFunction, 1000 / getProperty<int>("VisualizeForceUpdateFrequency").getValue(), false, "visualizerFunction");
108  visualizerTask->start();
109  }
110  updateRobotTask = new PeriodicTask<ForceTorqueObserver>(this, &ForceTorqueObserver::updateRobot, 1000 / getProperty<int>("RobotUpdateFrequency").getValue(), false, "updateRobot", false);
111  updateRobotTask->start();
112 
113  }
114 
116  {
117  if (!localRobot)
118  {
119  return;
120  }
121  float maxTorque = getProperty<float>("MaxExpectedTorqueValue");
122  float torqueVisuDeadZone = getProperty<float>("TorqueVisuDeadZone");
123  float arrowLength = getProperty<float>("MaxForceArrowLength").getValue();
124  float forceFactor = getProperty<float>("ForceVisualizerFactor").getValue();
125  auto channels = getAvailableChannels(false);
126  auto batchPrx = debugDrawer->ice_batchOneway();
127  {
128  std::unique_lock lock(dataMutex);
129 
130  std::set<std::string> frameAlreadyReported;
131  for (auto& channel : channels)
132  {
133  try
134  {
135  // if (localRobot->hasRobotNode(channel.first))
136  {
137  DatafieldRefPtr field = DatafieldRefPtr::dynamicCast(getForceDatafield(channel.first, Ice::emptyCurrent));
138 
139  FramedDirectionPtr value = field->getDataField()->get<FramedDirection>();
140  if (frameAlreadyReported.count(value->frame) > 0 || (value->frame != GlobalFrame && !value->frame.empty() && !localRobot->hasRobotNode(value->frame)))
141  {
142  continue;
143  }
144  frameAlreadyReported.insert(value->frame);
145  auto force = value->toGlobal(localRobot);
146  ARMARX_DEBUG << deactivateSpam(5, channel.first) << "new force " << channel.first << " : " << force->toEigen() << " original frame: " << value->frame;
147 
148  float forceMag = force->toEigen().norm() * forceFactor;
149  Vector3Ptr pos = new Vector3(localRobot->getRobotNode(value->frame)->getGlobalPose());
150  forceMag = std::min(1.0f, forceMag);
151  batchPrx->setArrowVisu("Forces",
152  "Force" + channel.first,
153  pos,
154  force,
155  DrawColor {forceMag, 1.0f - forceMag, 0.0f, 0.5f},
156  std::max(arrowLength * forceMag, 10.f),
157  3);
158 
159  field = DatafieldRefPtr::dynamicCast(getTorqueDatafield(channel.first, Ice::emptyCurrent));
160  value = field->getDataField()->get<FramedDirection>();
161  auto torque = value;
162  // ARMARX_INFO << deactivateSpam(1, torque->frame) << "Reporting for " << channel.first << " in frame " << torque->frame;
163 
164  Eigen::Vector3f dirXglobal = FramedDirection(Eigen::Vector3f::UnitX(), torque->frame, torque->agent).toGlobalEigen(localRobot);
165  Eigen::Vector3f dirYglobal = FramedDirection(Eigen::Vector3f::UnitY(), torque->frame, torque->agent).toGlobalEigen(localRobot);
166  Eigen::Vector3f dirZglobal = FramedDirection(Eigen::Vector3f::UnitZ(), torque->frame, torque->agent).toGlobalEigen(localRobot);
167  // ARMARX_INFO << channel.first << VAROUT(torque) << VAROUT(dirXglobal) << VAROUT(dirYglobal) << VAROUT(dirZglobal);
168  if (fabs(torque->x) > torqueVisuDeadZone)
169  {
170  batchPrx->setCircleArrowVisu("Torques",
171  "TorqueX" + channel.first,
172  pos,
173  new Vector3(dirXglobal),
174  50,
175  torque->x / maxTorque,
176  3 * std::max(1.0f, torque->x / maxTorque),
177  DrawColor {1.0f, 0.0f, 0.0f, 0.5f}
178  );
179  }
180  else
181  {
182  batchPrx->removeCircleVisu("Torques",
183  "TorqueX" + channel.first);
184  }
185  if (fabs(torque->y) > torqueVisuDeadZone)
186  {
187  batchPrx->setCircleArrowVisu("Torques",
188  "TorqueY" + channel.first,
189  pos,
190  new Vector3(dirYglobal),
191  50,
192  torque->y / maxTorque,
193  3 * std::max(1.0f, torque->y / maxTorque),
194  DrawColor {0.0f, 1.0f, 0.0f, 0.5f}
195  );
196  }
197  else
198  {
199  batchPrx->removeCircleVisu("Torques",
200  "TorqueY" + channel.first);
201 
202  }
203  if (fabs(torque->z) > torqueVisuDeadZone)
204  {
205  batchPrx->setCircleArrowVisu("Torques",
206  "TorqueZ" + channel.first,
207  pos,
208  new Vector3(dirZglobal),
209  50,
210  torque->z / maxTorque,
211  3 * std::max(1.0f, torque->z / maxTorque),
212  DrawColor {0.0f, 0.0f, 1.0f, 0.5f}
213  );
214  }
215  else
216  {
217  batchPrx->removeCircleVisu("Torques",
218  "TorqueZ" + channel.first);
219 
220  }
221 
222  }
223 
224  // else
225  // {
226  // // ARMARX_INFO << deactivateSpam(5,channel.first) << "No node name " << channel.first;
227  // }
228  }
229  catch (...)
230  {
231 
232  }
233  }
234  }
235  batchPrx->ice_flushBatchRequests();
236  }
237 
238 
240  {
243  }
244 
245  void ForceTorqueObserver::updateRobot()
246  {
247  std::unique_lock lock(dataMutex);
248  RemoteRobot::synchronizeLocalClone(localRobot, robot);
249  }
250 
251 
252  void ForceTorqueObserver::offerValue(const std::string& nodeName, const std::string& type, const FramedDirectionBasePtr& value, const DataFieldIdentifierPtr& id)
253  {
254  FramedDirectionPtr vec = FramedDirectionPtr::dynamicCast(value);
255 
256 
257 
258 
259  try
260  {
261  setDataFieldFlatCopy(id->channelName, id->datafieldName, new Variant(value));
262  }
263  catch (...)
264  {
265  ARMARX_INFO << "Creating force/torque fields for node " << nodeName << " with id " << id->getIdentifierStr();
266  if (!existsDataField(id->channelName, id->datafieldName))
267  {
268  if (!existsChannel(id->channelName))
269  {
270  offerChannel(id->channelName, type + " vectors on specific parts of the robot.");
271  }
272  offerDataFieldWithDefault(id->channelName, id->datafieldName, Variant(value), "3D vector for " + type + " of " + nodeName);
273  }
274  }
275 
276 
277  // pod = plain old data
278  std::string pod_channelName = id->channelName + POD_SUFFIX;
279 
280  try
281  {
283  values[id->datafieldName + "_x" ] = new Variant(vec->x);
284  values[id->datafieldName + "_y" ] = new Variant(vec->y);
285  values[id->datafieldName + "_z" ] = new Variant(vec->z);
286  values[id->datafieldName + "_frame"] = new Variant(vec->frame);
287  setDataFieldsFlatCopy(pod_channelName, values);
288  }
289  catch (...)
290  {
291  ARMARX_INFO << "Creating force/torque pod fields";
292  if (!existsChannel(pod_channelName))
293  {
294  offerChannel(pod_channelName, id->datafieldName + " on " + nodeName + " as plain old data (pod)");
295 
296  }
297  offerOrUpdateDataField(pod_channelName, id->datafieldName + "_x", Variant(vec->x), type + " on X axis");
298  offerOrUpdateDataField(pod_channelName, id->datafieldName + "_y", Variant(vec->y), type + " on Y axis");
299  offerOrUpdateDataField(pod_channelName, id->datafieldName + "_z", Variant(vec->z), type + " on Z axis");
300  offerOrUpdateDataField(pod_channelName, id->datafieldName + "_frame", Variant(vec->frame), "Frame of " + value->frame);
301  }
302 
303 
304 
305  }
306 
307  void armarx::ForceTorqueObserver::reportSensorValues(const std::string& sensorNodeName, const FramedDirectionBasePtr& forces, const FramedDirectionBasePtr& torques, const Ice::Current& c)
308  {
309  std::unique_lock lock(dataMutex);
310 
311  auto offerForceAndTorqueValue = [ =, this ](std::string const & sensorNodeName, std::string const & frame, std::string channelName, const FramedDirectionBasePtr & forces, const FramedDirectionBasePtr & torques)
312  {
313  try
314  {
316 
317  if (forces)
318  {
319  if (channelName.empty())
320  {
321  id = getForceDatafieldId(sensorNodeName, frame);
322  }
323  else
324  {
325  id = new DataFieldIdentifier(getName(), channelName, "forces");
326  }
327 
328  offerValue(sensorNodeName, id->datafieldName, forces, id);
329  }
330 
331  if (torques)
332  {
333  if (channelName.empty())
334  {
335  id = getTorqueDatafieldId(sensorNodeName, frame);
336  }
337  else
338  {
339  id = new DataFieldIdentifier(getName(), channelName, "torques");
340  }
341 
342  offerValue(sensorNodeName, id->datafieldName, torques, id);
343  }
344 
345  updateChannel(id->channelName);
346  updateChannel(id->channelName + POD_SUFFIX);
347  }
348  catch (std::exception&)
349  {
350  ARMARX_ERROR << "Reporting force torque for " << sensorNodeName << " failed! ";
352  }
353  };
354 
355  if (!localRobot)
356  {
357  return;
358  }
359 
360 
361 
362  FramedDirectionPtr realTorques = FramedDirectionPtr::dynamicCast(torques);
363  realTorques->changeFrame(localRobot, forces->frame);
364 
365  FramedDirectionPtr realForces = FramedDirectionPtr::dynamicCast(forces);
366  offerForceAndTorqueValue(sensorNodeName, forces->frame, "", realForces, realTorques);
367 
368  auto sensorMappingRange = sensorRobotNodeMapping.equal_range(sensorNodeName);
369  for (auto iter = sensorMappingRange.first; iter != sensorMappingRange.second; ++iter)
370  {
371  auto& sensorName = iter->first;
372  auto& robotNodeName = iter->second.first;
373  auto& channelName = iter->second.second;
374  FramedDirectionPtr forcesCopy = FramedDirectionPtr::dynamicCast(realForces->clone());
375  FramedDirectionPtr torquesCopy = FramedDirectionPtr::dynamicCast(realTorques->clone());
376  forcesCopy->changeFrame(localRobot, robotNodeName);
377  torquesCopy->changeFrame(localRobot, robotNodeName);
378 
379  offerForceAndTorqueValue(sensorName, robotNodeName, channelName, forcesCopy, torquesCopy);
380  }
381  }
382 
383 
384  DatafieldRefBasePtr armarx::ForceTorqueObserver::createNulledDatafield(const DatafieldRefBasePtr& forceTorqueDatafieldRef, const Ice::Current&)
385  {
386  return createFilteredDatafield(new filters::OffsetFilter(), forceTorqueDatafieldRef);
387  }
388 
389  DatafieldRefBasePtr ForceTorqueObserver::getForceDatafield(const std::string& nodeName, const Ice::Current&)
390  {
391  auto id = getForceDatafieldId(nodeName, nodeName);
392 
393  if (!existsChannel(id->channelName))
394  {
395  throw UserException("No sensor for node '" + nodeName + "'available: channel " + id->channelName);
396  }
397 
398  if (!existsDataField(id->channelName, id->datafieldName))
399  {
400  throw UserException("No sensor for node '" + nodeName + "'available: datafield " + id->datafieldName);
401  }
402 
403  return new DatafieldRef(this, id->channelName, id->datafieldName);
404 
405  }
406 
407  DatafieldRefBasePtr ForceTorqueObserver::getTorqueDatafield(const std::string& nodeName, const Ice::Current&)
408  {
409  auto id = getTorqueDatafieldId(nodeName, nodeName);
410 
411  if (!existsChannel(id->channelName))
412  {
413  throw UserException("No sensor for node '" + nodeName + "'available: channel " + id->channelName);
414  }
415 
416  if (!existsDataField(id->channelName, id->datafieldName))
417  {
418  throw UserException("No sensor for node '" + nodeName + "'available: datafield " + id->datafieldName);
419  }
420 
421  return new DatafieldRef(this, id->channelName, id->datafieldName);
422  }
423 
424  DataFieldIdentifierPtr ForceTorqueObserver::getForceDatafieldId(const std::string& nodeName, const std::string& frame)
425  {
426  std::string channelName;
427 
428  if (frame == nodeName)
429  {
430  channelName = nodeName;
431  }
432  else
433  {
434  channelName = nodeName + "_" + frame;
435  }
436 
437  std::string datafieldName = "forces";
438  DataFieldIdentifierPtr id = new DataFieldIdentifier(getName(), channelName, datafieldName);
439  return id;
440  }
441 
442  DataFieldIdentifierPtr ForceTorqueObserver::getTorqueDatafieldId(const std::string& nodeName, const std::string& frame)
443  {
444  std::string channelName;
445 
446  if (frame == nodeName)
447  {
448  channelName = nodeName;
449  }
450  else
451  {
452  channelName = nodeName + "_" + frame;
453  }
454 
455  std::string datafieldName = "torques";
456  DataFieldIdentifierPtr id = new DataFieldIdentifier(getName(), channelName, datafieldName);
457  return id;
458  }
459 
461  {
462  if (visualizerTask)
463  {
464  visualizerTask->stop();
465  }
466  if (updateRobotTask)
467  {
468  updateRobotTask->stop();
469  }
470  }
471 
473  {
474 
475  }
476 }
armarx::ForceTorqueObserver::onConnectObserver
void onConnectObserver() override
Framework hook.
Definition: ForceTorqueObserver.cpp:100
RemoteRobot.h
armarx::StringVariantBaseMap
std::map< std::string, VariantBasePtr > StringVariantBaseMap
Definition: ManagedIceObject.h:111
armarx::RemoteRobot::synchronizeLocalClone
static bool synchronizeLocalClone(VirtualRobot::RobotPtr robot, RobotStateComponentInterfacePrx robotStatePrx)
Definition: RemoteRobot.cpp:448
ConditionCheckEquals.h
armarx::ForceTorqueObserver::createPropertyDefinitions
PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: ForceTorqueObserver.cpp:239
armarx::FramedDirectionPtr
IceInternal::Handle< FramedDirection > FramedDirectionPtr
Definition: FramedPose.h:81
armarx::RemoteRobot::createLocalCloneFromFile
static VirtualRobot::RobotPtr createLocalCloneFromFile(RobotStateComponentInterfacePrx robotStatePrx, VirtualRobot::RobotIO::RobotDescription loadMode=VirtualRobot::RobotIO::eFull)
This is a convenience function for createLocalClone, which automatically gets the filename from the R...
Definition: RemoteRobot.cpp:441
armarx::ForceTorqueObserver::onInitObserver
void onInitObserver() override
Framework hook.
Definition: ForceTorqueObserver.cpp:61
ConditionCheckInRange.h
armarx::GlobalFrame
const std::string GlobalFrame
Definition: FramedPose.h:62
armarx::Split
std::vector< std::string > Split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)
Definition: StringHelperTemplates.h:35
armarx::Observer::offerOrUpdateDataField
bool offerOrUpdateDataField(std::string channelName, std::string datafieldName, const Variant &value, const std::string &description)
Definition: Observer.cpp:222
ProsthesisInterface.values
values
Definition: ProsthesisInterface.py:190
armarx::filters::OffsetFilter
The OffsetFilter class returns values relative to value from the first call of the filter....
Definition: OffsetFilter.h:41
armarx::ConditionCheckSmaller
Definition: ConditionCheckSmaller.h:40
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::Observer::setDataFieldsFlatCopy
void setDataFieldsFlatCopy(const std::string &channelName, const StringVariantBaseMap &datafieldValues, bool triggerFilterUpdate=true)
Definition: Observer.cpp:665
armarx::Observer::existsChannel
bool existsChannel(const std::string &channelName) const
Definition: Observer.cpp:1433
RobotAPIObjectFactories.h
StringHelpers.h
IceInternal::Handle< DatafieldRef >
armarx::ForceTorqueObserver::getForceDatafield
DatafieldRefBasePtr getForceDatafield(const std::string &nodeName, const Ice::Current &) override
Definition: ForceTorqueObserver.cpp:389
DatafieldRef.h
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926
armarx::ConditionCheckMagnitudeLarger
Definition: ConditionCheckMagnitudeChecks.h:36
armarx::ConditionCheckUpdated
Definition: ConditionCheckUpdated.h:41
armarx::ForceTorqueObserver::onDisconnectComponent
void onDisconnectComponent() override
Hook for subclass.
Definition: ForceTorqueObserver.cpp:460
armarx::ForceTorqueObserver::getTorqueDatafieldId
DataFieldIdentifierPtr getTorqueDatafieldId(const std::string &nodeName, const std::string &frame)
Definition: ForceTorqueObserver.cpp:442
armarx::ForceTorqueObserver::reportSensorValues
void reportSensorValues(const std::string &sensorNodeName, const FramedDirectionBasePtr &forces, const FramedDirectionBasePtr &torques, const Ice::Current &) override
Definition: ForceTorqueObserver.cpp:307
armarx::Observer::setDataFieldFlatCopy
void setDataFieldFlatCopy(const std::string &channelName, const std::string &datafieldName, const VariantPtr &value, bool triggerFilterUpdate=true)
Definition: Observer.cpp:501
ARMARX_DEBUG
#define ARMARX_DEBUG
Definition: Logging.h:177
armarx::Vector3
The Vector3 class.
Definition: Pose.h:112
armarx::DataFieldIdentifierPtr
IceInternal::Handle< DataFieldIdentifier > DataFieldIdentifierPtr
Typedef of DataFieldIdentifierPtr as IceInternal::Handle<DataFieldIdentifier> for convenience.
Definition: DataFieldIdentifier.h:39
armarx::ConditionCheckEqualsWithTolerance
Definition: ConditionCheckEqualsWithTolerance.h:41
armarx::ForceTorqueObserverPropertyDefinitions
Definition: ForceTorqueObserver.h:38
max
T max(T t1, T t2)
Definition: gdiam.h:48
armarx::ForceTorqueObserver::ForceTorqueObserver
ForceTorqueObserver()
Definition: ForceTorqueObserver.cpp:52
ConditionCheckEqualsWithTolerance.h
armarx::ForceTorqueObserver::setTopicName
void setTopicName(std::string topicName)
Definition: ForceTorqueObserver.cpp:56
ARMARX_ERROR
#define ARMARX_ERROR
Definition: Logging.h:189
OffsetFilter.h
armarx::ConditionCheckMagnitudeSmaller
Definition: ConditionCheckMagnitudeChecks.h:45
armarx::VariantType::DatafieldRef
const VariantTypeId DatafieldRef
Definition: DatafieldRef.h:169
armarx::ManagedIceObject::usingTopic
void usingTopic(const std::string &name, bool orderedPublishing=false)
Registers a proxy for subscription after initialization.
Definition: ManagedIceObject.cpp:248
armarx::Component::getConfigIdentifier
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition: Component.cpp:74
armarx::Observer::getAvailableChannels
ChannelRegistry getAvailableChannels(bool includeMetaChannels)
Retrieve information on all sensory data channels available from the observer.
Definition: Observer.cpp:1396
armarx::ForceTorqueObserver::getForceDatafieldId
DataFieldIdentifierPtr getForceDatafieldId(const std::string &nodeName, const std::string &frame)
Definition: ForceTorqueObserver.cpp:424
armarx::FramedDirection
FramedDirection is a 3 dimensional direction vector with a reference frame. The reference frame can b...
Definition: FramedPose.h:83
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
armarx::VariantType::FramedDirection
const VariantTypeId FramedDirection
Definition: FramedPose.h:38
armarx::Observer::existsDataField
bool existsDataField(const std::string &channelName, const std::string &datafieldName) const
Definition: Observer.cpp:1450
ConditionCheckSmaller.h
armarx::ManagedIceObject::offeringTopic
void offeringTopic(const std::string &name)
Registers a topic for retrival after initialization.
Definition: ManagedIceObject.cpp:290
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::ForceTorqueObserver::onExitObserver
void onExitObserver() override
Framework hook.
Definition: ForceTorqueObserver.cpp:472
armarx::ConditionCheckMagnitudeInRange
Definition: ConditionCheckMagnitudeChecks.h:54
memoryx::KBM::Vector3
Eigen::Vector3d Vector3
Definition: kbm.h:41
armarx::ConditionCheckEquals
Definition: ConditionCheckEquals.h:46
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::Observer::offerConditionCheck
void offerConditionCheck(std::string checkName, ConditionCheck *conditionCheck)
Offer a condition check.
Definition: Observer.cpp:273
ConditionCheckMagnitudeChecks.h
armarx::ManagedIceObject::getName
std::string getName() const
Retrieve name of object.
Definition: ManagedIceObject.cpp:107
armarx::ForceTorqueObserver::createNulledDatafield
DatafieldRefBasePtr createNulledDatafield(const DatafieldRefBasePtr &forceTorqueDatafieldRef, const Ice::Current &) override
Definition: ForceTorqueObserver.cpp:384
armarx::PeriodicTask
Definition: ArmarXManager.h:70
ConditionCheckLarger.h
armarx::ConditionCheckLarger
Definition: ConditionCheckLarger.h:40
min
T min(T t1, T t2)
Definition: gdiam.h:42
armarx::Observer::offerDataFieldWithDefault
void offerDataFieldWithDefault(std::string channelName, std::string datafieldName, const Variant &defaultValue, std::string description)
Offer a datafield with default value.
Definition: Observer.cpp:152
armarx::handleExceptions
void handleExceptions()
Definition: Exception.cpp:141
armarx::PropertyDefinitionsPtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
Definition: forward_declarations.h:34
armarx::ForceTorqueObserver::visualizerFunction
void visualizerFunction()
Definition: ForceTorqueObserver.cpp: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
POD_SUFFIX
#define POD_SUFFIX
Definition: ForceTorqueObserver.cpp:47
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::ForceTorqueObserver::getTorqueDatafield
DatafieldRefBasePtr getTorqueDatafield(const std::string &nodeName, const Ice::Current &) override
Definition: ForceTorqueObserver.cpp:407
armarx::DataFieldIdentifier
DataFieldIdentifier provide the basis to identify data field within a distributed ArmarX scenario.
Definition: DataFieldIdentifier.h:48
ForceTorqueObserver.h
armarx::split
std::vector< std::string > split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)
Definition: StringHelpers.cpp:36
ConditionCheckUpdated.h
armarx::Observer::offerChannel
void offerChannel(std::string channelName, std::string description)
Offer a channel.
Definition: Observer.cpp:126