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

ch3 / examples / plotTrajectory.cpp : vector subscript out of range #303

Open
syt06162 opened this issue Apr 25, 2024 · 0 comments
Open

Comments

@syt06162
Copy link

In line 79, // 画出连线 (Draw the lines connecting the poses) parts,
I think for statement should be changed :

for (size_t i = 0; i < poses.size(); i++)
to
for (size_t i = 0; i < poses.size() - 1 ; i++)

because
auto p1 = poses[i], p2 = poses[i + 1];
can cause the error vector subscript out of range.
(in other OS, compilers..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant