acmerobotics / road-runner

Wheeled mobile robot motion planning library designed for FTC
MIT License
209 stars 75 forks source link

1.0.0 Beta 5 I am having an issue where past a certain point in our auto when we try to follow a spline it goes fine until the last little bit where it corrects to a heading about 30 degrees off #99

Closed ayoda1122 closed 4 months ago

ayoda1122 commented 5 months ago

I have an abstract class where most of the path generation happens but for the paths that are generated in the actual auto, It seems to act up when I try to add any movement. The coordinates don't line up anymore and the heading gets pretty far off after a correction. I am feeding it drive.pos for the start position for this action, but when I tried to feed it the actual position it threw an error but I can remember the error. In the abstract class, I have public actions that return my actions and I am doing the same with the actions in the class but have had multiple issues with the localizer getting off, but if I move the same paths to the abstract class and run them as a part of the previous action it works well but for our system, we need to have them separate preferably.

ayoda1122 commented 5 months ago

This is the code under the abstract class image image

ayoda1122 commented 5 months ago

And this is the segment under the specific auto image It is under another public action which returns the correct action based on camera input.

ayoda1122 commented 5 months ago

I assume that I am not giving it the correct start position but when I try to use new Pose2d(new Vector2d(55, -20), -PI/2) not sure if correct values but this was the syntax I tried I kept running into an error.

rbrott commented 5 months ago

I'm having trouble following all of this. Can you start by describing one particular problem and include a minimal code example?

ayoda1122 commented 5 months ago

The main problem is towards the end of our code the coordinates and headings stop lining up with the field. As in if i try to go to a different point it ends up trying to go to a completely different point usually through the wall. It would seem that this happens for all but our first action.

ayoda1122 commented 5 months ago

I will throw together some pseudo code once I am able to.

ayoda1122 commented 5 months ago

image This is the top section of the auto base mostly for non Roadrunner things.

ayoda1122 commented 5 months ago

image Still in Auto base does the logic for spike position

ayoda1122 commented 5 months ago

image image This is the action for spike left specifically in auto base

ayoda1122 commented 5 months ago

image top of Red right code image This is the action that is in Red Right

ayoda1122 commented 5 months ago

image and then run code