@@ -81,9 +81,6 @@ HelmChassis<Motor, MotorParam>::HelmChassis(Param& param, float control_freq)
81
81
reinterpret_cast <float *>(System::Memory::Malloc (
82
82
4 * sizeof (*this ->setpoint_ .motor_rotational_speed )));
83
83
ASSERT (this ->setpoint_ .motor_rotational_speed );
84
- // this->setpoint_.wheel_pos = reinterpret_cast<float*>(
85
- // System::Memory::Malloc(4 * sizeof(*this->setpoint_.wheel_pos)));
86
- // ASSERT(this->setpoint_.wheel_pos);
87
84
auto event_callback = [](ChassisEvent event, HelmChassis* chassis) {
88
85
chassis->ctrl_lock_ .Wait (UINT32_MAX);
89
86
@@ -247,24 +244,8 @@ void HelmChassis<Motor, MotorParam>::Control() {
247
244
case HelmChassis::BREAK:
248
245
break ;
249
246
case HelmChassis::INDENPENDENT: /* 独立模式wz为0 */
250
- // // this->move_vec_.wz = this->cmd_.z;
251
- // for (int i = 0; i < 4; i++) {
252
- // this->setpoint_.wheel_pos[i] += this->gyro_angle_[i];
253
- // }
254
- // break;
255
247
case HelmChassis::FOLLOW_GIMBAL: /* 跟随模式通过PID控制使车头跟随云台
256
248
*/
257
- // // this->move_vec_.wz =
258
- // // this->follow_pid_.Calculate(0.0f, this->yaw_, this->dt_);
259
-
260
- // // if (this->move_vec_.wz < 0.01 && this->move_vec_.wz > -0.01) {
261
- // // this->move_vec_.wz = 0;
262
- // // }
263
-
264
- // for (int i = 0; i < 4; i++) {
265
- // this->setpoint_.wheel_pos[i] += this->gyro_angle_[i];
266
- // }
267
- // break;
268
249
case HelmChassis::ROTOR: /* 小陀螺模式使底盘以一定速度旋转
269
250
*/
270
251
for (int i = 0 ; i < 4 ; i++) {
0 commit comments