It is difficult to make a proper square in the quiz. I know the logic behind the code. Any suggestions on how to make a proper square. I have even added cmd_vel as 0 in between forward motion and turning in order to make the robot turn properly
We live in a broken world @steve26, so things are hardly perfect here .
You move towards perfection at lower speeds (say
0.05) in addition to stopping before turning. This is especially necessary because of the high inertia of the bullyish BB8 ball
I have one more doubt. I have used the logic structure below as:
i =1 j = 1 for i in range(1, repetitions+2): while j <=4:
The robot moves in a proper square but when I put 2 repetitions it only makes 1 repetition.
The loop, for some reason, exits when i=2. I don’t understand why. I’m sure this is the logic for the code works.
Hi @steve26. I can’t see the complete picture with just that snippet. Could you send me a private message with the full code?
PS: to send a private message, click on my avatar and click on the Message icon.