31 lines
596 B
C++
31 lines
596 B
C++
#ifndef GO1_PRO_UNITREE_LEGGED_SAFETY_H_
|
|
#define GO1_PRO_UNITREE_LEGGED_SAFETY_H_
|
|
|
|
#include "comm.h"
|
|
#include "quadruped.h"
|
|
|
|
namespace UNITREE_LEGGED_SDK {
|
|
|
|
class Safety {
|
|
public:
|
|
Safety(LeggedType type);
|
|
~Safety();
|
|
void PositionLimit(LowCmd& cmd);
|
|
int PowerProtect(LowCmd& cmd, LowState& state, int factor);
|
|
int PositionProtect(LowCmd& cmd, LowState& state, double limit = 0.087);
|
|
|
|
private:
|
|
int WattLimit;
|
|
int Wcount;
|
|
double Hip_max;
|
|
double Hip_min;
|
|
double Thigh_max;
|
|
double Thigh_min;
|
|
double Calf_max;
|
|
double Calf_min;
|
|
};
|
|
|
|
} // namespace UNITREE_LEGGED_SDK
|
|
|
|
#endif
|