SafetyTaskspaceImpedanceController.h
Go to the documentation of this file.
1 /**
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @author Jianfeng Gao ( jianfeng dot gao at kit dot edu )
17  * @date 2021
18  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19  * GNU General Public License
20  */
21 
22 #pragma once
23 
24 #include <VirtualRobot/IK/DifferentialIK.h>
25 #include <VirtualRobot/Robot.h>
26 
28 
31 
32 #include <armarx/control/common/control_law/aron/SafetyTaskspaceImpedanceControllerConfig.aron.generated.h>
35 #include <armarx/control/common/ft/aron/FTConfig.aron.generated.h>
36 
37 #include <simox/control/environment/CollisionRobot.h>
38 #include <simox/control/geodesics/metric/inertia.h>
39 #include <simox/control/impl/simox/robot/Robot.h>
40 #include <simox/control/robot/NodeInterface.h>
41 
43 {
44 
46  {
47  public:
48  using InertiaPtr = std::shared_ptr<simox::control::geodesics::metric::Inertia>;
49  using DistanceResultsPtr =
50  std::shared_ptr<std::vector<simox::control::environment::DistanceResult>>;
51  using SimoxRobotPtr = std::shared_ptr<simox::control::simox::robot::Robot>;
52  using FTConfig = common::ft::arondto::FTConfig;
53  using Config = common::control_law::arondto::SafetyTaskspaceImpedanceControllerConfig;
54  using ConfigDict =
55  common::control_law::arondto::SafetyTaskspaceImpedanceControllerConfigDict;
56 
57  /// internal status of the controller, containing intermediate variables, mutable targets
58  struct RtStatus : public RobotStatus
59  {
60  /// targets
61  Eigen::VectorXf desiredJointTorques;
62  Eigen::VectorXf nullspaceTorque;
63  Eigen::VectorXf jointDampingTorque;
64 
65  /// force torque
67 
68  /// task space variables
71 
72  /// current status
73  Eigen::VectorXf qpos;
74  Eigen::VectorXf qvel;
75  Eigen::VectorXf qvelFiltered;
76 
80 
81  /// intermediate impedance results
85 
86  Eigen::Vector3f dirErrorImp;
90 
91  /// intermediate torque results
92  Eigen::VectorXf impedanceJointTorque;
93  Eigen::VectorXf kdImpedanceTorque;
94  Eigen::VectorXf selfCollisionJointTorque;
95  Eigen::VectorXf jointLimitJointTorque;
96 
97  Eigen::VectorXf selfCollisionTorqueFiltered;
98  Eigen::VectorXf jointLimitTorqueFiltered;
99 
100  /// intermediate projected torques via null space matrices
101  Eigen::VectorXf projImpedanceJointTorque; // TODO: rename it to proImpedanceJointTorque
102  Eigen::VectorXf projSelfCollJointTorque;
103  Eigen::VectorXf projJointLimJointTorque;
104 
107 
108  /// intermediate null space matrices (self-collision and joint limit avoidance)
109  Eigen::MatrixXf selfCollNullSpace;
110  Eigen::MatrixXf jointLimNullSpace;
112 
113  Eigen::MatrixXf selfCollNullSpaceFiltered;
114  Eigen::MatrixXf jointLimNullSpaceFiltered;
115 
116  /// self-collision avoidance initialization parameters
118 
119  /// self-collision avoidance intermediate results
120  const simox::control::robot::NodeInterface* node;
124  unsigned int node1Index;
125  unsigned int node2Index;
126 
128  {
129  /// the distances and projected jacobians from the generateSelfCollisionTorque() method
130  /// are needed for the null space calculation
131  std::string nodeName; // for debugging
132  std::string otherName; // for debugging
133  Eigen::MatrixXf jacobian;
134  float minDistance;
135 
136  // Debugging values
139  Eigen::VectorXf projectedJacT;
141  Eigen::Vector3f direction;
142  Eigen::Vector3f point;
143  float damping;
146 
147 
148  float
149  projectedImpedanceForce; // mapped back from joint space with projectedJac pinv
150 
151  selfCollisionData(int size) : jacobian(size, size), projectedJacT(size)
152  {
153  nodeName = "";
154  otherName = "";
155  jacobian.setZero();
156  projectedJacT.setZero();
157  nodeName = "";
158  minDistance = -1.0f;
159  repulsiveForce = -1.0f;
160  localStiffness = -1.0f;
161  distanceVelocity = -1.0f;
162  direction.setZero();
163  point.setZero();
164  damping = -1.0f;
165  projectedMass = -1.0f;
166  desiredNSColl = -1.0f;
167  projectedImpedanceForce = -1.0f;
168  }
169 
170  void
172  {
173  nodeName = "";
174  otherName = "";
175  jacobian.setZero();
176  projectedJacT.setZero();
177  direction.setZero();
178  point.setZero();
179  minDistance = -1.0f;
180  repulsiveForce = -1.0f;
181  localStiffness = -1.0f;
182  distanceVelocity = -1.0f;
183  damping = -1.0f;
184  projectedMass = -1.0f;
185  desiredNSColl = -1.0f;
186  projectedImpedanceForce = -1.0f;
187  }
188 
189  void
190  setDistValues(std::string nodeName, std::string otherName, float minDistance)
191  {
192  this->nodeName = nodeName;
193  this->otherName = otherName;
194  this->minDistance = minDistance;
195  }
196 
197  void
198  setCalcValues(const Eigen::MatrixXf& jacobian,
199  float repulsiveForce,
200  float localStiffness,
201  const Eigen::VectorXf& projectedJacT,
202  float distanceVelocity,
203  const Eigen::Vector3f& direction,
204  const Eigen::Vector3f& point,
205  float damping,
206  float projectedMass,
207  float desiredNSColl)
208  {
209  this->jacobian = jacobian;
210  this->repulsiveForce = repulsiveForce;
211  this->localStiffness = localStiffness;
212  this->projectedJacT = projectedJacT;
213  this->distanceVelocity = distanceVelocity;
214  this->direction = direction;
215  this->point = point;
216  this->damping = damping;
217  this->projectedMass = projectedMass;
218  this->desiredNSColl = desiredNSColl;
219  }
220  };
221 
222  std::vector<selfCollisionData> selfCollDataVec;
223  simox::control::environment::DistanceResult activeDistPair;
224  std::vector<selfCollisionData> evalData;
226 
227  /// self-collision avoidance null space intermediate results
228  float k1, k2, k3, k4;
229  Eigen::VectorXf normalizedJacT;
230  Eigen::MatrixXf tempNullSpaceMatrix;
231 
232  /// joint limit avoidance initialization parameters
234  {
235  /// for each joint, that has a limit, based on the config parameters:
236  /// jointRangeBufferZone
237  /// jointRangeBufferZone_z1
238  /// jointRangeBufferZone_z2
239  ///
240  /// the specific values depending on the joint range of each joint have to
241  /// be calculated (and stored, so the calculation is only done in the init)
242  std::string jointName;
244  float qLimLow;
245  float qLimHigh;
247  float qposThresholdLow; // unique for each joint in rep. torque function
249  /// null space parameters
250  float qposZ1Low;
251  float qposZ2Low;
252  float qposZ1High;
253  float qposZ2High;
259 
261  {
262  jointName = "";
263  isLimitless = false;
264  qLimLow = 0.0;
265  qLimHigh = 0.0;
266  thresholdRange = 0.0;
267  qposThresholdLow = 0.0;
268  qposThresholdHigh = 0.0;
269  qposZ1Low = 0.0;
270  qposZ2Low = 0.0;
271  qposZ1High = 0.0;
272  qposZ2High = 0.0;
275  desiredNSjointLim = -1.0;
276  repulsiveTorque = -1.0;
277  totalDamping = -1.0;
278  }
279  };
280 
281  std::vector<jointRangeBufferZoneData> jointLimitData;
282 
283  /// joint limit avoidance intermediate results
284  float jointVel;
286 
289 
290  float k1Lo, k2Lo, k3Lo, k4Lo;
291  float k1Hi, k2Hi, k3Hi, k4Hi;
292 
293  /// others
294  Eigen::MatrixXf jacobi;
295  Eigen::MatrixXf jtpinv;
296  Eigen::MatrixXf inertia;
297  Eigen::MatrixXf inertiaInverse;
298  bool rtSafe;
299 
300  /// time status
307 
308  /// collision pair info
311 
312 
313  /// other actuated joint debug info
320  Eigen::VectorXd setActuatedJointValues;
321  Eigen::VectorXd getActuatedJointValues;
322  };
323 
324  unsigned int numOfJoints; // for nonRT use case
325  private:
326  std::atomic_bool enablePreactivateInit{false};
327 
328  Eigen::MatrixXf I;
329 
330  VirtualRobot::DifferentialIKPtr ik;
331 
332  const float lambda = 2.0f;
333 
334  simox::control::robot::NodeSetInterface* simoxNodeSet;
335 
336 
337  /// avoidance torque methods
338  void calculateSelfCollisionTorque(
339  Config& c,
340  RtStatus& rtStatus,
341  std::shared_ptr<std::vector<::simox::control::environment::DistanceResult>>
342  collisionPairs,
343  std::shared_ptr<std::vector<int>> pointsOnArm,
344  int pointsOnArmIndex,
345  std::vector<std::string> selfCollisionNodes);
346  void calculateJointLimitTorque(Config& c, RtStatus& rtStatus);
347 
348  /// caclulate null spaces
349  void calculateSelfCollisionNullspace(Config& c, RtStatus& rtStatus);
350  void calculateJointLimitNullspace(Config& c, RtStatus& rtStatus);
351 
352  /// helper functions
353  Eigen::Vector4f calculateTransitionWeights(float z1, float z2);
354 
355 
356  public:
357  VirtualRobot::RobotNodePtr tcp;
358  VirtualRobot::RobotNodePtr rtTCP;
360 
361  // void updateFT(const FTConfig& c, RtStatus& rtStatus);
362  void initialize(const VirtualRobot::RobotNodeSetPtr& rns,
363  const VirtualRobot::RobotNodeSetPtr& rtRns,
364  SimoxRobotPtr& simoxControlRobot);
365  void
366  preactivateInit(const VirtualRobot::RobotNodeSetPtr& rns, Config& c, RtStatus& rtStatus);
367 
368  void run(Config& c,
369  RtStatus& robotStatus,
370  DistanceResultsPtr& collisionPairs,
371  std::shared_ptr<std::vector<int>>& pointsOnArm,
372  int pointsOnArmIndex,
373  InertiaPtr& inertiaInstance,
374  std::vector<std::string>& selfCollisionNodes);
375  void firstRun();
376  };
377 } // namespace armarx::control::common::control_law
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::totalDamping
float totalDamping
Definition: SafetyTaskspaceImpedanceController.h:258
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::numOfJoints
unsigned int numOfJoints
Definition: SafetyTaskspaceImpedanceController.h:324
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::nodeName
std::string nodeName
the distances and projected jacobians from the generateSelfCollisionTorque() method are needed for th...
Definition: SafetyTaskspaceImpedanceController.h:131
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::InertiaPtr
std::shared_ptr< simox::control::geodesics::metric::Inertia > InertiaPtr
Definition: SafetyTaskspaceImpedanceController.h:48
armarx::control::common::control_law::SafetyTaskspaceImpedanceController
Definition: SafetyTaskspaceImpedanceController.h:45
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::setDistValues
void setDistValues(std::string nodeName, std::string otherName, float minDistance)
Definition: SafetyTaskspaceImpedanceController.h:190
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::qposThresholdLow
float qposThresholdLow
Definition: SafetyTaskspaceImpedanceController.h:247
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointLimitNullspaceTime
double jointLimitNullspaceTime
Definition: SafetyTaskspaceImpedanceController.h:306
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::qposZ2High
float qposZ2High
Definition: SafetyTaskspaceImpedanceController.h:253
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::collisionPairTime
double collisionPairTime
time status
Definition: SafetyTaskspaceImpedanceController.h:301
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollDataVec
std::vector< selfCollisionData > selfCollDataVec
Definition: SafetyTaskspaceImpedanceController.h:222
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::selfCollisionData
selfCollisionData(int size)
Definition: SafetyTaskspaceImpedanceController.h:151
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::normalizedJacT
Eigen::VectorXf normalizedJacT
Definition: SafetyTaskspaceImpedanceController.h:229
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::activeCollPairsNum
int activeCollPairsNum
Definition: SafetyTaskspaceImpedanceController.h:310
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointLimitTorqueFiltered
Eigen::VectorXf jointLimitTorqueFiltered
Definition: SafetyTaskspaceImpedanceController.h:98
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::k2Hi
float k2Hi
Definition: SafetyTaskspaceImpedanceController.h:291
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::isLimitless
bool isLimitless
Definition: SafetyTaskspaceImpedanceController.h:243
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::dirErrorImp
Eigen::Vector3f dirErrorImp
Definition: SafetyTaskspaceImpedanceController.h:86
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointLimitJointTorque
Eigen::VectorXf jointLimitJointTorque
Definition: SafetyTaskspaceImpedanceController.h:95
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::qvel
Eigen::VectorXf qvel
Definition: SafetyTaskspaceImpedanceController.h:74
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::impedanceJointTorque
Eigen::VectorXf impedanceJointTorque
intermediate torque results
Definition: SafetyTaskspaceImpedanceController.h:92
armarx::navigation::core::Pose
Eigen::Isometry3f Pose
Definition: basic_types.h:31
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::direction
Eigen::Vector3f direction
Definition: SafetyTaskspaceImpedanceController.h:141
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::preactivateInit
void preactivateInit(const VirtualRobot::RobotNodeSetPtr &rns, Config &c, RtStatus &rtStatus)
Definition: SafetyTaskspaceImpedanceController.cpp:36
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::inertiaInverse
Eigen::MatrixXf inertiaInverse
Definition: SafetyTaskspaceImpedanceController.h:297
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::forceImpedance
Eigen::Vector6f forceImpedance
task space variables
Definition: SafetyTaskspaceImpedanceController.h:69
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::desiredNSColl
float desiredNSColl
Definition: SafetyTaskspaceImpedanceController.h:145
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::k4Hi
float k4Hi
Definition: SafetyTaskspaceImpedanceController.h:291
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::minDistance
float minDistance
Definition: SafetyTaskspaceImpedanceController.h:134
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::ConfigDict
common::control_law::arondto::SafetyTaskspaceImpedanceControllerConfigDict ConfigDict
Definition: SafetyTaskspaceImpedanceController.h:55
common.h
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::nullspaceTorque
Eigen::VectorXf nullspaceTorque
Definition: SafetyTaskspaceImpedanceController.h:62
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::k1Hi
float k1Hi
Definition: SafetyTaskspaceImpedanceController.h:291
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::kdForceImpedance
Eigen::Vector6f kdForceImpedance
Definition: SafetyTaskspaceImpedanceController.h:70
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::neck1JointValued
double neck1JointValued
Definition: SafetyTaskspaceImpedanceController.h:318
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::torsoJointValuef
float torsoJointValuef
other actuated joint debug info
Definition: SafetyTaskspaceImpedanceController.h:314
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::projectedMass
float projectedMass
Definition: SafetyTaskspaceImpedanceController.h:144
FTSensor.h
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::setActuatedJointValues
Eigen::VectorXd setActuatedJointValues
Definition: SafetyTaskspaceImpedanceController.h:320
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::k3Hi
float k3Hi
Definition: SafetyTaskspaceImpedanceController.h:291
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::neck2JointValuef
float neck2JointValuef
Definition: SafetyTaskspaceImpedanceController.h:316
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::currentTwist
Eigen::Vector6f currentTwist
Definition: SafetyTaskspaceImpedanceController.h:78
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::node2Index
unsigned int node2Index
Definition: SafetyTaskspaceImpedanceController.h:125
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::projectedImpedanceForce
float projectedImpedanceForce
Definition: SafetyTaskspaceImpedanceController.h:149
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::k1Lo
float k1Lo
Definition: SafetyTaskspaceImpedanceController.h:290
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::impTorqueRatio
float impTorqueRatio
Definition: SafetyTaskspaceImpedanceController.h:105
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::poseDiffMatImp
Eigen::Matrix3f poseDiffMatImp
intermediate impedance results
Definition: SafetyTaskspaceImpedanceController.h:82
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::otherName
std::string otherName
Definition: SafetyTaskspaceImpedanceController.h:132
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::thresholdRange
float thresholdRange
Definition: SafetyTaskspaceImpedanceController.h:246
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::run
void run(Config &c, RtStatus &robotStatus, DistanceResultsPtr &collisionPairs, std::shared_ptr< std::vector< int >> &pointsOnArm, int pointsOnArmIndex, InertiaPtr &inertiaInstance, std::vector< std::string > &selfCollisionNodes)
------------------------------— main rt-loop ---------------------------------------—
Definition: SafetyTaskspaceImpedanceController.cpp:1022
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::tempNullSpaceMatrix
Eigen::MatrixXf tempNullSpaceMatrix
Definition: SafetyTaskspaceImpedanceController.h:230
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::node
const simox::control::robot::NodeInterface * node
self-collision avoidance intermediate results
Definition: SafetyTaskspaceImpedanceController.h:120
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::node1OnArm
bool node1OnArm
Definition: SafetyTaskspaceImpedanceController.h:122
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointLimNullSpace
Eigen::MatrixXf jointLimNullSpace
Definition: SafetyTaskspaceImpedanceController.h:110
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollNullspaceTime
double selfCollNullspaceTime
Definition: SafetyTaskspaceImpedanceController.h:305
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::qpos
Eigen::VectorXf qpos
current status
Definition: SafetyTaskspaceImpedanceController.h:73
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::projTotalForceImpedance
float projTotalForceImpedance
Definition: SafetyTaskspaceImpedanceController.h:89
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::qposZ2Low
float qposZ2Low
Definition: SafetyTaskspaceImpedanceController.h:251
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::projForceImpedance
Eigen::Vector6f projForceImpedance
Definition: SafetyTaskspaceImpedanceController.h:88
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::getActuatedJointValues
Eigen::VectorXd getActuatedJointValues
Definition: SafetyTaskspaceImpedanceController.h:321
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::neck1JointValuef
float neck1JointValuef
Definition: SafetyTaskspaceImpedanceController.h:315
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::repulsiveForce
float repulsiveForce
Definition: SafetyTaskspaceImpedanceController.h:137
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointLimitData
std::vector< jointRangeBufferZoneData > jointLimitData
Definition: SafetyTaskspaceImpedanceController.h:281
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointLimNullSpaceFiltered
Eigen::MatrixXf jointLimNullSpaceFiltered
Definition: SafetyTaskspaceImpedanceController.h:114
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::k1
float k1
self-collision avoidance null space intermediate results
Definition: SafetyTaskspaceImpedanceController.h:228
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointLimitTorqueTime
double jointLimitTorqueTime
Definition: SafetyTaskspaceImpedanceController.h:304
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::neck2JointValued
double neck2JointValued
Definition: SafetyTaskspaceImpedanceController.h:319
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::qposZ1High
float qposZ1High
Definition: SafetyTaskspaceImpedanceController.h:252
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::k4Lo
float k4Lo
Definition: SafetyTaskspaceImpedanceController.h:290
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus
internal status of the controller, containing intermediate variables, mutable targets
Definition: SafetyTaskspaceImpedanceController.h:58
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::evalDataIndex
int evalDataIndex
Definition: SafetyTaskspaceImpedanceController.h:225
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::setCalcValues
void setCalcValues(const Eigen::MatrixXf &jacobian, float repulsiveForce, float localStiffness, const Eigen::VectorXf &projectedJacT, float distanceVelocity, const Eigen::Vector3f &direction, const Eigen::Vector3f &point, float damping, float projectedMass, float desiredNSColl)
Definition: SafetyTaskspaceImpedanceController.h:198
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointInertia
float jointInertia
Definition: SafetyTaskspaceImpedanceController.h:285
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::collisionTorqueTime
double collisionTorqueTime
Definition: SafetyTaskspaceImpedanceController.h:303
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::evalData
std::vector< selfCollisionData > evalData
Definition: SafetyTaskspaceImpedanceController.h:224
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::jointRangeBufferZoneData
jointRangeBufferZoneData()
Definition: SafetyTaskspaceImpedanceController.h:260
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::desiredJointTorques
Eigen::VectorXf desiredJointTorques
targets
Definition: SafetyTaskspaceImpedanceController.h:61
armarx::control::common::control_law::RobotStatus
Definition: common.h:29
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::projSelfCollJointTorque
Eigen::VectorXf projSelfCollJointTorque
Definition: SafetyTaskspaceImpedanceController.h:102
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::Config
common::control_law::arondto::SafetyTaskspaceImpedanceControllerConfig Config
Definition: SafetyTaskspaceImpedanceController.h:53
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::kdImpedanceTorque
Eigen::VectorXf kdImpedanceTorque
Definition: SafetyTaskspaceImpedanceController.h:93
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::jointLimitNullSpaceWeightsHigh
Eigen::Vector4f jointLimitNullSpaceWeightsHigh
Definition: SafetyTaskspaceImpedanceController.h:255
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::currentPose
Eigen::Matrix4f currentPose
Definition: SafetyTaskspaceImpedanceController.h:77
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::rtTCP
VirtualRobot::RobotNodePtr rtTCP
Definition: SafetyTaskspaceImpedanceController.h:358
armarx::control::common::control_law
This file is part of ArmarX.
Definition: aron_conversions.cpp:68
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::firstRun
void firstRun()
Definition: SafetyTaskspaceImpedanceController.cpp:132
ControlTarget1DoFActuator.h
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::currentForceTorque
Eigen::Vector6f currentForceTorque
force torque
Definition: SafetyTaskspaceImpedanceController.h:66
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::FTConfig
common::ft::arondto::FTConfig FTConfig
Definition: SafetyTaskspaceImpedanceController.h:52
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::DistanceResultsPtr
std::shared_ptr< std::vector< simox::control::environment::DistanceResult > > DistanceResultsPtr
Definition: SafetyTaskspaceImpedanceController.h:50
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::SimoxRobotPtr
std::shared_ptr< simox::control::simox::robot::Robot > SimoxRobotPtr
Definition: SafetyTaskspaceImpedanceController.h:51
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::activeDistPair
simox::control::environment::DistanceResult activeDistPair
Definition: SafetyTaskspaceImpedanceController.h:223
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::qLimHigh
float qLimHigh
Definition: SafetyTaskspaceImpedanceController.h:245
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::inertia
Eigen::MatrixXf inertia
Definition: SafetyTaskspaceImpedanceController.h:296
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData
Definition: SafetyTaskspaceImpedanceController.h:127
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::jacobian
Eigen::MatrixXf jacobian
Definition: SafetyTaskspaceImpedanceController.h:133
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::localTransformation
simox::control::Pose localTransformation
Definition: SafetyTaskspaceImpedanceController.h:121
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollNullSpaceFiltered
Eigen::MatrixXf selfCollNullSpaceFiltered
Definition: SafetyTaskspaceImpedanceController.h:113
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::node2OnArm
bool node2OnArm
Definition: SafetyTaskspaceImpedanceController.h:123
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::rtSafe
bool rtSafe
Definition: SafetyTaskspaceImpedanceController.h:298
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::dampingJointLim
float dampingJointLim
Definition: SafetyTaskspaceImpedanceController.h:288
TripleBuffer.h
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionNullSpaceWeights
Eigen::Vector4f selfCollisionNullSpaceWeights
self-collision avoidance initialization parameters
Definition: SafetyTaskspaceImpedanceController.h:117
GfxTL::Matrix3f
MatrixXX< 3, 3, float > Matrix3f
Definition: MatrixXX.h:600
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::projImpedanceJointTorque
Eigen::VectorXf projImpedanceJointTorque
intermediate projected torques via null space matrices
Definition: SafetyTaskspaceImpedanceController.h:101
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::qLimLow
float qLimLow
Definition: SafetyTaskspaceImpedanceController.h:244
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::qvelFiltered
Eigen::VectorXf qvelFiltered
Definition: SafetyTaskspaceImpedanceController.h:75
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::trackingError
float trackingError
Definition: SafetyTaskspaceImpedanceController.h:84
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::k3
float k3
Definition: SafetyTaskspaceImpedanceController.h:228
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::preFilterTime
double preFilterTime
Definition: SafetyTaskspaceImpedanceController.h:302
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointDampingTorque
Eigen::VectorXf jointDampingTorque
Definition: SafetyTaskspaceImpedanceController.h:63
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::damping
float damping
Definition: SafetyTaskspaceImpedanceController.h:143
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData
joint limit avoidance initialization parameters
Definition: SafetyTaskspaceImpedanceController.h:233
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::tcp
VirtualRobot::RobotNodePtr tcp
Definition: SafetyTaskspaceImpedanceController.h:357
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::initialize
void initialize(const VirtualRobot::RobotNodeSetPtr &rns, const VirtualRobot::RobotNodeSetPtr &rtRns, SimoxRobotPtr &simoxControlRobot)
Definition: SafetyTaskspaceImpedanceController.cpp:15
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::distanceVelocity
float distanceVelocity
Definition: SafetyTaskspaceImpedanceController.h:140
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::totalForceImpedance
float totalForceImpedance
Definition: SafetyTaskspaceImpedanceController.h:87
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::projJointLimJointTorque
Eigen::VectorXf projJointLimJointTorque
Definition: SafetyTaskspaceImpedanceController.h:103
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::repulsiveTorque
float repulsiveTorque
Definition: SafetyTaskspaceImpedanceController.h:257
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::poseErrorImp
Eigen::Vector6f poseErrorImp
Definition: SafetyTaskspaceImpedanceController.h:83
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::clearValues
void clearValues()
Definition: SafetyTaskspaceImpedanceController.h:171
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::desiredNullSpace
float desiredNullSpace
Definition: SafetyTaskspaceImpedanceController.h:111
Eigen::Matrix< float, 6, 1 >
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::k2Lo
float k2Lo
Definition: SafetyTaskspaceImpedanceController.h:290
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::qposZ1Low
float qposZ1Low
null space parameters
Definition: SafetyTaskspaceImpedanceController.h:250
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jacobi
Eigen::MatrixXf jacobi
others
Definition: SafetyTaskspaceImpedanceController.h:294
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::collisionPairsNum
int collisionPairsNum
collision pair info
Definition: SafetyTaskspaceImpedanceController.h:309
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointVel
float jointVel
joint limit avoidance intermediate results
Definition: SafetyTaskspaceImpedanceController.h:284
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::impForceRatio
float impForceRatio
Definition: SafetyTaskspaceImpedanceController.h:106
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionTorqueFiltered
Eigen::VectorXf selfCollisionTorqueFiltered
Definition: SafetyTaskspaceImpedanceController.h:97
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionJointTorque
Eigen::VectorXf selfCollisionJointTorque
Definition: SafetyTaskspaceImpedanceController.h:94
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::projectedJacT
Eigen::VectorXf projectedJacT
Definition: SafetyTaskspaceImpedanceController.h:139
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::jointLimitNullSpaceWeightsLow
Eigen::Vector4f jointLimitNullSpaceWeightsLow
Definition: SafetyTaskspaceImpedanceController.h:254
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::torsoJointValued
double torsoJointValued
Definition: SafetyTaskspaceImpedanceController.h:317
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::node1Index
unsigned int node1Index
Definition: SafetyTaskspaceImpedanceController.h:124
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::localStiffnessJointLim
float localStiffnessJointLim
Definition: SafetyTaskspaceImpedanceController.h:287
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::jointName
std::string jointName
for each joint, that has a limit, based on the config parameters: jointRangeBufferZone jointRangeBuff...
Definition: SafetyTaskspaceImpedanceController.h:242
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::point
Eigen::Vector3f point
Definition: SafetyTaskspaceImpedanceController.h:142
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::k2
float k2
Definition: SafetyTaskspaceImpedanceController.h:228
armarx::control::common::ft::FTSensor
Definition: FTSensor.h:45
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollNullSpace
Eigen::MatrixXf selfCollNullSpace
intermediate null space matrices (self-collision and joint limit avoidance)
Definition: SafetyTaskspaceImpedanceController.h:109
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::desiredNSjointLim
float desiredNSjointLim
Definition: SafetyTaskspaceImpedanceController.h:256
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::selfCollisionData::localStiffness
float localStiffness
Definition: SafetyTaskspaceImpedanceController.h:138
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::ftsensor
common::ft::FTSensor ftsensor
Definition: SafetyTaskspaceImpedanceController.h:359
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::desiredPose
Eigen::Matrix4f desiredPose
Definition: SafetyTaskspaceImpedanceController.h:79
SensorValue1DoFActuator.h
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::k4
float k4
Definition: SafetyTaskspaceImpedanceController.h:228
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::k3Lo
float k3Lo
Definition: SafetyTaskspaceImpedanceController.h:290
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jointRangeBufferZoneData::qposThresholdHigh
float qposThresholdHigh
Definition: SafetyTaskspaceImpedanceController.h:248
armarx::control::common::control_law::SafetyTaskspaceImpedanceController::RtStatus::jtpinv
Eigen::MatrixXf jtpinv
Definition: SafetyTaskspaceImpedanceController.h:295