40 lines
871 B
C++
40 lines
871 B
C++
#ifndef GIMBAL_HPP
|
|
#define GIMBAL_HPP
|
|
|
|
#include "GO_M8010_6_Driver.h"
|
|
#include "pid.h"
|
|
#include "nuc.h"
|
|
class Gimbal
|
|
{
|
|
public:
|
|
Gimbal();
|
|
void gimbalFlow(void);//云台随遥控器转动
|
|
void gimbalZero(void);//云台零阻尼模式
|
|
void gimbalInit(void);//go初始化
|
|
//void gimbalVision(void);//云台视觉模式
|
|
void gimbalVision(const NUC_t &nuc); // 接收 NUC_t 数据
|
|
//暂存要发送的扭矩
|
|
//float result[GO_NUM];
|
|
// float Kp;
|
|
// float Kd;
|
|
private:
|
|
// //电机速度pid结构体
|
|
// pid_type_def speed_pid[GO_NUM];
|
|
// //位置环pid
|
|
// pid_type_def angle_pid[GO_NUM];
|
|
//视觉发送的要调的角度
|
|
float self_angleSet;
|
|
GO_Motorfield* goData[GO_NUM];
|
|
//暂存目标位置
|
|
float angleSet[GO_NUM];
|
|
float offestAngle[GO_NUM];//go数据
|
|
float Kp;
|
|
float Kd;
|
|
float allowRange;
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|