Ops Manager: Project

Site: GoLabs
Course: Robotic Challenges with Python and GoPiGo
Book: Ops Manager: Project
Printed by: Guest user
Date: Thursday, 21 November 2024, 12:25 PM

Description

This is the fourth challenge within the Robotics with GoPiGo and Python Curriculum.

Your task is to design a robot program that increases the volume of products that Amazing.com can ship out to its customers on a daily basis without increasing the number of robot pickers it employs.

Learn how to program and calibrate the Line Follower while they try to design an efficient system.

1. The Challenge

Amazing.com’s robot workforce currently uses a Bang! Bang! controller to navigate around the warehouse. It was quick and easy to get the operation up and running when it was a small operation. Up until now, this has got the job done with little fuss. However, with sales rising fast the robot pickers have now hit their maximum stock-picking capacity.

Your challenge is to develop a more efficient line-following algorithm that can follow a line-marked route across the warehouse between the stock shelves and the packing area to collect 3 items from the stock shelves and return them to the packing area in the shortest possible time.

          • You can only transport one item at a time.
          • You can manually place an item in your carrier when the stock picker reaches the stock shelf and remove it when it arrives at the packing area. 
          • Your stock picker must pause for 3 seconds at each end of the route to allow for manual loading and unloading.
          • Your code must perform an initial time check when the code starts and record the elapsed time in your notebook when it returns to the packing area for the third time.

2. Construct the Route

Construct a warehouse route map for your stock picker to follow by taping together printed line follower template sheets. The route map design below is a suggestion.


If you are working  on your own, you are free to design and construct a route map of your own.

If you are part of a camp, or school activity, your educator may suggest a set route.

3. Make a Container for the Warehouse Picker

Warehouse stock pickers need something to carry the items that they pick from the shelf to the packing department.

          • Create a container to hold the items that you will be picking.

You could use :

          • a plastic tub,
          • a cardboard box,
          • a bespoke designed lego box ,
          • whatever seems appropriate for you.


Make sure that this box is securely attached to the robot’s chassis so that it doesn’t drop its items in transit.

Pro Tip: The chassis holes are great for inserting lego rods into or threading cable ties, pipe cleaners or string through.

4. Instruct Your Robot

In the LEARN section you implemented a Bang! Bang! controller. There is a more efficient way to follow the line that gives you a faster straight line speed and allows you to corner at higher speeds without losing the line. The more efficient you can make it, the faster your robot can pick items from stock and the more items your warehouse can pack in a day.

          • Amend the code you used in the LEARN section to improve the behavior of your warehouse stock picker.
          • Use the line follower’s position_val() function, which can tell you how far you are from the line, to code up a proportional controller, where the magnitude of steering is proportional to the line’s distance from the center.

See the LEARN section for details of this line follower function and a recap of some driving functions that you may find useful in this challenge. Or download the (same) files directly from here if you need to reference them.

5. Small Hints

Here are a couple of hints to get you started.

          • Substitute picker.position() with picker.position_val(). Instead of simply getting left or right, you now get a number telling you how far left, or how far right the robot is from the line.
          • Investigate using picker.steer(0,100) or picker.steer(100,0) instead of picker.right() and picker.left().
          • Can you change the 0in the steer() method to another value to get smoother turns, depending on how far the robot has to correct course?
          • Look at this table that spells out the different situations. What you need to do is come up with appropriate values for S in order to optimize the robot's course.


How you calculate that S value is up to you.

When S is equal to 0, you get the bang! bang! controller behavior that you saw in the Learn section.

When S varies according to the distance away from the line, you are now dealing with what's called a proportional controller.

6. Try It Out

If you think you're ready, you can move on to the Try It Out lesson which has a couple more details to work on.