ZeroTorque.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 #include <VirtualRobot/VirtualRobot.h>
5 
7 
9 
10 // #include <armarx/control/njoint_controller/ControllerInterface.h>
11 #include <RobotAPI/interface/units/RobotUnit/NjointZeroTorqueController.h>
12 
13 
15 {
16 
18  {
19  Ice::FloatSeq targetTorques;
20  };
21 
23 
25  public NJointControllerWithTripleBuffer<NJointZeroTorqueControllerTarget>,
26  public NJointZeroTorqueControllerInterface
27  {
28  public:
29  using ConfigPtrT = NJointZeroTorqueControllerConfigPtr;
30  NJointZeroTorqueController(RobotUnitPtr prov, const NJointZeroTorqueControllerConfigPtr& config, const VirtualRobot::RobotPtr&);
31 
32  // NJointControllerInterface interface
33  std::string getClassName(const Ice::Current&) const override;
34  // WidgetDescription::StringWidgetDictionary getFunctionDescriptions(const Ice::Current&) const override;
35  // void callDescribedFunction(const std::string& name, const StringVariantBaseMap& valueMap, const Ice::Current&) override;
36 
37  // NJointController interface
38  void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) override;
41  const std::map<std::string, ConstControlDevicePtr>&,
42  const std::map<std::string, ConstSensorDevicePtr>&);
43 
44  static NJointZeroTorqueControllerConfigPtr GenerateConfigFromVariants(const StringVariantBaseMap& values);
45  protected:
46  void rtPreActivateController() override;
47  void rtPostDeactivateController() override;
48 
49  std::vector<ControlTarget1DoFActuatorZeroTorque*> targets;
51 
52  // NJointZeroTorqueControllerInterface interface
53  public:
54  void setControllerTarget(const Ice::FloatSeq&, const Ice::Current&) override;
55  };
56 
57 } // namespace armarx
armarx::control::njoint_controller::joint_space::NJointZeroTorqueControllerTarget
Definition: ZeroTorque.h:17
armarx::StringVariantBaseMap
std::map< std::string, VariantBasePtr > StringVariantBaseMap
Definition: ManagedIceObject.h:111
armarx::NJointControllerWithTripleBuffer
Definition: NJointControllerWithTripleBuffer.h:10
ProsthesisInterface.values
values
Definition: ProsthesisInterface.py:190
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::rtPreActivateController
void rtPreActivateController() override
This function is called before the controller is activated.
Definition: ZeroTorque.cpp:41
armarx::NJointControllerBase::ConfigPtrT
NJointControllerConfigPtr ConfigPtrT
Definition: NJointControllerBase.h:586
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::NJointZeroTorqueController
NJointZeroTorqueController(RobotUnitPtr prov, const NJointZeroTorqueControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
Definition: ZeroTorque.cpp:19
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::setControllerTarget
void setControllerTarget(const Ice::FloatSeq &, const Ice::Current &) override
Definition: ZeroTorque.cpp:240
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::control::njoint_controller::joint_space
Definition: Torque.cpp:9
armarx::control::njoint_controller::joint_space::NJointZeroTorqueControllerTarget::targetTorques
Ice::FloatSeq targetTorques
Definition: ZeroTorque.h:19
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController
Definition: ZeroTorque.h:24
ControlTarget1DoFActuator.h
max
T max(T t1, T t2)
Definition: gdiam.h:48
armarx::control::njoint_controller::joint_space::TYPEDEF_PTRS_HANDLE
TYPEDEF_PTRS_HANDLE(NJointTorqueController)
armarx::armem::Time
armarx::core::time::DateTime Time
Definition: forward_declarations.h:13
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::rtPostDeactivateController
void rtPostDeactivateController() override
This function is called after the controller is deactivated.
Definition: ZeroTorque.cpp:124
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::GenerateConfigFromVariants
static NJointZeroTorqueControllerConfigPtr GenerateConfigFromVariants(const StringVariantBaseMap &values)
Definition: ZeroTorque.cpp:113
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::targets
std::vector< ControlTarget1DoFActuatorZeroTorque * > targets
Definition: ZeroTorque.h:49
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::maxTorque
float maxTorque
Definition: ZeroTorque.h:50
NJointController.h
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::rtRun
void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration) override
TODO make protected and use attorneys.
Definition: ZeroTorque.cpp:48
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::GenerateConfigDescription
static WidgetDescription::WidgetPtr GenerateConfigDescription(const VirtualRobot::RobotPtr &, const std::map< std::string, ConstControlDevicePtr > &, const std::map< std::string, ConstSensorDevicePtr > &)
Definition: ZeroTorque.cpp:60
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::getClassName
std::string getClassName(const Ice::Current &) const override
Definition: ZeroTorque.cpp:14