Giter Club home page Giter Club logo

jamautokart's Introduction

JamAutoKart

jamautokart's People

Contributors

mavabene avatar

Watchers

 avatar

jamautokart's Issues

Suggestions

  1. Function abstraction

write a class that takes care of updating the raw sensor data instead of
https://github.com/mavabene/JamAutoKart/blob/main/EncoderVandA/src/main.cpp#L39 to https://github.com/mavabene/JamAutoKart/blob/main/EncoderVandA/src/main.cpp#L43 where you do it manually in the main.cpp file

  SteeringPot->SensorVal = getAnalogInt(STEERING_ANGLE_POT);
  SteeringPot->Setpoint = 30;
  CtrlLoop(SteeringPID,SteeringPot,SteeringMotor);
  current_angle = SensorInputToUnitsFloatPtr(SteeringPot);
  SteeringPot->EngVal = current_angle;

  1. extract config variables all to a single file, such as time interval for getting dx
    https://github.com/mavabene/JamAutoKart/blob/main/EncoderVandA/src/main.cpp#L75
  SteeringPID->Kp = 4;
  SteeringPID->Kd = 1;
  SteeringPID->Ki = 0;
  SteeringPot->SensorMin = 350;
  SteeringPot->SensorMax = 850;
  SteeringPot->MinEngVal = -45;
  SteeringPot->MaxEngVal = 45;
  1. use more verbose variable naming
if (init1==true)
    {
      
      init1=false;
    }

what does ini1 mean?

  1. it's okay to debug, but put debug code in a seperate function plz, to reduce the amount of code in the main loop
    Line 35-73

  2. provide documentation for functions in header fileshttps://github.com/mavabene/JamAutoKart/blob/main/EncoderVandA/include/utilities.h#L101

  3. arduino level just process raw data, don't do any PID controls. Let's do it in ROS
    void CtrlLoop(PidLoop *loop, Sensor *sens, Actuator *act)

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.