SummaryIn this culminating activity of the unit, students bring together everything they've learned in order to write the code to solve the Grand Challenge. The code solution takes two images captured by robots and combines them to create an image that can be focused at different distances, similar to the way that humans can focus either near or far. They write in a derivative of C++ called QT; all code is listed in this activity.
For a robot to be useful, software must be written to enable it to perform its functions. This is one of the main phases in the design and construction of robots. In this activity, students write the software for their hypothetical robot. In a real-life situation, computer programmers would work closely with electrical and computer engineers in designing the software for the robot to function as intended.
Familiarity with QT and the basic functions within the QT libraries imageloader, QtGui, QString, cmath and QVector.
After this activity, students should be able to:
- Initialize a two-dimensional array.
- Initialize a new instance of a vector class.
- Store RGB values in a vector.
- Read data from the vector and write it to a new image.
- Create, compile and test code that addresses the Grand Challenge.
- Explain how this code writing process is similar to what a computer science engineer "does."
Tennessee State Standards for C++ Programming Applications (2005)
- Standard 5.0 - The student will write and document an executable program in C++ programming language.
More Curriculum Like This
This unit leads students through a study of human vision and computer programming simulation. Students apply their previous knowledge of arrays and looping structures to implement a new concept of linked lists and RGB decomposition in order to solve the unit's Grand Challenge: writing a program to s...
Students are introduced to the Robotics Peripheral Vision Grand Challenge question. They are asked to write journal responses to the question and brainstorm what information they require in order to answer the question. Students draw a basis for the average peripheral vision of humans and then compa...
Students analyze a cartoon of a Rube Goldberg machine and a Python programming language script to practice engineering analysis. In both cases, they study the examples to determine how the different systems operate and the function of each component.
During this lesson, students start to see the data structure they will use to store their images, towards finding a solution to this unit's Grand Challenge. Students are introduced to two-dimensional arrays and vector classes.
Each TeachEngineering lesson or activity is correlated to one or more K-12 science,
technology, engineering or math (STEM) educational standards.
All 100,000+ K-12 STEM standards covered in TeachEngineering are collected, maintained and packaged by the Achievement Standards Network (ASN),
a project of D2L (www.achievementstandards.org).
In the ASN, standards are hierarchically structured: first by source; e.g., by state; within source by type; e.g., science or mathematics;
within type by subtype, then by grade, etc.
Each TeachEngineering lesson or activity is correlated to one or more K-12 science, technology, engineering or math (STEM) educational standards.
All 100,000+ K-12 STEM standards covered in TeachEngineering are collected, maintained and packaged by the Achievement Standards Network (ASN), a project of D2L (www.achievementstandards.org).
In the ASN, standards are hierarchically structured: first by source; e.g., by state; within source by type; e.g., science or mathematics; within type by subtype, then by grade, etc.
- Use a computer simulation to model the impact of proposed solutions to a complex real-world problem with numerous criteria and constraints on interactions within and between systems relevant to the problem. (Grades 9 - 12) Details... View more aligned curriculum... Do you agree with this alignment? Thanks for your feedback!
Each group needs access to a computer and supporting software (QT) for writing code.:
In this activity, you will take all the lessons taught up to this point and combine the knowledge and skills you have gained to write the code that provides a solution to the Grand Challenge. This will fulfill the "research and revise" and "test your mettle" steps of the Legacy Cycle as you learn about the coding, write it yourself, test your program by running it, and revise until it is functional. Finally, being able to show your functioning program meets the "go public" stage of the Legacy Cycle as we finally answer the Grand Challenge.
Let's recall the Grand Challenge: "The Wall-e robotics firm thinks it has a unique and novel solution for getting a broader spectrum of usable data. Instead of using a single camera, they mounted on the top of the robot two cameras at different focal lengths. The first camera provides an up-close and detailed image (however, this image lacks surrounding data) and the second camera provides a broader view with less detail. However, they need this data to be usable by a humans. Right now a person must look at two separate pictures. Could you somehow combine those images to simulate how a human's vision would focus in and out of the two focal lengths? How would you accomplish this task?"
You will write the code in QT, a language similar to C++. Let the coding begin!
code: File(s) of statements written in one of many human-readable programming languages that are used to manipulate computers to perform many different actions.
QT: A coding application that runs off an enriched version of C++.
Before the Activity
- Arrange for the necessary computer and software access for six class periods.
- Make sure that the computers are working.
With the Students
- Present the Introduction/Motivation content to the class.
- Have students list the concepts they now understand that will help them write the code. Expect these to include information about vision, lenses, digital images, color formats and arrays, as well as concepts such as focal length, foveal vision, peripheral vision, pixel, RGB, hexadecimal and subscript. Indicate that this is the sort of background information software engineers and computer science engineers might need to learn about if they were given the Grand Challenge as an engineering project. Tell students that they will be performaing as computer science engineers as they write a code solution.
- Remind students of the time limitations for this activity. Give them six class periods to write code, test it and deploy the program.
- Remind students of the Learning Objectives (write them on the classroom board or a place where they can easily see them throughout the activity).
- Divide the class into groups of three students each. Oversee and guide the students to write, test and improve until they obtain a functioning code solution.
Functioning Code: Assess student groups on the success of their completed programs. See the Suggested Program Code Solution for a programming solution algorithm that students should work towards developing.
"Programming Code." Last updated June 20, 2010. Wikipedia, The Free Encyclopedia. Accessed June 20, 2010. http://en.wikipedia.org/wiki/Programming_code
ContributorsMark Gonyea; Anna Goncharova; Rachelle Klinger
Copyright© 2013 by Regents of the University of Colorado; original © 2010 Vanderbilt University
Supporting ProgramVU Bioengineering RET Program, School of Engineering, Vanderbilt University
The contents of this digital library curriculum were developed under National Science Foundation RET grant nos. 0338092 and 0742871. However, these contents do not necessarily represent the policies of the NSF, and you should not assume endorsement by the federal government.
Last modified: September 5, 2017