ZeroTorqueOrVelocity.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 #include <VirtualRobot/VirtualRobot.h>
5 
8 
9 #include <armarx/control/njoint_controller/joint_space/ControllerInterface.h>
10 
12 {
13 
15  {
16  Ice::FloatSeq targetTorqueOrVelocity;
17  };
18 
20 
22  public NJointControllerWithTripleBuffer<NJointZeroTorqueOrVelocityControllerTarget>,
24  {
25  public:
26  using ConfigPtrT = NJointZeroTorqueOrVelocityControllerConfigPtr;
28  RobotUnitPtr prov,
29  const NJointZeroTorqueOrVelocityControllerConfigPtr& config,
30  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,
39  const IceUtil::Time& timeSinceLastIteration) override;
40  // void onPublish(const SensorAndControl&,
41  // const DebugDrawerInterfacePrx&,
42  // const DebugObserverInterfacePrx&) override;
45  const std::map<std::string, ConstControlDevicePtr>&,
46  const std::map<std::string, ConstSensorDevicePtr>&);
47 
48  static NJointZeroTorqueOrVelocityControllerConfigPtr
50 
51  protected:
52  void rtPreActivateController() override;
53  void rtPostDeactivateController() override;
54 
55  std::vector<ControlTarget1DoFActuatorZeroTorque*> targetsTorque;
56  std::vector<ControlTarget1DoFActuatorZeroVelocity*> targetsVel;
59  std::vector<bool> torqueControlled;
60 
61  // NJointZeroTorqueOrVelocityControllerInterface interface
62  public:
63  void setControllerTarget(const Ice::FloatSeq&, const Ice::Current&) override;
64  };
65 
66 } // namespace armarx::control::njoint_controller::joint_space
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityController::rtPostDeactivateController
void rtPostDeactivateController() override
This function is called after the controller is deactivated.
Definition: ZeroTorqueOrVelocity.cpp:206
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityControllerTarget
Definition: ZeroTorqueOrVelocity.h:14
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityController::NJointZeroTorqueOrVelocityController
NJointZeroTorqueOrVelocityController(RobotUnitPtr prov, const NJointZeroTorqueOrVelocityControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
Definition: ZeroTorqueOrVelocity.cpp:25
armarx::StringVariantBaseMap
std::map< std::string, VariantBasePtr > StringVariantBaseMap
Definition: ManagedIceObject.h:111
armarx::NJointControllerWithTripleBuffer
Definition: NJointControllerWithTripleBuffer.h:10
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityControllerTarget::targetTorqueOrVelocity
Ice::FloatSeq targetTorqueOrVelocity
Definition: ZeroTorqueOrVelocity.h:16
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityController::targetsTorque
std::vector< ControlTarget1DoFActuatorZeroTorque * > targetsTorque
Definition: ZeroTorqueOrVelocity.h:55
ProsthesisInterface.values
values
Definition: ProsthesisInterface.py:190
armarx::NJointControllerBase::ConfigPtrT
NJointControllerConfigPtr ConfigPtrT
Definition: NJointControllerBase.h:586
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityController::GenerateConfigFromVariants
static NJointZeroTorqueOrVelocityControllerConfigPtr GenerateConfigFromVariants(const StringVariantBaseMap &values)
Definition: ZeroTorqueOrVelocity.cpp:185
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityController::rtRun
void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration) override
TODO make protected and use attorneys.
Definition: ZeroTorqueOrVelocity.cpp:84
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityController::setControllerTarget
void setControllerTarget(const Ice::FloatSeq &, const Ice::Current &) override
Definition: ZeroTorqueOrVelocity.cpp:321
armarx::control::njoint_controller::joint_space
Definition: Torque.cpp:9
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityController::GenerateConfigDescription
static WidgetDescription::WidgetPtr GenerateConfigDescription(const VirtualRobot::RobotPtr &, const std::map< std::string, ConstControlDevicePtr > &, const std::map< std::string, ConstSensorDevicePtr > &)
Definition: ZeroTorqueOrVelocity.cpp:107
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityController::maxTorque
float maxTorque
Definition: ZeroTorqueOrVelocity.h:57
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityController::rtPreActivateController
void rtPreActivateController() override
This function is called before the controller is activated.
Definition: ZeroTorqueOrVelocity.cpp:77
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::NJointZeroTorqueOrVelocityController::maxVelocity
float maxVelocity
Definition: ZeroTorqueOrVelocity.h:58
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityController::getClassName
std::string getClassName(const Ice::Current &) const override
Definition: ZeroTorqueOrVelocity.cpp:20
NJointController.h
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityController::targetsVel
std::vector< ControlTarget1DoFActuatorZeroVelocity * > targetsVel
Definition: ZeroTorqueOrVelocity.h:56
armarx::control::NJointZeroTorqueOrVelocityControllerInterface
Definition: ControllerInterface.ice:59
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityController::torqueControlled
std::vector< bool > torqueControlled
Definition: ZeroTorqueOrVelocity.h:59
armarx::control::njoint_controller::joint_space::NJointZeroTorqueOrVelocityController
Definition: ZeroTorqueOrVelocity.h:21
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18