修改参数
This commit is contained in:
		
							parent
							
								
									6cf2fb649b
								
							
						
					
					
						commit
						bea23c3860
					
				| @ -200,6 +200,11 @@ | |||||||
|           <WinNumber>1</WinNumber> |           <WinNumber>1</WinNumber> | ||||||
|           <ItemText>\\R2\../User/task/chassis_task.c\chassis.param->M3508_param.d</ItemText> |           <ItemText>\\R2\../User/task/chassis_task.c\chassis.param->M3508_param.d</ItemText> | ||||||
|         </Ww> |         </Ww> | ||||||
|  |         <Ww> | ||||||
|  |           <count>10</count> | ||||||
|  |           <WinNumber>1</WinNumber> | ||||||
|  |           <ItemText>\\R2\../User/task/nuc_task.c\cmd_fromnuc</ItemText> | ||||||
|  |         </Ww> | ||||||
|       </WatchWindow1> |       </WatchWindow1> | ||||||
|       <Tracepoint> |       <Tracepoint> | ||||||
|         <THDelay>0</THDelay> |         <THDelay>0</THDelay> | ||||||
|  | |||||||
										
											Binary file not shown.
										
									
								
							| @ -42,9 +42,11 @@ int8_t Chassis_init(Chassis_t *c, const Chassis_Param_t *param, float target_fre | |||||||
|     if (c == NULL) return CHASSIS_ERR_NULL; |     if (c == NULL) return CHASSIS_ERR_NULL; | ||||||
|     c->param = param; |     c->param = param; | ||||||
| 
 | 
 | ||||||
|     for (int i = 0; i < 4; i++) { |     for (int i = 0; i < 3; i++) { | ||||||
|         PID_init(&(c->pid.chassis_3508VecPID[i]), PID_POSITION_D, &(c->param->M3508_param)); |         PID_init(&(c->pid.chassis_3508VecPID[i]), PID_POSITION_D, &(c->param->M3508_param)); | ||||||
|     } |     } | ||||||
|  |         PID_init(&(c->pid.chassis_3508VecPID[3]), PID_POSITION_D, &(c->param->M3508_param_other)); | ||||||
|  | 		 | ||||||
|     PID_init(&(c->pid.chassis_PICKWzPID_HIGN), PID_POSITION, &(c->param->chassis_PICKWzPID_HIGN_param)); |     PID_init(&(c->pid.chassis_PICKWzPID_HIGN), PID_POSITION, &(c->param->chassis_PICKWzPID_HIGN_param)); | ||||||
|     PID_init(&(c->pid.chassis_PICKWzPID_LOW), PID_POSITION, &(c->param->chassis_PICKWzPID_LOW_param)); |     PID_init(&(c->pid.chassis_PICKWzPID_LOW), PID_POSITION, &(c->param->chassis_PICKWzPID_LOW_param)); | ||||||
|     /*sick*/ |     /*sick*/ | ||||||
|  | |||||||
| @ -73,6 +73,8 @@ typedef struct | |||||||
| 	 | 	 | ||||||
| 	/*该部分决定PID的参数整定在config中修改*/ | 	/*该部分决定PID的参数整定在config中修改*/ | ||||||
|   pid_param_t M3508_param; |   pid_param_t M3508_param; | ||||||
|  |   pid_param_t M3508_param_other; | ||||||
|  | 	 | ||||||
| 
 | 
 | ||||||
| 	pid_param_t chassis_PICKWzPID_HIGN_param; | 	pid_param_t chassis_PICKWzPID_HIGN_param; | ||||||
| 	pid_param_t chassis_PICKWzPID_LOW_param; | 	pid_param_t chassis_PICKWzPID_LOW_param; | ||||||
|  | |||||||
| @ -75,11 +75,11 @@ static const ConfigParam_t param ={ | |||||||
| 
 | 
 | ||||||
|     /*投球*/ |     /*投球*/ | ||||||
|     .LaunchCfg = { |     .LaunchCfg = { | ||||||
|     .m2006_init = -130.0f,    // M2006初始角度
 |     .m2006_init = -140.0f,    // M2006初始角度
 | ||||||
|     .m2006_trig = 0.0f,       // M2006触发角度
 |     .m2006_trig = 0.0f,       // M2006触发角度
 | ||||||
|     .go_pull_pos = -210.0f,   // go上升去合并扳机,扳机位置
 |     .go_pull_pos = -210.0f,   // go上升去合并扳机,扳机位置
 | ||||||
|     .go_up_speed = 12.0f,     // 上升速度
 |     .go_up_speed = 15.0f,     // 上升速度
 | ||||||
|     .go_down_speed = 10.0f,     // 下降速度
 |     .go_down_speed = 12.0f,     // 下降速度
 | ||||||
| 		.Pitch_angle = 58,	           //俯仰角
 | 		.Pitch_angle = 58,	           //俯仰角
 | ||||||
| 		.go_init	 = -50 | 		.go_init	 = -50 | ||||||
| }, | }, | ||||||
| @ -117,7 +117,18 @@ static const ConfigParam_t param ={ | |||||||
| //		 .i_limit = 200.0f,
 | //		 .i_limit = 200.0f,
 | ||||||
| //		 .out_limit =6000.0f,
 | //		 .out_limit =6000.0f,
 | ||||||
| 		 .p = 20.5f, | 		 .p = 20.5f, | ||||||
| 		 .i = 0.00011f, | 		 .i = 0.00005f, | ||||||
|  | 		 .d = 3.2f, | ||||||
|  | 		 .i_limit = 200.0f, | ||||||
|  | 		 .out_limit =6000.0f, | ||||||
|  | 			  | ||||||
|  | 			  | ||||||
|  | 	 },	 | ||||||
|  | 		  | ||||||
|  | 	 .M3508_param_other= { | ||||||
|  | 
 | ||||||
|  | 		 .p = 16.5f, | ||||||
|  | 		 .i = 0.00001f, | ||||||
| 		 .d = 3.2f, | 		 .d = 3.2f, | ||||||
| 		 .i_limit = 200.0f, | 		 .i_limit = 200.0f, | ||||||
| 		 .out_limit =6000.0f, | 		 .out_limit =6000.0f, | ||||||
|  | |||||||
| @ -132,7 +132,7 @@ int8_t ALL_Motor_Control(UP_t *u,CAN_Output_t *out) | |||||||
| { | { | ||||||
| 		/*目标值限位*/ | 		/*目标值限位*/ | ||||||
| 		abs_limit_min_max_fp(&u->motor_target.go_shoot ,-215.0f,0.0f); | 		abs_limit_min_max_fp(&u->motor_target.go_shoot ,-215.0f,0.0f); | ||||||
| 		abs_limit_min_max_fp(&u->motor_target.Pitch_angle ,48.0f,67.0f); | 		abs_limit_min_max_fp(&u->motor_target.Pitch_angle ,48.0f,71.5f); | ||||||
| 	 | 	 | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| @ -423,10 +423,10 @@ int8_t UP_AUTO_Control(UP_t *u,CAN_Output_t *out,CMD_t *c){ | |||||||
|       /*俯仰角度,力度转换,加数值限位*/ |       /*俯仰角度,力度转换,加数值限位*/ | ||||||
| 	 | 	 | ||||||
| 			if(u->MID360Context.Curve==CURVE_58){ | 			if(u->MID360Context.Curve==CURVE_58){ | ||||||
| 					MID360Cfg->go_release_pos=CurveChange(LowPassFilter2p_Apply(&u->filled[0],c->cmd_MID360.dis)+0.1f,3.3,4.3,&u->MID360Context.Curve); | 					MID360Cfg->go_release_pos=CurveChange(LowPassFilter2p_Apply(&u->filled[0],c->cmd_MID360.dis)+0.25f,3.3,4.3,&u->MID360Context.Curve); | ||||||
| 			} | 			} | ||||||
| 			else { | 			else { | ||||||
| 					MID360Cfg->go_release_pos=CurveChange(LowPassFilter2p_Apply(&u->filled[0],c->cmd_MID360.dis),3.3,4.3,&u->MID360Context.Curve); | 					MID360Cfg->go_release_pos=CurveChange(LowPassFilter2p_Apply(&u->filled[0],c->cmd_MID360.dis)+0.1f,3.3,4.3,&u->MID360Context.Curve); | ||||||
| 				 | 				 | ||||||
| 			} | 			} | ||||||
| 			if (u->MID360Context.Curve == CURVE_58) { | 			if (u->MID360Context.Curve == CURVE_58) { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user