Puck Class

class Puck(number, position, angle, height=30)
set_position(position)

Updates Puck position.

Parameters:position (float[]) – New Puck position [x,y]
set_angle(angle)

Updates Puck angle.

Parameters:angle (float[]) – New Puck angle
set_height(height)

Updates Puck height.

Parameters:height (float[]) – New Puck height
get_xyz()

Gets true position of Puck ([x,y,z] on the work object).

Returns:Puck position [x,y,z]
check_collision(puck_list)

Finds an angle of rotation for the gripper which avoids collisions between the gripper and other pucks when sliding in to pick up a puck.

Parameters:puck_list (Puck[]) – List of all Puck objects
Returns:Rotation which yields no collision
Returns:If puck should be gripped forward or backward