diff --git a/slam/v1/slamnav_control.fbs b/slam/v1/slamnav_control.fbs new file mode 100644 index 00000000..40fb30fb --- /dev/null +++ b/slam/v1/slamnav_control.fbs @@ -0,0 +1,250 @@ +namespace SLAMNAV; + +table Request_Get_Safety_Field { + id: string; +} +table Response_Get_Safety_Field { + id: string; + safety_field: int; + result: string; + message: string; +} + +table Request_Set_Safety_Field { + id: string; + safety_field: int; +} +table Response_Set_Safety_Field { + id: string; + safety_field: int; + result: string; + message: string; +} + +table SafetyFlag { + name: string; + value: bool; +} +table Request_Get_Safety_Flag { + id: string; +} +table Response_Get_Safety_Flag { + id: string; + safety_flag: [SafetyFlag]; + result: string; + message: string; +} + +table Request_Set_Safety_Flag { + id: string; + reset_flag: [SafetyFlag]; +} +table Response_Set_Safety_Flag { + id: string; + reset_flag: [SafetyFlag]; + result: string; + message: string; +} + +table Request_Get_Safety_Io { + id: string; +} +table Response_Get_Safety_Io { + id: string; + mcu0_dio: [bool]; // vector(8) + mcu1_dio: [bool]; // vector(8) + mcu0_din: [bool]; // vector(8) + mcu1_din: [bool]; // vector(8) + result: string; + message: string; +} + +table Request_Set_Safety_Io { + id: string; + command: string; + mcu0_din: [bool]; // vector(8) + mcu1_din: [bool]; // vector(8) +} +table Response_Set_Safety_Io { + id: string; + command: string; + mcu0_din: [bool]; // vector(8) + mcu1_din: [bool]; // vector(8) + result: string; + message: string; +} + +//-------------------------------------------- + +// command : "dock", "undock", "dockstop" +table Request_Dock { + id: string; + command: string; +} +table Response_Dock { + id: string; + command: string; + result: string; + message: string; +} + +table Request_Charge_Trigger { + id: string; + onoff: bool; +} +table Response_Charge_Trigger { + id: string; + onoff: bool; + result: string; + message: string; +} + +table State_Change_Dock { + id: string; + command: string; + result: string; + message: string; +} + +//-------------------------------------------- + +struct ObsBox { + x: float; + y: float; + z: float; +} +table Request_Get_Obs_Box { + id: string; + command: string; + min: ObsBox; + max: ObsBox; + range: float; +} +table Response_Get_Obs_Box { + id: string; + command: string; + min: ObsBox; + max: ObsBox; + range: float; + result: string; + message: string; +} + +table Request_Set_Obs_Box { + id: string; + command: string; + min: ObsBox; + max: ObsBox; + range: float; +} +table Response_Set_Obs_Box { + id: string; + command: string; + min: ObsBox; + max: ObsBox; + range: float; + result: string; + message: string; +} + +//-------------------------------------------- + +table Request_Led { + id: string; + onoff: bool; + color: string; +} +table Response_Led { + id: string; + onoff: bool; + color: string; + result: string; + message: string; +} + +//-------------------------------------------- + +table Request_Motor { + id: string; + onoff: bool; +} +table Response_Motor { + id: string; + onoff: bool; + result: string; + message: string; +} + +//-------------------------------------------- + +table Request_Jog { + id: string; + onoff: bool; +} +table Response_Jog { + id: string; + onoff: bool; + result: string; + message: string; +} + +//-------------------------------------------- +// sensor socket on/off & freq +// command : camera, lidar2d, lidar3d +table Request_Sensor { + id: string; + command: string; + onoff: bool; + frequency: int; +} +table Response_Sensor { + id: string; + command: string; + onoff: bool; + frequency: int; + result: string; + message: string; +} + +//-------------------------------------------- + +table Request_Path { + id: string; + onoff: bool; + frequency: int; +} +table Response_Path { + id: string; + onoff: bool; + frequency: int; + result: string; + message: string; +} + +//-------------------------------------------- + +table Request_Detect { + id: string; + command: string; + camera_number: int; + camera_serial: string; + marker_size: float; +} +table Response_Detect { + id: string; + command: string; + camera_number: int; + camera_serial: string; + marker_size: float; + tf: [float]; // 4*4 Matrix [[1,0,0,0]....[0,0,0,1]] + result: string; + message: string; +} + +//-------------------------------------------- +//-------------------------------------------- +table Control_Result { + id: string; // Response ID + result: string; // success / fail + message: string; // reason +} \ No newline at end of file diff --git a/slam/v1/slamnav_localization.fbs b/slam/v1/slamnav_localization.fbs new file mode 100644 index 00000000..2f1091ad --- /dev/null +++ b/slam/v1/slamnav_localization.fbs @@ -0,0 +1,80 @@ +namespace SLAMNAV; + +struct LocalizationPose { + x: float; + y: float; + z: float; + rz: float; +} + +table Request_Localization_Init { + id: string; + pose: LocalizationPose; +} +table Response_Localization_Init { + id: string; + pose: LocalizationPose; + result: string; + message: string; +} + +table Request_Localization_RandomInit { + id: string; + random_seed: string; +} +table Response_Localization_RandomInit { + id: string; + random_seed: string; + pose: LocalizationPose; + result: string; + message: string; +} + +table Request_Localization_AutoInit { + id: string; +} +table Response_Localization_AutoInit { + id: string; + pose: LocalizationPose; + result: string; + message: string; +} + +table Request_Localization_SemiAutoInit { + id: string; +} + +table Response_Localization_SemiAutoInit { + id: string; + pose: LocalizationPose; + result: string; + message: string; +} + +table Request_Localization_Start { + id: string; +} +table Response_Localization_Start { + id: string; + pose: LocalizationPose; + result: string; + message: string; +} + +table Request_Localization_Stop { + id: string; +} +table Response_Localization_Stop { + id: string; + pose: LocalizationPose; + result: string; + message: string; +} + +//-------------------------------------------- +//-------------------------------------------- +table Localization_Result { + id: string; // Response ID + result: string; // success / fail + message: string; // reason +} \ No newline at end of file diff --git a/slam/v1/slamnav_map.fbs b/slam/v1/slamnav_map.fbs new file mode 100644 index 00000000..92f85cd7 --- /dev/null +++ b/slam/v1/slamnav_map.fbs @@ -0,0 +1,206 @@ +namespace SLAMNAV; + +table MapFileInfo { + map_name: string; + created_at: string; + update_at: string; + map_type: string; + map_size: float; +} +table MapFile { + file_name: string; + created_at: string; + update_at: string; + file_type: string; + cloud_info: MapFileInfo; + topo_info: MapFileInfo; +} +table Request_Map_List { + id: string; +} +table Response_Map_List { + id: string; + list: [MapFile]; + result: string; + message: string; +} + +table Request_Map_Delete { + id: string; + map_name: string; +} +table Response_Map_Delete { + id: string; + map_name: string; + result: string; + message: string; +} + +table Request_Map_Current { + id: string; +} +table Response_Map_Current { + id: string; + map_name: string; + result: string; + message: string; +} + +table Request_Map_Load { + id: string; + map_name: string; +} +table Response_Map_Load { + id: string; + map_name: string; + result: string; + message: string; +} + +//------------------------------------ + +struct CloudData { + x: float; + y: float; + z: float; + intensity: float; +} + +table Request_Get_Map_File { + id: string; + map_name: string; + file_name: string; +} +table Response_Get_Map_File { + id: string; + map_name: string; + file_name: string; + size: uint32; + // data: [ubyte]; //.../map/cloud + data: [CloudData]; + result: string; + message: string; +} + +table Link { + id: string; + info: string; + speed: float; + method: string; + safety_field: int; +} +table Node { + id: string; + name: string; + pose: [float]; + info: string; + links: [Link]; + type: string; +} + +table Request_Get_Map_Cloud { + id: string; + map_name: string; + file_name: string; +} +table Response_Get_Map_Cloud { + id: string; + map_name: string; + file_name: string; + size: uint32; + data: [CloudData]; + result: string; + message: string; +} + +table Request_Set_Map_Cloud { + id: string; + map_name: string; + file_name: string; + size: uint32; + data: [CloudData]; +} +table Response_Set_Map_Cloud { + id: string; + map_name: string; + file_name: string; + size: uint32; + // data: [Node]; -> too big + result: string; + message: string; +} + +// 이거 모르겠음... 어떤 함수인지... +table Request_Get_Map_pipe {} +table Response_Get_Map_pipe {} +table Request_Get_Map_Tiles {} +table Response_Get_Map_Tiles {} + +//------------------------------------ + +table Request_Set_Map_Topology { + id: string; + map_name: string; + data: [Node]; +} +table Response_Set_Map_Topology { + id: string; + map_name: string; + // data: [Node]; -> too big + result: string; + message: string; +} + +table Request_Get_Map_Topology { + id: string; + map_name: string; +} +table Response_Get_Map_Topology { + id: string; + map_name: string; + data: [Node]; + result: string; + message: string; +} + +//------------------------------------ + +table Request_Mapping_Start { + id: string; +} +table Response_Mapping_Start { + id: string; + result: string; + message: string; +} + +table Request_Mapping_Stop { + id: string; +} +table Response_Mapping_Stop { + id: string; + result: string; + message: string; +} + +table Request_Mapping_Save { + id: string; + map_name: string; +} +table Response_Mapping_Save { + id: string; + map_name: string; + result: string; + message: string; +} + +table Request_Mapping_Cloud_Reload {} +table Response_Mapping_Cloud_Reload {} + +//-------------------------------------------- +//-------------------------------------------- +table Map_Result { + id: string; // Response ID + result: string; // success / fail + message: string; // reason +} \ No newline at end of file diff --git a/slam/v1/slamnav_move.fbs b/slam/v1/slamnav_move.fbs new file mode 100644 index 00000000..99e107f9 --- /dev/null +++ b/slam/v1/slamnav_move.fbs @@ -0,0 +1,144 @@ +namespace SLAMNAV; + +struct MovePose { + x: float; + y: float; + z: float; + rz: float; +} + +table Request_Move_Goal { + id: string; + goal_id: string; + goal_name: string; + method: string; + preset: int; +} + +table Response_Move_Goal { + id: string; + goal_id: string; + goal_name: string; + method: string; + preset: int; + result: string; + message: string; +} + +table Request_Move_Target { + id: string; + goal_pose: MovePose; + method: string; + preset: int; +} +table Response_Move_Target { + id: string; + method: string; + goal_pose: MovePose; + preset: int; + result: string; + message: string; +} + +table Move_Jog { + vx: float; + vy: float; + wz: float; +} + +table Request_Move_Stop { + id: string; +} +table Response_Move_Stop { + id: string; + result: string; + message: string; +} + +table Request_Move_Pause { + id: string; +} +table Response_Move_Pause { + id: string; + result: string; + message: string; +} + +table Request_Move_Resume { + id: string; +} +table Response_Move_Resume { + id: string; + result: string; + message: string; +} + +table Request_Move_XLinear { + id: string; + target: float; + speed: float; +} +table Response_Move_XLinear { + id: string; + target: float; + speed: float; + result: string; + message: string; +} + +table Request_Move_Circular { + id: string; + target: float; + speed: float; + direction: string; +} +table Response_Move_Circular { + id: string; + target: float; + speed: float; + direction: string; + result: string; + message: string; +} + +table Request_Move_Rotate { + id: string; + target: float; + speed: float; +} +table Response_Move_Rotate { + id: string; + target: float; + speed: float; + result: string; + message: string; +} + +// 모르겠엄... +table State_Change_Move { + id: string; + command: string; + cur_pose: MovePose; + goal_pose: MovePose; + map_name: string; + vel: [float]; + goal_id: string; + goal_name: string; + method: string; + direction: string; + preset: int; + result: string; + message: string; + remaining_dist: float; + target: float; + speed: float; + bat_percent: int; +} + +//-------------------------------------------- +//-------------------------------------------- +table Move_Result { + id: string; // Response ID + result: string; // success / fail + message: string; // reason +} \ No newline at end of file diff --git a/slam/v1/slamnav_multi.fbs b/slam/v1/slamnav_multi.fbs new file mode 100644 index 00000000..29ed376f --- /dev/null +++ b/slam/v1/slamnav_multi.fbs @@ -0,0 +1,27 @@ +namespace SLAMNAV; + +table Request_Path { + id: string; + path: [string]; +} +table Response_Path { + id: string; + path: [string]; + result: string; + message: string; +} + +table Request_Vobs { + id: string; + vobs_robots: [string]; + vobs_closures: [string]; + is_vobs_closures_change: string; +} +table Response_Vobs { + id: string; + vobs_robots: [string]; + vobs_closures: [string]; + is_vobs_closures_change: string; + result: string; + message: string; +} \ No newline at end of file diff --git a/slam/v1/slamnav_setting.fbs b/slam/v1/slamnav_setting.fbs new file mode 100644 index 00000000..3295b3b1 --- /dev/null +++ b/slam/v1/slamnav_setting.fbs @@ -0,0 +1,153 @@ +namespace SLAMNAV; + +table Request_Get_Robot_Type { + id: string; +} +table Response_Get_Robot_Type { + id: string; + robot_type: string; + result: string; + message: string; +} +table Request_Set_Robot_Type { + id: string; + robot_type: string; +} +table Response_Set_Robot_Type { + id: string; + robot_type: string; + result: string; + message: string; +} + +table SettingParam { + key: string; + type: string; + value: string; +} +// config.json 파라미터 정보 (일단 흐린눈)\ +/* +table Request_Get_Setting_Param { + id: string; + robot_type: string; + params: [SettingParam]; +} +table Response_Get_Setting_Param { + id: string; + robot_type: string; + params: [SettingParam]; + result: string; + message: string; +} +table Request_Setting_Param_All { + id: string; + robot_type: string; +} +table Response_Setting_Param_All { + id: string; + robot_type: string; + params: [SettingParam]; +} +table Request_Set_Setting_Param { + id: string; + robot_type: string; + params: [SettingParam]; +} +table Response_Set_Setting_Param { + id: string; + robot_type: string; + params: [SettingParam]; + result: string; + message: string; +} +*/ + +table Request_Get_Sensor_Off { + id: string; + index: [SensorInfo]; +} +table Response_Get_Sensor_Off { + id: string; + index: [SensorInfo]; + result: string; + message: string; +} + +table Request_Get_Pdu_Param { + id: string; +} +table Response_Get_Pdu_Param { + id: string; + params: [SettingParam]; + result: string; + message: string; +} +table Request_Set_Pdu_Param { + id: string; + params: [SettingParam]; +} +table Response_Set_Pdu_Param { + id: string; + params: [SettingParam]; + result: string; + message: string; +} + +table Request_Get_Drive_Param { + id: string; +} +table Response_Get_Drive_Param { + id: string; + params: [SettingParam]; + result: string; + message: string; +} + +//-------------------------------------------- + +table SensorInfo { + index: int; + serial: string; +} +table Request_Get_Sensor_Index { + id: string; + target: string; +} +table Response_Get_Sensor_Index { + id: string; + target: string; + index: [SensorInfo]; + result: string; + message: string; +} +table Request_Set_Sensor_Index { + id: string; + target: string; + index: [SensorInfo]; +} +table Response_Set_Sensor_Index { + id: string; + target: string; + index: [SensorInfo]; + result: string; + message: string; +} +table Request_Set_Sensor_On { + id: string; + index: [SensorInfo]; +} +table Response_Set_Sensor_On { + id: string; + index: [SensorInfo]; + result: string; + message: string; +} + + +//-------------------------------------------- +//-------------------------------------------- +table Setting_Result { + id: string; // Response ID + result: string; // success / fail + message: string; // reason +} \ No newline at end of file diff --git a/slam/v1/slamnav_socket.fbs b/slam/v1/slamnav_socket.fbs new file mode 100644 index 00000000..e0fffbee --- /dev/null +++ b/slam/v1/slamnav_socket.fbs @@ -0,0 +1,42 @@ +namespace SLAMNAV; + +struct Point2D { + x: float; + y: float; +} + +table Lidar_2D { + timestamp: float; + points: [Point2D]; +} + +//-------------------------------------------- + +struct Point3D { + x: float; + y: float; + z: float; +} +table Lidar_3D { + timestamp: float; + points: [Point3D]; +} + +//-------------------------------------------- + +table Mapping_Cloud { + timestamp: float; + points: [Point3D]; +} + +//-------------------------------------------- + +table Global_Path { + id: string; + path: [string]; +} + +table Local_Path { + id: string; + path: [string]; +} \ No newline at end of file diff --git a/slam/v1/slamnav_status.fbs b/slam/v1/slamnav_status.fbs new file mode 100644 index 00000000..bcebc320 --- /dev/null +++ b/slam/v1/slamnav_status.fbs @@ -0,0 +1,140 @@ +namespace SLAMNAV; + +struct StatusImu { + acc_x: float; + acc_y: float; + acc_z: float; + gyr_x: float; + gyr_y: float; + gyr_z: float; + imu_rx: float; + imu_ry: float; + imu_rz: float; +} + +struct StatusMotor { + connection: bool; + status: int; + temp: float; + current: float; +} + +struct StatusCondition { + inlier_error: float; + inlier_ratio: float; + mapping_error: float; + mapping_ratio: float; +} + +table StatusRobotState { + charge: string; + dock: bool; + emo: bool; + localization: string; + power: bool; + sss_recovery: bool; + sw_reset: bool; + sw_stop: bool; + sw_start: bool; + sf_bumper_detect: bool; + sf_obs_detect: bool; + sf_operational_stop: bool; +} + +table StatusRobotSafetyIoState { + mcu0_dio: [bool]; // vector(8) + mcu1_dio: [bool]; // vector(8) + mcu0_din: [bool]; // vector(8) + mcu1_din: [bool]; // vector(8) +} + +struct StatusPower { + bat_in: float; + bat_out: float; + bat_current: float; + total_power: float; + power: float; + bat_percent: float; + tabos_voltage: float; + tabos_current: float; + tabos_status: float; + tabos_ttf: float; + tabos_tte: float; + tabos_soc: float; + tabos_soh: float; + tabos_temp: float; + tabos_rc: float; + tabos_ae: float; + charge_current: float; + contact_voltage: float; +} + +table StatusSetting { + platform_type: string; + platform_name: string; +} + +table StatusMap { + map_name: string; + map_status: string; +} + +table Status { + condition: StatusCondition; + imu: StatusImu; + motor0: StatusMotor; + motor1: StatusMotor; + power: StatusPower; + robot_state: StatusRobotState; + robot_safety_io_state: StatusRobotSafetyIoState; + setting: StatusSetting; + map: StatusMap; +} + +//-------------------------------------------- + +table MoveStatusMoveState { + auto_move: string; + dock_move: string; + jog_move: string; + obs: string; + path: string; +} + +struct MoveStatusPose { + x: float; + y: float; + z: float; + rz: float; +} + +struct MoveStatusVel { + vx: float; + vy: float; + wz: float; +} + +table MoveStatusNode { + node_id: string; + name: string; + state: string; + x: float; + y: float; + rz: float; +} + +table Move_Status { + cur_node: MoveStatusNode; + goal_node: MoveStatusNode; + move_state: MoveStatusMoveState; + pose: MoveStatusPose; + vel: MoveStatusVel; +} + +//-------------------------------------------- +//-------------------------------------------- +table Status_Result { + id: string; // Response ID + result: string; // success / fail + message: string; // reason +} \ No newline at end of file diff --git a/slam/v1/slamnav_update.fbs b/slam/v1/slamnav_update.fbs new file mode 100644 index 00000000..8921de60 --- /dev/null +++ b/slam/v1/slamnav_update.fbs @@ -0,0 +1,33 @@ +namespace SLAMNAV; + +table Request_Update { + id: string; + branch: string; + version: string; +} + +table Response_Update { + id: string; + branch: string; + version: string; + result: string; + message: string; +} + +table Request_Current_Version { + id: string; +} +table Response_Current_Version { + id: string; + version: string; + result: string; + message: string; +} + +//-------------------------------------------- +//-------------------------------------------- +table Update_Result { + id: string; // Response ID + result: string; // success / fail + message: string; // reason +} \ No newline at end of file