Compare commits

...

3 Commits

Author SHA1 Message Date
RB
7b0a5cf63c 调好啦~ 2025-03-15 00:33:49 +08:00
RB
f53af0b510 修改参数 2025-03-14 22:28:10 +08:00
RB
996825c0cc 修正ai火控逻辑 2025-03-13 14:25:32 +08:00
14 changed files with 16722 additions and 16839 deletions

File diff suppressed because one or more lines are too long

View File

@ -417,11 +417,6 @@
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>host</ItemText> <ItemText>host</ItemText>
</Ww> </Ww>
<Ww>
<count>12</count>
<WinNumber>1</WinNumber>
<ItemText>gimbal</ItemText>
</Ww>
</WatchWindow1> </WatchWindow1>
<Tracepoint> <Tracepoint>
<THDelay>0</THDelay> <THDelay>0</THDelay>
@ -1229,7 +1224,7 @@
<Group> <Group>
<GroupName>Middlewares/USB_Device_Library</GroupName> <GroupName>Middlewares/USB_Device_Library</GroupName>
<tvExp>0</tvExp> <tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel> <cbSel>0</cbSel>
<RteFlg>0</RteFlg> <RteFlg>0</RteFlg>

Binary file not shown.

View File

@ -22,7 +22,7 @@ Dialog DLL: TCM.DLL V1.48.0.0
<h2>Project:</h2> <h2>Project:</h2>
C:\Users\lvzucheng\Documents\RMUL2025\MDK-ARM\DevC.uvprojx C:\Users\lvzucheng\Documents\RMUL2025\MDK-ARM\DevC.uvprojx
Project File Date: 03/11/2025 Project File Date: 03/14/2025
<h2>Output:</h2> <h2>Output:</h2>
*** Using Compiler 'V6.16', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin' *** Using Compiler 'V6.16', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
@ -37,70 +37,9 @@ Note: source file '..\User\task\ai.c' - object file renamed from 'DevC\ai.o' to
Note: source file '..\User\task\can.c' - object file renamed from 'DevC\can.o' to 'DevC\can_3.o'. Note: source file '..\User\task\can.c' - object file renamed from 'DevC\can.o' to 'DevC\can_3.o'.
Note: source file '..\User\task\cap.c' - object file renamed from 'DevC\cap.o' to 'DevC\cap_1.o'. Note: source file '..\User\task\cap.c' - object file renamed from 'DevC\cap.o' to 'DevC\cap_1.o'.
Note: source file '..\User\task\referee.c' - object file renamed from 'DevC\referee.o' to 'DevC\referee_1.o'. Note: source file '..\User\task\referee.c' - object file renamed from 'DevC\referee.o' to 'DevC\referee_1.o'.
compiling freertos.c...
compiling stm32f4xx_it.c...
compiling usb_device.c...
compiling adc.c...
compiling usbd_cdc_if.c...
compiling buzzer.c...
compiling can.c...
compiling crc32.c...
compiling delay.c...
compiling flash.c...
compiling fric.c...
compiling gpio.c...
compiling laser.c...
compiling i2c.c...
compiling led.c...
compiling mm.c...
compiling pwm.c...
compiling rand.c...
compiling servo.c...
compiling spi.c...
compiling uart.c...
compiling usb.c...
compiling ballistics.c...
compiling capacity.c...
compiling ahrs.c...
compiling crc8.c...
compiling crc16.c...
compiling cmd.c...
compiling error_detect.c...
compiling limiter.c...
compiling filter.c...
compiling mixer.c...
compiling pid.c...
compiling user_math.c...
compiling FreeRTOS_CLI.c...
compiling ui.c...
compiling bmi088.c...
compiling can.c...
compiling ist8310.c...
compiling dr16.c...
compiling referee.c...
compiling cap.c...
compiling ai.c... compiling ai.c...
compiling chassis.c...
compiling config.c...
compiling gimbal.c...
compiling shoot.c...
compiling atti_esti.c...
compiling ai.c...
compiling can.c...
compiling cap.c...
compiling cli.c...
compiling command.c...
compiling ctrl_chassis.c...
compiling ctrl_gimbal.c...
compiling ctrl_shoot.c...
compiling info.c...
compiling init.c...
compiling monitor.c...
compiling rc.c...
compiling referee.c...
compiling user_task.c...
linking... linking...
Program Size: Code=149536 RO-data=7272 RW-data=760 ZI-data=43832 Program Size: Code=149520 RO-data=7272 RW-data=760 ZI-data=43832
FromELF: creating hex file... FromELF: creating hex file...
"DevC\DevC.axf" - 0 Error(s), 0 Warning(s). "DevC\DevC.axf" - 0 Error(s), 0 Warning(s).
@ -116,7 +55,7 @@ Package Vendor: Keil
C:\Users\lvzucheng\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\2.15.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include C:\Users\lvzucheng\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\2.15.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include
<h2>Collection of Component Files used:</h2> <h2>Collection of Component Files used:</h2>
Build Time Elapsed: 00:00:12 Build Time Elapsed: 00:00:01
</pre> </pre>
</body> </body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
<title>Static Call Graph - [DevC\DevC.axf]</title></head> <title>Static Call Graph - [DevC\DevC.axf]</title></head>
<body><HR> <body><HR>
<H1>Static Call Graph for image DevC\DevC.axf</H1><HR> <H1>Static Call Graph for image DevC\DevC.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Wed Mar 12 15:54:11 2025 <BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Sat Mar 15 00:25:56 2025
<BR><P> <BR><P>
<H3>Maximum Stack Usage = 632 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3> <H3>Maximum Stack Usage = 632 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3> Call chain for Maximum Stack Depth:</H3>
@ -1295,7 +1295,7 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_Command <BR>[Called By]<UL><LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_Command
</UL> </UL>
<P><STRONG><a name="[29a]"></a>CMD_ParseHost</STRONG> (Thumb, 120 bytes, Stack size 16 bytes, cmd.o(.text.CMD_ParseHost)) <P><STRONG><a name="[29a]"></a>CMD_ParseHost</STRONG> (Thumb, 100 bytes, Stack size 16 bytes, cmd.o(.text.CMD_ParseHost))
<BR><BR>[Stack]<UL><LI>Max Depth = 16<LI>Call Chain = CMD_ParseHost <BR><BR>[Stack]<UL><LI>Max Depth = 16<LI>Call Chain = CMD_ParseHost
</UL> </UL>
<BR>[Called By]<UL><LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_Command <BR>[Called By]<UL><LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_Command

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -399,19 +399,14 @@ int8_t CMD_ParseHost(const CMD_Host_t *host, CMD_t *cmd, float dt_sec)
/* 云台欧拉角设置为host相应的变化的欧拉角 */ /* 云台欧拉角设置为host相应的变化的欧拉角 */
cmd->gimbal.delta_eulr.yaw = host->gimbal_delta.yaw; cmd->gimbal.delta_eulr.yaw = host->gimbal_delta.yaw;
cmd->gimbal.delta_eulr.pit = host->gimbal_delta.pit; cmd->gimbal.delta_eulr.pit = host->gimbal_delta.pit;
// cmd->shoot.mode = SHOOT_MODE_LOADED;
/* host射击命令设置不同的射击频率和弹丸初速度 */ /* host射击命令设置不同的射击频率和弹丸初速度 */
if(cmd->fire){
if (host->fire) if (cmd->fire && host->fire)
{ {
cmd->shoot.mode = SHOOT_MODE_LOADED;
cmd->shoot.fire = true; cmd->shoot.fire = true;
} }
else
{
cmd->shoot.mode = SHOOT_MODE_SAFE;
}
}
return 0; return 0;
} }

View File

@ -51,8 +51,8 @@ int8_t AI_Init(AI_t *ai) {
BSP_UART_RegisterCallback(BSP_UART_AI, BSP_UART_IDLE_LINE_CB, BSP_UART_RegisterCallback(BSP_UART_AI, BSP_UART_IDLE_LINE_CB,
Ai_IdleLineCallback); Ai_IdleLineCallback);
ai->search_velocity.yaw = 0.0015f; ai->search_velocity.yaw = 0.0025f;
ai->search_velocity.pit = 0.003f; ai->search_velocity.pit = 0.0015f;
inited = true; inited = true;
return 0; return 0;
} }
@ -99,9 +99,9 @@ void AI_PackCmd(AI_t *ai, CMD_Host_t *cmd_host) {
} }
void AI_SearchArmor(AI_t *ai, CMD_Host_t *cmd_host , AHRS_Eulr_t *gimbal_ai){ void AI_SearchArmor(AI_t *ai, CMD_Host_t *cmd_host , AHRS_Eulr_t *gimbal_ai){
if (gimbal_ai->pit > 2.0){ if (gimbal_ai->pit > 1.95){
ai->search_velocity.pit = fAbs(ai->search_velocity.pit); ai->search_velocity.pit = fAbs(ai->search_velocity.pit);
} else if (gimbal_ai->pit < 1.4) { } else if (gimbal_ai->pit < 1.75) {
ai->search_velocity.pit = -fAbs(ai->search_velocity.pit); ai->search_velocity.pit = -fAbs(ai->search_velocity.pit);
} }

View File

@ -481,7 +481,7 @@ static const Config_RobotParam_t param_sentry = {
.cover_close_duty = 0.050f, .cover_close_duty = 0.050f,
.model = SHOOT_MODEL_17MM, .model = SHOOT_MODEL_17MM,
.bullet_speed = 25.f, .bullet_speed = 25.f,
.min_shoot_delay = (uint32_t)(1000.0f / 10.0f), .min_shoot_delay = (uint32_t)(1000.0f / 8.0f),
}, /* shoot */ }, /* shoot */
.can = { .can = {