Skip to content

Modified pid#48

Open
MahdMalik wants to merge 59 commits intomainfrom
modifiedPID
Open

Modified pid#48
MahdMalik wants to merge 59 commits intomainfrom
modifiedPID

Conversation

@MahdMalik
Copy link
Contributor

tung tung tung sahur

democat3457 and others added 30 commits September 15, 2025 22:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
democat3457 and others added 29 commits September 30, 2025 01:45
all we needed to do was measure the actual loop time instead of the expected loop time
it goes in a circle lol
it will usually travel straight now
Made everything into doubles.
Found a better approximation for the robot
Is close but still unstable
Changed PID to work on the forward and angular velocity  of the robot as opposed to the speed of the individual motors.
Feedback is based on the x, y, and rotation of the robot.
Gets within about 5cm per forward move.
Todo: realign robot to 0 degrees after forward move is completed
Added stop when at the destination.
Adjusted power to fit between -1 and 1 for the motors. As a bonus, the robot drives even straighter.
Tested backwards and longer distances with good results.
Needs a bit more tuning, but is very close.
Lowered threshold to stop the robot and moved logging to strings that can be enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants