#pragma once #include #include template struct FVector3 { T X; T Y; T Z; }; enum RadarPosition :int32_t { RADAR_LEFT, RADAR_RIGHT, RADAR_REAR, RADAR_ALL }; enum RenderPosition :int32_t { FRONT, BACK, LEFT, RIGHT, DASHBOARD, DASHBOARD_m, ALL }; enum EgoType :int32_t { None, User, Car }; enum ChannelType:int32_t { CHANNEL_CAR, CHANNEL_IMU, CHANNEL_RADAR, #ifdef LIDAR_SENSOR CHANNEL_LEFT_LIDAR, CHANNEL_RIGHT_LIDAR, #endif CHANNEL_ALL, }; enum UserState { Offline=0, Idle = 1, Remote = 2, Automotive = 3, AskRemote = 4 }; struct UserCamera { int32_t uid; EgoType type; UserState state; std::string name; }; struct OfferDesc { char type[16]; char sdp[4096 * 3-16]; }; struct AnswerDesc { char type[16]; char sdp[4096 * 3 - 16]; }; struct CandidateDesc { char candidate[4096]; char sdp_mid[4096]; int32_t sdp_mline_index; }; #pragma pack(1) #define CAN_MSG_LEN 13 struct cannet_frame { int8_t dlc; int32_t canid; int8_t data[8]; }; #pragma pack() enum RobotStatus { OK, Fail, }; #pragma pack() struct RadarData { int32_t r0; int32_t r1; int32_t r2; int32_t r3; int32_t r4; int32_t r5; int32_t r6; int32_t r7; }; struct FeedData { //int32_t work_pressure; //int32_t brake_pressure; //int32_t gearbox_oil_temp; //int32_t gearbox_oil_pressure; //int32_t engine_rpm; //int32_t engine_pressure; //int32_t speed; //// int32_t gear; //int32_t cold_water; //int32_t steer_angle; //int32_t left_lock_status; //int32_t right_lock_status; ///////////////////////////////////////////////////////状态参数 int32_t Engine_speed = 1;//发动机转速 int32_t Travel_speed = 2;//行驶速度 int32_t Fuel_level = 3;//燃油油位 int32_t Engine_temperature = 4;//发动机水温 int32_t Hydraulic_oil_temperature = 5;//液压油油温 int32_t Main_pump_1_pressure = 6;//主泵1压力 int32_t Main_pump_2_pressure = 7;//主泵2压力 int32_t Hand_gear = 8;//水箱水位 int32_t Actual_gear = 9;//发动机机油压力 _Float32 Gripper_height = 10;//抓具高度 _Float32 amplitude = 11;//幅度 int32_t Boom_angle = 12;//动臂角度 int32_t Stick_angle = 13;//斗杆角度 ///////////////////////////////////////////////////////报警信息 int32_t Idle_protection = 14;//怠速保护 int32_t Front_toggle = 15;//前轮对中 int32_t Back_toggle = 16;//后轮对中 int8_t Error_Buff[8];//报警信息 int32_t interlock = 18;//启动联锁 int32_t safety_switch = 19;//安全开关阀异常 int32_t arm_lift_pilot = 20;//大臂提升先导比例阀异常 int32_t arm_lowering_pilot = 21;//大臂下降先导比例阀异常 int32_t lever_lifting_pilot = 22;//斗杆提升先导比例阀异常 int32_t rod_lowering_pilot = 23;//斗杆下降先导比例阀异常 int32_t left_rotary_pilot = 24;//左回转先导比例阀异常 int32_t right_rotary_pilot = 25;//右回转先导比例阀异常 int32_t grab_open_pilot = 26;//抓斗开启先导比例阀异常 int32_t grab_close_pilot = 27;//抓斗闭合先导比例阀异常 int32_t safety_valves = 28;//安全开关阀 //增加 0x384 int32_t function_code =29 ; //功能码 int32_t main_add =30; //主地址 int32_t sub_add =31; //次地址 int32_t paramter=32 ; //参数值 //增加0x28b int32_t engine_spn =33; //发动机实时故障SPN int32_t engine_fmi =34; //发动机实时故障FMI int32_t engine_num =35; //发动机故障次数 int8_t all_Buff[8]; //0x28f }; struct cannet_frame_receive { int32_t canid; int8_t dlc; int8_t data[8]; }; typedef struct { //车辆基本状态控制 int16_t keyStatus; //钥匙状态 int16_t parkControl; //驻车控制 int16_t travelMode; //驾驶模式 int16_t eStop; //急停开关 int16_t directSwitch; //前后切换 int16_t gearControl; //车辆档位控制 int16_t hazardLight; //双闪灯 int16_t travelLight; //行驶灯光 int16_t vehicleHorn; //喇叭 int16_t silencedAlarm; //消报警音按钮 //车辆行驶控制 // int16_t accPedal; //油门踏板/ int16_t accPedalH; //手油门踏板 int16_t accPedalF; //脚油门踏板 int16_t brakePedal ; //刹车踏板 int16_t steeringWheel; //方向盘转速 int16_t turnSignal ; //转向灯 int16_t turnMode; //转向模式 //作业机构控制 int16_t enableHydraulic; //液压使能开关 int16_t workLight; //工作灯 int16_t bypassSwitch; //旁通开关 int16_t taskJoint_1; //第一个作业关节控制 int16_t taskJoint_2; //第二个作业关节控制 int16_t taskJoint_3; //第三个作业关节控制 int16_t endJoint; //末端关节控制 int16_t toolControl; //末端工具控制 int16_t baseLegSwitch; //支腿选择开关 int16_t baseLegControl; //支腿动作控制 int16_t cabLift; //驾驶室升降机构 int16_t esCabLift; //驾驶室应急下降开关 int16_t suckerSelect; //吸盘选择开关 int16_t coopSignal; //协同作业信号 //舱端故障报警 int16_t errBasOperation; //基本操作故障 int16_t errAccPedal; //油门信号故障 int16_t errBrakePedal; //刹车信号故障 int16_t errSteeringWheel; //转向故障 int16_t errHandle; //手柄信号故障 int16_t errEndTool; //末端工具控制故障 int16_t errOther; //其他故障 } vehicle_control_cv;