PolarRobotics / PolarRobotics/PR-ESPIDFCodebase

DriveStraight (Encoder)

Open
#16 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
9
Forks
1
Avg merge
14m
Merged PRs (30d)
3

Description

Project Goal

The goal of this project is to make a Combine program specifically for the shuttle drill that will assist or completely perform the actions that a regular driver would.


Considerations

  • We have CL control available in a very rough and basic form from Mechatronics with Dr. Funke
    Link: https://drive.google.com/drive/folders/1DJQNfQaiD1RDpLIgE63Gqkf9GAiqQY4K?usp=sharing

  • There should be a way to increase or decrease the aggressiveness of the acceleration value because this will only work as long as the wheels do not slip.
    (We want the program to ride this line of accelerating fast but not too fast.)

  • The control loop should handle everything in terms of velocity until it achieves positional targets, then send velocity towards zero.

  • Program the controller so that it doesn’t let the wheel counts differ by more than some defined constant so that we don’t veer too far off of target.


Program Stages and Targets

  • This is a macro, so start once button is pressed.
  • Set current position and count to 0.
  • Set target to a value in front of the robot.
  • Run until robot achieves that position.
  • Set position to a position twice as far behind the robot.
  • Run until robot achieves that position.
  • Set position to zero.
  • Run until robot achieves that position.
  • Exit.

MVP Goal

Minimize the amount of time it takes to complete the Shuttle Run, and minimize the contact with cones along the path of travel.

When complete, transition into final DriveStraight Implementation.


Subtasks
  • Integrate encoders with program to record current motor RPM
  • Implement Funke's velocity control algorithm
  • Tune Values for velocity control until it seems good enough
  • Add the ability to tune acceleration aggressiveness with a constant
  • Add the ability to run the program until a certain value is achieved
  • Tune PID values and acceleration aggressiveness until it drives straight
  • Add the backwards driving function and repeat testing
  • Implement full program and tune distances to achieve good times in the combine

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name files, tests, or entry points. Start by locating the encoder integration and velocity-control code, then review how motor positions, RPM, PID values, and macros are currently handled. Done means the listed stages and subtasks are implemented and the shuttle run meets the stated speed and cone-contact goals.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot, robotics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.