RobotUnitModuleControllerManagement.h
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::RobotUnit
17  * @author Raphael Grimm ( raphael dot grimm at kit dot edu )
18  * @date 2018
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 #include <thread>
26 
27 #include <RobotAPI/interface/units/RobotUnit/RobotUnitInterface.h>
28 
29 #include "RobotUnitModuleBase.h"
30 
32 {
33  /**
34  * @ingroup Library-RobotUnit-Modules
35  * @brief This \ref ModuleBase "Module" manages \ref NJointControllerBase "NJointControllers".
36  *
37  * @see ModuleBase
38  */
40  virtual public ModuleBase,
41  virtual public RobotUnitControllerManagementInterface
42  {
43  friend class ModuleBase;
44 
45  public:
46  /**
47  * @brief Returns the singleton instance of this class
48  * @return The singleton instance of this class
49  */
50  static ControllerManagement&
52  {
53  return ModuleBase::Instance<ControllerManagement>();
54  }
55 
57 
58  // //////////////////////////////////////////////////////////////////////////////////////// //
59  // ///////////////////////////////// RobotUnitModule hooks //////////////////////////////// //
60  // //////////////////////////////////////////////////////////////////////////////////////// //
61  private:
62  /// @see ModuleBase::_preOnInitRobotUnit
63  void _preOnInitRobotUnit();
64  /// @see ModuleBase::_preFinishRunning
65  void _preFinishRunning();
66  /// @see ModuleBase::_postFinishRunning
67  void _postFinishRunning();
68  // //////////////////////////////////////////////////////////////////////////////////////// //
69  // ///////////////////////////////////// ice interface //////////////////////////////////// //
70  // //////////////////////////////////////////////////////////////////////////////////////// //
71  public:
72  /**
73  * @brief Returns a proxy to the \ref NJointControllerBase.
74  * @param name The \ref NJointControllerBase's name.
75  * @return A proxy to the \ref NJointControllerBase.
76  * @see getAllNJointControllers
77  */
78  NJointControllerInterfacePrx
79  getNJointController(const std::string& name,
80  const Ice::Current& = Ice::emptyCurrent) const override;
81  /**
82  * @brief Returns proxies to all \ref NJointControllerBase "NJointControllers"
83  * @return Proxies to all \ref NJointControllerBase "NJointControllers"
84  * @see getNJointController
85  */
86  StringNJointControllerPrxDictionary
87  getAllNJointControllers(const Ice::Current& = Ice::emptyCurrent) const override;
88 
89  /**
90  * @brief Returns the status of the \ref NJointControllerBase.
91  * @param name The \ref NJointControllerBase's name.
92  * @return The status of the \ref NJointControllerBase.
93  * @see NJointControllerStatus
94  * @see getNJointControllerStatuses
95  * @see getNJointControllerDescriptionWithStatus
96  * @see getNJointControllerDescriptionsWithStatuses
97  */
98  NJointControllerStatus
99  getNJointControllerStatus(const std::string& name,
100  const Ice::Current& = Ice::emptyCurrent) const override;
101  /**
102  * @brief Returns the status of all \ref NJointControllerBase "NJointControllers".
103  * @return The status of all \ref NJointControllerBase "NJointControllers".
104  * @see NJointControllerStatus
105  * @see getNJointControllerStatus
106  * @see getNJointControllerDescriptionWithStatus
107  * @see getNJointControllerDescriptionsWithStatuses
108  */
109  NJointControllerStatusSeq
110  getNJointControllerStatuses(const Ice::Current& = Ice::emptyCurrent) const override;
111 
112  /**
113  * @brief Returns the description of the \ref NJointControllerBase.
114  * @param name The \ref NJointControllerBase's name.
115  * @return The description of the \ref NJointControllerBase.
116  * @see NJointControllerDescription
117  * @see getNJointControllerDescriptions
118  * @see getNJointControllerDescriptionWithStatus
119  * @see getNJointControllerDescriptionsWithStatuses
120  */
121  NJointControllerDescription
122  getNJointControllerDescription(const std::string& name,
123  const Ice::Current& = Ice::emptyCurrent) const override;
124  /**
125  * @brief Returns the description of all \ref NJointControllerBase "NJointControllers".
126  * @return The description of all \ref NJointControllerBase "NJointControllers".
127  * @see NJointControllerDescription
128  * @see getNJointControllerDescription
129  * @see getNJointControllerDescriptionWithStatus
130  * @see getNJointControllerDescriptionsWithStatuses
131  */
132 
133  NJointControllerDescriptionSeq
134  getNJointControllerDescriptions(const Ice::Current& = Ice::emptyCurrent) const override;
135 
136  /**
137  * @brief Returns the status and description of the \ref NJointControllerBase.
138  * @param name The \ref NJointControllerBase's name.
139  * @return The status and description of the \ref NJointControllerBase.
140  * @see getNJointControllerDescriptionsWithStatuses
141  * @see NJointControllerStatus
142  * @see getNJointControllerStatus
143  * @see getNJointControllerStatuses
144  * @see NJointControllerDescription
145  * @see getNJointControllerDescription
146  * @see getNJointControllerDescriptions
147  */
148  NJointControllerDescriptionWithStatus getNJointControllerDescriptionWithStatus(
149  const std::string& name,
150  const Ice::Current& = Ice::emptyCurrent) const override;
151  /**
152  * @brief Returns the status and description of all \ref NJointControllerBase "NJointControllers".
153  * @return The status and description of all \ref NJointControllerBase "NJointControllers".
154  * @see getNJointControllerDescriptionsWithStatus
155  * @see NJointControllerStatus
156  * @see getNJointControllerStatus
157  * @see getNJointControllerStatuses
158  * @see NJointControllerDescription
159  * @see getNJointControllerDescription
160  * @see getNJointControllerDescriptions
161  */
162  NJointControllerDescriptionWithStatusSeq getNJointControllerDescriptionsWithStatuses(
163  const Ice::Current& = Ice::emptyCurrent) const override;
164 
165  /**
166  * @brief getNJointControllerClassDescription
167  * @param className
168  * @return
169  */
170  NJointControllerClassDescription
171  getNJointControllerClassDescription(const std::string& className,
172  const Ice::Current& = Ice::emptyCurrent) const override;
173  /**
174  * @brief getNJointControllerClassDescriptions
175  * @return
176  */
177  NJointControllerClassDescriptionSeq getNJointControllerClassDescriptions(
178  const Ice::Current& = Ice::emptyCurrent) const override;
179 
180  /**
181  * @brief Returns the names of all available classes of \ref NJointControllerBase.
182  * @return The names of all available classes of \ref NJointControllerBase.
183  */
184  Ice::StringSeq
185  getNJointControllerClassNames(const Ice::Current& = Ice::emptyCurrent) const override;
186  /**
187  * @brief Returns the names of all \ref NJointControllerBase "NJointControllers"
188  * @return The names of all \ref NJointControllerBase "NJointControllers"
189  */
190  Ice::StringSeq
191  getNJointControllerNames(const Ice::Current& = Ice::emptyCurrent) const override;
192  /**
193  * @brief Returns the names of all requested \ref NJointControllerBase "NJointControllers"
194  * @return The names of all requested \ref NJointControllerBase "NJointControllers"
195  */
196  Ice::StringSeq
197  getRequestedNJointControllerNames(const Ice::Current& = Ice::emptyCurrent) const override;
198  /**
199  * @brief Returns the names of all activated \ref NJointControllerBase "NJointControllers"
200  * @return The names of all activated \ref NJointControllerBase "NJointControllers"
201  */
202  Ice::StringSeq
203  getActivatedNJointControllerNames(const Ice::Current& = Ice::emptyCurrent) const override;
204 
205  /**
206  * @brief Queues the given \ref NJointControllerBase for deletion.
207  * @param name The \ref NJointControllerBase to delete.
208  * @see removeNJointControllersToBeDeleted
209  * @see nJointControllersToBeDeleted
210  * @see deleteNJointControllers
211  */
212  void deleteNJointController(const std::string& name,
213  const Ice::Current& = Ice::emptyCurrent) override;
214  /**
215  * @brief Queues the given \ref NJointControllerBase "NJointControllers" for deletion.
216  * @param names The \ref NJointControllerBase "NJointControllers" to delete.
217  * @see removeNJointControllersToBeDeleted
218  * @see nJointControllersToBeDeleted
219  * @see deleteNJointController
220  */
221  void deleteNJointControllers(const Ice::StringSeq& names,
222  const Ice::Current& = Ice::emptyCurrent) override;
223  /**
224  * @brief Queues the given \ref NJointControllerBase for deletion and deactivates it if necessary.
225  * @param name The \ref NJointControllerBase to delete.
226  * @see removeNJointControllersToBeDeleted
227  * @see nJointControllersToBeDeleted
228  * @see deleteNJointController
229  * @see deleteNJointControllers
230  * @see deactivateAnddeleteNJointControllers
231  */
232  void deactivateAndDeleteNJointController(const std::string& name,
233  const Ice::Current& = Ice::emptyCurrent) override;
234  /**
235  * @brief Queues the given \ref NJointControllerBase "NJointControllers" for deletion and deactivates them if necessary.
236  * @param names The \ref NJointControllerBase "NJointControllers" to delete.
237  * @see removeNJointControllersToBeDeleted
238  * @see nJointControllersToBeDeleted
239  * @see deleteNJointController
240  * @see deleteNJointControllers
241  * @see deactivateAnddeleteNJointController
242  */
243  void deactivateAndDeleteNJointControllers(const Ice::StringSeq& names,
244  const Ice::Current&) override;
245 
246  /**
247  * @brief Requests activation for the given \ref NJointControllerBase.
248  * @param name The requested \ref NJointControllerBase.
249  * @see activateNJointControllers
250  */
251  void activateNJointController(const std::string& name,
252  const Ice::Current& = Ice::emptyCurrent) override;
253  /**
254  * @brief Requests activation for the given \ref NJointControllerBase "NJointControllers".
255  * @param names The requested \ref NJointControllerBase "NJointControllers".
256  * @see activateNJointController
257  */
258  void activateNJointControllers(const Ice::StringSeq& names,
259  const Ice::Current& = Ice::emptyCurrent) override;
260 
261  /**
262  * @brief Requests deactivation for the given \ref NJointControllerBase.
263  * @param name The \ref NJointControllerBase to be deactivated.
264  * @see deactivateNJointControllers
265  */
266  void deactivateNJointController(const std::string& name,
267  const Ice::Current& = Ice::emptyCurrent) override;
268  /**
269  * @brief Requests deactivation for the given \ref NJointControllerBase "NJointControllers".
270  * @param names The \ref NJointControllerBase "NJointControllers" to be deactivated.
271  * @see deactivateNJointController
272  */
273  void deactivateNJointControllers(const Ice::StringSeq& names,
274  const Ice::Current& = Ice::emptyCurrent) override;
275 
276  /**
277  * @brief Cretes a \ref NJointControllerBase.
278  * @param className The \ref NJointControllerBase's class.
279  * @param instanceName The \ref NJointControllerBase's name.
280  * @param config A config passed to the \ref NJointControllerBase's ctor.
281  * @return A proxy to the created \ref NJointControllerBase.
282  */
283  NJointControllerInterfacePrx
284  createNJointController(const std::string& className,
285  const std::string& instanceName,
286  const NJointControllerConfigPtr& config,
287  const Ice::Current& = Ice::emptyCurrent) override;
288  /**
289  * @brief Cretes a \ref NJointControllerBase.
290  * @param className The \ref NJointControllerBase's class.
291  * @param instanceName The \ref NJointControllerBase's name.
292  * @param variants A map of \ref Variant "Variants" passed to the \ref NJointControllerBase's ctor.
293  * @return A proxy to the created \ref NJointControllerBase.
294  */
295  NJointControllerInterfacePrx
296  createNJointControllerFromVariantConfig(const std::string& className,
297  const std::string& instanceName,
298  const StringVariantBaseMap& variants,
299  const Ice::Current& = Ice::emptyCurrent) override;
300  /**
301  * @brief Deletes any \ref NJointControllerBase with the given name and creates a new one.
302  * @param className The \ref NJointControllerBase's class.
303  * @param instanceName The \ref NJointControllerBase's name.
304  * @param config A config passed to the \ref NJointControllerBase's ctor.
305  * @return A proxy to the created \ref NJointControllerBase.
306  */
307  NJointControllerInterfacePrx
308  createOrReplaceNJointController(const std::string& className,
309  const std::string& instanceName,
310  const NJointControllerConfigPtr& config,
311  const Ice::Current& = Ice::emptyCurrent) override;
312 
313  /**
314  * @brief Changes the set of requested \ref NJointControllerBase "NJointControllers" to the given set.
315  * @param newSetup The new set of requested \ref NJointControllerBase "NJointControllers"
316  */
317  void switchNJointControllerSetup(const Ice::StringSeq& newSetup,
318  const Ice::Current& = Ice::emptyCurrent) override;
319  // //////////////////////////////////////////////////////////////////////////////////////// //
320  // /////////////////////////////////// Module interface /////////////////////////////////// //
321  // //////////////////////////////////////////////////////////////////////////////////////// //
322  public:
323  /**
324  * @brief Cretes a \ref NJointControllerBase.
325  * @param className The \ref NJointControllerBase's class.
326  * @param instanceName The \ref NJointControllerBase's name.
327  * @param config A config passed to the \ref NJointControllerBase's ctor.
328  * @param deletable Whether the \ref NJointControllerBase can be deleted.
329  * @param internal Whether the \ref NJointControllerBase should be tagged as internal.
330  * @return A pointer to the created \ref NJointControllerBase
331  */
332  const NJointControllerBasePtr&
333  createNJointController(const std::string& className,
334  const std::string& instanceName,
335  const NJointControllerConfigPtr& config,
336  bool deletable,
337  bool internal);
338 
339  /**
340  * @brief Returns pointers to the \ref NJointControllerBase "NJointControllers". (If one does not exist, an exception is thrown.)
341  * @param names The \ref NJointControllerBase "NJointControllers" names.
342  * @return Pointers to the \ref NJointControllerBase "NJointControllers".
343  * @throw If there is no \ref NJointControllerBase for \param name
344  */
345  std::vector<armarx::NJointControllerBasePtr>
346  getNJointControllersNotNull(const std::vector<std::string>& names) const;
347  /**
348  * @brief Returns a pointer to the \ref NJointControllerBase. (If it does not exist, an exception is thrown.)
349  * @param name The \ref NJointControllerBase
350  * @return A pointer to the \ref NJointControllerBase.
351  * @throw If there is no \ref NJointControllerBase for \param name
352  */
353  const NJointControllerBasePtr& getNJointControllerNotNull(const std::string& name) const;
354 
355  /**
356  * @brief Returns the names of given \ref NJointControllerBase "NJointControllers"
357  * @param ctrls The \ref NJointControllerBase "NJointControllers"
358  * @return The names of given \ref NJointControllerBase "NJointControllers"
359  */
360  std::vector<std::string>
361  getNJointControllerNames(const std::vector<armarx::NJointControllerBasePtr>& ctrls) const;
362 
363  /**
364  * @brief Queues the given \ref NJointControllerBase for deletion.
365  * @param ctrl The \ref NJointControllerBase to delete.
366  * @see removeNJointControllersToBeDeleted
367  * @see nJointControllersToBeDeleted
368  * @see deleteNJointControllers
369  */
370  void deleteNJointController(const NJointControllerBasePtr& ctrl);
371  /**
372  * @brief Queues the given \ref NJointControllerBase "NJointControllers" for deletion.
373  * @param ctrls The \ref NJointControllerBase "NJointControllers" to delete.
374  * @see removeNJointControllersToBeDeleted
375  * @see nJointControllersToBeDeleted
376  * @see deleteNJointController
377  */
378  void deleteNJointControllers(const std::vector<NJointControllerBasePtr>& ctrls);
379  /**
380  * @brief Queues the given \ref NJointControllerBase for deletion and deactivates it if necessary.
381  * @param ctrl The \ref NJointControllerBase to delete.
382  * @see removeNJointControllersToBeDeleted
383  * @see nJointControllersToBeDeleted
384  * @see deleteNJointController
385  * @see deleteNJointControllers
386  * @see deactivateAnddeleteNJointControllers
387  */
388  void deactivateAndDeleteNJointController(const NJointControllerBasePtr& ctrl);
389  /**
390  * @brief Queues the given \ref NJointControllerBase "NJointControllers" for deletion and deactivates them if necessary.
391  * @param ctrls The \ref NJointControllerBase "NJointControllers" to delete.
392  * @see removeNJointControllersToBeDeleted
393  * @see nJointControllersToBeDeleted
394  * @see deleteNJointController
395  * @see deleteNJointControllers
396  * @see deactivateAnddeleteNJointController
397  */
398  void
399  deactivateAndDeleteNJointControllers(const std::vector<NJointControllerBasePtr>& ctrls);
400 
401 
402  /**
403  * @brief Requests activation for the given \ref NJointControllerBase.
404  * @param ctrl The requested \ref NJointControllerBase.
405  * @see activateNJointControllers
406  */
407  void activateNJointController(const NJointControllerBasePtr& ctrl);
408  /**
409  * @brief Requests activation for the given \ref NJointControllerBase "NJointControllers".
410  * @param ctrls The requested \ref NJointControllerBase "NJointControllers".
411  * @see activateNJointController
412  */
413  void activateNJointControllers(const std::vector<NJointControllerBasePtr>& ctrls);
414 
415  /**
416  * @brief Requests deactivation for the given \ref NJointControllerBase.
417  * @param ctrl The \ref NJointControllerBase to be deactivated.
418  * @see deactivateNJointControllers
419  */
420  void deactivateNJointController(const NJointControllerBasePtr& ctrl);
421  /**
422  * @brief Requests deactivation for the given \ref NJointControllerBase "NJointControllers".
423  * @param ctrls The \ref NJointControllerBase "NJointControllers" to be deactivated.
424  * @see deactivateNJointController
425  */
426  void deactivateNJointControllers(const std::vector<NJointControllerBasePtr>& ctrls);
427 
428  // //////////////////////////////////////////////////////////////////////////////////////// //
429  // //////////////////////////////////// implementation //////////////////////////////////// //
430  // //////////////////////////////////////////////////////////////////////////////////////// //
431  private:
432  /**
433  * @brief Deletes the given \ref NJointControllerBase "NJointControllers" and removes them
434  * from the \ref ArmarXManager
435  * @param ctrls \ref NJointControllerBase "NJointControllers" to delete.
436  * @param blocking Whether removal from the \ref ArmarXManager should be blocking.
437  * @param l Proxy to the listener topic all removal events should be sent to.
438  */
439  void removeNJointControllers(std::map<std::string, NJointControllerBasePtr>& ctrls,
440  bool blocking = true,
441  RobotUnitListenerPrx l = nullptr);
442  /**
443  * @brief Calls \ref removeNJointControllers for all \ref NJointControllerBase "NJointControllers"
444  * queued for deletion (\ref nJointControllersToBeDeleted).
445  * @param blocking Whether removal from the \ref ArmarXManager should be blocking.
446  * @param l Proxy to the listener topic all removal events should be sent to.
447  * @see removeNJointControllers
448  * @see nJointControllersToBeDeleted
449  */
450  void removeNJointControllersToBeDeleted(bool blocking = true,
451  RobotUnitListenerPrx l = nullptr);
452 
453  /**
454  * @brief Sets the requested flag for all given \ref NJointControllerBase "NJointControllers" and unsets it for the rest.
455  * @param request The \ref NJointControllerBase "NJointControllers" where the requested flag should be set.
456  */
457  void updateNJointControllerRequestedState(const std::set<NJointControllerBasePtr>& request);
458  /**
459  * @brief Throws if there is no factory for \ref NJointControllerBase "NJointControllers" for the given class name.
460  * @param className The class to check for.
461  * @throw If there is no factory for \ref NJointControllerBase "NJointControllers" for the given class name.
462  */
463  void checkNJointControllerClassName(const std::string& className) const;
464 
465  // //////////////////////////////////////////////////////////////////////////////////////// //
466  // ///////////////////////////////////////// Data ///////////////////////////////////////// //
467  // //////////////////////////////////////////////////////////////////////////////////////// //
468  private:
469  /// @brief Holds all currently loaded NJoint controllers (index: [instancename])(May not be accessed in rt.)
470  std::map<std::string, NJointControllerBasePtr> nJointControllers;
471  /// @brief These controllers will be deleted in the next iteration of publish
472  std::map<std::string, NJointControllerBasePtr> nJointControllersToBeDeleted;
473  /// @brief VirtualRobot used when creating controllers / calling other functions in this module
474  VirtualRobot::RobotPtr controllerCreateRobot;
475 
476  std::recursive_mutex controllerMutex;
477  // //////////////////////////////////////////////////////////////////////////////////////// //
478  // /////////////////////////////////////// Attorneys ////////////////////////////////////// //
479  // //////////////////////////////////////////////////////////////////////////////////////// //
480  private:
481  /**
482  * \brief This class allows minimal access to private members of \ref ControllerManagement in a sane fashion for \ref Publisher.
483  * \warning !! DO NOT ADD ADDITIONAL FRIENDS IF YOU DO NOT KNOW WAHT YOU ARE DOING! IF YOU DO SOMETHING WRONG YOU WILL CAUSE UNDEFINED BEHAVIOUR !!
484  */
486  /**
487  * \brief This class allows minimal access to private members of \ref ControllerManagement in a sane fashion for \ref ControlThreadDataBuffer.
488  * \warning !! DO NOT ADD ADDITIONAL FRIENDS IF YOU DO NOT KNOW WAHT YOU ARE DOING! IF YOU DO SOMETHING WRONG YOU WILL CAUSE UNDEFINED BEHAVIOUR !!
489  */
491  };
492 } // namespace armarx::RobotUnitModule
armarx::RobotUnitModule::ControllerManagement::getNJointControllerClassDescription
NJointControllerClassDescription getNJointControllerClassDescription(const std::string &className, const Ice::Current &=Ice::emptyCurrent) const override
getNJointControllerClassDescription
Definition: RobotUnitModuleControllerManagement.cpp:607
armarx::RobotUnitModule::ControllerManagementAttorneyForPublisher
This class allows minimal access to private members of ControllerManagement in a sane fashion for Pub...
Definition: RobotUnitModulePublisher.cpp:121
armarx::RobotUnitModule::ControllerManagement::deactivateAndDeleteNJointControllers
void deactivateAndDeleteNJointControllers(const Ice::StringSeq &names, const Ice::Current &) override
Queues the given NJointControllers for deletion and deactivates them if necessary.
Definition: RobotUnitModuleControllerManagement.cpp:566
armarx::RobotUnitModule::ControllerManagement::~ControllerManagement
~ControllerManagement()
Definition: RobotUnitModuleControllerManagement.cpp:832
armarx::RobotUnitModule::ControllerManagement::getNJointControllerClassNames
Ice::StringSeq getNJointControllerClassNames(const Ice::Current &=Ice::emptyCurrent) const override
Returns the names of all available classes of NJointControllerBase.
Definition: RobotUnitModuleControllerManagement.cpp:306
armarx::StringVariantBaseMap
std::map< std::string, VariantBasePtr > StringVariantBaseMap
Definition: ManagedIceObject.h:111
armarx::RobotUnitModule::ControllerManagement::getNJointControllerDescription
NJointControllerDescription getNJointControllerDescription(const std::string &name, const Ice::Current &=Ice::emptyCurrent) const override
Returns the description of the NJointControllerBase.
Definition: RobotUnitModuleControllerManagement.cpp:705
RobotUnitModuleBase.h
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::RobotUnitModule::ControllerManagement::deleteNJointControllers
void deleteNJointControllers(const Ice::StringSeq &names, const Ice::Current &=Ice::emptyCurrent) override
Queues the given NJointControllers for deletion.
Definition: RobotUnitModuleControllerManagement.cpp:501
armarx::RobotUnitModule::ControllerManagement::getNJointControllerStatuses
NJointControllerStatusSeq getNJointControllerStatuses(const Ice::Current &=Ice::emptyCurrent) const override
Returns the status of all NJointControllers.
Definition: RobotUnitModuleControllerManagement.cpp:687
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::RobotUnitModule::ControllerManagement::switchNJointControllerSetup
void switchNJointControllerSetup(const Ice::StringSeq &newSetup, const Ice::Current &=Ice::emptyCurrent) override
Changes the set of requested NJointControllers to the given set.
Definition: RobotUnitModuleControllerManagement.cpp:508
armarx::RobotUnitModule::ControllerManagement::getNJointControllerDescriptions
NJointControllerDescriptionSeq getNJointControllerDescriptions(const Ice::Current &=Ice::emptyCurrent) const override
Returns the description of all NJointControllers.
Definition: RobotUnitModuleControllerManagement.cpp:719
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::RobotUnitModule::ControllerManagement::deactivateNJointControllers
void deactivateNJointControllers(const Ice::StringSeq &names, const Ice::Current &=Ice::emptyCurrent) override
Requests deactivation for the given NJointControllers.
Definition: RobotUnitModuleControllerManagement.cpp:453
armarx::RobotUnitModule::ControllerManagement::createNJointController
NJointControllerInterfacePrx createNJointController(const std::string &className, const std::string &instanceName, const NJointControllerConfigPtr &config, const Ice::Current &=Ice::emptyCurrent) override
Cretes a NJointControllerBase.
Definition: RobotUnitModuleControllerManagement.cpp:176
armarx::RobotUnitModule::ControllerManagement::createNJointControllerFromVariantConfig
NJointControllerInterfacePrx createNJointControllerFromVariantConfig(const std::string &className, const std::string &instanceName, const StringVariantBaseMap &variants, const Ice::Current &=Ice::emptyCurrent) override
Cretes a NJointControllerBase.
Definition: RobotUnitModuleControllerManagement.cpp:189
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::RobotUnitModule::ControllerManagement::getAllNJointControllers
StringNJointControllerPrxDictionary getAllNJointControllers(const Ice::Current &=Ice::emptyCurrent) const override
Returns proxies to all NJointControllers.
Definition: RobotUnitModuleControllerManagement.cpp:157
armarx::RobotUnitModule::ControllerManagement::getNJointControllerNotNull
const NJointControllerBasePtr & getNJointControllerNotNull(const std::string &name) const
Returns a pointer to the NJointControllerBase.
Definition: RobotUnitModuleControllerManagement.cpp:124
armarx::RobotUnitModule::ControllerManagement::Instance
static ControllerManagement & Instance()
Returns the singleton instance of this class.
Definition: RobotUnitModuleControllerManagement.h:51
armarx::RobotUnitModule::ControllerManagement::getRequestedNJointControllerNames
Ice::StringSeq getRequestedNJointControllerNames(const Ice::Current &=Ice::emptyCurrent) const override
Returns the names of all requested NJointControllers.
Definition: RobotUnitModuleControllerManagement.cpp:75
armarx::RobotUnitModule::ControllerManagement::getNJointControllerClassDescriptions
NJointControllerClassDescriptionSeq getNJointControllerClassDescriptions(const Ice::Current &=Ice::emptyCurrent) const override
getNJointControllerClassDescriptions
Definition: RobotUnitModuleControllerManagement.cpp:634
armarx::RobotUnitModule::ControllerManagement::createOrReplaceNJointController
NJointControllerInterfacePrx createOrReplaceNJointController(const std::string &className, const std::string &instanceName, const NJointControllerConfigPtr &config, const Ice::Current &=Ice::emptyCurrent) override
Deletes any NJointControllerBase with the given name and creates a new one.
Definition: RobotUnitModuleControllerManagement.cpp:219
armarx::RobotUnitModule::ControllerManagement::getNJointController
NJointControllerInterfacePrx getNJointController(const std::string &name, const Ice::Current &=Ice::emptyCurrent) const override
Returns a proxy to the NJointControllerBase.
Definition: RobotUnitModuleControllerManagement.cpp:660
armarx::RobotUnitModule::ControllerManagement::getNJointControllerStatus
NJointControllerStatus getNJointControllerStatus(const std::string &name, const Ice::Current &=Ice::emptyCurrent) const override
Returns the status of the NJointControllerBase.
Definition: RobotUnitModuleControllerManagement.cpp:677
armarx::viz::data::ElementFlags::names
const simox::meta::IntEnumNames names
Definition: json_elements.cpp:14
armarx::RobotUnitModule::ControllerManagement
This Module manages NJointControllers.
Definition: RobotUnitModuleControllerManagement.h:39
armarx::RobotUnitModule::ControllerManagement::getNJointControllersNotNull
std::vector< armarx::NJointControllerBasePtr > getNJointControllersNotNull(const std::vector< std::string > &names) const
Returns pointers to the NJointControllers.
Definition: RobotUnitModuleControllerManagement.cpp:109
armarx::RobotUnitModule
Definition: ControlDevice.h:34
armarx::RobotUnitModule::ControllerManagement::getNJointControllerDescriptionWithStatus
NJointControllerDescriptionWithStatus getNJointControllerDescriptionWithStatus(const std::string &name, const Ice::Current &=Ice::emptyCurrent) const override
Returns the status and description of the NJointControllerBase.
Definition: RobotUnitModuleControllerManagement.cpp:741
armarx::RobotUnitModule::ControllerManagement::getActivatedNJointControllerNames
Ice::StringSeq getActivatedNJointControllerNames(const Ice::Current &=Ice::emptyCurrent) const override
Returns the names of all activated NJointControllers.
Definition: RobotUnitModuleControllerManagement.cpp:83
armarx::RobotUnitModule::ControllerManagement::getNJointControllerNames
Ice::StringSeq getNJointControllerNames(const Ice::Current &=Ice::emptyCurrent) const override
Returns the names of all NJointControllers.
Definition: RobotUnitModuleControllerManagement.cpp:313
armarx::RobotUnitModule::ControllerManagementAttorneyForControlThreadDataBuffer
This class allows minimal access to private members of ControllerManagement in a sane fashion for Con...
Definition: RobotUnitModuleControlThreadDataBuffer.cpp:51
armarx::RobotUnitModule::ControllerManagement::activateNJointControllers
void activateNJointControllers(const Ice::StringSeq &names, const Ice::Current &=Ice::emptyCurrent) override
Requests activation for the given NJointControllers.
Definition: RobotUnitModuleControllerManagement.cpp:345
armarx::RobotUnitModule::ModuleBase
Base class for all RobotUnitModules.
Definition: RobotUnitModuleBase.h:183
armarx::RobotUnitModule::ControllerManagement::getNJointControllerDescriptionsWithStatuses
NJointControllerDescriptionWithStatusSeq getNJointControllerDescriptionsWithStatuses(const Ice::Current &=Ice::emptyCurrent) const override
Returns the status and description of all NJointControllers.
Definition: RobotUnitModuleControllerManagement.cpp:755
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18