Skip to content

Commit

Permalink
[Spinal][Controller] modified the condition for updating torque alloc…
Browse files Browse the repository at this point in the history
…ation matrix.
  • Loading branch information
sugihara-16 committed Sep 15, 2023
1 parent 5b31162 commit dc39f77
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ void AttitudeController::rpyGainCallback( const spinal::RollPitchYawTerms &gain_

void AttitudeController::torqueAllocationMatrixInvCallback(const spinal::TorqueAllocationMatrixInv& msg)
{
if(motor_number_ == 0) return;
if(motor_number_ == 0 || !start_control_flag_) return;

#ifdef SIMULATION
if(msg.rows.size() != motor_number_)
Expand Down Expand Up @@ -947,7 +947,7 @@ void AttitudeController::pwmConversion()
}
}
}

for(int i = 0; i < motor_number_; i++)
target_thrust_[i] = roll_pitch_term_[i] + (1 + base_thrust_decreasing_rate) * base_thrust_term_[i] + (1 + yaw_decreasing_rate) * yaw_term_[i];

Expand Down

0 comments on commit dc39f77

Please sign in to comment.