123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- #pragma once
- #include <unordered_map>
- #include <vector>
- template<typename T>
- 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(1)
- #define CAN_MSG_LEN 13
- struct cannet_busframe
- {
- int8_t dlc;
- int32_t canid;
- int8_t data[8];
-
- };
- #pragma pack()
- enum RobotStatus
- {
- OK,
- Fail,
- };
- struct FeedData
- {
- /*
- 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 work_pressure = 1;//工作系统压力
- int32_t brake_pressure = 2; //制动系统压力
- int32_t gearbox_oil_temp = 3;//变速箱油温
- int32_t gearbox_oil_pressure = 4; //变速箱油压
- int32_t engine_rpm = 5;//发动机转速
- int32_t speed = 6;//不知道?---可能是后加的传感器---驱动轮增量编码器
- int32_t gear = 7;
- int32_t engine_pressure = 8;//发动机压力
- int32_t cold_water = 9;//冷却液温度-发动机水温
- //int32_t steer_angle = 10;
- float steer_angle = 10;//转向角度(原来金川是轮子的现在大冶用铰链位置) 铰接转向姿态编码器
- int32_t left_lock = 11;//遥操模式
- int32_t right_lock = 12;//人工模式
- //大冶新加的
- int32_t engine_time = 13;//发动机运行小时
- int32_t wire_sensor_l = 14;//拉线传感器左侧
- int32_t wire_sensor_r = 15;//拉线传感器右侧
- int32_t fuel_level = 16;//燃油油位
- int32_t lock_switch_l = 17;//锁钩到位开关左
- int32_t lock_switch_r = 18; //锁钩到位开关右
- int32_t tip_limit = 19;//倾翻限位
- int32_t turn_left = 20;//左转
- int32_t turn_right = 21;//右转
- int32_t hight_beam = 22;//远光灯
- int32_t low_beam = 23;//近光灯
- int32_t parking = 24;//驻车
- int32_t brake = 25;//刹车
- int32_t back_car = 26;//倒车
- int32_t front_work_lamp = 27;//前工作灯
- int32_t rear_work_lamp = 28;//后工作灯
- int32_t cargo_weight = 29;//渣包重量
- int32_t system_vol = 30;//系统电压
- int8_t Error_Buff[8];//报警信息
- int32_t f_gear = 32;//1F,2R,3N
- int32_t gear_1 =33;//1,2,3,4
- int32_t outgrigger_l = 34;//左支腿伸到位开关
- int32_t outgrigger_r = 35;//右支腿伸到位开关
- int32_t tip_pressure = 36;//倾翻压力开关
- };
- struct cannet_frame_receive
- {
- int32_t canid;
- int8_t dlc;
- uint8_t data[8];
- };
- struct Gsml_Info
- {
- int32_t m_record;
- int32_t m_device;
- int64_t m_time;
- };
|