Scripted motions - northern-bites/nbites GitHub Wiki

The northern bites currently uses python to implement all scripted motions. Scripted motions include the front stand up, back stand up, kicks, pans, and scans.

The front stand up, back stand up, and kicks are called SweetMoves (cause they're sweet) while pans and scans are considered HeadMoves. Essentially SweetMoves and HeadMoves define constants which are a tuple of tuples of joint angles, an interpolation type, interpolation time, and stiffnesses. The stiffnesses are defined as constants in another file.

Interpolation type is the way we change to the next determined joint angle. Interpolations are calculated in ChopShop. A linear interpolation is when the motors are essentially moving at constant speed while executing the next joint command. Smooth interpolation is when the motors start and end slow and move quickly in the middle. The difference is apparent when watching the movements, linear commands start and end jerky while smooth commands are, well, smoother.

Interpolation time is how much time we want to take until the robot is at the desired joint angles.

The stiffnesses are a measure between 0 and 1 of how stiff each joint should be. Stiffnesses are also tuples. A higher stiffness means the robot should try harder to maintain its current joint angle. An example of how we use stiffnesses is how we turn of all stiffnesses in the robot to "relax" it when it's falling. This allows the robot to be limp, rather than snap an arm.