5#include <VirtualRobot/VirtualRobot.h>
16#include <armarx/control/deprecated_njoint_mp_controller/task_space/ControllerInterface.h>
20 class SensorValue1DoFActuatorTorque;
21 class SensorValue1DoFActuatorVelocity;
22 class SensorValue1DoFActuatorPosition;
23 class ControlTarget1DoFActuatorTorque;
24 class ControlTarget1DoFActuatorVelocity;
30 namespace tsvmp = armarx::control::deprecated_njoint_mp_controller::tsvmp;
51 using ConfigPtrT = NJointPeriodicTSDMPControllerConfigPtr;
53 const NJointControllerConfigPtr& config,
61 void rtRun(
const IceUtil::Time& sensorValuesTimestamp,
62 const IceUtil::Time& timeSinceLastIteration);
73 void runDMP(
const Ice::DoubleSeq& goals,
double tau,
const Ice::Current&);
74 void setSpeed(Ice::Double times,
const Ice::Current&);
75 void setGoals(
const Ice::DoubleSeq& goals,
const Ice::Current&);
81 return dmpCtrl->canVal;
94 struct DebugBufferData
96 StringFloatDictionary latestTargetVelocities;
97 StringFloatDictionary currentPose;
109 struct RTToControllerData
113 Eigen::Matrix4f currentPose;
114 Eigen::VectorXf currentTwist;
121 Eigen::Matrix4f currentTcpPose;
122 float waitTimeForCalibration;
130 std::vector<const SensorValue1DoFActuatorVelocity*> velocitySensors;
131 std::vector<const SensorValue1DoFActuatorPosition*> positionSensors;
132 std::vector<ControlTarget1DoFActuatorVelocity*>
targets;
136 std::string nodeSetName;
144 VirtualRobot::DifferentialIKPtr ik;
145 VirtualRobot::RobotNodePtr tcp;
147 NJointPeriodicTSDMPControllerConfigPtr cfg;
151 Eigen::Matrix4f targetPose;
155 Eigen::Vector3f filteredForce;
156 Eigen::Vector3f forceOffset;
157 Eigen::Matrix3f toolTransform;
158 Eigen::Vector3f oriToolDir;
165 TripleBuffer<UserToRTData> user2rtData;
#define TYPEDEF_PTRS_HANDLE(T)
NJointControllerWithTripleBuffer(const NJointPeriodicTSDMPForwardVelControllerControlData &initialCommands=NJointPeriodicTSDMPForwardVelControllerControlData())
std::recursive_mutex MutexType
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
A simple triple buffer for lockfree comunication between a single writer and a single reader.
The NJointPeriodicTSDMPForwardVelController class.
void onDisconnectNJointController()
void learnDMPFromFiles(const Ice::StringSeq &fileNames, const Ice::Current &)
void setAmplitude(Ice::Double amp, const Ice::Current &)
void setGoals(const Ice::DoubleSeq &goals, const Ice::Current &)
void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration)
TODO make protected and use attorneys.
std::string getClassName(const Ice::Current &) const
double getCanVal(const Ice::Current &)
bool isFinished(const Ice::Current &)
void runDMP(const Ice::DoubleSeq &goals, double tau, const Ice::Current &)
void onInitNJointController()
void setSpeed(Ice::Double times, const Ice::Current &)
NJointPeriodicTSDMPForwardVelController(const RobotUnitPtr &, const NJointControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
virtual void onPublish(const SensorAndControl &, const DebugDrawerInterfacePrx &, const DebugObserverInterfacePrx &)
NJointPeriodicTSDMPControllerConfigPtr ConfigPtrT
Eigen::VectorXf targetTSVel
Eigen::Matrix4f targetPose
Brief description of class targets.
std::shared_ptr< class Robot > RobotPtr
std::shared_ptr< TaskSpaceDMPController > TaskSpaceDMPControllerPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface > DebugObserverInterfacePrx
std::shared_ptr< CartesianVelocityController > CartesianVelocityControllerPtr
IceUtil::Handle< class RobotUnit > RobotUnitPtr
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx
detail::ControlThreadOutputBufferEntry SensorAndControl