1.1 Project Introduction
In the modern travel scenario, the security and convenient carrying of luggage are pain points faced by many people. Especially for those who love traveling, when rushing to catch a flight at the airport with both hands full of bags, there is no extra hand to carry the luggage. If an automatically following luggage can be made, both hands can be liberated, and there is no need to worry about losing the luggage, thus solving the trouble of constantly dragging the luggage during travel.
Ā
This project will make a smart following luggage to achieve real-time tracking and following of a specific target object (such as a specific pattern on shoes). This function can not only solve the trouble of carrying luggage during travel but also be extended to applications such as item care and child following in home scenarios, bringing convenience and safety guarantees to daily life. The overall project follows a closed-loop process of "inference ā computation ā execution", deeply integrating AI technology with hardware devices and helping developers easily achieve the development of intelligent hardware projects from 0 toĀ
Ā
Ā
1.2 Demo Video
Ā
2. Project Implementation Principle
Its core logic is as follows: In the Object Tracking mode of the HuskyLens 2 AI camera sensor, the sensor learns the target object's features and real-time outputs data include the target's unique ID, center coordinates (x,y), and confidence level. These data are transmitted to the UNIHIKER K10 via the I2C communication protocol. The K10 calculates the relative position deviation (e.g., horizontal offset, distance) from the target based on the coordinate data, combines it with a preset speed control algorithm, and drives the chassis motors to adjust the robot car's forward, left-turning, or right-turning actions to reduce deviation and enable continuous following. Throughout this process, the built-in AI model inference of HuskyLens 2 ensures low-latency response, while the UNIHIKER K10 handles motion logic computation and motor actuation, forming a closed-loop control loop of "data collection ā model incremental training ā inference application".
Ā

Ā
3. Hardware and Software Preparation
Ā
3.1 Equipment List

Note: HuskyLens requires Version 2.
Ā
3.2 Hardware Connection
Make connections by referring to the diagram below.
Ā

Ā
3.3 Software Preparation
Download and install the Mind+ installation package (Version 2 or above) from the official website. Double-click to open it after installation.
Ā

Ā
4. Project Making
4.1 HuskyLens 2
First, select the protocol type for HuskyLens 2. Ā
Tap System Settings -> Protocol Type -> Select I2C communication mode, then return to the main menu interface.
Ā

Ā
Second, swipe the screen to find the "Object Tracking" function.
Ā

Ā
Learn Target Object: Point at the object to be tracked, follow the on-screen text instructions, touch and drag to draw a selection box around the object, and release to complete learning.
Ā

Ā
Identify Target Object: If the previously learned object is identified, the screen will frame it with a colored box, and display the object name, ID number, and confidence at the top of the screen, e.g., "track:ID1 83%". Here, the name defaults to "track"; "ID1" refers to the first object learned; "83%" is the confidence value, indicating the model's "certainty" in its prediction. "ID1 83%" means under Object Tracking, the model considers this object 83% likely to be the first learned target.
Ā

Ā
For more detailed usage of HuskyLens 2, please refer to the following URL:
https://wiki.dfrobot.com/_SKU_SEN0638_Gravity_HUSKYLENS_2_AI_Camera_Vision_Sensor
Ā
After learning the specific object in HuskyLens 2, you can start writing code to create a smart following luggage(simulated by a robot car).
Ā
4.2 Programming
Open the programming software Mind+, choose "Coding" mode, then click "Upload Mode" to create a new project.
Ā

Ā
Next, add the required extensions in Mind+, including UNIHIKER K10, HuskyLens 2 and expansion board.
Enter the "Extensions" page, switch to "Board" tab, search for "K10", and click "UNIHIKER K10".
Ā



Ā
Load the "HuskyLens 2 AI Camera" and "expansion board" library by the same way from "Module" page.
Ā


Ā
Click the "Back" button to return to the programming interface.
Ā

Ā
Click the "Connect Devices", choose your device and "Connect".
Ā




Ā
After the device is successfully connected, write the program as follows:
Ā

Ā
The analysis of the core code is as follows:
Ā

Ā
There is a complete program file for this project in the attachment. (Note: The .mp file is compatible with both Mind+ v1.x (e.g., v1.8.1) and v2.x (e.g., v2.0), while the .mpcode file only works with Mind+ v2.0)
Open Project->Open Local File to load project.
Ā


Ā
Select the project in the attachment and click "Open".
Ā

Ā
Click "Upload" to run the program.
Ā

Ā
Disconnect the UNIHIKER K10 from the computer, and correctly install the UNIHIKER K10 and HuskyLens 2 onto the vehicle frame. Power on the device by toggling the switches in the order shown in the following figure.
Ā

Ā
Note: Please first complete the program upload before installing UNIHIKER K10 onto the vehicle. When installing or removing UNIHIKER K10 on the expansion board, ensure the vehicle power supply is turned off.
Ā
The effect is as follows:
Ā



Ā
Ā
5. Attachment









