Open robotsmaker opened 9 months ago
Using dx and dy directly might not capture the relationship with self.detect_length, or might introduce noise or sensitivity that is undesirable in the control system.
Using dx and dy directly might not capture the relationship with self.detect_length, or might introduce noise or sensitivity that is undesirable in the control system.
Thank you, I understand. It's very clever. There is another question, why is there "self. pidx (0),self. pidy (0)" in the function "lock_target", and in the parameter file, d is three times p? So it looks like p+d becomes the true p?
I am confused about the pid controller code here. Why write it like this instead of using dx and dy directly?
move_rel_x = self.pidx(atan2(-move_rel_x, self.detect_length) self.detect_length) move_rel_y = self.pidy(atan2(-move_rel_y, self.detect_length) self.detect_length)