123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- #pragma once
- #include <unordered_map>
- #include <vector>
- #include <string>
- 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()
- 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 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;
- int32_t Main_pump_2_pressure = 7;
- 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;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- };
- struct cannet_frame_receive
- {
- int32_t canid;
- int8_t dlc;
- int8_t data[8];
-
- };
|