臂电机读数ok
This commit is contained in:
parent
35cf664580
commit
e53121558c
@ -4,22 +4,22 @@
|
||||
Arm::Arm(){
|
||||
dm_motor_params[0] = MOTOR_DM_Param_t{
|
||||
.can = BSP_CAN_1,
|
||||
.master_id = 0x11,
|
||||
.can_id = 1,
|
||||
.master_id = 0x14,
|
||||
.can_id = 0x04,
|
||||
.module = MOTOR_DM_J4310,
|
||||
.reverse = false
|
||||
};
|
||||
dm_motor_params[1] = MOTOR_DM_Param_t{
|
||||
.can = BSP_CAN_1,
|
||||
.master_id = 0x12,
|
||||
.can_id = 1,
|
||||
.master_id = 0x15,
|
||||
.can_id = 0x05,
|
||||
.module = MOTOR_DM_J4310,
|
||||
.reverse = false
|
||||
};
|
||||
dm_motor_params[2] = MOTOR_DM_Param_t{
|
||||
.can = BSP_CAN_1,
|
||||
.master_id = 0x13,
|
||||
.can_id = 1,
|
||||
.master_id = 0x16,
|
||||
.can_id = 0x06,
|
||||
.module = MOTOR_DM_J4310,
|
||||
.reverse = false
|
||||
};
|
||||
@ -97,7 +97,7 @@ void Arm::operator()(){
|
||||
arm_output[0].kd = 1.0f;
|
||||
// MOTOR_DM_MITCtrl(&dm_motor_params[0], &arm_output[0]);
|
||||
|
||||
arm_state = MOTOR_LZ_Relax(&lz_motor_params[0]);
|
||||
MOTOR_LZ_Relax(&lz_motor_params[0]);
|
||||
BSP_TIME_Delay(2);
|
||||
MOTOR_LZ_Relax(&lz_motor_params[1]);
|
||||
BSP_TIME_Delay(2);
|
||||
|
||||
@ -20,5 +20,5 @@ private:
|
||||
MOTOR_LZ_t arm_lz_motor[3];
|
||||
MOTOR_LZ_MotionParam_t arm_lz_motion[3];
|
||||
MOTOR_MIT_Output_t arm_output[3];
|
||||
int8_t arm_state = 1;
|
||||
|
||||
};
|
||||
@ -3,28 +3,28 @@
|
||||
|
||||
Chassis::Chassis() {
|
||||
motors_param[0] = {
|
||||
.can = BSP_CAN_1,
|
||||
.id = 0x206,
|
||||
.module = MOTOR_GM6020,
|
||||
.can = BSP_CAN_2,
|
||||
.id = 0x201,
|
||||
.module = MOTOR_M3508,
|
||||
.reverse = false,
|
||||
.gear = true
|
||||
};
|
||||
motors_param[1] = {
|
||||
.can = BSP_CAN_1,
|
||||
.can = BSP_CAN_2,
|
||||
.id = 0x202,
|
||||
.module = MOTOR_M3508,
|
||||
.reverse = false,
|
||||
.gear = true
|
||||
};
|
||||
motors_param[2] = {
|
||||
.can = BSP_CAN_1,
|
||||
.can = BSP_CAN_2,
|
||||
.id = 0x203,
|
||||
.module = MOTOR_M3508,
|
||||
.reverse = false,
|
||||
.gear = true
|
||||
};
|
||||
motors_param[3] = {
|
||||
.can = BSP_CAN_1,
|
||||
.can = BSP_CAN_2,
|
||||
.id = 0x204,
|
||||
.module = MOTOR_M3508,
|
||||
.reverse = false,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user