z1_controller/include/control/CtrlComponents.h

47 lines
934 B
C
Raw Normal View History

2022-07-20 11:11:38 +08:00
#ifndef CTRLCOMPONENTS_H
#define CTRLCOMPONENTS_H
#include "message/LowlevelCmd.h"
#include "message/LowlevelState.h"
#include "interface/IOInterface.h"
#include "interface/IOROS.h"
#include "model/ArmDynKineModel.h"
#include "common/utilities/CSVTool.h"
#include <string>
#include <iostream>
2022-09-13 19:53:15 +08:00
#include "common/math/robotics.h"
2022-07-20 11:11:38 +08:00
struct CtrlComponents{
public:
2022-09-13 19:53:15 +08:00
CtrlComponents();
~CtrlComponents();
2022-07-20 11:11:38 +08:00
int dof;
std::string armConfigPath;
LowlevelCmd *lowCmd;
LowlevelState *lowState;
IOInterface *ioInter;
ArmDynKineModel *armModel;
CSVTool *stateCSV;
2022-09-13 19:53:15 +08:00
//config
Control ctrl;
bool _hasGripper;
std::string ctrl_IP;
2022-07-20 11:11:38 +08:00
double dt;
bool *running;
2022-09-13 19:53:15 +08:00
void sendRecv();
void geneObj();
2022-07-20 11:11:38 +08:00
2022-09-13 19:53:15 +08:00
bool isRecord;
void writeData();
2022-07-20 11:11:38 +08:00
private:
2022-09-13 19:53:15 +08:00
Vec3 _endPosLocal;
double _endEffectorMass;
Vec3 _endEffectorCom;
Mat3 _endEffectorInertia;
2022-07-20 11:11:38 +08:00
};
#endif // CTRLCOMPONENTS_H