You are browsing as a guest. Sign up (or log in) to start making projects!

Odyssey

  • 2 Devlogs
  • 18 Total hours

Hyper-optimized bezier curve pathing algorithm.

Open comments for this post

1h 47m 25s logged

finished VelocityProfile.java

what is it?
a velocity profile is just a simple mapping of the optimal velocity given the robot is along the path. it takes in distance, and it outputs velocity.

how does it do that?
first of all, because it maps distance in a cubic bezier-curve path, my numerical solution to arc-length parametrization using a Gauss-Legendre integrator proves actually useful. Based on that distance, you pass the optimal velocity through 3 different checks: centripetal, forward, and backward.

centripetal pass:
you get the curvature based on the distance you are along the path, and from that curvature you use the formula a_c=v^2*k (rearrange it to v^2=a_c/k and finally v=sqrt(a_c/k)) to find the curve velocity limit. This is also tuned by the maximum centripetal acceleration limit that is based on the robot’s physical capability.

forward pass:
with a standard velocity profile with just velocity mappings, the robot may physically not be able to accelerate from point A to B. a forward pass provides the maximum velocity for accelerating smoothly without error along two distances. It uses the kinematic formula with the max acceleration as the robot’s acceleration limit.

backward pass:
backward pass is basically the same idea as forward pass except, you guessed it, backwards! it uses the robot’s physical limit of braking (or deacceleration) to find the optimal breaking speed.

for finding the velocity you can lerp the closest low and high vals.

tests: 14 out of 14 passed yay (i had one slip up where i forgot to lerp v^2 and lerped v)

now im working on:
the simulated follower bc i need the actual robot for t he real follower

0
0
24
Open comments for this post

16h 32m 58s logged

initial commit

everything done so far (first devlog a bit late into the project so a lot is done)

  • entire geometry package (Vector2d, BezierCurve, Pose2d, etc.)
  • follower class DriveSignal that turns forward strafe and turn into one robust signal
  • beautiful arc-length parametrization and implicitization (holy that took a long time accounted for like 5 hours lmao) but one of the key parts that makes this algo extremely accurate compared to others
  • pid controller
  • VERY VERY VERY basic GUI using JavaFX
    in progress:
  • velocity profile (working on the basic methods on optimal centrepital acceleration, trying to learn 1st pass 2nd pass and 3rd pass)
    soon:
  • simulated follower algo
  • actual follower algo when i get the robot
    ambitious:
  • GUI that turns your path (hand-drawn with bezier curve control points, maybe next i could include an optimize function) into JSON for easier readibility and maybe soon an actual java code that works
  • potentially making this into a library??
0
0
24

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…