English
English
简体中文
Contact Us
Register
Log In
layoutIndex

Sweeper SDK

Last Updated on : 2022-10-26 08:55:44download

Tuya Sweeper SDK provides the APIs to enable the functionality of robot vacuums. For example, get the cleaning maps, routes, and historical maps. You can integrate the SDK with your project based on Tuya Smart Life App SDK. For more information, see Fast Integration with Smart Life App SDK for iOS.

Feature overview

The Sweeper SDK supports gyroscope, vision, and laser robot vacuums. The following features are provided:

  • Sweeper SDK: Provide capabilities to transmit real-time data through channels and return full data.

  • Gyroscope and vision robot vacuums: Return real-time data through streams and dynamically report incremental data from smart robot vacuums over Message Queuing Telemetry Transport (MQTT).

  • Laser robot vacuums: Transmit large amounts of full data in real time that is not suitable for MQTT-based streams. The robot vacuums report full cleaning data including maps and routes to the Tuya IoT Development Platform. The data is stored in binary files. The file storage path on the app server is published over MQTT.

Preparation

The Sweeper SDK serves your development as an extension of the Tuya Smart Life App SDK. Before you start development, register a developer account on the Tuya IoT Development Platform, create a product, and then get the key used to integrate with the SDK. For more information, see Preparation.

Fast integration

  1. Add the following code block to the Podfile:

    platform :ios, '9.0'
    
    target 'your_target_name' do
    	pod "TuyaSmartSweeperKit"
    end
    
  2. In the root directory of your project, run pod update to integrate with a third-party library. For more information about CocoaPods, see CocoaPods Guides.

Import header files

  • Add the following content to the project file PrefixHeader.pch:

    #import <TuyaSmartSweeperKit/TuyaSmartSweeperKit.h>
    
  • Add the following content to the bridging header file xxx_Bridging-Header.h for a Swift project:

    #import <TuyaSmartSweeperKit/TuyaSmartSweeperKit.h>
    

Terms

Term Description
Gyroscope robot vacuum A robot vacuum equipped with a gyroscope can sense and determine the orientation and thus automatically navigate its way around a home. It steers with an indoor navigation system and accurately calculates xOy coordinates along the cleaning routes in light of the running status of its walking motor. When walking around obstacles, the robot vacuum records detour directions to avoid repeated cleaning and improve cleaning efficiency. The software-defined walking routes can also be recorded for the cleaning route coverage algorithm to generate and save cleaning route plans.
During the movement, the gyroscope detects the horizontal rotation and position of the robot vacuum and adjusts the running status accordingly. In need of charging, the robot vacuum easily returns to the charging dock, oriented by the xOy coordinates.
After the robot vacuum is fully charged, it automatically continues cleaning as scheduled in the walking routes to ensure efficient cleaning. It can reach concaves and blind corners, leveraging the cleaning route records and leaving no hidden dust behind no matter the angle.
Vision robot vacuum A vision robot vacuum supports visual navigation. It is equipped with a camera to capture surrounding objects. Sophisticated algorithms are embedded to sense optical images that are composed of light spots varying in brightness. The robot vacuum collects a large number of optical images from different angles, builds a map based on the image data, and then locates the positions where cleaning is finished and where further cleaning tasks are required.
Laser robot vacuum A laser robot vacuum supports laser radar navigation. To implement the positioning, The radar scans the surroundings with laser beams. These beams will be reflected by encountered objects. The distance from the surface of each object to the radar differs. Based on the time elapsed between when radar beams are emitted and when they are received by the radar, the distances between the robot vacuum and these objects can be calculated. This allows the robot vacuum to outline the environment and run positioning and mapping tasks. The laser positioning technology has been deeply researched and widely used in robot vacuums.
OSS Object Storage Service (OSS) provides a data storage architecture on which data is stored as objects.