30#include <armarx/control/interface/ConfigurableNJointControllerInterface.h>
31#include <armarx/control/memory/config/Writer.h>
39 const std::string& controllerName,
40 const std::string& controllerTypeName,
41 const memory::config::Writer& configWriter) :
43 controllerName_(controllerName),
44 controllerTypeName_(controllerTypeName),
45 configWriter_(configWriter)
56 ARMARX_INFO <<
"Deactivating and deleting controller `" << controllerName_ <<
"`";
57 controller_->deactivateAndDeleteController();
69 ARMARX_WARNING <<
"Exception while deactivating and deleting controller `"
71 <<
"`. The controller may not have been deleted on the "
82 ARMARX_INFO <<
"Activating controller `" << controllerName_ <<
"`";
83 controller_->activateController();
90 return controller_->isControllerActive();
97 ARMARX_INFO <<
"Deactivating controller `" << controllerName_ <<
"`";
98 controller_->deactivateController();
104 ARMARX_INFO <<
"Daemonizing controller `" << controllerName_ <<
"`";
119 ARMARX_VERBOSE <<
"Updating config for controller `" << controllerName_ <<
"`";
124 ARMARX_DEBUG <<
"--> config.toAronDTO() of control cfg took "
127 controller_->updateConfig(cfgDTO);
129 <<
"--> sending the converted AronDTO (controller_->updateConfig(cfgDTO)) took "
136 configWriter_.storeConfig(controllerTypeName_, controllerName_, config.
toAron());
137 ARMARX_DEBUG <<
"--> store config in memory (configWriter_.storeConfig) took "
virtual armarx::aron::data::dto::DictPtr toAronDTO() const =0
Convert the current bo to the ice representation of an aron variant data dict.
virtual armarx::aron::data::DictPtr toAron() const =0
Convert the current bo to an aron variant data dict.
void updateConfig(const armarx::aron::codegenerator::cpp::AronGeneratedObjectBase &config)
Updates the configuration of the controller.
void activate()
Requests the activation of the controller in the RobotUnit.
void deactivate()
Requests the deactivation of the controller in the RobotUnit.
ControllerPrx & ctrl()
Returns the "raw" controller object.
bool isActive()
Check the status of the controller.
ControllerWrapperBase()=delete
armarx::control::ConfigurableNJointControllerInterfacePrx ControllerPrx
void daemonize(bool daemonize=true)
Sets whether the controller should be daemonized.
~ControllerWrapperBase()
Destructor for the ControllerWrapperBase class.
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
#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...
#define ARMARX_INFO
The normal logging level.
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
#define ARMARX_VERBOSE
The logging level for verbose information.
aron::cpp::AronGeneratedObjectBase AronGeneratedObjectBase
This file is part of ArmarX.
std::string GetHandledExceptionString()