|
@@ -274,6 +274,13 @@ namespace robot_control
|
|
|
DISABLED
|
|
|
}DRIVER_ENABLE_STATE;
|
|
|
|
|
|
+ typedef enum EQA_STATE_{
|
|
|
+ EQA_NULL = 0,
|
|
|
+ LISTEN = 1,
|
|
|
+ THINK = 2,
|
|
|
+ EXECUTE = 3
|
|
|
+ }EQA_STATE;
|
|
|
+
|
|
|
//scene = 1; //0: 平地 , 1: 楼梯 , 2: 沟壑 , 3: 陡坡 , 4: 限高
|
|
|
typedef enum SCENE_TYPE_{
|
|
|
NULL_SCENE = 0,
|
|
@@ -281,7 +288,10 @@ namespace robot_control
|
|
|
WALKING = 2,
|
|
|
STAIRS = 3,
|
|
|
CHARGE = 4,
|
|
|
- PERCEIVE_STAIRS = 5
|
|
|
+ PERCEIVE_STAIRS = 5,
|
|
|
+ SNOW = 6,
|
|
|
+ SLIPPY = 7,
|
|
|
+ STONE = 8
|
|
|
}SCENE_TYPE;
|
|
|
|
|
|
//机器人场景切换状态枚举
|
|
@@ -414,6 +424,13 @@ namespace robot_control
|
|
|
bool camera_switch; //是否打开相机
|
|
|
}JETSON_VISUAL_FOOTHOLD_INFO;
|
|
|
|
|
|
+ typedef enum _STAIRS_HEIGH_STATE{
|
|
|
+ STAIRS_HEIGH_NULL = 0,
|
|
|
+ STAIRS_LESS_THAN_16CM = 1,
|
|
|
+ STAIRS_LESS_THAN_20CM = 2,
|
|
|
+ STAIRS_LESS_THAN_30CM = 3,
|
|
|
+ }STAIRS_HEIGH_STATE;
|
|
|
+
|
|
|
typedef struct ROBOT_DRIVER_VALUE_{
|
|
|
double position;
|
|
|
double velocity;
|
|
@@ -451,6 +468,23 @@ namespace robot_control
|
|
|
CALIBRATE_FAILED = 3
|
|
|
}CALIBRATE_POSE_STATE;
|
|
|
|
|
|
+ typedef enum TERRAIN_SEG_DETECTION_RESULTS_{
|
|
|
+ NULL_TERRAIN = 0,
|
|
|
+ WEI_ZHI = 1,
|
|
|
+ CAO_DI = 2,
|
|
|
+ CI_ZHUAN = 3,
|
|
|
+ DI_BAN = 4,
|
|
|
+ DI_TAN = 5,
|
|
|
+ LI_QING_LU_MIAN = 6,
|
|
|
+ LOU_TI = 7,
|
|
|
+ LUAN_SHI_DI_MIAN = 8,
|
|
|
+ LU_ZHUAN = 9,
|
|
|
+ SHUI_NI_DI = 10,
|
|
|
+ TAI_JIE = 11
|
|
|
+ }TERRAIN_SEG_DETECTION_RESULTS;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
typedef struct ROBOT_COMMON_STATUS_{
|
|
|
int network; //机器人当前网络状态
|
|
|
BODY_POSTURE_STATE belie_or_stand; //机器人处于站立趴下状态(目前不用,芳勇认为测试中可能会用)
|
|
@@ -470,20 +504,37 @@ namespace robot_control
|
|
|
float tip_position_wrt_hip[LEG_NUMBER*3];//足端相对髋关节坐标系位置
|
|
|
float vf_planned_tip_position_wrt_base[LEG_NUMBER * 3];
|
|
|
float touch_detection[LEG_NUMBER];//触地检测,范围从0到1.0, 等于1.0为绝对触地,后期会变为概率,但目前还是只有1或者0两种可能
|
|
|
+ float target_body_orientation[3]; //raw pitch yaw
|
|
|
|
|
|
//错误代码
|
|
|
int error_code;
|
|
|
+ bool has_error;
|
|
|
+ unsigned int error_wheel[CODE_WHEEL_NUM];
|
|
|
+ unsigned int warn_wheel[CODE_WHEEL_NUM];
|
|
|
+ unsigned int note_wheel[CODE_WHEEL_NUM];
|
|
|
+ unsigned int joint_error_wheel[JOINT_CODE_WHEEL_NUM];
|
|
|
+ unsigned int joint_warn_wheel[JOINT_CODE_WHEEL_NUM];
|
|
|
+ unsigned int joint_note_wheel[JOINT_CODE_WHEEL_NUM];
|
|
|
ROBOT_CHARGE_STATUS charge_status;
|
|
|
bool salute_state;
|
|
|
NAV_OR_JOY_MODE joy_mode;
|
|
|
+ EQA_STATE eqa_state;
|
|
|
|
|
|
bool guardian_switch; //表示当前停障功能的开关的状态
|
|
|
bool visual_foothold_switch; //表示当前视觉落脚点功能开关的状态
|
|
|
- GUARDIAN_VELOCITY_DECAY_RATIO guardian_velocity_decay_ratio; //军营用于显示前左右三个方位的障碍 (芳哥,这是新加接口)
|
|
|
+ GUARDIAN_VELOCITY_DECAY_RATIO guardian_velocity_decay_ratio; //军营用于显示前左右三个方位的障碍
|
|
|
|
|
|
LIE_DOWN_ADJUST_ lie_down_adjust; //用于判断趴下前是否正在做足端位置调整
|
|
|
float speed_bar_on_controller; //机器人遥控器上当前选中的线速度
|
|
|
CALIBRATE_POSE_STATE calibrate_pos_state;
|
|
|
+ int self_test_code;
|
|
|
+ bool encoder_calibrate_state;
|
|
|
+
|
|
|
+ bool nav_pos_state;//当前导航定位位置是否正常
|
|
|
+ bool nav_init_pos;//是否尝试初始化导航定位
|
|
|
+ TERRAIN_SEG_DETECTION_RESULTS terrain_seg_result;
|
|
|
+ bool uwb_state;
|
|
|
+ STAIRS_HEIGH_STATE stairs_state;
|
|
|
}ROBOT_COMMON_STATUS;
|
|
|
|
|
|
typedef enum JOINT_LIMIT_STATE_{
|
|
@@ -495,7 +546,9 @@ namespace robot_control
|
|
|
typedef struct ROBOT_JOINT_STATUS_{
|
|
|
std::string name;
|
|
|
float current;//电机数据(电流值)
|
|
|
- float joint_temperature;//关节温度
|
|
|
+ float joint_temperature;//驱动器温度
|
|
|
+ float motor_temperature;//电机温度
|
|
|
+ float driver_cpu_temperature;//驱动器cpu温度
|
|
|
float torque_sensor_data;//扭矩传感器数据
|
|
|
double position;
|
|
|
double velocity;
|
|
@@ -504,6 +557,7 @@ namespace robot_control
|
|
|
double min_limit;
|
|
|
JOINT_LIMIT_STATE limit_state;
|
|
|
unsigned short driver_error_code;
|
|
|
+ unsigned short motor_error_code;
|
|
|
double target_position;
|
|
|
double target_velocity;
|
|
|
double target_effort;
|
|
@@ -562,6 +616,9 @@ namespace robot_control
|
|
|
double driver_kd_scale;
|
|
|
double trq_safety_limit;
|
|
|
double target_torque;
|
|
|
+ bool init_pos_check_switch;
|
|
|
+ double init_position;
|
|
|
+ double init_position_error;
|
|
|
}DRIVER_CONFIG_PARAMETER;
|
|
|
|
|
|
typedef struct SENSOR_CONFIG_PARAMETER_{
|
|
@@ -575,6 +632,7 @@ namespace robot_control
|
|
|
robot_control::common::DRIVER_CONFIG_PARAMETER driver_data[MOTOR_NUM];
|
|
|
robot_control::common::SENSOR_CONFIG_PARAMETER sensor_data[THE_TRQ_SENSOR_NUM];
|
|
|
bool trq_have_been_calibrated;
|
|
|
+ bool joint_position_have_been_calibrated;
|
|
|
}JOINTS_CONFIG_INFO;
|
|
|
|
|
|
typedef struct _ROBOT_SPECIAL_CONFIG_INFO{
|
|
@@ -582,6 +640,9 @@ namespace robot_control
|
|
|
std::string light_address;
|
|
|
EN_DRIVER_ECAT_SLAVES_TYPE driver_type;
|
|
|
EN_TRQ_SENSOR_ECAT_SLAVES_TYPE trq_sensor_type;
|
|
|
+ EN_BMS_TYPE bms_type;
|
|
|
+ EN_EMOJI_LIGHT_TYPE emoji_light_type;
|
|
|
+ EN_LAMP_EFFECT_THEME lamp_effect_theme;
|
|
|
}ROBOT_SPECIAL_CONFIG_INFO;
|
|
|
|
|
|
typedef enum _ROBOT_BODY_TYPE{
|
|
@@ -612,6 +673,23 @@ namespace robot_control
|
|
|
MC_COORDINATE point;
|
|
|
MC_QUATERNIONS quaternion;
|
|
|
}ROBOT_POSE_ESTIMATE;
|
|
|
+
|
|
|
+ typedef struct BMS_STATE_INFO_{
|
|
|
+ float sigle_overvoltage;
|
|
|
+ float remaining_capacity;
|
|
|
+ float battery_voltage_1th;
|
|
|
+ float battery_voltage_2th;
|
|
|
+ float battery_voltage_3th;
|
|
|
+ float battery_voltage_4th;
|
|
|
+ float battery_voltage_5th;
|
|
|
+ float battery_voltage_6th;
|
|
|
+ float total_voltage;
|
|
|
+ float discharging_current;
|
|
|
+ float remain_battery_capacity;
|
|
|
+ float reconfigurable_system_on_chip;
|
|
|
+ float battery_power;
|
|
|
+ bool is_charging;
|
|
|
+ }BMS_STATE_INFO;
|
|
|
//Log config
|
|
|
} // namespace common
|
|
|
}
|