Coder Social home page Coder Social logo

path-gen's Introduction


Important

LemLib is being written from scratch for its upcoming v0.6.0 release. You can find the source code for the latest stable version of LemLib here

Welcome to LemLib! This open-source PROS template aims to introduce common algorithms like Pure Pursuit and Odometry for new and experienced teams alike.

The creation of this template was inspired by EZ-Template and OkapiLib. We aim to develop a library that strikes a balance between ease-of-use, akin to that of EZ-Template, and comprehensive functionality, similar to that of OkapiLib.

Want a place to chat with the devs and other users? Join our Discord server.

License

This project is licensed under the MIT license. Check LICENSE for more details.

Features

  • Generic PID class
  • Odometry
    • Supports IMU
    • Works without tracking wheels
    • Supports all tracking wheels configurations
  • Turn to face point
  • Turn to face heading
  • Swing to face point
  • Swing to face heading
  • Move to Pose via boomerang
  • Path Following via pure pursuit
  • Motion Chaining
  • Driver Control
    • Expo drive curves
    • Smooth deadzone compensation
    • Minimum output
    • Arcade control (single or double stick)
    • Tank control
    • Curvature control (single or double stick)
    • turn-steer prioritization

Example Project

You can find a fully annotated example project here.

Tutorials

The tutorials provide a detailed walkthrough through all the features of LemLib. It covers everything from installation to Path Following:

FAQ

1. Help! Why is my controller vibrating? If your controller vibrated more than once, your inertial sensor calibration failed. Check if its connected to the right port and try again.

2. What drivetrains are supported? Only tank/differential. This is not going to change until other drivetrains are competitive.

3. Do I need tracking wheels? No, but it is recommended. You should absolutely have a horizontal tracking wheel if you don't have traction wheels, and you have to spend extra effort tuning your movements to prevent any wheel slip.

4. Do I need an inertial sensor? No, but it is highly recommended. The one exception to this would be if you have 2 parallel tracking wheels which are tuned well and are perfectly square. LemLib will work without it, but the accuracy will be compromised.

5. Do I need an SD card? As of v0.5.0, no SD card is necessary.

6. What are the units? The units are inches and degrees. In a future release, Qunits will be used so you can use whatever units you like.

7. Is LemLib V5RC legal? Yes. Per the RECF student-centred policy, in the context of third-party libraries.

Students should be able to understand and explain the code used on their robots

In other words, you need to know how LemLib works. You don't need to know the details like all the math, just more or less how the algorithm works. If you want to learn more about LemLib, you can look through the documentation and ask questions on our Discord server.

Documentation

Check out the Documentation.

Contributing

Want to contribute? Please read CONTRIBUTING.md and join our Discord server.

Code of Conduct

See the Code of Conduct on how to behave like an adult.

path-gen's People

Contributors

sizzinseal avatar sunkensplash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

path-gen's Issues

[BUG] ...

What is Wrong

playback mode does not seem to be working in Path-Gen

What should happen

the file upload works in design mode and the path is loaded but when switching to playback mode nothing appears

How to reproduce the bug

on a mac, in either chrome or safari, upload a file in playback mode

Screenshots

First image is a good path load from downloaded path
Second image is the same file not loading from the playback screen
image
image

OS and Browser

MacOS Ventura 13.5.2 on Chrome or Safari latest versions

[FEATURE] Improve Readme

The current Readme does not tell you anything about the project.

What it should tell new users:

  • What it is for
  • How to download/access it
  • How to contribute
  • Example photos
  • List of all features

[BUG] Control points dont draw properly

What is Wrong

Some control points don't draw in the correct order

What should happen

They should cover the lines connecting themselves and another control point

How to reproduce the bug

Create a line segment and look at the second control point

Screenshots

first is the bug, second is intended behavior
image
image

OS and Browser

Windows 11
Opera GX

[BUG] Points don't space out properly

What is Wrong

The points on the path do not space out properly

What should happen

The points on the path should space out immediately

When does this happen

It occurs when adding a new segment to the path. Moving any control point fixes it.

Screenshots

First image shows the issue, the second does not
image
image

OS and Browser

Windows 11
Opera GX

[FEATURE] Draw canvas at 60HZ

Is your feature request related to a problem? Please describe.

Yes. Currently, the majority of bugs occur within the drawSpline function. It is usually called by different functions when the canvas needs to be updated. This makes it complicated and difficult to maintain.

Describe the solution you'd like

By redrawing the field at a specific interval (e.g 60hz), it removes the need to call the function from anywhere in the code. I have previously shown that the function can be called 300 times per second (on a Ryzen 9 5900HX). If performance is poor, some optimizations can be implemented (e.g GPU acceleration)

Describe alternatives you've considered

Diagnosing issue #3 has proven to be difficult, and despite my best efforts, I am not able to introduce a fix. Implementing this feature will make the drawSpline function easier to maintain, and hopefully easier to debug.

[FEATURE] Graphics Rewrite

Is your feature request related to a problem? Please describe.

When I was adding a new feature to the project, I was immediately confused as to how the rendering worked, specifically what the program was trying to render. This makes it very difficult to add or change features.

Describe the solution you'd like

In order to simplify the rendering process, a graphics API should be created. It should be very simple, able to create a circle or draw a line between 2 points, or plot a series of points. However, instead of having to redraw the canvas each time, the program will keep track of created objects and redraw them automatically. The functions should also use field coordinates instead of canvas coordinates to prevent confusion

Describe alternatives you've considered

I have considered rewriting the entire path generator, since I have learned how to make more organized code since the start of this project. However, as I am the only contributor at the time of writing, I won't have the time to do this. Instead, the existing code should be improved iteratively.

[FEATURE] Path download and upload

Is your feature request related to a problem? Please describe.

No. Currently, the user has no way of easily getting the path in the form of a text file to be read by a robot. Also, the user has no way of saving their work.

Describe the solution you'd like

All that needs to be done to get a file to be read by a robot, is to log the path points and constants like kV, kA and kP. To save a path the user can just download a JSON of the path object, and when uploaded the simulator will set that as the path.

Describe alternatives you've considered

Paths could be stored on a database, but that will take time and resources

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.