深圳科创学院2024高中生机器人冬令营 底盘嵌入式系统
InnoXSZ 2024 Robotics Winter Camp for High School Students.
FishChassis is provided as a lower layer controller.
Author: qianwan.Jin@2024 [email protected]
Get this repository by:
git clone https://github.com/RM-camp-for-high-school-students/Shenzhen-innoX-2024wc-chassis.git --recursive --depth=1
Related Projects:
- LibFishChassis - ESP32 Mixly Arduino Package
- FishDistribution - ESP32 Board PCBA
- FishRefereeEmbedded - Embedded System of Refer System
- FishCom - Communication Protocol
- Innox2024-WC-WS - ROS Work Space
- Code generator: STM32CubeMX-6.10.0
- Tools chains: arm-none-eabi-gcc
- Debugger: OpenOCD + GDB(Windows need mingw64)
- Code editor: Vscode/Clion
- Refer tutorial: Vscode/Clion
Author recommend Clion as IDE for more intelligent. And in this project, both Clion and Vscode are ready to go.
Recommended tutorial for initing invironments: Configuring CLion for STM32 Development-Zhihui Peng
Some present configurations may need to be adjust for your environment. Like: Use clangd need to edit .vscode/setting.json :
--query-driver = "your\arm\tool\chain\bin\arm-none-eabi-g*"
- STM32CubeF4 Firmware Package V1.28.0 - HAL Driver
- STM32CubeExpansion_AZRTOS-F4 V1.1.0 - RTOS
- FishCom - Communication Protocol
- OneMessage - Message System
- WHX EKF - AHRS
- How To Calibrate the IMU:
Presse the user key while resetting the MCU, and buzzer would sound, indicating the start of the calibration program. It may take some time to pre-heat the imu. Buzzer will alternatively sound as the imu is calibrating. Once calibratetion is finished, the board will sound a long beep and reset.
Calibration may take up to 4 minutes, so it's crucial to keep the board in releatively stable at all stages!!!
RFU indicates that Right-Forward-Upward is the correct orientation for the chassis. Anticlockwise rotation direction is positive. ZYX rotation order is implemented on the robot. Right-Forward corresponds to the ID-0 wheel, with the IDs increasing counterclockwise.
FishChassis serves as the foundational layer in the entire robot system. It facilitates basic closed-loop control for actuators and offers a control API for the upper layers.
Here are the details:
- Hardware Layer
- Supports the running environment for programs.
- Operating System Layer
- Supports basic system resource management.
- Service Layer
- Supports advanced system services for apps, such as publisher-subscriber modules, USB-ACM service, etc.
- Task APP Layer
- Implements user tasks to execute functions.
Here shows how system startup:
- USB-ACM
- Operates FishCom
- Appears as tty-acm-x on Linux.
- Simply plug in the micro-USB to the PC.
- Well-suited for upper layers.
- SPI
- Operates FishComLite.
- Configured for ESP32-Arduino.
- Not recommended for upper layers.
[Release Optimize]
Memory region Used Size Region Size %age Used
CCMRAM: 24444 B 64 KB 37.30%
RAM: 61464 B 128 KB 46.89%
FLASH: 130388 B 896 KB 14.21%
CPU Usage
[CPU IDLE] 83.11%
[IMU] 15.46%
[Wheel] 0.62%
[MsgScheduler] 0.35%
[MsgSPI] 0.17%
[Interrupt] 0.15%
[Remoter] 0.1%
[cdc-acm-write] 0.05%
[Servo] 0.04%
[cdc-acm-write] 0.04%
[IMU_Temp] <0.01%