CartFreeDrag.h 963 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #pragma once
  2. #ifndef __CartFreeDrag_H__
  3. #define __CartFreeDrag_H__
  4. #include "AdmittanceBasic.h"
  5. class CartFreeDrag : public AdmittanceBasic
  6. {
  7. public:
  8. void Init();
  9. void LoadData(WayPoint curWayPt, FTData curForce, WayPoint refWayPt);
  10. void GetActualTarget(WayPoint& wayPoint);
  11. void RefreshAdmittancePara();
  12. private:
  13. void CartDragFunction(WayPoint& wayPoint);
  14. CartesianPos _curCart;
  15. CartesianForce _curForce;
  16. typedef Eigen::DiagonalMatrix<double, 6> Diag6d;
  17. // 历史数据
  18. Sophus::Vector6d deltaFkminus1;
  19. Sophus::Vector6d deltaFkminus2;
  20. Sophus::Vector6d Vkminus1;
  21. Sophus::Vector6d Vkminus2;
  22. Eigen::Matrix4d tool2Basekminus1 = Eigen::Matrix4d::Identity();
  23. // 阻抗控制参数
  24. Diag6d M;
  25. Diag6d B;
  26. Diag6d K;
  27. Sophus::Matrix6d Md;
  28. Sophus::Matrix6d Bd;
  29. Sophus::Matrix6d Kd;
  30. // 拖动
  31. Sophus::Vector6d dragFThr;
  32. bool isDrag;
  33. int Y = 0;
  34. int N = 0;
  35. };
  36. #endif
  37. #pragma once