robot code for summer school
Dependencies: PM2_Libary Eigen
Fork of PM2_Example_Summer_School by
Diff: Robot_Library/robot.h
- Revision:
- 56:3fce0a9bb6df
- Parent:
- 49:7da71f479dac
- Child:
- 57:8bf0b5a70065
--- a/Robot_Library/robot.h Thu May 26 16:33:16 2022 +0200 +++ b/Robot_Library/robot.h Mon May 30 08:38:03 2022 +0200 @@ -28,9 +28,22 @@ // Finite state machine functions void Initial(); void Idle(); - void FollowingLine(); - void LeftTurn(); - void RightTurn(); + void FollowingLine(); // takes in rotational velocity? + void LeftTurn_90(); + void RightTurn_90(); + + //PID + + void PID_Move(std::uint8_t s_binary); + void PID_Delay(int ms); + bool IsSharpTurn(int b); + + const float kP = 0.5f; + const float kI = 0.5f; + const float kD = 0.5f; + + int previous_error_value; + int intergal_error; //bool motors_enabled;