Skip to content

API Integration

  1. 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.
  2. 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.
  3. Shut Down Robot :

    • Endpoint: /robot/control_svr_close
    • Purpose: To shut down the robot server.
    • Method: GET
    • Implementation: Used in RobotStartup.vue and Login.vue to turn off the robot.

Data Flow

  1. Initialization :

    • The application starts with Startup.vue, displaying the initial logo and then navigating to Login.vue.
    • Login.vue checks the robot server status before allowing users to proceed.
  2. 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.
  3. 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.