开启底盘跟随,修改Peremeter.h中Yaw轴回正时编码器值以保证云台正确回中,由于抖动和严重发热,暂时关闭云台pitch轴控制

This commit is contained in:
2025-11-03 12:41:17 +08:00
parent 6504b5a614
commit 53a706d8f0
22 changed files with 665 additions and 652 deletions

View File

@@ -162,8 +162,6 @@ void Gimbal_PitchControl(void)
PID_PositionCalc(&Gimbal_PitchAnglePositionPID,AttitudeAlgorithms_DegRoll);
Gimbal_PitchAnglePositionPID.OUT=kalmanFilter(&kfp_PITCH,Gimbal_PitchAnglePositionPID.OUT);
Gimbal_PitchAngleSpeedPID.Need_Value=-Gimbal_PitchAnglePositionPID.OUT;
PID_PositionCalc(&Gimbal_PitchAngleSpeedPID,GM6020_MotorStatus[Gimbal_PitchMotor-0x205].Speed);
@@ -279,7 +277,7 @@ void Gimbal_Rammer(void)
*/
void Gimbal_MoveControl(void)
{
Gimbal_PitchControl();//云台Pitch轴控制
//Gimbal_PitchControl();//云台Pitch轴控制
Gimbal_YawControl();//云台Yaw轴控制
Gimbal_FiringMechanismControl();//摩擦轮控制

Binary file not shown.

View File

@@ -21,35 +21,35 @@ Target DLL: CMSIS_AGDI.dll V1.33.24.0
Dialog DLL: TCM.DLL V1.56.6.0
<h2>Project:</h2>
C:\Users\LSMushui\Desktop\RM\hero-test\Hero-C-Board-Legacy\<5C><>̨\<5C><>̨\Project.uvprojx
C:\Users\LSMushui\Desktop\RM\Hero-C-Board-Legacy\<5C><>̨\<5C><>̨\Project.uvprojx
Project File Date: 11/02/2025
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Users\LSMushui\AppData\Local\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'Target 1'
assembling startup_stm32f40_41xxx.s...
compiling stm32f4xx_adc.c...
compiling stm32f4xx_dac.c...
compiling stm32f4xx_dma.c...
compiling stm32f4xx_dcmi.c...
compiling misc.c...
compiling stm32f4xx_cryp_des.c...
compiling stm32f4xx_dfsdm.c...
compiling stm32f4xx_flash_ramfunc.c...
compiling system_stm32f4xx.c...
compiling stm32f4xx_dcmi.c...
compiling stm32f4xx_adc.c...
compiling stm32f4xx_fsmc.c...
compiling stm32f4xx_cryp_tdes.c...
compiling stm32f4xx_dsi.c...
compiling stm32f4xx_cryp.c...
compiling stm32f4xx_cec.c...
compiling stm32f4xx_fmpi2c.c...
compiling stm32f4xx_dma2d.c...
compiling stm32f4xx_cryp_des.c...
compiling stm32f4xx_dac.c...
compiling stm32f4xx_dbgmcu.c...
compiling stm32f4xx_exti.c...
compiling stm32f4xx_dfsdm.c...
compiling stm32f4xx_fmpi2c.c...
compiling stm32f4xx_flash_ramfunc.c...
compiling stm32f4xx_crc.c...
compiling stm32f4xx_gpio.c...
compiling stm32f4xx_can.c...
compiling stm32f4xx_fsmc.c...
compiling stm32f4xx_exti.c...
compiling stm32f4xx_cryp.c...
compiling stm32f4xx_dma2d.c...
compiling stm32f4xx_dma.c...
compiling stm32f4xx_flash.c...
compiling stm32f4xx_can.c...
compiling stm32f4xx_cryp_aes.c...
compiling stm32f4xx_hash.c...
compiling stm32f4xx_hash_md5.c...
@@ -61,23 +61,22 @@ compiling stm32f4xx_pwr.c...
compiling stm32f4xx_ltdc.c...
compiling stm32f4xx_qspi.c...
compiling stm32f4xx_rng.c...
compiling stm32f4xx_rcc.c...
compiling stm32f4xx_spdifrx.c...
compiling AHRS_middleware.c...
compiling stm32f4xx_sai.c...
compiling TIM.c...
compiling stm32f4xx_sdio.c...
compiling stm32f4xx_wwdg.c...
compiling stm32f4xx_usart.c...
compiling Delay.c...
compiling stm32f4xx_syscfg.c...
compiling stm32f4xx_sai.c...
compiling stm32f4xx_rcc.c...
compiling stm32f4xx_sdio.c...
compiling stm32f4xx_spi.c...
compiling user_lib.c...
compiling TIM.c...
compiling Delay.c...
compiling stm32f4xx_usart.c...
compiling AHRS_middleware.c...
compiling stm32f4xx_wwdg.c...
compiling stm32f4xx_rtc.c...
compiling UART.c...
compiling user_lib.c...
compiling stm32f4xx_tim.c...
compiling MyI2C.c...
compiling CAN.c...
compiling WaveFiltering_Kalman_Filtering.c...
Control\WaveFiltering_Kalman_Filtering.c(13): warning: #177-D: variable "pDst" was declared but never referenced
float pDst,pDst1=1.0f;
@@ -86,35 +85,36 @@ Control\WaveFiltering_Kalman_Filtering.c(13): warning: #177-D: variable "pDst1"
Control\WaveFiltering_Kalman_Filtering.c(32): warning: #1-D: last line of file ends without a newline
Control\WaveFiltering_Kalman_Filtering.c: 3 warnings, 0 errors
compiling CAN.c...
compiling LED.c...
compiling Buzzer.c...
compiling IST8310.c...
compiling Remote.c...
compiling Laser.c...
compiling BMI088.c...
compiling Laser.c...
compiling GM6020.c...
compiling M3508.c...
compiling LinkCheck.c...
compiling M2006.c...
compiling Warming.c...
compiling M3508.c...
compiling CToC.c...
compiling CloseLoopControl.c...
compiling AttitudeAlgorithms.c...
compiling CloseLoopControl.c...
compiling IMUTemperatureControl.c...
compiling PID.c...
compiling Keyboard.c...
compiling Gimbal.c...
compiling RefereeSystem.c...
compiling Visual.c...
CarBody\Visual.c(68): warning: #9-D: nested comment is not allowed
UART2_Printf("%f %f %f %f \n",Visual_Yaw,Visual_Pitch,Visual_GetRoll,Visual_GetDelay);//*0.0030518509475997f*/
CarBody\Visual.c(165): warning: #1-D: last line of file ends without a newline
}
CarBody\Visual.c: 2 warnings, 0 errors
compiling IMUTemperatureControl.c...
compiling RefereeSystem.c...
compiling Gimbal.c...
compiling Keyboard.c...
compiling main.c...
compiling stm32f4xx_it.c...
linking...
Program Size: Code=31544 RO-data=1236 RW-data=552 ZI-data=3520
Program Size: Code=31032 RO-data=1236 RW-data=552 ZI-data=3520
".\Objects\Project.axf" - 0 Error(s), 5 Warning(s).
<h2>Software Packages used:</h2>
@@ -127,7 +127,7 @@ Package Vendor: Keil
<h2>Collection of Component include folders:</h2>
<h2>Collection of Component Files used:</h2>
Build Time Elapsed: 00:00:04
Build Time Elapsed: 00:00:05
</pre>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -2273,7 +2273,7 @@ I (.\Library\stm32f4xx_dcmi.h)(0x64D03164)
I (.\Library\stm32f4xx_flash.h)(0x64D03164)
I (.\Library\stm32f4xx_gpio.h)(0x64D03164)
I (.\Library\stm32f4xx_i2c.h)(0x64D03164)
I (.\Library\stm32f4xx_iwdg.h)(0x64D03164)
I (.\Library\stm32f4xx_iwdg.h)(0x64D03164)
I (.\Library\stm32f4xx_pwr.h)(0x64D03164)
I (.\Library\stm32f4xx_rcc.h)(0x64D03164)
I (.\Library\stm32f4xx_rtc.h)(0x64D03164)
@@ -2442,7 +2442,7 @@ I (Control\WaveFiltering_Kalman_Filtering.h)(0x67B835FF)
I (.\User\stm32f4xx_conf.h)(0x64D03180)
I (.\Library\stm32f4xx_adc.h)(0x64D03164)
I (.\Library\stm32f4xx_crc.h)(0x64D03164)
I (.\Library\stm32f4xx_dbgmcu.h)(0x64D03164)
I (.\Library\stm32f4xx_dbgmcu.h)(0x64D03164)
I (.\Library\stm32f4xx_dma.h)(0x64D03164)
I (.\Library\stm32f4xx_exti.h)(0x64D03164)
I (.\Library\stm32f4xx_flash.h)(0x64D03164)
@@ -2477,7 +2477,7 @@ I (.\Library\stm32f4xx_can.h)(0x64D03164)
-o .\objects\m2006.o --omf_browse .\objects\m2006.crf --depend .\objects\m2006.d)
I (.\Start\stm32f4xx.h)(0x66256792)
I (.\Start\core_cm4.h)(0x64D03162)
I (.\Start\core_cm4.h)(0x64D03162)
I (C:\Users\LSMushui\AppData\Local\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8E3CC2)
I (.\Start\core_cmInstr.h)(0x64D03162)
I (.\Start\core_cmFunc.h)(0x64D03162)
@@ -2670,13 +2670,13 @@ I (.\Function\CToC.h)(0x669D31F6)
I (.\Start\system_stm32f4xx.h)(0x64D03132)
I (.\User\stm32f4xx_conf.h)(0x64D03180)
I (.\Library\stm32f4xx_adc.h)(0x64D03164)
I (.\Library\stm32f4xx_crc.h)(0x64D03164)
I (.\Library\stm32f4xx_crc.h)(0x64D03164)
I (.\Library\stm32f4xx_dbgmcu.h)(0x64D03164)
I (.\Library\stm32f4xx_dma.h)(0x64D03164)
I (.\Library\stm32f4xx_exti.h)(0x64D03164)
I (.\Library\stm32f4xx_flash.h)(0x64D03164)
I (.\Library\stm32f4xx_gpio.h)(0x64D03164)
I (.\Library\stm32f4xx_i2c.h)(0x64D03164)
I (.\Library\stm32f4xx_i2c.h)(0x64D03164)
I (.\Library\stm32f4xx_iwdg.h)(0x64D03164)
I (.\Library\stm32f4xx_pwr.h)(0x64D03164)
I (.\Library\stm32f4xx_rcc.h)(0x64D03164)

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -2098,7 +2098,7 @@
<Group>
<GroupName>CarBody</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>

View File

@@ -2,7 +2,7 @@
#define __PARAMETER_H
/*=============================================结构参数=============================================*/
#define Yaw_GM6020PositionValue 1000//Yaw轴编码器值4050
#define Yaw_GM6020PositionValue 6200////Yaw轴回正时编码器值
#define Pitch_GM6020PositionValue 3245//Pitch轴编码器值
#define Pitch_GM6020PositionLowerLinit 7363//Pitch轴编码器值下限7363
#define Pitch_GM6020PositionUpperLinit 8625//Pitch轴编码器值上限433 8625