26#include <VirtualRobot/IK/DifferentialIK.h>
27#include <VirtualRobot/IK/JacobiProvider.h>
28#include <VirtualRobot/Nodes/RobotNode.h>
29#include <VirtualRobot/Robot.h>
30#include <VirtualRobot/RobotNodeSet.h>
31#include <VirtualRobot/VirtualRobot.h>
38#include <armarx/control/common/control_law/aron/TaskspaceControllerConfig.aron.generated.h>
41#include <armarx/control/common/ft/aron/FTConfig.aron.generated.h>
46 template <
typename ConfigType,
typename ConfigDictType>
50 using FTConfig = common::ft::arondto::FTConfig;
55 VirtualRobot::RobotNodePtr
tcp;
56 VirtualRobot::RobotNodePtr
rtTCP;
60 const std::map<std::string, std::string>& jointControlModeMap);
62 void initialize(
const VirtualRobot::RobotNodeSetPtr& rns,
63 const VirtualRobot::RobotNodeSetPtr& rtRns);
89 VirtualRobot::DifferentialIKPtr ik;
93 template <
typename ConfigType,
typename ConfigDictType>
96 const VirtualRobot::RobotNodeSetPtr& rns,
97 const VirtualRobot::RobotNodeSetPtr& rtRns)
100 auto numOfJoints = rns->getSize();
103 rtTCP = rtRns->getTCP();
105 ik.reset(
new VirtualRobot::DifferentialIK(
106 rtRns, rtRns->getRobot()->getRootNode(), VirtualRobot::JacobiProvider::eSVDDamped));
107 ik->setDampedSvdLambda(0.1f);
108 ik->setJacobiMMRegularization(1.f);
110 JacPseudoInvRegularization =
111 ik->getJacobiRegularization(VirtualRobot::IKSolver::CartesianSelection::All);
118 common::control_law::arondto::TSMixImpVelConfigDict>
121 static constexpr std::string_view
TypeName =
"TSMixImpVel";
128 common::control_law::arondto::TSImpConfigDict>
131 static constexpr std::string_view
TypeName =
"TSImp";
138 common::control_law::arondto::TSVelConfigDict>
141 static constexpr std::string_view
TypeName =
"TSVel";
148 common::control_law::arondto::TSAdmConfigDict>
151 static constexpr std::string_view
TypeName =
"TSAdm";
void run(Config &c, TSCtrlRtStatus &robotStatus) override
static constexpr bool IsCompliant
static constexpr std::string_view TypeName
void run(Config &c, TSCtrlRtStatus &robotStatus) override
static constexpr bool IsCompliant
static constexpr std::string_view TypeName
void run(Config &c, TSCtrlRtStatus &robotStatus) override
static constexpr bool IsCompliant
static constexpr std::string_view TypeName
void run(Config &c, TSCtrlRtStatus &robotStatus) override
static constexpr bool IsCompliant
static constexpr std::string_view TypeName
void initialize(const VirtualRobot::RobotNodeSetPtr &rns, const VirtualRobot::RobotNodeSetPtr &rtRns)
VirtualRobot::RobotNodePtr rtTCP
virtual void run(ConfigType &c, TSCtrlRtStatus &robotStatus)=0
common::ft::FTSensor ftsensor
void updateTSError(ConfigType &c, TSCtrlRtStatus &rtStatus)
void computeInertiaInverse(TSCtrlRtStatus &rtStatus)
void updateJacobian(ConfigType &c, TSCtrlRtStatus &rtStatus)
common::ft::arondto::FTConfig FTConfig
void applyAdmittanceInterface(ConfigType &c, TSCtrlRtStatus &rtStatus)
void applyInverseKinematics(ConfigType &c, TSCtrlRtStatus &rtStatus)
void updateNullspaceForceCommand(ConfigType &c, TSCtrlRtStatus &rtStatus)
ConfigDictType ConfigDict
void updateTSAdmittanceCommand(ConfigType &c, TSCtrlRtStatus &rtStatus)
Impedance.
void updateTSTwistCommand(ConfigType &c, TSCtrlRtStatus &rtStatus)
void setForceTorqueGuard(bool forceGuard, bool torqueGuard)
void updateTSForceCommand(ConfigType &c, TSCtrlRtStatus &rtStatus)
Velocity.
void validate(ConfigType &c, TSCtrlRtStatus &rtStatus)
void applyInverseDynamics(ConfigType &c, TSCtrlRtStatus &rtStatus)
bool isControlModeValid(const std::vector< std::string > &nameList, const std::map< std::string, std::string > &jointControlModeMap)
void updateNullspaceTwistCommand(ConfigType &c, TSCtrlRtStatus &rtStatus)
Admittance.
virtual ~TaskspaceController()=default
void updateTwist(ConfigType &c, TSCtrlRtStatus &rtStatus)
VirtualRobot::RobotNodePtr tcp
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
Matrix< float, 6, 1 > Vector6f
This file is part of ArmarX.