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 paths with events on C++ #603

Merged
merged 2 commits into from
Feb 8, 2024
Merged

Fix paths with events on C++ #603

merged 2 commits into from
Feb 8, 2024

Conversation

AJahueyM
Copy link
Contributor

@AJahueyM AJahueyM commented Feb 8, 2024

The latest updates that changed event markers to be time based caused paths with events to crash on C++.
When doing:

m_untriggeredEvents.insert(m_untriggeredEvents.end(),
  m_generatedTrajectory.getEventCommands().begin(),
  m_generatedTrajectory.getEventCommands().end());

A new vector is created each time m_generatedTrajectory.getEventCommands() is called, meaning that the iterators are not linked. I solved this by storing the eventCommands in a different variable and then getting the begin and end iterators from it. Another solution could maybe be changing PathPlannerTrajectory::getEventCommands to return a constant reference to the events.

@github-actions github-actions bot added the PathPlannerLib Changes to PathPlannerLib label Feb 8, 2024
@mjansen4857
Copy link
Owner

mjansen4857 commented Feb 8, 2024

Thanks. Will replace the 2024.2.3 update I just did today after this is merged

@mjansen4857 mjansen4857 merged commit 3a7fc67 into mjansen4857:main Feb 8, 2024
24 checks passed
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.

2 participants