Torque.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <VirtualRobot/VirtualRobot.h>
4 
6 #include <RobotAPI/interface/units/RobotUnit/NjointZeroTorqueController.h>
7 
9 {
11  {
12  Ice::FloatSeq targetTorques;
13  };
14 
16 
18  public NJointControllerWithTripleBuffer<NJointTorqueControllerTarget>,
19  public NJointTorqueControllerInterface
20  {
21  public:
22  using ConfigPtrT = NJointTorqueControllerConfigPtr;
24  const NJointTorqueControllerConfigPtr& config,
25  const VirtualRobot::RobotPtr&);
26 
27  // NJointControllerInterface interface
28  std::string getClassName(const Ice::Current&) const override;
29  // WidgetDescription::StringWidgetDictionary getFunctionDescriptions(const Ice::Current&) const override;
30  // void callDescribedFunction(const std::string& name, const StringVariantBaseMap& valueMap, const Ice::Current&) override;
31 
32  // NJointController interface
33  void rtRun(const IceUtil::Time& sensorValuesTimestamp,
34  const IceUtil::Time& timeSinceLastIteration) override;
37  const std::map<std::string, ConstControlDevicePtr>&,
38  const std::map<std::string, ConstSensorDevicePtr>&);
39 
40  static NJointTorqueControllerConfigPtr
42 
43  protected:
44  void rtPreActivateController() override;
45  void rtPostDeactivateController() override;
46 
47  std::vector<ControlTarget1DoFActuatorTorque*> targets;
49 
50  // NJointTorqueControllerInterface interface
51  public:
52  void setControllerTarget(const Ice::FloatSeq&, const Ice::Current&) override;
53  };
54 
55 } // namespace armarx::control::njoint_controller::joint_space
armarx::control::njoint_controller::joint_space::NJointTorqueControllerTarget::targetTorques
Ice::FloatSeq targetTorques
Definition: Torque.h:12
NJointControllerWithTripleBuffer.h
armarx::StringVariantBaseMap
std::map< std::string, VariantBasePtr > StringVariantBaseMap
Definition: ManagedIceObject.h:110
armarx::control::njoint_controller::joint_space::NJointTorqueController::GenerateConfigFromVariants
static NJointTorqueControllerConfigPtr GenerateConfigFromVariants(const StringVariantBaseMap &values)
Definition: Torque.cpp:120
armarx::control::njoint_controller::joint_space::NJointTorqueController::getClassName
std::string getClassName(const Ice::Current &) const override
Definition: Torque.cpp:19
armarx::NJointControllerWithTripleBuffer
Definition: NJointControllerWithTripleBuffer.h:10
armarx::control::njoint_controller::joint_space::NJointTorqueController::NJointTorqueController
NJointTorqueController(RobotUnitPtr prov, const NJointTorqueControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
Definition: Torque.cpp:24
ProsthesisInterface.values
values
Definition: ProsthesisInterface.py:190
armarx::control::njoint_controller::joint_space::NJointTorqueController::targets
std::vector< ControlTarget1DoFActuatorTorque * > targets
Definition: Torque.h:47
armarx::NJointControllerBase::ConfigPtrT
NJointControllerConfigPtr ConfigPtrT
Definition: NJointControllerBase.h:587
armarx::control::njoint_controller::joint_space::NJointTorqueController
Definition: Torque.h:17
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::control::njoint_controller::joint_space::NJointTorqueController::rtRun
void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration) override
TODO make protected and use attorneys.
Definition: Torque.cpp:55
armarx::control::njoint_controller::joint_space
Definition: Torque.cpp:12
max
T max(T t1, T t2)
Definition: gdiam.h:51
armarx::control::njoint_controller::joint_space::NJointTorqueController::GenerateConfigDescription
static WidgetDescription::WidgetPtr GenerateConfigDescription(const VirtualRobot::RobotPtr &, const std::map< std::string, ConstControlDevicePtr > &, const std::map< std::string, ConstSensorDevicePtr > &)
Definition: Torque.cpp:66
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::NJointTorqueController::rtPreActivateController
void rtPreActivateController() override
This function is called before the controller is activated.
Definition: Torque.cpp:49
IceUtil::Handle< class RobotUnit >
armarx::control::njoint_controller::joint_space::NJointTorqueControllerTarget
Definition: Torque.h:10
armarx::control::njoint_controller::joint_space::NJointTorqueController::rtPostDeactivateController
void rtPostDeactivateController() override
This function is called after the controller is deactivated.
Definition: Torque.cpp:130
armarx::control::njoint_controller::joint_space::NJointTorqueController::setControllerTarget
void setControllerTarget(const Ice::FloatSeq &, const Ice::Current &) override
Definition: Torque.cpp:244
armarx::control::njoint_controller::joint_space::NJointTorqueController::maxTorque
float maxTorque
Definition: Torque.h:48
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:19