API Integration¶
-
Robot Interaction :
- Endpoint:
/robot/sdk_ctrl/start
- Purpose: To start the robot and initiate its functions.
- Method: GET
- Data Flow: Triggered in
RobotStartup.vue
, this API call starts the robot. The response is monitored to update the UI accordingly.
- Endpoint:
-
System Settings :
- Endpoint:
/robot/control_svr_status
- Purpose: Checks the status of the robot server.
- Method: GET
- Usage: In
Login.vue
, this endpoint determines if the robot server is active before proceeding.
- Endpoint:
-
Shut Down Robot :
- Endpoint:
/robot/control_svr_close
- Purpose: To shut down the robot server.
- Method: GET
- Implementation: Used in
RobotStartup.vue
andLogin.vue
to turn off the robot.
- Endpoint:
Data Flow¶
-
Initialization :
- The application starts with
Startup.vue
, displaying the initial logo and then navigating toLogin.vue
. Login.vue
checks the robot server status before allowing users to proceed.
- The application starts with
-
Robot Operation Flow :
Controller.vue
takes user inputs for robot control. These inputs are sent to the robot through API calls.- Responses from the robot are received and processed to update the UI or handle errors.
-
Settings and Information :
Setting.vue
fetches and displays system information and settings.- Users can update settings, and changes are sent to the server via API calls.
Error Handling and Debugging¶
- API errors are handled gracefully, with user-friendly messages displayed.
RobotStartup.vue
includes provisions for logging and debugging, essential for troubleshooting issues during robot operation.