Kiwibot Explanation

def KiwiDrive(angle): # Run the kiwibot in a particular direction
x = angle + 180 # Switch to intermediate representation + 120) * 100) * 100) - 120) * 100)

Can anyone explain this part
it is for a kiwibot

The wheels on two of the three motors are set at an angle to the forward direction on a kiwi bot. The wheel on the back motor faces perpendicular to the forward direction, so you don’t want that wheel driving at all when going directly forward or directly backward. The code given above allocates different amounts of drive power to each of the three motors depending on the direction you want to go in. The wheel directions are 120 degrees apart. Here’s the explanation from RobotMesh:

So, the sine of the angle varies between -1 and 1. Multiplying the sine of the drive angle by 100 will therefore give you a power which varies from -100 to 100, with it being 0 when the desired direction is perpendicular to the wheel.

Longer and more descriptive explanations are possible, but does this get you started? Do you have particular questions?