Closed jdmulder03 closed 3 years ago
@baylessj bump
Thanks for testing this out and opening an issue! The time plot is definitely wrong, that shouldn't reset between halves of the path.
I don't think the second graph is ideal either, although it's currently working as designed. squiggles::Pose
points currently set the velocity and acceleration to 0, so having a pose as the middle waypoint will get you a velocity like you show above. I would prefer the default behavior to be a trapezoidal velocity graph above, but that's a bit harder to pull off in reality.
I'm wondering if it would be possible to do the path parameterization across the whole path rather than each segment and see if that remedies the issue. I can take a look at that sometime in the next week or two.
Would you be interested in opening a PR for the time incrementing issue? That should hopefully be a much easier fix than the change in parameterization of the paths.
Yeah I'll start on a PR
I'm done with the time reset issue but looking at the code it seems like full path parameterization would also fix the time issue. Once I figure out the build system and make sure all tests pass I'll submit a PR.
Sounds good, thanks!
I took a look back at your discord message with the build errors. Building with ./pleasew build
is the preferred method, I need to remove the CMake script from the project. I think that the error with --system
might be a result of running the build in WSL, WSL has some interesting permissions issues sometimes. I'm running Linux primarily but I can boot into Windows and check out that error if you hit a roadblock with it.
@Dr-Danimal Is everything going alright for you with the PR for this issue? Happy to help any way I can.
The time fix is done in my testing env. I'll pr it in the next few days. Been kinda busy with FRC starting up. I was expirimenting with doing the full path parameterization and just have to fix some stuff with the spline interpolation. When I get back to work on that I might need help, thanks for the offer.
No worries, the FRC season start is important! Are you planning to try to use Squiggles for an FRC bot or just for VEX?
Just for VEX, I'm not on software for FRC.
Hi @Dr-Danimal! Don't mean to pester you about this issue, but this is the last issue left before merging into Okapilib. It's totally fine if you don't have everything ready for a PR, could you open a PR in "draft" status and give me edit access instead? I can pick up where you've left off.
@baylessj Thanks for the reminder, went ahead and made a working PR for the time fix . I never got the build to work on WSL so I have only tested the PR on my own environment. If there are issues I believe you should have edit access.
I don't really have anything to PR for the full parameterization yet as most of my work has been just passing the full raw path to SplineGenerator::parameterize
and seeing what happens/understanding why it happens. It seems to just work except for the position interpolation in SplineGenerator::get_point_at_time
. I see 3 ways to handle the interpolation with the full raw path being passed to SplineGenerator::parameterize
.
ControlVector
's with their corresponding segments and interpolate with the existing get_point_at_time
ProfilePoint
's instead of ControlVector
'sI'm currently trying to generate the interpolation spline with ProfilePoint
's. If you want me to try something else let me know.
I got the interpolation working, ended up being pretty simple. I gotta take another look at the parameterization since it seems to be doing some slightly weird things. If parameterization is still working, all that needs to be fixed is the handling of ControlVectors
passed to generate
as right now I ignore all but the first and last. I'll put a draft PR up later today so you can take a look.
I might be doing something wrong but when using multi point paths on each segment the timestamp is reset counting from zero. Also not sure if this is intended behavior but when using the
SplineGenerator::generate
withPose
on each segment the starting velocity and ending velocities are zero.