Do you have to use a gyro, or can you use brain inertial? Also, whenever i set Walkheading 1800 heading 0, it just spins around instead of going forward.
That looks right. That formula would make the robot turn in the same position without it moving forwards. Matthew is out for 10 days but he may be able to give you more details when he returns.
@@bloxboy2b893 Hi, thanks for watching the video! There are two ways to do this. Creating a separate myblock for moving backwards or adding a parameter in your myblock to tell robot either walk forward or backwards. If you are new to the coding, making a separate myblock is cleaner and your code is easier to read/fix.
@@bloxboy2b893 So, in the formula, the left wheel speed and right wheel speed would be negative to go reverse. For the robot to adjust clockwise, instead of right wheel slow down, we need left wheel to slow down. For the robot to adjust counter-clockwise, we need right wheel to slow down. It is opposite to go forward. So here is the formula (MaxSpeed is the maximum velocity your robot can run): In the situation that Error >0: SetLeftWheelVelocity = - MaxSpeed: SetRightWheelVelocity = - MaxSpeed + Kp*Error In the situation that Error
Nicely done! Thanks for sharing
Great explanation! Loved the examples and the data🎉🎉🎉
Thanks! 🙂
Do you have to use a gyro, or can you use brain inertial? Also, whenever i set Walkheading 1800 heading 0, it just spins around instead of going forward.
How do you do just turning (e.g., turn 90 degrees)? Would it be LeftMotorSpeed = turnKD * error; RightMotorSpeed = - turnKD * error?
That looks right. That formula would make the robot turn in the same position without it moving forwards. Matthew is out for 10 days but he may be able to give you more details when he returns.
@MakaylaChou thanks! Let me know when Matthew is back and how he thinks about this?
Love this kid (platonically)
Thanks! How's your robot coming along? Feel free to ask if you need some more PID help
@ what’s your discord
@@madisoglrobotics inotmatt
How do you reverse
@@bloxboy2b893 Hi, thanks for watching the video! There are two ways to do this. Creating a separate myblock for moving backwards or adding a parameter in your myblock to tell robot either walk forward or backwards. If you are new to the coding, making a separate myblock is cleaner and your code is easier to read/fix.
@@MatthewChou0 can you give me a example
@@bloxboy2b893 So, in the formula, the left wheel speed and right wheel speed would be negative to go reverse. For the robot to adjust clockwise, instead of right wheel slow down, we need left wheel to slow down. For the robot to adjust counter-clockwise, we need right wheel to slow down. It is opposite to go forward. So here is the formula (MaxSpeed is the maximum velocity your robot can run):
In the situation that Error >0: SetLeftWheelVelocity = - MaxSpeed: SetRightWheelVelocity = - MaxSpeed + Kp*Error
In the situation that Error
@@MatthewChou0 I’m sorry I just don’t understand could you send a photo of our you would do it in the code
@@bloxboy2b893 No worries. I'll include that in the next video. Stay tuned.
is it the same guy as before
Yeah, have we met in a competition before?