Files
base/app/app_request.h
2025-08-26 10:53:01 +08:00

84 lines
1.4 KiB
C

#ifndef APP_REQUEST_H
#define APP_REQUEST_H
#ifdef __cplusplus
extern "C"
{
#endif
#include "app_config.h"
#include "app_differential_drive.h"
//typedef enum
//{
// MODE_MANUAL, // 手动模式
// MODE_AUTO // 自动模式
//} ControlMode;
//
typedef struct RequestData
{
float desired_speed; // 期望速度
float desired_curvature; // 期望曲率
float left_motor_speed; // 当前左电机速度
float right_motor_speed; // 当前右电机速度
float speed; // 当前车速
float curvature; // 当前曲率
float yaw_rate; // 当前角速度
float desired_yaw_rate; // 期望角速度
float acceleration; // 当前加速度
float deceleration; // 当前减速度
float max_speed; // 最大速度
float desired_acceleration; // 期望加速度
float desired_deceleration; // 期望减速度
float out_left_motor_speed; // 输出左电机速度
float out_right_motor_speed; // 输出右电机速度
} RequestData;
// 声明外部变量
extern DiffData diff_data;
void requestAppInit(void);
#ifdef __cplusplus
}
#endif
#endif // APP_DIFFERENTIAL_DRIVE_H