Nano-Robotics Challenge (NRC)

From EG1003 Lab Manual
Jump to: navigation, search

RFP*: Nano Robotics Challenge(NRC)

* RFP is an acronym for Request For Proposal. Internationally, RFPs are called ITTs, an acronym for Invitation To Tender governmental agencies use RFPs to solicit new business.

This project reflects real life scenarios; the robot must be able to handle minor imperfections in the course.

Introduction and Overview

Nano-robotics is a quickly growing field; robots the size of a nanometer (1*10^-9 m) could very well be the next important breakthrough in medical technology. Currently the interest in nanorobots revolves around their potential application in the medical field to act inside the human body as a cure for various ailments.

The Center of Disease Control (CDC) has recently had an influx of very sick volunteers willing to try out this novel technology. In response the CDC has reached out to engineers and programmers to develop an autonomous nano-robot that can travel through the bloodstream, diagnose health issues, and cure diseases.

Each research group has been provided with a patient. Your group's patient is Jesse. Jesse decided to go for a swim in the Gowanus Canal. We can't be sure what possessed them to do that, but here we are. Provided with information on illnesses that Jesse could have, your group will need to program an autonomous nano-robot to detect, find, and cure all the illnesses present in the body.

Specifications

Jesse is represented by a light-up skeleton located in the EG Modelshop. Jesse contains a program that represents a set of diseases and viruses. Each group of "doctors" working to cure Jesse will be given a set of three, two diseases and one virus, that will need to be diagnosed and cured. Although the "doctors" will be able to see the location of the disease/ virus and how its moving through the body the nanorobot will need to diagnose the Jesse separately, and will therefor need to be soft coded.

The following viruses could be present:

  • Virus Steve - This virus moves through the human body on a set course with easy to follow motions, it will follow a preset path, but stop randomly to take a small break from wreaking havoc on Jesse.
  • Virus Jenny - This virus doesn't move randomly but will take different paths through the body, though it doesn't stop moving.

To cure a virus the nanorobot simply needs to be able to catch it, ie be in the same location (the same led) at the same time as the virus.

The following diseases could be present:

  • Heart Attack - The heart pumps blood through the body. A heart attack occurs when there is a blockage of blood flow into the heart. Oxygen is cut off and the heart begins to die.
  • Kidney Disease - Kidneys filter excess water and waste properly through the body. Kidney disease occurs when the kidneys begin to loose functionality that can result in a variety of health problems.
  • Stroke - When blood supply to the brain is interrupted, the brain cells that lack oxygen and glucose will begin to die.

To cure a disease the nanorobot will need to go through a series of tasks/operations: first the nanorobot needs to be on top of the disease (same led), next the nanorobot needs to get the "status feedback" from Jesse while in that location, if the led is shown to have that disease then the nanorobot needs to call the "start cure" function. Next there will be a "proof of work" for curing the disease which will be a mini task that the nanorobot must complete, then the nanorobot can "submit the cure".

The nanorobot in Jesse's body can be interacted with via an HTTP API as described in Appendix A. Most programming languages have some way to send HTTP requests. For the purposes of this project, Python with the Requests module is recommended. However, for students completely unfamiliar with programming, an instance of Snap!, a graphical programming language maintained by UC Berkeley, is provided.

To learn how to code with the graphical programming language snap click here. If members of the group have more coding experience Python is an available coding option for this projects, learn more about using Python for this project here.

To interact with Jesse, connect to the WiFi network EG_NRC-8913 in the EG Modelshop. Python can be used to directly innteract with Jesse after connecting to the wifi. For Snap! users the Snap! code can be imported to the web address 10.42.0.1:5000/. Coding can be done outside of the Modelshop, but code can only be ran properly while connected to Jesse. Information on the API Specification and using Snap! is available in the Appendices below.

Diagnosis: NRC Part 2

Part 2 can be completed at any time after benchmark B!

Background

The doctors of the group are also required to do a physical diagnosis to determine if the patient is diabetic or prediabetic. The previous blood tests indicate higher blood sugar levels, bellow you will complete a glucose test to determine how the body is metabolizing sugar over time. The patient will consume a glass of sugar water and then samples of their blood plasma will be taken at preset intervals, you will then test these insulin levels and see if they fall above or bellow a healthy level.

If the blood plasma samples turn green with the indicator then the blood glucose levels are above 125 mg/dL indicating diabetic blood sugar levels, any other color indicates blood sugar levels bellow 125 mg/dL and combined with their other blood test will mean they are prediabetic. If the patient remains in the diabetic blood sugar range for at least an hour diagnose them as diabetic. If before the hour mark there blood sugar levels decrease to a normal level diagnose them as prediabetic.

Insulin produced in the pancreas helps maintain heathy blood sugar levels. If the body has a hard time producing insulin or responding to insulin as a hormone in the body the person will have difficulty metabolizing glucose. If blood sugar is a high enough to be concerning but not be diabetic a patient is considered prediabetic.

Equipment

  • 4 tubes of “blood plasma,” these blood plasma samples were taken after the patient consumed a cup of sugar water. Sample A was taken 0 minutes after consuming the sugar water, sample B was taken 30 minutes after, sample C was taken 60 minutes after, sample D was taken 90 minutes after.
  • 1 tube of insulin indicator
  • Droppers

Instructions

Place 2-3 droplets of the indicator into the blood plasma tubes, write down your results on the sheet linked here, then fill out the additional questions on the sheet.

Extra Credit

  • 3D print a Logo for the company
  • 3D print of the representation of the nanorobot (can be as creative as the group wishes but needs to be explained in a reasonable fashion)
  • Diagnosis disease: After completing Part 2 to your SLDP you can receive a code that correlates with your diagnosis which will open up a new disease to cure on Jesse! To receive this code please have your Part 2 form already filled out, grab a TA to monitor your work, and talk to Jesse about their diagnosis. After talking to Jesse about their diagnosis the TA will give you the code to access the extra credit disease.

Microsoft Project

A time management plan using Microsoft Project (MS Project) must be created. You can learn Microsoft Project by doing the MS Project Skill Builder. This plan must include all tasks related to the project. The MS Project schedule should include the following:

  • Minimum of 20 tasks.
  • Milestones should be clearly indicated on the project plan (duration of zero days).
  • Each task must include the person responsible for completing the task (resource names).
  • Use the Copy Picture function to include the project plan in the presentations. DO NOT take a screenshot.
  • Gantt chart must be displayed alongside the tasks list (fit onto one slide).
  • Gantt chart must clearly show a progress line.
  • Clearly state during the presentation whether the project is on time, behind schedule or ahead of schedule

For help in planning the project, review the page called How to plan the schedule and calculate costs for a project.

Workflow Diagram

A workflow diagram is a graphical representation of the intended path of programming and problem solving for a computer science project. It shows a series of tasks that the program will make, for this project it will help students plan out their program and show others the general logic that is going into programming NRC.

This diagram is a flow chart with different shapes representing various coding functions, for the purposes of this project only a few of these shapes are used. The picture bellow explains these shapes and what they mean in more detail.

Figure 1: Functions for Diagrams

For Milestone 1 the workflow diagram will show the programming path for Benchmark A. This workflow diagram will be the most detailed and every decision that is included in the program should be represented. A short example is illustrated bellow, the actual diagram should be much longer.

Figure 2: Detailed Diagram for Milestone 1

Milestone 2 will show a workflow diagram for Benchmark B. Milestone 3 will include a workflow diagram for commissioning. The final presentation will show the actual and final workflow diagram that represents the final program. These diagrams do not need to include every decision make in the coding process and general actions in the code can be grouped together. For example instead of writing out every action taken to go through the "curing process" for a disease students can simply write "cure". A short example is illustrated bellow, the actual diagram should be much longer.

Figure 3: More General Diagram

Milestones and Benchmarks

As you work on your project, you will be required to present periodic reports on your progress. We call these Milestones. All the items assigned in each Milestone are called deliverables. These deliverables often consist of a combination of written submissions, presentations, and demonstrations.

Milestone 1

Prepare a preliminary assessment of the track system using digital logic (truth table, Karnaugh maps, and Boolean equations), a cost estimate, and an MS Project plan.

Look Ahead: What tasks are planned between now and Milestone 2?

See How To Give a Milestone Presentation for the format of a Milestone presentation.

Milestone 1 Deliverables:

  • Presentation:
    • Project description
    • Design approach
    • Mission statement
    • Cost estimate
    • MS Project schedule
    • Workflow diagram
    • Progress update: current state of the project

Presentation notes:

  • Be sure to include any special features and benefits of your design.


Benchmark Assessment A

The purpose of Benchmark A is to demonstrate familiarity with interacting with the API and the ability to do it repeatably through code. For benchmark A, students must:

  • Demonstrate an understanding of the API by building a set of functions (or SNAP! blocks) that allow them to use the API conveniently
  • Demonstrate the ability to login
  • Demonstrate the ability to tick the game
  • Demonstrate the ability to start holding and stop holding
  • Demonstrate the ability to change the direction of the nanobot
  • Demonstrate the ability to reset the game

Milestone 2

Look Ahead: What tasks are planned between now and Milestone 3?

See How To Give a Milestone Presentation for the format of a Milestone presentation.

Milestone 2 Deliverables:

  • Presentation:
    • Project description
    • Design approach
    • Design changes since Milestone 1
    • Workflow diagram
    • Mission statement

Benchmark Assessment B

Students must twice:

  • Cure both diseases present
  • Reset the game

WITHOUT manually interacting with their program.

Milestone 3

Look ahead: What tasks are planned between now and the completion of the project?

See How To Give a Milestone Presentation for the format of a Milestone presentation.

Milestone 3 Deliverables:

  • Presentation:
    • Project description
    • Design approach
    • Design changes since Milestone 2
    • Mission statement
    • Workflow diagram
    • Cost estimate (previous and current). What changes were made?
    • MS Project schedule (previous and current). What changes were made?
    • Progress update: current state of the project (time, budget, etc.)

Commissioning

In order to commission students must twice:

  • Cure the virus
  • Cure both diseases
  • Must be one continuous program
  • Reset the game

WITHOUT manually interacting with their program.

Final Presentation

The final presentation will be a technical briefing, similar to the milestones, but also serves as a sales presentation explaining why your company should be selected instead of the competition. Please include the following:

  • Problem statement
  • Solution overview
  • Company description and qualifications
  • Source code of program
  • Cost estimate
  • Microsoft Project schedule
  • Video demonstration
  • Why should the company be awarded this contract?

Submission

All SLDPs must submit online. Please visit https://eg.poly.edu/finalSLDP.php for login information and the link to the Project Submission form.

Students must be logged into the account provided at https://eg.poly.edu/finalSLDP.php. Submitting with your NYU account or any other account will generate an error.

Submissions may be edited at any time before the deadline. Please note that submission times are based on the last submission. Submissions that qualify for Early Submission will lose the Early Submission Extra Credit if the submission is edited after the Early Submission deadline.

Please note the deliverables for this project are as follows. If any of the following items are omitted, you will be penalized. Be sure to click SUBMIT at the bottom of the form.

  • Project deliverables:
    • Final presentation
    • Final program
    • Final MS Project Schedule
    • Final cost estimate
    • Resume(s) (No fictitious resumes will be accepted.)

Early Acceptance

If you submit your project one week early, you are eligible for a bonus that will be added to your final semester-long project grade. You must submit all deliverables one week before the submission deadline (see syllabus for exact date). The deliverables received early are the ones you will use in your presentation. No adjustments to the deliverables submitted will be accepted.

Late Submission

Late submission is not allowed. If you do not commission or partial commission by the deadline set forth in the syllabus, you will not be allowed to submit and will receive a 0 for the project grade. In order to receive partial commissioning, two TAs must analyze the project and determine its level of completeness in terms of commissioning requirements. Please refer to the EG1003 Grading Policy for more information.

Appendix: Programming NRC

NRC can be interacted with via an HTTP API. Most programming languages have some way of making HTTP Requests. For NRC, we recommend using Python with the Requests module. There are a number of resources on-line that can help you learn about these tools.

For students with absolutely no programming experience, we also provide a graphical programming interface, Snap!. Snap! is based on the Scratch project and provides a drag and drop environment to put together code. The instance of Snap! used to interact with NRC is available at 10.42.0.1:5000/. The reference manual for Snap!, that includes information about the basic use of Snap! and any advanced operations you may need is available here as a PDF. Note: In order to interact with NRC via Snap! you will need to go to the file menu (on the upper left), to Libraries, and then select the "Web services access (https)" option.

The API Specification for NRC is as follows:

All URLs for NRC follow the following format:
    http://10.42.0.1:5000/<command-family>/<username>/<secret>/<action>/<index>

    http://10.42.0.1:5000/
        The base URL is the IP address of the Raspberry Pi running the webserver

    <command-family>
        There are two command families currently in use, login and game.
        login -> handles logging in
        game -> handles game interaction

    <username>/<secret>
        These fields are used to "authenticate" your game.
        username -> your netid
        secret -> a string set during login.  This CAN be different between games, it is set by
            the user, not the game itself

    <action>
        These fields are the actual interaction with the game.  Unless otherwise
        specified, they are POST requests that return a json object with a returned status.

    <index>
        Some actions require you to specify WHICH thing to take.  This is done by providing a numerical index.

Logging in:
    Make a POST request to http://10.42.0.1:5000/login/<username>/<secret>/<benchmark>
    Where username is your NetID and secret is a secret of your choosing.  The benchmark corresponds to the
        current benchmark being attempted.  Note that for our purposes, commissioning is benchmark C.


<action> list: 
    /tick
        POST request.
        Progresses the game forward by one unit of time, here called a tick.
        Returns a one item json object with the status of the tick

    /start_holding
        POST request.
        Causes the player character to "Hold." The player will temporarily stop moving through the graph.
            Holding has a limited length of time it can be applied.

    /stop_holding
        POST request.
        Causes the player character to release a possible "Hold".  The player character will begin moving again.

    /select_direction/<index>
        POST request.
        The next time the player character can choose their next path they will go down the path in the list with
            the specified index.  Indices begin at 0.  If the selected index is greater than the length of the list
            the player character will go down the last path in the list.  This is NOT automatically cleared and will
            remain until manually reset.
        Returns a one item json object confirming the direction selected.

    /attempt_heal
        POST request.
        Available when the player character is in the same node as a disease.   Begins the proof of work process for curing
            the disease.  Returns a json object with a list in it.  The first element of the list is the challenge.  The
            remaining elements of the list are the operands for the challenge.

    /heal_solution/<solution>
        POST request.
        Solution belongs in the <index> field of the URL.
        Available only after the player character has called attempt_heal.  Must be called IMMEDIATELY after attempt heal, i.e.
            no other command can be called between attempt_heal and heal_solution.  This also AUTOMATICALLY ticks the game.
    
    /get_status
        GET request.
        Returns all of the available status for the player character in a json object.  The schema is specified below.
    

status json object schema:
    "player_postition"-> the name of the node the player character is currently in
    "options"-> the list of nodes the player character can go to next
    "number_of_options"-> the length of the options list
    "score"-> the current score
    "round_number"-> the round number/number of ticks that have occurred
    "rounds_remaining"-> the number of ticks left in the game
    "holding"-> True if the player is holding, otherwise False
    "holding_time_remaining"-> The number of rounds the player could hold
    "bot_visible"-> True if the bot character is within sight of the player character, False otherwise
    "bot_location"-> The name of the bot's current location if it is visible