ADM Activity 1.2.2

Transporting and Palletizing Objects

Use a magnetic end effector to move and place cubes in a planned layout.

Lesson Overview

In this lesson, you will explore how automated systems move, organize, and palletize objects in manufacturing and warehouse environments. The example uses loops, variables, and a magnetic end effector to pick up and place cubes in rows.

Notes

  • Set the correct end effector before attempting to pick up objects.
  • Use safe approach and lift heights when moving between pickup and drop-off locations.
  • Variables such as yPos and xPos control where each cube is placed.
  • Loops make the palletizing process repeatable and easier to adjust.
  • Final submissions must include comments that explain pickup, transport, placement, and loop logic.
Code example

1.2.2: Transporting and Palletizing Objects

Review the code, copy it when needed, and add comments before submitting your final version.

VEXcode Python Example
Code examples may be incomplete or missing comments. Comments are required for code submissions.
def main():
    arm.set_end_effector_type(Arm.MAGNET)
    arm.set_speed(100)

    cubes = 2
    yPos = 185
    arm.move_to(180, 0, 180)
    #place cubes in back row
    for x in range(cubes):
        #move to pick up cube

        arm.move_to(48, 152, 30)
        arm.move_to(48, 152, 25)
        arm.set_end_effector_magnet(True)
        #move to drop off cube
        arm.move_to(48, 152, 60)
        arm.move_to(200, yPos, 45)
        arm.move_to(200, yPos, 41)
        arm.set_end_effector_magnet(False)
        arm.move_to(168, 160, 100)
        yPos = yPos - 50
    xPos = 135

    #front row cubes
    for x in range(cubes):
       #move to pickup cubes
        arm.move_to(48, 152, 30)
        arm.move_to(48, 152, 25)
        arm.set_end_effector_magnet(True)
        #move to drop off cubes
        arm.move_to(48, 152, 60)
        arm.move_to(150, xPos, 45)
        arm.move_to(150, xPos, 41)
        arm.set_end_effector_magnet(False)
        arm.move_to(168, 160, 100)
        xPos = xPos + 50