z1_controller/include/message/LowlevelCmd.h

57 lines
1.3 KiB
C
Raw Normal View History

2022-07-20 11:11:38 +08:00
#ifndef LOWLEVELCMD_H
#define LOWLEVELCMD_H
#include "common/math/mathTypes.h"
#include "common/math/mathTools.h"
#include <vector>
#include <iostream>
struct LowlevelCmd{
public:
std::vector<double> q;
std::vector<double> dq;
std::vector<double> tau;
std::vector<double> kp;
std::vector<double> kd;
2022-11-11 19:49:41 +08:00
std::vector<std::vector<double>> q_data;
std::vector<std::vector<double>> dq_data;
std::vector<std::vector<double>> tauf_data;
std::vector<std::vector<double>> tau_data;
2022-07-20 11:11:38 +08:00
2022-09-13 19:53:15 +08:00
LowlevelCmd();
2022-07-20 11:11:38 +08:00
~LowlevelCmd(){}
void setZeroDq();
void setZeroTau();
void setZeroKp();
void setZeroKd();
void setQ(VecX qInput);
void setQd(VecX qDInput);
void setTau(VecX tauInput);
2022-11-11 19:49:41 +08:00
void setControlGain();
void setControlGain(std::vector<float> KP, std::vector<float> KW);
2022-07-20 11:11:38 +08:00
void setPassive();
2022-11-11 19:49:41 +08:00
2022-07-20 11:11:38 +08:00
void setGripperGain();
void setGripperGain(float KP, float KW);
void setGripperZeroGain();
void setGripperQ(double qInput);
2022-09-13 19:53:15 +08:00
double getGripperQ();
2022-07-20 11:11:38 +08:00
void setGripperQd(double qdInput);
2022-09-13 19:53:15 +08:00
double getGripperQd();
2022-07-20 11:11:38 +08:00
void setGripperTau(double tauInput);
2022-09-13 19:53:15 +08:00
double getGripperTau();
2022-11-11 19:49:41 +08:00
2022-07-20 11:11:38 +08:00
Vec6 getQ();
Vec6 getQd();
2022-09-13 19:53:15 +08:00
void resizeGripper();
2022-11-11 19:49:41 +08:00
private:
size_t _dof = 6;
2022-07-20 11:11:38 +08:00
};
#endif //LOWLEVELCMD_H