HNUYueLuRM/basic_framework

framework for developing RoboMaster Electric Control programmes

What it solves

It provides a standardized, modular embedded control framework for robots, specifically targeting the RoboMaster competition. It solves the problem of fragmented, poorly documented, and inconsistent codebases common in student robotics teams, replacing complex Linux/ROS stacks with a more accessible C++ SDK that is easier for beginners to learn and port.

How it works

The framework uses a three-layer structural hierarchy to decouple hardware from high-level logic:

  1. BSP (Board Support Package): Abstracts hardware peripherals (USART, SPI, I2C, CAN, etc.) so the rest of the system is hardware-independent.
  2. Module Layer: Implements specific hardware drivers (motors, IMUs, sensors) and software algorithms (PID, filters, observers) using the BSP.
  3. App Layer: The highest level where robot-specific logic (chassis control, gimbal movement, shooting mechanisms) is implemented as FreeRTOS tasks.

To ensure decoupling between apps, it employs a pub-sub (publisher-subscriber) message mechanism, allowing different robot modules to communicate without direct dependencies.

Who it’s for

  • RoboMaster competition teams looking for a structured embedded framework.
  • Embedded developers wanting a modular SDK for robot control.
  • Students learning modern embedded development workflows (moving away from legacy IDEs like Keil).

Highlights

  • Modern Workflow: Supports arm-gnu toolchain with VSCode, CLion, and Segger Ozone/Systemviewer for high-efficiency debugging and performance analysis.
  • Hardware Abstraction: Clear separation between hardware-specific code and application logic, making it easy to port to different robot configurations.
  • Comprehensive Tooling: Includes built-in support for various DJI motors, sensors (BMI088, IST8310), and communication protocols.
  • Extensive Documentation: Provides detailed guides on PID tuning, bug localization, and environment setup.

Related

  • Project
  • Project
  • Project
  • Project