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

PathfindingCommand Completing When Robot is Within 0.5 Meters of Target Pose #1053

Open
Murat65536 opened this issue Feb 7, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@Murat65536
Copy link

Upon the initialization of the PathfindingCommand, the robot checks if it is within 0.5 meters of the target pose. If it is, it sets the variable finish to true. This skips execute and returns true in isFinished. This is an issue since our team was planning to use PathPlanner's PathfindingCommand to visit different poses on the reef, and we simply cannot be within 0.5 meters of our intended pose and still be able to score.

Steps to reproduce the behavior:

  1. Run the PathfindingCommand while close to your intended destination.

We expected this to be able to reach our pose. Instead, the robot thought that it was close enough and didn't move.

Image

  • OS: Windows 11
  • GUI Version: 2025.2.2
  • PPLib Version: 2025.2.3
  • PPLib Language: Java

I believe that creating a variable that can be changed in the Pathfinding class and then calling it in PathfindingCommand instead of having a static number could resolve this issue. It would preserve the default value while still allowing modification.

@Murat65536 Murat65536 added the bug Something isn't working label Feb 7, 2025
@mjansen4857
Copy link
Owner

This is intended. Changing that value doesn’t solve the underlying issue that it is there to prevent in the first place. The pathfinder cannot generate very short paths like that because the start and end position can be the same node on the navigation grid. Basically it already starts at the goal.

Don’t use pathfinding for short distance paths or if you know there won’t be an obstacle in the way, use on the fly paths for that instead, which is much more efficient and controllable.

@Murat65536
Copy link
Author

Since PathPlanner allows for changing the number of nodes covering a grid, could this at least be altered to scale with that amount? This would ensure that the start and end positions are not on the same node while bringing the robot closer to its desired destination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants