gaoxiang12 / slambook2

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

missing header file causing" plotTrajectory.cpp:13:28: error: ‘Isometry3d’ was not declared in this scope" #314

Open zylinux opened 1 month ago

zylinux commented 1 month ago

mzhang@mzhang-XPS-9320:~/home_work/SLAM/slambook2/ch3/build$ make [ 10%] Building CXX object useEigen/CMakeFiles/eigenMatrix.dir/eigenMatrix.cpp.o [ 20%] Linking CXX executable eigenMatrix [ 20%] Built target eigenMatrix [ 30%] Building CXX object useGeometry/CMakeFiles/eigenGeometry.dir/eigenGeometry.cpp.o [ 40%] Linking CXX executable eigenGeometry [ 40%] Built target eigenGeometry [ 50%] Building CXX object visualizeGeometry/CMakeFiles/visualizeGeometry.dir/visualizeGeometry.cpp.o [ 60%] Linking CXX executable visualizeGeometry [ 60%] Built target visualizeGeometry [ 70%] Building CXX object examples/CMakeFiles/coordinateTransform.dir/coordinateTransform.cpp.o [ 80%] Linking CXX executable coordinateTransform [ 80%] Built target coordinateTransform [ 90%] Building CXX object examples/CMakeFiles/plotTrajectory.dir/plotTrajectory.cpp.o /home/mzhang/home_work/SLAM/slambook2/ch3/examples/plotTrajectory.cpp:13:28: error: ‘Isometry3d’ was not declared in this scope 13 | void DrawTrajectory(vector<Isometry3d, Eigen::aligned_allocator>); | ^~~~~~ /home/mzhang/home_work/SLAM/slambook2/ch3/examples/plotTrajectory.cpp:13:65: error: ‘Isometry3d’ was not declared in this scope 13 | void DrawTrajectory(vector<Isometry3d, Eigen::aligned_allocator>); | ^~~~~~ /home/mzhang/home_work/SLAM/slambook2/ch3/examples/plotTrajectory.cpp:13:65: error: template argument 1 is invalid /home/mzhang/home_work/SLAM/slambook2/ch3/examples/plotTrajectory.cpp:13:75: error: template argument 1 is invalid

FIX is : In order to solve this , please add a line "#include <Eigen/Geometry>" into plotTrajectory.cpp. you should be good.

looks like I don't have permission to create remote branch and do the PR. anyway. Hope this could help someone. There was another issue might related to this as well.

https://github.com/gaoxiang12/slambook2/issues/308

@gaoxiang12