Class Meeting 07: Advanced Blockly II


Learning Goals



Lecture Overview


Here is a link to the presentation slides for today.

Today's Timeline


Programming Exercise #1: Getting the first joint pair to work together.


In this first exercise, get some hands on experience with measuring joint angles and using that measurement to move other joints. To begin, build a ClicBot that has 6 joints with the base, a long arm, a gripper, and a brain, as pictured below.

ex 1 plain build

Then, create a new program that measures the angle of joint A (pictured). HINT: use the "detect servo angle" sensor in the sensors tab.


Once you're familiar with how the angle reading of joint A changes as you rotate the joint upon its axis, add additional logic to make joint B mimic the movements of joint A.

HINT 1: you can use constant offsets to account for the angle difference in which joint A and joint B start at.

HINT 2: is your logic correct but the program not doing anything? Maybe it is doing something really but just doing once, really quickly that you didn't notice. How do you get it to keep doing it?

Blocks you might need

exercise 1 build with joints labeled

This is what your finished product should do.

final gif
Discuss as a group: Once you're done, compare your program with your neighbors - are there any drastic differences? If so, what do you think contributed to this disparity?

Programming Exercise #2: Please pair up with your neighbor and build a big robot


IMPORTANT: In order to ensure that everyone in the group has a chance to participate, please refer to the Group Assignment Sheet to see who is responsible for which task. Please check with an instructor when you're done with each task.

Please build the following robot as pictured below. Note: you will need to borrow your neighbor's joints to make this work.

This robot will require 9 joints, 1 long arm, 1 gripper, 1 brain, and 1 smart foot. Once you're settled in with your combined group, raise your hand and we will hand you a smart foot.

ex 1 plain build
ex 1 plain build

Programming Exercise #3: Program 3 of the Big Robot's joints


Please refer to the following diagrams for the correct joint pairing. Note that there are 2 vertically rotating joints and 1 horizontally rotating joint. The exercise is broken down into 3 parts, 3.1, 3.2, and 3.3. The individual assigned to each task must complete that task, discussion with the team is encouraged.

Subtasks:

  1. Blue joint pair
  2. Green joint pair.
  3. Red joint pair.
ex 1 plain build

Here's a demo of what your end product should be able to do. Note: Your implementation doesn't have to be exactly the same, as long as it does something similar, you're good.

ex 1 plain build

Blocks you might need

Discuss as a group: This exercise will likely challenge your debugging skills. It's important to note that there are usually multiple ways to solve a problem - I would encourage y'all to try whatever comes to mind!

Programming Exercise #4: Program the Gripper & Smart Foot


You're nearly done! The last thing you'll need to program as a group is the gripper and the smart foot. Your program logic should aim to open/close the gripper based on pressure input on the smart foot. Note: the units of force used by the smart foot is Newton

Here's a demo of what your end product should be able to do. Note: Your implementation doesn't have to be exactly the same, as long as it does similar things, you're good.

ex 1 plain build

Blocks you might need


Programming Exercise #5: Optimizing Your Program and Powering Up Your Robot Build


Now that you're done with building and coding the Big Robot, take turns trying to pick up blocks and drop them into the Accessories box.

This is also a good opportunity to fine tune your program so that it behaves exactly like you want it to. You're also encouraged to modify the structural design of your robot by adding additional joints, grippers, etc. This will give you an edge in the competition you'll have against your neighbors in the next exercise. Winners will get prizes! Feel free to check out the rules in Exercise 6.

ex 1 plain build

Programming Exercise #6: Battle of the ClicBots


Challenge your neighbors to a battle! Please ask your instructors who your team should battle against.

The objective of this game would be to score the most points by picking up blocks and placing them into your team's box. The different blocks are worth different number of points!

If you manage to decapitate your opponent's robot, your team will win by knockout!

ex 1 plain build

Today's Exit Ticket


Here's a link to today's exit ticket survey. The exit ticket will ask you for: