基于 RT-Thread RA8D1的机器视觉STM32捡球小车
| Files | Last commit | Last update |
|---|---|---|
| 1 year ago | ||
| 1 year ago | ||
| 1 year ago | ||
| 1 year ago | ||
| 1 year ago | ||
| 1 year ago |
Project Document of rthreadPing-pongCar Intelligent Ball-Picking Cart
The RA8D1 machine vision ping-pong ball picking trolley based on the RT-Thread operating system integrates image recognition and motion control functions to achieve automatic recognition and picking of ping-pong balls.
software architecture
This system adopts a hierarchical architecture design and is mainly divided into the following layers:
- Hardware Abstraction Layer (HAL) -RT-Thread BSP driver
- Underlying peripheral drivers (camera, motor, encoder, Bluetooth)
- "Operating System Layer" -RT-Thread standard version kernel
- Device driver framework Thread scheduling and synchronization mechanism
- "Functional Module Layer"
- Image recognition module (OpenMV Visual Processing)
- Motion Control Module (PID control algorithm)
- Path planning module
- Communication module (Bluetooth /WiFi)
- Power management module
- "Application Layer
- Automatic ball-picking task Semi-automatic control task
- User interaction interface
The system adopts a multi-threaded design. Each functional module operates independently and communicates through mechanisms such as message queues and semaphores to ensure real-time performance and stability.
Installation guide
- "Preparation of the development environment" Install RT-Thread Studio v2.2.0 or a higher version
- Install the GCC cross-compilation toolchain Install the J-Link driver and debugging tool
- ** Obtain source code **
git clone https://gitee.com/your_username/rthreadPing-pongCar.git
cd rthreadPing-pongCar
` ` `
3. Configure BSP
Import the project in RT-Thread Studio
- Configure RA8D1 Vision-Board BSP
Configure STM32F407ZGT6 BSP
4. Compilation and Burning
Compile the RA8D1 visual processing program
Compile the STM32 motion control program
Burn the two programs to the corresponding main control chips respectively through J-Link
5. "Hardware Connection"
- Connect the RA8D1 Vision-Board to the STM32F407 main control board
- Connect the motor drive module
- Install the camera module
- Connect the power module
#### Instructions for use
1. Start the system
When the power is turned on, the system will automatically initialize
Observe the LED status indicator to confirm that the system is starting up normally
2. "Mode Selection"
- "Semi-automatic mode"
1. Connect the device's Bluetooth via the mobile phone APP
2. Select "Semi-automatic Mode" on the APP
3. Use the APP to control the movement of the car
4. When a ping-pong ball is detected, the system automatically takes over and performs the ball-picking action
- "Fully automatic mode" :
1. Select "Fully Automatic Mode" through the mobile phone APP or physical buttons
2. The car automatically starts patrolling and recognizes table tennis balls
3. Automatically plan the path and perform the ball-picking task
4. When the ball-picking frame is full, it will automatically return to the charging base
3. "Parameter Adjustment"
- Adjust the following parameters through the APP or serial terminal:
- Image recognition sensitivity
"Motion speed"
-PID control parameters
- Working area scope
4. Maintenance and Charging
- Cleaning the ball picking frame: Open the top cover plate of the device and take out the collection box
- Battery charging: Connect to an external power source, and the system will automatically switch to charging mode
- Software update: Update the system firmware via OTA function or USB interface
#### contribute
1. Fork this repository
Click the "Fork" button in the upper right corner of the repository page
- Select your own Gitee account as the target repository
2. "Create a New branch"
```bash
git checkout -b Feat_xxx
` ` `
Here, 'xxx' represents the description of a new feature or a fixed issue
3. Submit the code
Write the code and ensure it passes the tests
- Add necessary annotations and documentation
Submit the code and add clear submission information
4. Create a Pull Request
Open your own repository page on Gitee
Click the "Pull Request" button
- Select the source branch and the target branch
Fill in the change description and submit it for review
#### Stunts
1. "Multilingual support"
- Use 'Readme_XXX.md' to support documents in different languages, such as' Readme_en.md 'and' Readme_zh.md '
2. "Gitee Resources"
- Visit [Gitee official blog](https://blog.gitee.com) for technical articles and updates
Exploration [Gitee excellent open source projects] (https://gitee.com/explore) for inspiration
- Learn about [GVP Most Valuable Open Source Projects](https://gitee.com/gvp)
3. Use the help
- See [Gitee User Manual](https://gitee.com/help) for the operation guide
Follow [Gitee cover story](https://gitee.com/gitee-stars/) to stay updated on the latest developments in the open source community
This project follows the RT-Thread open source license agreement. Developers are welcome to participate and contribute!