Pick and place robot
This example demonstrates how to make a simple pick and place robot
- A stand
- 2 passive modules
- 1 3D-printed stand for a ball
- 1 LEGO connector or another stand for a ball
- 1 3D-printed ”picker-connector” (to pick up the ball)
- 1 ball (table tennis)
- 1 joint module Fable (the robot)
- 1 USB Dongle
Construct the robot and set up an extra stand for the robot to place the ball. Note that it matters which way the joint module is rotated.
Program the robot to grab the ball placed on the one stand and move it to the other. The robot must then return the ball to the first stand and repeat the sequence.
The first thing you should do is to start a loop with this block:
and afterwards put all the other blocks in to this block.
Next up: The Fable program starts out in a simple version and it would be possible to solve the problem with this block:
which you'll find under "actions" - but the program will run more smooth if you turn the Fable Blockly into "Full version":
Now you will find another "move" block under actions where you can control the speed of the robot - get that block:
And then you should put a wait block in between all of the action blocks:
Your program should look similar to this:
Test the program several times and discuss the following questions:
- Does it work every time? Can you make it more reliable?
- Is it fast enough? Can you make the sequence faster?
Experiment with the program and the robot - try to make it more adaptive and autonomous.
For example, you can use the camera to detect when the ball is placed at A, after which the robot can start the sequence that moves the ball to B.
Happy programming :-)
Get blockly source code here.