Coder Social home page Coder Social logo

jonlamb-gh / oxcc Goto Github PK

View Code? Open in Web Editor NEW
18.0 6.0 5.0 233 KB

A port of Open Source Car Control written in Rust

License: Apache License 2.0

GDB 0.46% Shell 0.26% Rust 99.23% RenderScript 0.04%
rust rust-embedded stm32 stm32f767zi autonomous-vehicles autonomous-driving nucleo-f767zi can-bus bootloader no-std

oxcc's Issues

Disable controls globally when any faults are detected

Now that all of the modules (brake, throttle and steering) are on a single chip, they no longer need to respond to other modules fault CAN messages in order to disable themselves.

Instead, we can report up when a fault is detected in a given module and disable controls for all.

Should control command timeouts be re-implemented?

Some discussion on OSCC control command timeouts in this PR; they were removed.

Is that a reasonable claim? What happens when the last throttle command was non-zero and no further control commands (or any CAN frames) are received?

We have plenty of cycles to burn, and it would be pretty easy to re-implement that logic.

Compatibility with Sensor Interface, VCM, and Gateway Boards

If my assumption correct, the signal paths for those boards don't change per PolySync released. Is this valid assumption? The Nucleo board outer pinouts serve as Arduino pinouts. I haven't taken a greater look in the code but it does utilize MCP's and DAC's stuffs from Arduino boards.

Downgrade ADC resolution to 10-bit so users don't have to re-calibrate vehicle configurations

While it would be great to use the full 12-bit ADC resolution; this requires existing users to re-calibrate their existing vehicle configuration data which is not very convenient.

For example, the constant ACCELERATOR_OVERRIDE_THRESHOLD is a calibrated value in the 10-bit range.

My initial porting effort set things up with full 12-bit resolution, and I just shifted the constants.
Those changes should be restored with this effort.

AIN signal to DAC output mapping inconsistent between brake, throttle and steering modules

All of the modules should have a consistent mapping between the analog input hight/low signals and the DAC output A/B channels.

I think the mapping should be:

  • AIN signal high maps to DAC channel A
  • AIN signal low maps to DAC channel B

Currently the brake and throttle modules are inverting the mapping when they
call the prevent_signal_discontinuity() function.

The steering module seems to be using them correctly.

TODO Confirm this is a bug in the OSCC firmware or just a hardware pin mapping issue.

Can we do away with high/low and just have A/B for both input and output?

Runtime configuration

It would be handy if users could modify parameters at runtime.

The bootloader I put together already has some configs in flash. It would be easy to reserve a (partial) sector of flash for user firmware configuration parameters.

An initial effort could likely just provide a simple flash get/set framework over CAN; a proper XCP implementation could be done too.

Determine a reasonable ADC sample time

OSCC was likely using the default Arduino ADC configuration, which could be along the lines of ~104 microseconds per analogRead().

OxCC is currently using a prescaler/cycle-time combination that gives 27.33 microseconds per sample.

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.