Giter Club home page Giter Club logo

holonomiclib's Introduction

GitHub GitHub all releases Website Website

HolonomicLib

HolonomicLib is an open-source PROS (C++) library for VEX robots. The library specializes with holonomic drivetrains (ex. X-Drives or Mecanum Drives).

Installation

Use the PROS CLI to install HolonomicLib (if you installed PROS correctly, you do not need to install the CLI separately).

  1. Download the latest version of HolonomicLib (it should be HolonomicLib@VERSION_#.zip).
  2. Run the following in the root of your project:
pros conductor fetch HolonomicLib@VERSION_#.zip
pros conductor apply HolonomicLib
  1. Add #include "HolonomicLib/API.hpp" to your header file

Installation steps are also found in the documentation.

Usage

For step-by-step usage, follow the documentation.

For more specific usage, follow the API.

Contributing

Pull requests are welcome. Experimental changes should go to the development branch until deemed stable. For major changes, please open an issue first to discuss what you would like to change. For both issues and PRs, please follow the issues/PR template.

Please make sure to update tests as appropriate (that is, if tests get made).

License

GPL-3.0

holonomiclib's People

Contributors

jazonshou avatar ryan4253 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

holonomiclib's Issues

Refactor the X Drive Controller

The code needs some heavy refactoring.....

I currently see

  • Race Conditions
  • Unnecessary variables
  • Algorithms that can be better designed

Add Pneumatic Class

The pneumatic wrapper we used last year were very useful. Maybe we can add it into this lib as well since we will be using it this year. It is your call however since it is not actually directly connected to holonomic chassis control.

Switch to pure pursuit for path following

The current TimedTrajectory usage doesn't make much sense since we are not following the profiled velocity and simply using pid to move toward the target point. This means that the time it provides actually wouldn't make much sense in the first place.

It is probably better to use something purely feedback based like pure pursuit to follow discrete waypoints. The main issue associated with pure pursuit, the end position / settle angle wouldn't be much of an issue with holonomic drives, meaning pure pursuit can be very robust for holonomic drives.

[BUG] test

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

[BUG] Alg broken

Describe the bug
The output calculation is broken. It seems to only account for rotation and moving forward, and does not move left/right.

To Reproduce
Steps to reproduce the behavior:

  1. Run the code in main.cpp

Expected behavior
Should go to 2_ft, 2_ft, 45_deg (forward 2 ft, right 2 ft, turn 45 deg)

Actual behavior
Goes to 2_ft, 0_ft, 45_deg (forward 2 ft, right 0 ft, turn 45 deg)

Screenshots
n/a

Additional context
n/a

Switch to built in path generation

Issue:
Pathplanner's path is a little too close together for pure pursuit, and it takes a long time to generate and copy. Its better to just switch to generating paths internally.

Rather than using Pathplanner, I think it would be better to visualize bezier curves using something like Louis' Chassim a few years ago. It'll be more lightweight and allows us to display a vex field for even easier visualizaton.

How to approach:
Transfer lib4253's pathing components into HolonomicLib

[ENHANCEMENT] test

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[ENHANCEMENT] Add Clang-format

Is your feature request related to a problem? Please describe.
I HATE FORMATTING CODE

Describe the solution you'd like
Add Clang-Format to the code

test

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

[BUG] Seg Fault in opcontrol

Describe the bug
The code seg faults when you run it

To Reproduce
Steps to reproduce the behavior:

  1. Build + upload code from dev branch

Expected behavior
Should have created the controller and moved to 2_ft, 2_ft, 45_deg

Screenshots
image

Additional context
Add any other context about the problem here.

Installation: KeyError: "There is no item named 'template.pros' in the archive"

Describe the bug
When running the command: pros conductor fetch [email protected], the error KeyError: "There is no item named 'template.pros' in the archive" occurred. I tried putting the [email protected] file inside the src folder and in the root of the project (outside of src) but nothing changed. Any advice will be appreciated.

To Reproduce
https://holonomiclibdocs.readthedocs.io/en/latest/Docs/Intro/GettingStarted.html

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Unit Tests

It would be good if we can include a unit testing framework like gtest or doctest so we can test code on the fly. I think the easiest way is to follow Okapi's mocking api and add more unit tests above that.

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.