2 #include "unitree_legged_sdk/unitree_legged_sdk.h" 8 namespace a1 = UNITREE_LEGGED_SDK;
9 constexpr
double pi = M_PI;
21 using Instruction = std::function<InstructionOutput(Pose, a1::HighState)>;
27 a1::HighCmd
cmd = {0};
28 a1::HighState state = {0};
33 bool executing =
false;
63 Pose estimate_pose(
Pose prev, a1::HighState state);
67 bool validate_cmd(a1::HighCmd cmd);
91 void move_x(
float distance,
float velocity);
98 void move_y(
float distance,
float velocity);
105 void move(Eigen::Vector2f position, Eigen::Vector2f velocity);
114 void smooth_move(Eigen::Vector2f position,
float velocity,
float omega = 1*
pi/3);
123 void rotate(
float theta,
float omega);
130 [[deprecated(
"unsafe")]]
void set_led(std::vector<Eigen::Vector3i> lights);
135 [[deprecated]]
void set_pyr(Eigen::Vector3d pitch, Eigen::Vector3d yaw, Eigen::Vector3d roll);
139 [[deprecated]]
void set_height(
float h,
float v);
a1::HighCmd cmd
Definition: bot.h:12
Pose initial_pose
Initial pose of current instruction.
Definition: bot.h:29
bool done
Definition: bot.h:13
a1::UDP udp
UDP struct that stores payloads to send/recv.
Definition: bot.h:26
a1::Safety safe
Specifies operation mode?
Definition: bot.h:25
std::vector< Instruction > instructions
List of Instructions to be executed sequentially by the A1.
Definition: bot.h:40
std::function< InstructionOutput(Pose, a1::HighState)> Instruction
Lambda that takes in initial state and current state (in that order) and outputs a command for the cu...
Definition: bot.h:21
Bot()
Definition: bot.h:70
constexpr double pi
Definition: bot.h:9