4#include <VirtualRobot/VirtualRobot.h>
8#include <armarx/control/deprecated_njoint_mp_controller/joint_space/ControllerInterface.h>
10#include <dmp/representation/systemstatus.h>
14 class SensorValue1DoFActuatorTorque;
15 class SensorValue1DoFActuatorVelocity;
16 class SensorValue1DoFActuatorPosition;
17 class SensorValue1DoFGravityTorque;
18 class ControlTarget1DoFActuatorTorque;
19 class ControlTarget1DoFActuatorVelocity;
25 using UMIDMPPtr = ::boost::shared_ptr<class UMIDMP>;
59 using ConfigPtrT = NJointJointSpaceDMPControllerConfigPtr;
61 const NJointControllerConfigPtr& config,
65 std::string
getClassName(
const Ice::Current&)
const override;
68 void rtRun(
const IceUtil::Time& sensorValuesTimestamp,
69 const IceUtil::Time& timeSinceLastIteration)
override;
78 void learnDMPFromFiles(
const Ice::StringSeq& fileNames,
const Ice::Current&)
override;
81 void runDMP(
const Ice::DoubleSeq& goals,
double tau,
const Ice::Current&)
override;
94 struct DebugBufferData
96 StringFloatDictionary latestTargetVelocities;
97 StringFloatDictionary dmpTargetState;
102 std::map<std::string, const SensorValue1DoFActuatorTorque*> torqueSensors;
103 std::map<std::string, const SensorValue1DoFGravityTorque*> gravityTorqueSensors;
104 std::map<std::string, const SensorValue1DoFActuatorPosition*> positionSensors;
105 std::map<std::string, const SensorValue1DoFActuatorVelocity*> velocitySensors;
106 std::map<std::string, ControlTarget1DoFActuatorVelocity*>
targets;
112 std::vector<double> goals;
114 bool DMPAsForwardControl;
132 std::vector<std::string> dimNames;
133 DMP::Vec<DMP::DMPState> currentState;
134 DMP::DVec targetState;
#define TYPEDEF_PTRS_HANDLE(T)
NJointControllerWithTripleBuffer(const NJointJointSpaceDMPControllerControlData &initialCommands=NJointJointSpaceDMPControllerControlData())
A simple triple buffer for lockfree comunication between a single writer and a single reader.
The NJointJointSpaceDMPController class.
virtual void onPublish(const SensorAndControl &, const DebugDrawerInterfacePrx &, const DebugObserverInterfacePrx &) override
bool isFinished(const Ice::Current &) override
void learnDMPFromFiles(const Ice::StringSeq &fileNames, const Ice::Current &) override
void rtPostDeactivateController() override
This function is called after the controller is deactivated.
void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration) override
TODO make protected and use attorneys.
void runDMP(const Ice::DoubleSeq &goals, double tau, const Ice::Current &) override
void setTemporalFactor(double tau, const Ice::Current &) override
NJointJointSpaceDMPControllerConfigPtr ConfigPtrT
std::string getClassName(const Ice::Current &) const override
NJointJointSpaceDMPController(RobotUnitPtr prov, const NJointControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
void rtPreActivateController() override
This function is called before the controller is activated.
Brief description of class targets.
boost::shared_ptr< class UMIDMP > UMIDMPPtr
std::shared_ptr< class Robot > RobotPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface > DebugObserverInterfacePrx
IceUtil::Handle< class RobotUnit > RobotUnitPtr
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx
detail::ControlThreadOutputBufferEntry SensorAndControl