gaoxiang12 / slambook2

edition 2 of the slambook
MIT License
5.3k stars 1.99k forks source link

ch3 plotTrajectory segmentation fault #274

Open nofreewill42 opened 1 year ago

nofreewill42 commented 1 year ago

In the cloned repo, with Paligon built that comes with the repo I build the plotTrajectory.cpp as follows:

cd slambook2/ch3/examples
mkdir build
cd build
cmake ..
make
cd ../..
examples/build/plotTrajectory

The result is Segmentation fault.

read total 620 pose entries
Segmentation fault (core dumped)

What could be the problem, where do I even start?

mmints commented 10 months ago

Same thing here. Actually we built the project on two machines. The one works fine, the other doesn't... no idea why.

I think that it might be something related to Pangolin... but still no clue what it might be

1485995573 commented 6 months ago

Hello, can I ask you if this problem has been solved I seem to have encountered this problem as well

nofreewill42 commented 6 months ago

Unfortunately I wasn't able to resolve it.

mmints commented 6 months ago

Same for my co-worker

1485995573 commented 6 months ago

Have you tried other versions of Pangolin?

robo-dani commented 4 months ago

I think the issue may be that the p2'sindex i + 1 is out of bounds.

for (size_t i = 0; i < poses.size(); i++) {
      auto p1 = poses[i], p2 = poses[i + 1];

https://github.com/gaoxiang12/slambook2/blob/93b65b0a92b50c8f4ebe4805f0376a5b6d2d945f/ch3/examples/plotTrajectory.cpp#L79C1-L82C45