NJointController.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::NJointController
17  * @author Raphael Grimm ( 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 
23 #include <atomic>
24 
27 
28 #include "../RobotUnit.h"
29 #include "NJointControllerBase.h"
31 
32 namespace armarx
33 {
34  RobotUnit*
36  {
37  return cmngr->_modulePtr<RobotUnit>();
38  }
39 } // namespace armarx
40 
42 {
43 
44  /**
45  * \brief This class allows minimal access to private members of \ref armarx::RobotUnitModule::Devices in a sane fashion for \ref armarx::NJointControllerBase.
46  * \warning !! DO NOT ADD ANYTHING IF YOU DO NOT KNOW WAHT YOU ARE DOING! IF YOU DO SOMETHING WRONG YOU WILL CAUSE UNDEFINED BEHAVIOUR !!
47  */
49  {
50  friend class ::armarx::NJointControllerBase;
51 
52  static JointController*
53  GetJointController(Devices& d,
54  const std::string& deviceName,
55  const std::string& controlMode)
56  {
57  if (d.controlDevices.has(deviceName))
58  {
59  auto& dev = d.controlDevices.at(deviceName);
60  if (dev->hasJointController(controlMode))
61  {
62  ARMARX_CHECK_NOT_NULL(dev->getJointController(controlMode));
63  ARMARX_CHECK_NOT_NULL(dev->getJointController(controlMode)->getControlTarget());
64  return dev->getJointController(controlMode);
65  }
66  }
67  return nullptr;
68  }
69  };
70 } // namespace armarx::RobotUnitModule
71 
73 
74 namespace armarx
75 {
76  const NJointControllerBasePtr NJointControllerBase::NullPtr{nullptr};
77 
78  NJointControllerDescription
80  {
82  NJointControllerDescription d;
83  d.className = getClassName();
85  d.controller = NJointControllerInterfacePrx::uncheckedCast(getProxy(-1));
86  d.controlModeAssignment = controlDeviceControlModeMap;
87  d.instanceName = getInstanceName();
88  d.deletable = deletable;
89  d.internal = internal;
90  return d;
91  }
92 
93  std::optional<std::vector<char>>
94  NJointControllerBase::isNotInConflictWith(const std::vector<char>& used) const
95  {
97  ARMARX_CHECK_EXPRESSION(used.size() == controlDeviceUsedBitmap.size());
98  auto result = used;
99  for (std::size_t i = 0; i < controlDeviceUsedBitmap.size(); ++i)
100  {
101  if (controlDeviceUsedBitmap.at(i))
102  {
103  if (used.at(i))
104  {
105  return std::nullopt;
106  }
107  result.at(i) = true;
108  }
109  }
110  return result;
111  }
112 
113  NJointControllerStatus
114  NJointControllerBase::getControllerStatus(const Ice::Current&) const
115  {
116  ARMARX_TRACE;
117  NJointControllerStatus s;
118  s.active = isActive;
119  s.instanceName = getInstanceName();
120  s.requested = isRequested;
121  s.error = deactivatedBecauseOfError;
122  s.timestampUSec = std::chrono::duration_cast<std::chrono::microseconds>(
123  std::chrono::high_resolution_clock::now().time_since_epoch())
124  .count();
125  return s;
126  }
127 
128  NJointControllerDescriptionWithStatus
130  {
131  NJointControllerDescriptionWithStatus ds;
132  ds.description = getControllerDescription();
133  ds.status = getControllerStatus();
134  return ds;
135  }
136 
137  // RobotUnitInterfacePrx NJointControllerBase::getRobotUnit(const Ice::Current&) const
138  // {
139  // return RobotUnitInterfacePrx::uncheckedCast(robotUnit.getProxy(-1));
140  // }
141 
142  void
144  {
145  robotUnit.activateNJointController(this);
146  }
147 
148  void
150  {
151  robotUnit.deactivateNJointController(this);
152  }
153 
154  void
156  {
157  robotUnit.deleteNJointController(this);
158  }
159 
160  void
162  {
163  robotUnit.deactivateAndDeleteNJointController(this);
164  }
165 
166  void
167  NJointControllerBase::publish(const SensorAndControl& sac,
168  const DebugDrawerInterfacePrx& draw,
169  const DebugObserverInterfacePrx& observer)
170  {
171  ARMARX_TRACE;
172  const bool active = isActive;
173  if (publishActive.exchange(active) != active)
174  {
175  if (active)
176  {
177  ARMARX_DEBUG << "activating publishing for " << getInstanceName();
178  try
179  {
180  onPublishActivation(draw, observer);
181  }
182  catch (std::exception& e)
183  {
184  ARMARX_WARNING << "onPublishActivation of '" << getInstanceName()
185  << "' threw an exception!\nWhat:\n"
186  << e.what();
187  }
188  catch (...)
189  {
190  ARMARX_WARNING << "onPublishActivation of '" << getInstanceName()
191  << "' threw an exception!";
192  }
193  }
194  else
195  {
196  ARMARX_DEBUG << "deactivating publishing for " << getInstanceName();
197  try
198  {
199  onPublishDeactivation(draw, observer);
200  }
201  catch (std::exception& e)
202  {
203  ARMARX_WARNING << "onPublishDeactivation of '" << getInstanceName()
204  << "' threw an exception!\nWhat:\n"
205  << e.what();
206  }
207  catch (...)
208  {
209  ARMARX_WARNING << "onPublishDeactivation of '" << getInstanceName()
210  << "' threw an exception!";
211  }
212  }
213  }
214  if (active)
215  {
216  try
217  {
218  onPublish(sac, draw, observer);
219  }
220  catch (std::exception& e)
221  {
222  ARMARX_WARNING << "onPublish of '" << getInstanceName()
223  << "' threw an exception!\nWhat:\n"
224  << e.what();
225  }
226  catch (...)
227  {
228  ARMARX_WARNING << "onPublish of '" << getInstanceName() << "' threw an exception!";
229  }
230  }
231  }
232 
233  void
234  NJointControllerBase::deactivatePublish(const DebugDrawerInterfacePrx& draw,
235  const DebugObserverInterfacePrx& observer)
236  {
237  ARMARX_TRACE;
238  if (publishActive.exchange(false))
239  {
240  ARMARX_DEBUG << "forced deactivation of publishing for " << getInstanceName();
241  onPublishDeactivation(draw, observer);
242  }
243  }
244 
245  void
246  NJointControllerBase::rtActivateController()
247  {
248  if (!isActive)
249  {
250  deactivatedBecauseOfError = false;
252  isActive = true;
253  errorState.store(false);
254  }
255  }
256 
257  void
258  NJointControllerBase::rtDeactivateController()
259  {
260  if (isActive)
261  {
262  isActive = false;
264  }
265  }
266 
267  void
268  NJointControllerBase::rtDeactivateControllerBecauseOfError()
269  {
270  deactivatedBecauseOfError = true;
271  rtDeactivateController();
272  }
273 
275  armarx::NJointControllerBase::peekSensorDevice(const std::string& deviceName) const
276  {
278  << "The function '" << BOOST_CURRENT_FUNCTION
279  << "' must only be called during the construction of an NJointController.";
281  }
282 
284  NJointControllerBase::peekControlDevice(const std::string& deviceName) const
285  {
287  << "The function '" << BOOST_CURRENT_FUNCTION
288  << "' must only be called during the construction of an NJointController.";
290  }
291 
294  {
296  << "The function '" << BOOST_CURRENT_FUNCTION
297  << "' must only be called during the construction of an NJointController.";
298  ARMARX_CHECK_IS_NULL(rtRobot) << "useSynchronizedRtRobot was already called";
299  rtRobot = RobotUnitModule::RobotData::Instance().cloneRobot(updateCollisionModel);
300  rtRobotNodes = rtRobot->getRobotNodes();
301  return rtRobot;
302  }
303 
304  void
306  {
307  ARMARX_TRACE;
309  }
310 
311  void
313  {
314  ARMARX_TRACE;
316  }
317 
318  void
320  {
321  ARMARX_TRACE;
323  }
324 
325  void
327  {
328  ARMARX_TRACE;
330  // make sure the destructor of the handles does not throw an exception and triggers a termination of the process
331  ARMARX_DEBUG << "Deleting thread handles";
332  std::unique_lock lock(threadHandlesMutex);
333  for (auto& pair : threadHandles)
334  {
335  try
336  {
337 
338  auto& name = pair.first;
339  auto& handle = pair.second;
340  if (!handle || !handle->isValid())
341  {
342  ARMARX_VERBOSE << "Thread Handle is NULL or invalid - skipping";
343  continue;
344  }
345  if (handle->isDetached())
346  {
347  continue;
348  }
349  std::future_status status;
350  do
351  {
352  status = handle->getFuture().wait_for(std::chrono::seconds(3));
353  if (status == std::future_status::timeout)
354  {
355  ARMARX_INFO << "Still waiting for " << name << " thread handle!";
356  }
357  else if (status == std::future_status::ready ||
358  status == std::future_status::deferred)
359  {
360  ARMARX_VERBOSE << "Joining " << name << " task";
361  handle->join();
362  handle.reset();
363  }
364  } while (status != std::future_status::ready);
365  }
366  catch (...)
367  {
369  }
370  }
371 
372  threadHandles.clear();
373  }
374 
377  {
379  return Application::getInstance()->getThreadPool();
380  }
381 
382  const SensorValueBase*
383  NJointControllerBase::useSensorValue(const std::string& deviceName) const
384  {
385  ARMARX_TRACE;
387  << "The function '" << BOOST_CURRENT_FUNCTION
388  << "' must only be called during the construction of an NJointController.";
389  auto dev = peekSensorDevice(deviceName);
390  if (!dev)
391  {
392  ARMARX_DEBUG << "No sensor device for " << deviceName;
393  return nullptr;
394  }
395  return dev->getSensorValue();
396  }
397 
399  robotUnit(RobotUnitModule::ModuleBase::Instance<::armarx::RobotUnit>()),
400  controlDeviceUsedBitmap(robotUnit.getNumberOfControlDevices(), 0)
401  {
402  controlDeviceUsedIndices.reserve(robotUnit.getNumberOfControlDevices());
403  }
404 
406  {
407  }
408 
410  NJointControllerBase::useControlTarget(const std::string& deviceName,
411  const std::string& controlMode)
412  {
413  ARMARX_TRACE;
415  << "The function '" << BOOST_CURRENT_FUNCTION
416  << "' must only be called during the construction of an NJointController.";
417  ARMARX_CHECK_EQUAL(controlDeviceControlModeMap.count(deviceName), 0)
418  << BOOST_CURRENT_FUNCTION
419  << ": Must not request two ControlTargets for the same device. (got = "
420  << controlDeviceControlModeMap.at(deviceName) << ", requested " + controlMode + ") "
421  << "(You can only have a ControlDevice in one ControlMode. "
422  << "To check all available ControlModes for this device, get the ControlDevice via "
423  "peekControlDevice(" +
424  deviceName + ") and querry it)";
425 
426  //there is a device and a target was requested:
427  JointController* const jointCtrl =
428  RobotUnitModule::DevicesAttorneyForNJointController::GetJointController(
429  RobotUnitModule::Devices::Instance(), deviceName, controlMode);
430  if (!jointCtrl)
431  {
432  return nullptr;
433  }
434 
435  //update meta data structured
436  const std::size_t devIndex = robotUnit.getControlDeviceIndex(deviceName);
437  controlDeviceUsedJointController[deviceName] = jointCtrl;
438 
439  controlDeviceControlModeMap[deviceName] = controlMode;
440 
441  ARMARX_CHECK_EQUAL(0, controlDeviceUsedBitmap.at(devIndex));
442  controlDeviceUsedBitmap.at(devIndex) = 1;
443  //we want this vector to be sorted
444  controlDeviceUsedIndices.insert(std::upper_bound(controlDeviceUsedIndices.begin(),
445  controlDeviceUsedIndices.end(),
446  devIndex),
447  devIndex);
448 
449  return jointCtrl->getControlTarget();
450  }
451 } // namespace armarx
ARMARX_VERBOSE
#define ARMARX_VERBOSE
Definition: Logging.h:180
armarx::NJointControllerBase::peekSensorDevice
ConstSensorDevicePtr peekSensorDevice(const std::string &deviceName) const
Get a const ptr to the given SensorDevice.
Definition: NJointController.cpp:275
algorithm.h
armarx::NJointControllerBase::~NJointControllerBase
~NJointControllerBase() override
Definition: NJointController.cpp:405
armarx::NJointControllerBase::getInstanceName
std::string getInstanceName(const Ice::Current &=Ice::emptyCurrent) const final override
Definition: NJointControllerBase.h:803
armarx::NJointControllerRegistryEntry::ConstructorIsRunning
static bool ConstructorIsRunning()
Definition: NJointControllerRegistry.h:65
armarx::RobotUnitModule::Devices::getControlDevice
ConstControlDevicePtr getControlDevice(const std::string &deviceName) const
Returns the ControlDevice.
Definition: RobotUnitModuleDevices.cpp:118
armarx::NJointControllerBase::useSynchronizedRtRobot
const VirtualRobot::RobotPtr & useSynchronizedRtRobot(bool updateCollisionModel=false)
Requests a VirtualRobot for use in rtRun *.
Definition: NJointController.cpp:293
armarx::NJointControllerBase::deactivateController
void deactivateController(const Ice::Current &=Ice::emptyCurrent) final override
Definition: NJointController.cpp:149
NJointControllerBase.h
armarx::SensorValueBase
The SensorValueBase class.
Definition: SensorValueBase.h:40
armarx::NJointControllerBase::activateController
void activateController(const Ice::Current &=Ice::emptyCurrent) final override
Definition: NJointController.cpp:143
armarx::NJointControllerBase::onInitComponent
void onInitComponent() final
Definition: NJointController.cpp:305
armarx::ControlTargetBase
Brief description of class JointControlTargetBase.
Definition: ControlTargetBase.h:47
armarx::KeyValueVector::at
ValT & at(IdxT i)
Definition: KeyValueVector.h:110
armarx::NJointControllerBase::threadHandles
std::map< std::string, std::shared_ptr< ThreadPool::Handle > > threadHandles
Definition: NJointControllerBase.h:769
armarx::NJointControllerBase::useControlTarget
ControlTargetBase * useControlTarget(const std::string &deviceName, const std::string &controlMode)
Declares to calculate the ControlTarget for the given ControlDevice in the given ControlMode when rtR...
Definition: NJointController.cpp:410
ARMARX_CHECK_NOT_NULL
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
Definition: ExpressionException.h:206
armarx::RobotUnitModule::ControllerManagement::deactivateAndDeleteNJointController
void deactivateAndDeleteNJointController(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Queues the given NJointControllerBase for deletion and deactivates it if necessary.
Definition: RobotUnitModuleControllerManagement.cpp:558
armarx::KeyValueVector::has
bool has(const KeyT &k) const
Definition: KeyValueVector.h:176
armarx::NJointControllerBase::getClassName
std::string getClassName(const Ice::Current &=Ice::emptyCurrent) const override=0
armarx::NJointControllerBase::onDisconnectNJointController
virtual void onDisconnectNJointController()
Definition: NJointControllerBase.h:708
armarx::NJointControllerBase::onDisconnectComponent
void onDisconnectComponent() final
Definition: NJointController.cpp:319
armarx::NJointControllerBase::threadHandlesMutex
std::mutex threadHandlesMutex
Definition: NJointControllerBase.h:770
armarx::DebugObserverInterfacePrx
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface > DebugObserverInterfacePrx
Definition: JointController.h:44
armarx::NJointControllerBase::onExitComponent
void onExitComponent() final
Definition: NJointController.cpp:326
armarx::JointController
The JointController class represents one joint in one control mode.
Definition: JointController.h:51
armarx::NJointControllerBase::getControllerDescription
NJointControllerDescription getControllerDescription(const Ice::Current &=Ice::emptyCurrent) const final override
Definition: NJointController.cpp:79
armarx::NJointControllerBase::onPublishDeactivation
virtual void onPublishDeactivation(const DebugDrawerInterfacePrx &, const DebugObserverInterfacePrx &)
Definition: NJointControllerBase.h:1068
armarx::NJointControllerBase::onConnectNJointController
virtual void onConnectNJointController()
Definition: NJointControllerBase.h:703
armarx::RobotUnitModule::ControllerManagement::deleteNJointController
void deleteNJointController(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Queues the given NJointControllerBase for deletion.
Definition: RobotUnitModuleControllerManagement.cpp:494
armarx::NJointControllerBase::isNotInConflictWith
std::optional< std::vector< char > > isNotInConflictWith(const NJointControllerBasePtr &other) const
Definition: NJointControllerBase.h:1027
armarx::RobotUnitModule::ControllerManagement::deactivateNJointController
void deactivateNJointController(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Requests deactivation for the given NJointControllerBase.
Definition: RobotUnitModuleControllerManagement.cpp:446
armarx::NJointControllerBase::NullPtr
static const NJointControllerBasePtr NullPtr
Definition: NJointControllerBase.h:987
armarx::ThreadPoolPtr
std::shared_ptr< ThreadPool > ThreadPoolPtr
Definition: Application.h:76
armarx::getRobotUnit
RobotUnit * getRobotUnit(RobotUnitModule::ControllerManagement *cmngr)
Definition: NJointController.cpp:35
armarx::NJointControllerBase::onPublishActivation
virtual void onPublishActivation(const DebugDrawerInterfacePrx &, const DebugObserverInterfacePrx &)
Definition: NJointControllerBase.h:1063
armarx::NJointControllerBase::getControllerDescriptionWithStatus
NJointControllerDescriptionWithStatus getControllerDescriptionWithStatus(const Ice::Current &=Ice::emptyCurrent) const final override
Definition: NJointController.cpp:129
armarx::NJointControllerBase::onConnectComponent
void onConnectComponent() final
Definition: NJointController.cpp:312
armarx::RobotUnitModule::ControllerManagement::activateNJointController
void activateNJointController(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Requests activation for the given NJointControllerBase.
Definition: RobotUnitModuleControllerManagement.cpp:338
armarx::detail::ControlThreadOutputBufferEntry
Definition: ControlThreadOutputBuffer.h:177
ARMARX_TRACE
#define ARMARX_TRACE
Definition: trace.h:69
armarx::status
status
Definition: FiniteStateMachine.h:259
ARMARX_CHECK_IS_NULL
#define ARMARX_CHECK_IS_NULL(ptr)
This macro evaluates whether ptr is null and if it turns out to be false it will throw an ExpressionE...
Definition: ExpressionException.h:194
armarx::NJointControllerBase::deactivateAndDeleteController
void deactivateAndDeleteController(const Ice::Current &=Ice::emptyCurrent) final override
Definition: NJointController.cpp:161
armarx::NJointControllerBase::rtPostDeactivateController
virtual void rtPostDeactivateController()
This function is called after the controller is deactivated.
Definition: NJointControllerBase.h:941
armarx::RobotUnitModule::Devices::getSensorDevice
ConstSensorDevicePtr getSensorDevice(const std::string &deviceName) const
TODO move to attorney for NJointControllerBase.
Definition: RobotUnitModuleDevices.cpp:109
armarx::RobotUnitModule::DevicesAttorneyForNJointController
This class allows minimal access to private members of armarx::RobotUnitModule::Devices in a sane fas...
Definition: NJointController.cpp:48
armarx::NJointControllerBase::getThreadPool
ThreadPoolPtr getThreadPool() const
Definition: NJointController.cpp:376
ARMARX_DEBUG
#define ARMARX_DEBUG
Definition: Logging.h:177
armarx::NJointControllerBase::getControllerStatus
NJointControllerStatus getControllerStatus(const Ice::Current &=Ice::emptyCurrent) const final override
Definition: NJointController.cpp:114
armarx::NJointControllerBase::onPublish
virtual void onPublish(const SensorAndControl &, const DebugDrawerInterfacePrx &, const DebugObserverInterfacePrx &)
Definition: NJointControllerBase.h:1073
armarx::RobotUnitModule::Devices::Instance
static Devices & Instance()
Returns the singleton instance of this class.
Definition: RobotUnitModuleDevices.h:79
armarx::NJointControllerBase::onExitNJointController
virtual void onExitNJointController()
Definition: NJointControllerBase.h:713
armarx::Application::getInstance
static ApplicationPtr getInstance()
Retrieve shared pointer to the application object.
Definition: Application.cpp:289
armarx::NJointControllerBase::NJointControllerBase
NJointControllerBase()
Definition: NJointController.cpp:398
armarx::NJointControllerBase::peekControlDevice
ConstControlDevicePtr peekControlDevice(const std::string &deviceName) const
Get a const ptr to the given ControlDevice.
Definition: NJointController.cpp:284
armarx::NJointControllerBase::deleteController
void deleteController(const Ice::Current &=Ice::emptyCurrent) final override
Definition: NJointController.cpp:155
armarx::RobotUnitModule::Devices::getControlDeviceIndex
std::size_t getControlDeviceIndex(const std::string &deviceName) const
Returns the ControlDevice's index.
Definition: RobotUnitModuleDevices.cpp:99
armarx::RobotUnitModule::RobotData::Instance
static RobotData & Instance()
Returns the singleton instance of this class.
Definition: RobotUnitModuleRobotData.h:62
armarx::RobotUnitModule::Devices
This Module manages sensor and control devices for a RobotUnit and only allows save and sane access.
Definition: RobotUnitModuleDevices.h:67
armarx::RobotUnitModule::ModuleBase::_modulePtr
T * _modulePtr()
Returns this as ptr to the given type.
Definition: RobotUnitModuleBase.h:271
armarx::NJointControllerBase::rtPreActivateController
virtual void rtPreActivateController()
This function is called before the controller is activated.
Definition: NJointControllerBase.h:932
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
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
armarx::RobotUnit
The RobotUnit class manages a robot and its controllers.
Definition: RobotUnit.h:180
IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface >
armarx::RobotUnitModule::ControllerManagement
This Module manages NJointControllers.
Definition: RobotUnitModuleControllerManagement.h:39
armarx::NJointControllerBase::onInitNJointController
virtual void onInitNJointController()
Definition: NJointControllerBase.h:698
armarx::ConstSensorDevicePtr
std::shared_ptr< const class SensorDevice > ConstSensorDevicePtr
Definition: NJointControllerBase.h:77
armarx::RobotUnitModule
Definition: ControlDevice.h:34
armarx::JointController::getControlTarget
virtual ControlTargetBase * getControlTarget()=0
Definition: JointController.h:144
ARMARX_CHECK_EQUAL
#define ARMARX_CHECK_EQUAL(lhs, rhs)
This macro evaluates whether lhs is equal (==) rhs and if it turns out to be false it will throw an E...
Definition: ExpressionException.h:130
armarx::handleExceptions
void handleExceptions()
Definition: Exception.cpp:141
ARMARX_WARNING
#define ARMARX_WARNING
Definition: Logging.h:186
armarx::NJointControllerRegistryEntry::ConstructorIsRunning_
static thread_local bool ConstructorIsRunning_
Definition: NJointControllerRegistry.h:59
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::DebugDrawerInterfacePrx
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx
Definition: JointController.h:40
armarx::RobotUnitModule::RobotData::cloneRobot
VirtualRobot::RobotPtr cloneRobot(bool updateCollisionModel=false) const
Returns a clone of the robot's model.
Definition: RobotUnitModuleRobotData.cpp:127
armarx::ctrlutil::s
double s(double t, double s0, double v0, double a0, double j)
Definition: CtrlUtil.h:33
NJointControllerRegistry.h
armarx::ConstControlDevicePtr
std::shared_ptr< const class ControlDevice > ConstControlDevicePtr
Definition: NJointControllerBase.h:76
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::RobotUnitModule::Devices::getNumberOfControlDevices
std::size_t getNumberOfControlDevices() const
Returns the number of ControlDevices.
Definition: RobotUnitModuleDevices.cpp:73
Application.h
armarx::NJointControllerBase::useSensorValue
const SensorValueBase * useSensorValue(const std::string &sensorDeviceName) const
Get a const ptr to the given SensorDevice's SensorValue.
Definition: NJointController.cpp:383
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18