Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trajectories #12

Open
gnawinganimal opened this issue Sep 1, 2019 · 11 comments
Open

Trajectories #12

gnawinganimal opened this issue Sep 1, 2019 · 11 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@gnawinganimal
Copy link
Member

Sertain definately needs a pathfinding solution. One possibility is to use TrajectoryLib by the chezypoofs, but we could also write our own (idk i'll give it a shot)

Should have

  • A way to do smooth motion curves (for arms or lifts)
  • A way to follow a 2d path (for autonomous mode)

Also this is a pretty beefy feature so it should be in its own subproject.

@andrewda
Copy link
Member

andrewda commented Sep 1, 2019

Meanlib's is super well designed. Porting it to Kotlin or writing a new one with it in mind seems like a good start. I particularly like the animations in meanlib that can be used for a wide variety of use cases with a generic API.

Also keep in mind that any deviation from Meanlib should ideally maintain backwards compatibility in how paths are loaded (same JSON format) so that PathVisualizer can still be used. Between modules and BunnyBots, I'm guessing it'll be tough to find time to create a Sertain PathVisualizer replacement (especially one tested as well as PathVisualizer).

@gnawinganimal
Copy link
Member Author

Yeah I agree meanlib's is really nice.
Right now i'm more or less rewriting TrajectoryLib as a kotlin library. It's definately going to have animations, because that's the easy part. The harder part is the 2d trajectories, which I'm struggling to grasp an understanding of. (I am making progress though 😁 )

As for the path visulizer, that will happen as long as I can run the app (I was having trouble on several PCs). If I can't though, I guess we will just have to use desmos 🤷‍♀

@gnawinganimal
Copy link
Member Author

gnawinganimal commented Sep 5, 2019

Will support a format

path("somePath") {
	p(0.0, 0.0) ang 0.0
	// or
	wp(0.0, 0.0, 0.0)
	// also
	loadWaypoints("path/to/file")
}

or for loading the entire path loadPath("path/to/file")

the files will be json, of course

@gnawinganimal
Copy link
Member Author

Still working on this. Lots of calculus that I don't understand 😬

@andrewda
Copy link
Member

andrewda commented Sep 5, 2019

Let me know if you need any help 👍

@gnawinganimal
Copy link
Member Author

Lol, it actually isn't super hard. It'll be fine as long as I don't change any of the math 😆

@gnawinganimal gnawinganimal added enhancement New feature or request help wanted Extra attention is needed labels Sep 26, 2019
@gnawinganimal
Copy link
Member Author

Update on this issue:
🎉 Splines are working! The library now creates curves given a list of waypoints.
2019-10-16 (1)
It may just look like a crappy microsoft paint drawing, but it's actually a work of art ☝️

@gnawinganimal
Copy link
Member Author

Now we need to convert these (x, y) coordinates to the motor velocity...

@gnawinganimal
Copy link
Member Author

Honestly we are probably just going to wrap wpilib at this point

@gnawinganimal
Copy link
Member Author

Wpilib 2020 has been release, which means we can start working on paths

@gnawinganimal
Copy link
Member Author

Won't be to difficult, will just be wrapping a bunch of stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants