the wareho use receives a batch of goods with the … 5_5a4d9a65dbe57...the wareho use receives a...

9
The warehouse receives a batch of goods with the word “FRAGILE” stamped all over it. Be careful, rero Jr. Please handle with care.

Upload: others

Post on 18-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The wareho use receives a batch of goods with the … 5_5a4d9a65dbe57...The wareho use receives a batch of goods with the wor d “FRAGILE ” stamped all over it. Be careful, rero

The warehouse receives a batch of goods with the

word “FRAGILE” stamped all over it. Be careful, rero Jr.

Please handle with care.

Page 2: The wareho use receives a batch of goods with the … 5_5a4d9a65dbe57...The wareho use receives a batch of goods with the wor d “FRAGILE ” stamped all over it. Be careful, rero

Lesson 5

Materials Handling

Page 3: The wareho use receives a batch of goods with the … 5_5a4d9a65dbe57...The wareho use receives a batch of goods with the wor d “FRAGILE ” stamped all over it. Be careful, rero

Let’s Code </></>

Step 1Start with a Servo Position block. ID: 13 Degree: 270

Step 2Followed by another Servo Position block.ID: 14 Degree: 90

Step 3Add a Delay block with 1 second delay.

270

90

Page 4: The wareho use receives a batch of goods with the … 5_5a4d9a65dbe57...The wareho use receives a batch of goods with the wor d “FRAGILE ” stamped all over it. Be careful, rero

Step 4Followed by a 2WD block.Direction: 1 - Forward

Step 5Add a Delay block with 2 seconds delay.

Step 6Followed by a 2WD block.Direction: 0 - Stop

Page 5: The wareho use receives a batch of goods with the … 5_5a4d9a65dbe57...The wareho use receives a batch of goods with the wor d “FRAGILE ” stamped all over it. Be careful, rero

Step 7Add another Servo Position block.ID: 13 Degree: 180

Step 8Add a Servo Position block. ID: 14 Degree: 180

Step 9Lastly, add a Delay block with 1 sec. Then upload the program to your robot.

180

180

Page 6: The wareho use receives a batch of goods with the … 5_5a4d9a65dbe57...The wareho use receives a batch of goods with the wor d “FRAGILE ” stamped all over it. Be careful, rero

Go to Motion and play the file that you have saved. Observe how your robot works.

Step1

Step 2 Try to change the degree value of Servo Position block to ensure they can grip the brown box provided securely.

Let’s play

170 190

Page 7: The wareho use receives a batch of goods with the … 5_5a4d9a65dbe57...The wareho use receives a batch of goods with the wor d “FRAGILE ” stamped all over it. Be careful, rero

Important:

90 o270 o

o

135 o

225

o

180 o

180 o

190o

170

ID : 13 ID : 14

Use the brown box provided in the packaging as the gripping object.Estimate the gripper’s opening angle by referring to the figure below.The gripper needs to be closed to a certain angle where it can hold the object securely but not crushing the object. (Gripper may spoil if you close too tightly)

Page 8: The wareho use receives a batch of goods with the … 5_5a4d9a65dbe57...The wareho use receives a batch of goods with the wor d “FRAGILE ” stamped all over it. Be careful, rero

Program starts from here

The program runs very fast (milliseconds) from one block to another block. So these

two blocks execute almost at the same time.

Servos rotate to open grippersRobot will

move forwardRobot will move forward for 2 seconds

Robot will stop moving

Program ends here

This delay is to allow the servos to finish

rotating

This delay is to allow the servos to finish

rotating

How does the program work?

Servos rotate to close grippers

Page 9: The wareho use receives a batch of goods with the … 5_5a4d9a65dbe57...The wareho use receives a batch of goods with the wor d “FRAGILE ” stamped all over it. Be careful, rero

Challenge

Now let’s apply what we have learned in previous lessons in this challenge.i. Open gripper, then move forward.ii. Check Head-Infrared, if there is an obstacle ~ 3cm in front, stop moving and grip the object.iii. Move forward for 3 seconds then stop the robot and release the object.

Hint: The program runs in milliseconds from one block to another. You may need to introduce a delay of 1-3s in your program so that it has

enough time to execute certain commands.