Robot Lab 2v2

pdf

School

University of Toronto *

*We aren’t endorsed by this school

Course

422

Subject

Computer Science

Date

Jan 9, 2024

Type

pdf

Pages

8

Uploaded by ColonelSummerCat37

Report
ROBOTICS LAB 2 for Automated Manufacturing MIE 422S © Copyright by A. Wolf, S. Maligec, R. Ma, K. Leung, H. Chu, Prof. J.K. Mills, Prof. B. Benhabib, 2010. The material contained in this document is the exclusive property of the Department of Mechanical and Industrial Engineering, University of Toronto.
MIE422S Robotics Lab 2 1 LABORATORY 2: APPLYING THE BASICS Objectives: Students will program the robot to solve a carnivore, herbivore, vegetarian foodstuff puzzle (more commonly known as a cat, mouse and cheese or fox, chicken and corn puzzle). Students will be evaluated on the correctness of their solution (including the proper use of subroutines), on how well the robot places the objects and on how quickly the program is executed. Material Required: Stopwatch or watch with a seconds counter Carnivorous Coyote Herbivorous Road Runner Bag of feed Solution to the puzzle, as worked out before the lab period by the student SCORBOT-ER4pc robot Controller SCORBASE Level 3 software Procedure: Start up the computer, the controller and the SCORBASE software. Home the robot. The game scenario is as follows: Farmer Bob wishes to transport his beloved pet coyote, his speediest road runner and a bag of feed across a river. Being a cheapskate, Farmer Bob made his own raft in which to get everyone across the river. His raft is small and flimsy, so he can only transport one item at a time across the river. He cannot leave the road runner alone with the feed because the road runner is a glutton and he will eat it, leaving nothing for Farmer Bob’s other animals back at the farm. He cannot leave the coyote alone with the road runner because the coyote will eat him, which will cause Farmer Bob a great deal of distress. What is the best strategy for Farmer Bob to use in order to get everyone safely across the river? You are also operating under the following constraints: The robot can only move objects in and out of the raft. The conveyor will move the raft back and forth. Movement of the animals in to and out of the raft, and the movement of the raft across the river must be done by means of subroutines.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
MIE422S Robotics Lab 2 2 Write a program to solve the puzzle, and teach the robot all the positions it will need in order to execute the program. You should require no more than 20 positions in order to solve the puzzle. All objects should be upright at the end of your program’s execution. Notes on the Conveyor: You can move the conveyor just as you would any other robot axis using the Manual Movement window. The conveyor corresponds to Axis 7. XYZ coordinates cannot be used with the conveyor. You will have to record any positions in which the conveyor’s position will have to change in joint coordinates. Notes on Subroutines: Subroutines are called in the main program using the Call Subroutine command (the shortcut is typing cs ). A dialog box should appear asking you which subroutine you wish to call. Once the subroutine is finished, the program will jump back to the first line of code after the Call Subroutine command in the main program. Subroutines must be defined at the end of the main program. The command to define a subroutine is the Set Subroutine command (the shortcut is typing ss ). A dialog box should appear asking you for the name of the subroutine you wish to create. The subroutine’s name must begin with a letter. Once you have selected a name, a line of code will appear in the edit window stating that you’ve set the subroutine. Any code written from that point on will belong to your subroutine. To end the subroutine, use the Return Subroutine command (the shortcut is typing rs ). A line of code should appear stating that you are returning from the subroutine.
MIE422S Robotics Lab 2 3 Useful Commands in Scorbase SS Set Subroutine Creates a new subroutine with the name specified in the entry. Every subroutine must be created at the end of the main program. RS Return from Subroutine At the end of the subroutine, type Return (RS) to declare the end of the subroutine CS Set Subroutine In the main program, type CS to call the subroutine that is defined in the program Sample Subroutine (Beginning of the main program) CS Subroutine1 (Run the code written in the Subroutine1) SS Subroutine1 (Define the subroutine at the end of the main program) RS (Enter the code of the subroutine) Reference: Scorbase User Manual, Catalog #100342, Rev. G, Intelitek Inc.