ZeroTorque.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 #include <VirtualRobot/VirtualRobot.h>
5 
7 #include <RobotAPI/interface/units/RobotUnit/NjointZeroTorqueController.h>
8 
9 namespace armarx
10 {
11  class ControlTarget1DoFActuatorZeroTorque;
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;
31  const NJointZeroTorqueControllerConfigPtr& config,
32  const VirtualRobot::RobotPtr&);
33 
34  // NJointControllerInterface interface
35  std::string getClassName(const Ice::Current&) const override;
36  // WidgetDescription::StringWidgetDictionary getFunctionDescriptions(const Ice::Current&) const override;
37  // void callDescribedFunction(const std::string& name, const StringVariantBaseMap& valueMap, const Ice::Current&) override;
38 
39  // NJointController interface
40  void rtRun(const IceUtil::Time& sensorValuesTimestamp,
41  const IceUtil::Time& timeSinceLastIteration) override;
44  const std::map<std::string, ConstControlDevicePtr>&,
45  const std::map<std::string, ConstSensorDevicePtr>&);
46 
47  static NJointZeroTorqueControllerConfigPtr
49 
50  protected:
51  void rtPreActivateController() override;
52  void rtPostDeactivateController() override;
53 
54  std::vector<ControlTarget1DoFActuatorZeroTorque*> targets;
56 
57  // NJointZeroTorqueControllerInterface interface
58  public:
59  void setControllerTarget(const Ice::FloatSeq&, const Ice::Current&) override;
60  };
61 
62 } // namespace armarx::control::njoint_controller::joint_space
armarx::control::njoint_controller::joint_space::NJointZeroTorqueControllerTarget
Definition: ZeroTorque.h:17
NJointControllerWithTripleBuffer.h
armarx::StringVariantBaseMap
std::map< std::string, VariantBasePtr > StringVariantBaseMap
Definition: ManagedIceObject.h:110
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:51
armarx::NJointControllerBase::ConfigPtrT
NJointControllerConfigPtr ConfigPtrT
Definition: NJointControllerBase.h:587
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::NJointZeroTorqueController
NJointZeroTorqueController(RobotUnitPtr prov, const NJointZeroTorqueControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
Definition: ZeroTorque.cpp:25
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::setControllerTarget
void setControllerTarget(const Ice::FloatSeq &, const Ice::Current &) override
Definition: ZeroTorque.cpp:249
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::control::njoint_controller::joint_space
Definition: Torque.cpp:12
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
max
T max(T t1, T t2)
Definition: gdiam.h:51
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:134
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::GenerateConfigFromVariants
static NJointZeroTorqueControllerConfigPtr GenerateConfigFromVariants(const StringVariantBaseMap &values)
Definition: ZeroTorque.cpp:124
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::targets
std::vector< ControlTarget1DoFActuatorZeroTorque * > targets
Definition: ZeroTorque.h:54
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::maxTorque
float maxTorque
Definition: ZeroTorque.h:55
IceUtil::Handle< class RobotUnit >
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:58
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
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:70
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:19
armarx::control::njoint_controller::joint_space::NJointZeroTorqueController::getClassName
std::string getClassName(const Ice::Current &) const override
Definition: ZeroTorque.cpp:20