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

Fix typo in IdealStartingState Javadoc (#1007) #1008

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

codydg
Copy link
Contributor

@codydg codydg commented Jan 15, 2025

I believe I've fixed the typo.

If there could be more clarification added, I'd be interested. I find the term "Ideal" a bit vague. Does it mean the "expected" starting state? That would make sense to me since I'm using it for on-the-fly generation, but I'm not sure if there are other use cases of the class.

@github-actions github-actions bot added the PathPlannerLib Changes to PathPlannerLib label Jan 15, 2025
@mjansen4857
Copy link
Owner

It is basically an expected starting state, but not required. It's basically only used for GUI trajectories to pre-generate the "ideal" trajectory that will be followed if the robot's starting state matches. Otherwise, it will generate a new trajectory to match its actual state. The IdealStartingState is not needed for on-the-fly trajectories, since those will need to be generated anyways.

If you want to add a note about that, feel free.

@mjansen4857
Copy link
Owner

Also, any changes to the javadoc probably need to be made to c++ and python docs as well.

@codydg
Copy link
Contributor Author

codydg commented Jan 15, 2025

The IdealStartingState is not needed for on-the-fly trajectories, since those will need to be generated anyways.

When I construct the PathPlannerPath, doesn't it make the time-based trajectory at that moment? I may have a core misunderstanding of how the generation works, but I'll give an example:

Generate a Path from <0, 0> to <1, 0> to <1, 10> (forwards 1, then left 10 units)
If I tell it my initial velocity is 10/s, I'd expect a different trajectory than if I said it's zero.

If I tell it null, it has already generated the path so I'm not sure how it would account for the 'sudden finding' at the start that I'm actually moving at 10/s.

Also, any changes to the javadoc probably need to be made to c++ and python docs as well.

I did check the C++ documentation which just says "Create a new ideal starting state", meaning no typo was there.
I had forgotten about Python but I just checked and it had the same typo as Java so I've now pushed a fix.

@mjansen4857
Copy link
Owner

The trajectory does not get generated until a path following command starts.

@mjansen4857 mjansen4857 enabled auto-merge (squash) January 16, 2025 00:50
@mjansen4857 mjansen4857 linked an issue Jan 16, 2025 that may be closed by this pull request
@mjansen4857 mjansen4857 merged commit c2d8a7d into mjansen4857:main Jan 16, 2025
22 checks passed
@codydg codydg deleted the ideal-starting-state-typo branch January 16, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PathPlannerLib Changes to PathPlannerLib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IdealStartingState Typo
2 participants