Coder Social home page Coder Social logo

mars-rover's Introduction

mars-rover

Final Project for CprE 288: Embedded Systems (Spring 2014)

By Diamondstone and the Diamondstuds:

Control Module

Requirements:

  • python3
  • pyserial
  • numpy
  • matplotlib
  • scipy
  • ipython (recommended)

The testing environment was Mac OS X 10.9.2 Mavericks.

mars-rover's People

Contributors

asr1 avatar aore avatar dwtj avatar fcavalcanti avatar

Watchers

James Cloos avatar  avatar

Forkers

fcavalcanti asr1

mars-rover's Issues

`watchman` has been disabled

As of commit 52d6a6d0d4db, the watchman functionality of the sentinel object has been disabled. This is because it is not able to correctly parse unexpected messages from rover, and this functionality is low priority. In hindsight, this functionality was not important to our core goals.

To be clear, it was effectively disabled by editing sentinel.start_watch() to prevent the start messages from ever being sent to the aux_thread.

Speeding up serial transmission from control to the rover.

On my system, OS X 10.9, it was necessary to slow down the transmission of characters coming from control in order to prevent data overrun errors from occurring on the rover. The workaround was calling the serial connection's flush() method after every character written. This made transmission to the rover extremely slow. Fortunately, on Anne's system (also OS X 10.9), flush() does not seem anywhere near as slow. I do not know why this might be.

Debugging the ping demo.

The current problem with the ping demo seems to be that when the start byte is not being correctly transported from control to rover. It is somehow becomes some garbage value, which varies from trial to trial.

Consolidate `ir_reading_handler()` and `sonar_reading_handler()` into `dist_reading_handler()`

There is very bad code duplication between ir_reading_handler() and sonar_reading_handler(). This should be resolved by making a single handler that manages both. It could be called dist_reading_handler(). This generic handler could be passed function pointers to raw and converted readings functions, or an enum could just be used to indicated which subsystem should be chosen as the readings source in the handler code.

Need to Wait For Servo Movements to Complete

When setting the servo angle from control, the handler does not block until it is known that the servo has indeed reached its new value. This could be problematic if scans start before the desired angle was reached.

control: Refactor to give possession of the serial connection to a sentinel thread.

Ownership of the serial connection in control should not be with the main execution thread. It should instead be moved to what is currently the aux thread. That thread should be renamed to sentinel

The idea is that while the main thread is idle, the sentinel will be monitoring the serial connection for unexpected messages. Then, when the main thread is active and wishes to use the serial connection, it sends a message to sentinel asking for control of the serial connection. Then, once the sentinel has signaled to main that main has control of serial, sentinel will accept queue-delivered requests from main to both read and write bytes to the serial connection. After main is finished sending and receiving messages, it will send a message to sentinel that it should continue monitoring for unexpected messages.

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.