#include "robot.h"

int main(void)
{
	//初始化
	Robot::get()->init();

	while (1) {
		// 检测接收的命令
		Robot::get()->check_command();

		// 运动解算  把上位机下发的机器人的速度(线速度角速度)转为各个轮子的速度
		Robot::get()->do_kinmatics();

		// 根据轮子的编码器计算得到机器人的里程计
		Robot::get()->calc_odom();

		// 读取imu的值
		Robot::get()->get_imu_data();

		// 检测处理ps2的按键信息
		Robot::get()->check_joystick();
	}
}