Giter Site home page Giter Site logo

mc4bot's Introduction

MC4BOT

C++ code for the Ohio State Fundamentals of Engineering Honors robot project

Table of Contents

  1. Introduction
  2. Setup
  3. Capabilities
  4. Future Improvements
  5. Permalinks
  6. License

Introduction

Background

Each year, Ohio State's Fundamentals of Engineering Honors (FEH) classes participate in a semester-long project to build a robot. The goal of the robot is to complete that year's challenge course, constructed by the Engineering Education Department (EED) staff and teaching assistants, in under 2 minutes. I wrote most of the code for my group's robot, pictured below.

Team M4 Robot Picture

A picture of the course layout (courtesy of the EED) for our class (Spring 2019) is also included at the end of this paragraph. Tasks included reading light colors, pushing and holding buttons, flipping levers, moving score sliders, and depositing a token into a slot. A full description of the challenge scenario can be found in this document from the EED.

Course Layout Design

Results

Our robot had noticeable mechanical issues from its tread-based drivetrain, but this code was able to drive the robot to a perfect run during the final competition. A video of this run can be found here. A full video of the competition can be found on YouTube.

Setup

This code is intended to be compiled to an S19 file for the Proteus controllers used in the FEH classrooms. The Proteus is built on a Freescale Kinetis K60 (ARM Cortex M-4) and other components as described on this page.

OSU's Proteus wiki page describes how to set up the standard development environment. Other IDEs (I used VS Code) and platforms will also work through modification of the project Makefile and installation of the GNU Arm Embedded Toolchain, OSU's FEH Proteus firmware, and Freescale Semiconductor's Embedded Warrior Library (EWL).

Capabilities

This project implements many features for the robot, including:

  • Per-course path variance adjustment during initialization
  • Proportion-based adjustment for straight driving
  • Both single-movement and pulsed correction for X-position, Y-position, and course Heading based on FEH's "Robot Positioning System" (RPS)
  • Error tolerance and sampling for RPS X-position, Y-position, and Heading values
  • Acceleration-mapped driving to speed up and slow down the robot based on percentage of movement complete, with safe fallbacks
  • Timeouts for start light and encoder-based drive functions
  • Micro SD card logging for post-run debugging
  • Screen status updates
  • Movement functions for driving(forwards/backwards), turning, and curving based on both time and distance (through encoder count calculations)
  • Thorough test functions to show successful operation of the robot's drivetrain, servos, sensors, and other code functions

Future Improvements

A number of possible features could improve operation of the robot, including:

  • Increased motor speed values, ideally after testing to confirm effects on consistency
  • Improved calculations for position checks around the lever. Currently the robot functions fine there, but loses some time
  • Simulation of RPS lag, rather than costly (in terms of time) sleep statements. This idea was used by team M3 during the competition
  • Full PID feedback for straight driving, after testing to confirm feasibility with treads
  • Decreasing adjustment movements after overcorrections
  • Better error tolerance for the case in which one encoder completely breaks during a run

Permalinks

Links in the above text were live at the time I originally published this repository. In the event that link rot should occur, I have verified that the following links point to the intended content. The links make use of the Internet Archive's Wayback Machine.

Proteus Hardware

Proteus Development Environment Setup

GNU Arm Embedded Toolchain

Proteus Firmware

Embedded Warrior Library (EWL)

License

This code is free to use and available under the GPLv3 license. Full license text for this project is located in the LICENSE file.

mc4bot's People

Watchers

 avatar  avatar  avatar

mc4bot's Issues

Add debug output to functions

Output all actions to LCD so we can tell what is occurring and what isn't
EDIT: LCD should include some info, SD card should contain much more verbose log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.