-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add angular PID to ArcPIDController, fix issue with SettleExitCondition #89
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
@@ -10,9 +10,12 @@ class ArcPIDController : public AbstractController { | |||
protected: | |||
std::shared_ptr<ArcPIDController> p; | |||
utils::PID linear_pid; | |||
utils::PID angular_pid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: member variable 'angular_pid' has protected visibility [cppcoreguidelines-non-private-member-variables-in-classes]
utils::PID angular_pid;
^
double track_width; | ||
double min_error; | ||
double can_reverse; | ||
double arc_radius; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: member variable 'arc_radius' has protected visibility [cppcoreguidelines-non-private-member-variables-in-classes]
double arc_radius;
^
double track_width; | ||
double min_error; | ||
double can_reverse; | ||
double arc_radius; | ||
Point arc_center; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: member variable 'arc_center' has protected visibility [cppcoreguidelines-non-private-member-variables-in-classes]
Point arc_center;
^
@@ -18,6 +18,7 @@ class ArcPIDControllerBuilder { | |||
|
|||
ArcPIDControllerBuilder& with_linear_constants(double kP, double kI, | |||
double kD); | |||
ArcPIDControllerBuilder& with_angular_constants(double kP, double kI, double kD); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: parameter name 'kP' is too short, expected at least 3 characters [readability-identifier-length]
ArcPIDControllerBuilder& with_angular_constants(double kP, double kI, double kD);
^
@@ -18,6 +18,7 @@ class ArcPIDControllerBuilder { | |||
|
|||
ArcPIDControllerBuilder& with_linear_constants(double kP, double kI, | |||
double kD); | |||
ArcPIDControllerBuilder& with_angular_constants(double kP, double kI, double kD); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: parameter name 'kI' is too short, expected at least 3 characters [readability-identifier-length]
ArcPIDControllerBuilder& with_angular_constants(double kP, double kI, double kD);
^
.with_linear_constants(20, 0.02, 169) | ||
.with_angular_constants(250, 0.05, 2435) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 2435 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
.with_angular_constants(250, 0.05, 2435)
^
.with_min_error(5) | ||
.with_slew(8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
.with_slew(8)
^
master.rumble("--"); | ||
chassis.turn(0); | ||
printf("end\n"); | ||
odom->set_pose({0.0, 0.0, 90}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 90 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
odom->set_pose({0.0, 0.0, 90});
^
chassis.turn(0); | ||
printf("end\n"); | ||
odom->set_pose({0.0, 0.0, 90}); | ||
chassis.move({-24, 24}, arc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 24 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
chassis.move({-24, 24}, arc);
^
chassis.turn(0); | ||
printf("end\n"); | ||
odom->set_pose({0.0, 0.0, 90}); | ||
chassis.move({-24, 24}, arc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 24 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
chassis.move({-24, 24}, arc);
^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.