Skip to content

Commit

Permalink
更新参数
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiu-xiao committed May 19, 2024
1 parent 743ed60 commit e4e33c4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
8 changes: 0 additions & 8 deletions src/robot/drone_gimbal/robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,6 @@ Robot::UVA::Param param={
Device::DR16::KEY_L_RELEASE,
Module::UVALauncher::CHANGE_FIRE_MODE_SAFE
},
Component::CMD::EventMapItem{
Device::DR16::KEY_R,
Module::UVALauncher::OPEN_COVER
},
Component::CMD::EventMapItem{
Device::DR16::KEY_F,
Module::UVALauncher::CLOSE_COVER
}
},
},
.bmi088_rot = {
Expand Down
36 changes: 20 additions & 16 deletions src/robot/infantry/robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Robot::Infantry::Param param = {
.id_control = M3508_M2006_CTRL_ID_BASE,
.model = Device::RMMotor::MOTOR_M3508,
.can = BSP_CAN_1,

},
Device::RMMotor::Param{
.id_feedback = 0x202,
Expand Down Expand Up @@ -205,7 +206,7 @@ Robot::Infantry::Param param = {
.i = 0.0f,
.d = 0.0f,
.i_limit = 0.0f,
.out_limit = 10.0f,
.out_limit = 0.0f,
.d_cutoff_freq = -1.0f,
.cycle = true,
},
Expand All @@ -222,7 +223,7 @@ Robot::Infantry::Param param = {
.i = 0.f,
.d = 0.f,
.i_limit = 0.8f,
.out_limit = 1.0f,
.out_limit = 0.0f,
.d_cutoff_freq = -1.0f,
.cycle = false,
},
Expand Down Expand Up @@ -256,18 +257,18 @@ Robot::Infantry::Param param = {
.id_control = GM6020_CTRL_ID_BASE,
.model = Device::RMMotor::MOTOR_GM6020,
.can = BSP_CAN_2,
.reverse = true ,
.reverse = false ,
},

.mech_zero = {
.yaw = 1.3f,
.pit =M_2PI - 5.37046671f,
.yaw = 1.3f + M_PI,
.pit = 3.43f,
.rol = 0.0f,
},

.limit = {
.pitch_max =M_2PI - 5.1f,
.pitch_min =M_2PI - 5.8f,
.pitch_max = 3.7f,
.pitch_min = 3.1f,
},

.EVENT_MAP = {
Expand All @@ -281,11 +282,11 @@ Robot::Infantry::Param param = {
},
Component::CMD::EventMapItem{
Device::DR16::DR16_SW_R_POS_MID,
Module::Gimbal::SET_MODE_ABSOLUTE
Module::Gimbal::START_AUTO_AIM
},
Component::CMD::EventMapItem{
Device::DR16::DR16_SW_R_POS_BOT,
Module::Gimbal::SET_MODE_ABSOLUTE
Module::Gimbal::START_AUTO_AIM
},
Component::CMD::EventMapItem{
Device::DR16::KEY_R_PRESS,
Expand All @@ -312,8 +313,8 @@ Robot::Infantry::Param param = {
.trig_actr = {
Component::PosActuator::Param{
.speed = {
.k = 1.5f,
.p = 1.0f,
.k = 3.5f,
.p = 1.1f,
.i = 0.0f,
.d = 0.03f,
.i_limit = 0.5f,
Expand All @@ -323,7 +324,7 @@ Robot::Infantry::Param param = {
},

.position = {
.k = 1.2f,
.k = 1.5f,
.p = 1.0f,
.i = 0.0f,
.d = 0.012f,
Expand All @@ -342,7 +343,7 @@ Robot::Infantry::Param param = {
.fric_actr = {
Component::SpeedActuator::Param{
.speed = {
.k = 0.00025f,
.k = 0.00052f,
.p = 1.0f,
.i = 0.4f,
.d = 0.01f,
Expand All @@ -358,7 +359,7 @@ Robot::Infantry::Param param = {
},
Component::SpeedActuator::Param{
.speed = {
.k = 0.00025f,
.k = 0.00052f,
.p = 1.0f,
.i = 0.4f,
.d = 0.01f,
Expand All @@ -380,6 +381,7 @@ Robot::Infantry::Param param = {
.id_control = M3508_M2006_CTRL_ID_BASE,
.model = Device::RMMotor::MOTOR_M2006,
.can = BSP_CAN_2,
.reverse = true,
}
},

Expand All @@ -389,12 +391,14 @@ Robot::Infantry::Param param = {
.id_control = M3508_M2006_CTRL_ID_BASE,
.model = Device::RMMotor::MOTOR_M3508,
.can = BSP_CAN_2,
.reverse = true,
},
Device::RMMotor::Param{
.id_feedback = 0x204,
.id_control = M3508_M2006_CTRL_ID_BASE,
.model = Device::RMMotor::MOTOR_M3508,
.can = BSP_CAN_2,
.reverse = true,
},
},

Expand Down Expand Up @@ -440,8 +444,8 @@ Robot::Infantry::Param param = {

.bmi088_rot = {
.rot_mat = {
{ +1, +0, +0},
{ +0, +1, +0},
{ -1, +0, +0},
{ +0, -1, +0},
{ +0, +0, +1},
},
},
Expand Down

0 comments on commit e4e33c4

Please sign in to comment.