⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 params.cpp

📁 robocup源代码2001年清华机器人源代码
💻 CPP
字号:
/*
    Copyright (C) 2001  Tsinghuaeolus

    Authors : ChenJiang, YaoJinyi, CaiYunpeng, Lishi

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

	If you make any changes or have any comments we would appreciate a 
	message to yjy01@mails.tsinghua.edu.cn.
*/

#include "stdafx.h"

#include "Types.h"
#include "Params.h"

/*****   server params *************/
float SP_pitch_length 	    = 105.0f;
float SP_pitch_width  	    = 68.0f;
float SP_pitch_diameter;
float SP_semi_pitch_length = SP_pitch_length / 2.0f;
float SP_semi_pitch_width = SP_pitch_width / 2.0f;
float SP_pitch_margin         = 5.0f;
float SP_penalty_area_length  = 16.5f;
float SP_penalty_area_width   = 40.32f;
float SP_goal_area_length	    = 5.5f;
float SP_goal_area_width	    = 18.32f;
float SP_penalty_spot_dist    = 11.0f;
float SP_corner_arc_r         = 1.0f;
float SP_free_kick_buffer     = 9.15f;
float SP_feel_distance        = 3.0f;
float SP_unum_far_length      = 20.0f;
float SP_unum_too_far_length  = 40.0f;
float SP_team_far_length      = 40.0f;
float SP_team_too_far_length  = 60.0f;

float SP_version              = 7.00f;
int SP_half                 = 1;
float SP_goal_width           = 14.02f;       
float SP_player_size          = 0.8f;
float SP_player_decay         = 0.4f;
float SP_player_rand  	    = 0.1f;
float SP_player_weight        = 60.0f;
float SP_player_speed_max     = 1.0f;
float SP_paccel_max;
float SP_stamina_max	       = 4000.0f;
float SP_stamina_inc          = 45.0f;
float SP_recover_init		  = 0.0f;
float SP_recover_dec_thr      = 0.3f;
float SP_recover_dec          = 0.05f;
float SP_recover_min          = 0.1f;
float SP_effort_init		  = 0.0f;
float SP_effort_dec_thr       = 0.4f;
float SP_effort_min           = 0.1f;
float SP_effort_dec           = 0.05f;
float SP_effort_inc_thr       = 0.9f;
float SP_effort_inc           = 0.05f;
float SP_kick_rand			  = 0.0f;
float SP_team_actuator_noise  = 0.0f;
float SP_prand_factor_l       = 1.0f;
float SP_prand_factor_r       = 1.0f;
float SP_kick_rand_factor_l   = 1.0f;
float SP_kick_rand_factor_r   = 1.0f;
float SP_ball_size            = 0.085f;
float SP_ball_decay           = 0.94f;
float SP_ball_decay_ln;
float SP_ball_rand            = 0.05f;
float SP_ball_weight          = 0.2f;
float SP_ball_speed_max       = 2.7f;
float SP_baccel_max			  = 2.7f;
float SP_dash_power_rate      = 0.01f;
float SP_kick_power_rate      = 0.016f;
float SP_kickable_margin      = 0.7f;
float SP_kickable_area        = SP_kickable_margin + SP_ball_size + SP_player_size;
float SP_ctl_radius		  = 2.0f;
float SP_ctl_radius_width    = 1.7f;
float SP_catch_prob           = 1.0f;
float SP_catch_area_l         = 2.0f;
float SP_catch_area_w         = 1.0f;
int SP_catch_ban_cycle		  = 5;
int SP_goalie_max_moves;
float SP_max_power            = 100.0f;
float SP_min_power            = -30.0f;
float SP_max_moment           = 180.0f;
float SP_min_moment           = -180.0f;
float SP_min_neck_angle       = -90.0f;
float SP_max_neck_angle       = 90.0f;
float SP_min_neck_moment      = -180.0f;
float SP_max_neck_moment      = 180.0f;
float SP_visible_angle        = 90.0f;
float SP_audio_cut_dist       = 50.0f;
float SP_dist_qstep           = 0.1f;
float SP_land_qstep           = 0.01f;
float SP_dir_qstep;
float SP_dist_qstep_l;
float SP_dist_qstep_r;
float SP_land_qstep_l;
float SP_land_qstep_r;
float SP_dir_qstep_l;
float SP_dir_qstep_r;
float SP_ckmargin             = 1.0f;
float SP_wind_dir             = 0.0f;
float SP_wind_ang			  = 0.0f;
float SP_wind_force           = 0.0f;
float SP_wind_rand            = 0.0f;
bool SP_wind_none            = false;
bool SP_wind_random          = false;
int   SP_half_time            = 300;
char  SP_host[20] = "192.9.200.43";
int   SP_port                 = 6000;
int   SP_coach_port            = 6001;
int   SP_olcoach_port          = 6002;
int   SP_simulator_step        = 100;
int SP_send_step             = 150;
int SP_recv_step            = 10;
int SP_say_msg_size         = 512;
int SP_hear_max             = 2;
int SP_hear_inc             = 1;
int SP_hear_decay           = 2;
bool SP_coach_mode           = false;
bool SP_coach_w_referee_mode = false;
int SP_say_coach_cnt_max    = 128;
int SP_say_coach_msg_size   = 128;
int SP_send_vi_step         = 100;
int SP_look_step            = 100;
int SP_lcm_step;
bool SP_use_offside          = true;
bool SP_forbid_kickoff_offside = false;
int SP_verbose              = true;
float SP_offside_area         = 9.15f;
float SP_inertia_moment       = 5.0f;
int SP_sense_body_step      = 100;
float SP_offside_kick_margin  = 9.15f;
bool SP_record_messages      = false;
bool SP_rec_log       = false;
int SP_rec_ver        = 2;
bool SP_send_log      = false;
float SP_slow_down_factor = 1.0f;
bool SP_old_hear = false;
int SP_sv_step = 100;
int SP_drop_ball_time = 200; 

float SP_win_no;
float SP_win_random;
float SP_midfieldline = 25.0f;
float SP_backfieldline = -15.0f;
float SP_left_wing = -12.0f;
float SP_right_wing = 12.0f;

int SP_clang_win_size = 300;
int SP_clang_define_win = 1;
int SP_clang_meta_win = 1;
int SP_clang_advice_win = 1;
int SP_clang_info_win = 1;
int SP_clang_mess_delay = 50;
int SP_clang_mess_per_cycle = 1;

int SP_player_types = 7;
int SP_subs_max = 3;
float SP_player_speed_max_delta_min = 0.0f;
float SP_player_speed_max_delta_max = 0.2f;
float SP_stamina_inc_max_delta_factor = -100.0f;
float SP_player_decay_delta_min = 0.0f;
float SP_player_decay_delta_max = 0.2f;
float SP_inertia_moment_delta_factor = 25.0f;
float SP_dash_power_rate_delta_min = 0.0f;
float SP_dash_power_rate_delta_max = 0.002f;
float SP_player_size_delta_factor = -100.0f;
float SP_kickable_margin_delta_min = 0.0f;
float SP_kickable_margin_delta_max = 0.2f;
float SP_kick_rand_delta_factor = 0.5f;
float SP_extra_stamina_delta_min = 0.0f;
float SP_extra_stamina_delta_max = 100.0f;
float SP_effort_max_delta_factor = -0.002f;
float SP_effort_min_delta_factor = -0.002f;

/***********  client params *****************/
float CP_conf_max = 1.0f;
float CP_conf_decay = 0.95f;
float CP_min_valid_conf = 0.70f;
/************	file	*********************/
int  CP_log_max = 10;
char CP_logfile[100] = "log";
char CP_recfile[100] = "rec";
char CP_IT_weightfile[100] = "ITweight";
char CP_IT_ref_weigthfile[100] = "ITrefweight";
char CP_IT_time_weightfile[100] = "ITtimeweight";
char CP_PASS_weightfile[100] = "Passweight";
char CP_SHOOT_weightfile[100] = "Shootweight";
char CP_CB_weightfile[100] ="CBweight";
char CP_FM_offense_weightfile[100] = "FMOffenseweight";
char CP_FM_defense_weightfile[100] = "FMDefenseweight";
char CP_Off_sen_weightfile[100] = "OffSenweight";
char CP_DF_Sensitivity_weightfile[100] ="DF_Senweight"; 
char CP_Mark_priority_weightfile[100] = "Mark_weight"; 
char CP_Block_priority_weightfile[100] = "Block_weight"; 
char CP_deviation_weightfile[100] = "deviationweights"; 
char CP_DF_formation_priority_file[100] = "fmpriority"; 
char CP_DF_press_priority_file[100] = "presspriorityweights";  

char CP_matrixfile[100] = "matrix";
char CP_m_file[CP_matrix_max][100];
char CP_KickOA_weightfile_A[100];
char CP_KickOA_weightfile_B[100];
char CP_KickOA_weightfile_C[100];
char CP_KickOA_weightfile_D[100];
float CP_goalie_kick_min_vel = 1.2f;
int CP_setplay_wait_time = 20;
/*************************************************/
char CP_TeamName[100] = "Capser";
char CP_Opp_TeamName[100] = "Aeolus";
/*************************************************/
int CP_Number = 0;
int CP_goalieNo = 1;
bool CP_goalie = false;
/*************	role	***************************/
float CP_attackness;
float CP_leftness;
float CP_aggressiveness;
float CP_creativeness;
/*************************************************/
float CP_collision_buffer = 0.12f;
float CP_turnball_radius_threshold = 0.4f;
float CP_turnball_radius = 0.8f;
float CP_kickballaway_speed = 0.1f;
float CP_pos_deviation_max = 2.0f;
int   CP_decision_holdtime = 5;
float CP_deviation_max = 45.0f;  

/*************************************************/
float CP_division;
/*************************************************/
int   CP_encryption_matrix = 59359;
int   CP_encryption_key = 7903;
int   CP_decryption_key;
/*************************************************/
float CP_reliable_kickarea = 1.0f;
float CP_desired_kickarea = 0.7f;
float CP_anticollision_kickarea = 0.45f;
/*************************************************/
float CP_assumed_interceptspeed = 0.9f;
float CP_close_ball = 1.0f;

float CP_block_margin = 1.0f;
float CP_control_margin = SP_kickable_area + 0.1f;
float CP_dribble_radius = 0.5f;
float CP_dribble_angle = 90.0f;
float CP_dribble_speed = 0.6f;

float CP_drweight_conf_a = -0.03f;
float CP_drweight_conf_b = 0.01f;
float CP_drweight_conf_c = 1.0f;
float CP_passweight_conf_a = 0.0022f;
float CP_passweight_conf_b = 0.0113f;
float CP_passweight_conf_c = 0.2686f;
float CP_goto_allowed_error = 0.2f;
float CP_out_of_pitch_error = 3.0f;
float CP_passable_angle = 30;
float CP_passable_distance =  40;
float CP_pass_ball_speed_max = 2.2f;
float CP_kick_threshold_factor = 0.95f;
float CP_mnmx_kickeffect = 1.1f;
/*****************  shoot *************************/
float CP_max_shoot_distance = 35.0f;
float CP_goalie_catch_angle = 15.0f;
float CP_shoot_search_angle = 5.0f;
float CP_dribble_distance = 10.0f;
float CP_player_intercept_angle = 20.0f;
float CP_setplay_speed = 0.4f;
float CP_setplay_deviation = 1.0f;
float CP_defense_area_length = 30.0f;
float CP_defense_area_width = 30.0f;
float CP_block_speed = 1.0f;
float CP_block_speed_factor = 1.4f;
float CP_max_IT_cycles = 500;
float CP_offeseposition_speed = 0.4f;
float CP_block_dist = 3.5f;
float CP_mark_dist = 1.5f;
float CP_check_dist = 10.0f;
float CP_mark_speed = 1.0f;

float CP_goalie_clear_ang = 30.0f; 
float CP_goalie_clear_search_ang = 5.0f;
float CP_goalie_safe_catch_length = 1.8f; 
float CP_collision_threshold = 0.45f;
float CP_clear_angle = 15.0f;
float CP_reliable_kickable_area = 1.0f;
float CP_powerkick_radius = 0.85f;
float CP_kickable_area = 1.05f;
float CP_collision_detected_threshold = 0.2f;
float CP_safecatch_width; 
/*************************/
char CP_appname[100];
float CP_too_different_distance = 10.0f;
float CP_identify_min_conf = 0.2f;
float CP_different_distance = 3.5f;
float CP_negativepower_factor = 2.0f;
/***********  Field Params   ********************/
int FP_goalie_number = 1;
int FP_theirgoalie_number = 1;
float FP_attackness[SP_team_size];
float FP_leftness[SP_team_size];
float FP_aggressiveness[SP_team_size];
float FP_creativeness[SP_team_size];
/************ Update knowledge ******************/
float CP_selfvel_mingap = 0.06f;
/************ Visual system	******************/
float CP_VW_Narrowfactor = 1.1f;
float CP_def_concern_area = 15.0f;
float CP_kickarea_compensation = 0.7f;
float CP_catcharea_compensation = 1.5f;
float CP_sensitivity_distance = 10.0f;
float CP_k_dribble_avoid = 0.5f;
float CP_k_dribble_rosen = 0.5f;

float CP_shoot_avoidgoalie = 1.0f;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -