Closed nighthb2019 closed 4 years ago
Thanks for U outstanding work. But , when I was build ROS and g2o via "./build ros g2o" . The terminal will prompt the following error . ######################################################## /home/xx/catkin_ws/src/xivo/common/se3.h:318:9: error: ‘R’ was not declared in this scope auto (R, T) = Compose(R1, T1, R2, T2, ^ /home/xx/catkin_ws/src/xivo/common/se3.h:318:12: error: ‘T’ was not declared in this scope auto (R, T) = Compose(R1, T1, R2, T2, ^ /home/xx/catkin_ws/src/xivo/common/se3.h:318:13: error: invalid use of ‘auto’ auto (R, T) = Compose(R1, T1, R2, T2, ^ /home/xx/catkin_ws/src/xivo/common/se3.h:323:9: error: ‘Ri’ was not declared in this scope auto (Ri, Ti) = InverseOf(R, T, ^ /home/xx/catkin_ws/src/xivo/common/se3.h:323:13: error: ‘Ti’ was not declared in this scope auto (Ri, Ti) = InverseOf(R, T, ^ /home/xx/catkin_ws/src/xivo/common/se3.h:323:15: error: invalid use of ‘auto’ auto (Ri, Ti) = InverseOf(R, T, ########################################################## I have installed eigen3 and performed VIO programs such as VINS-Mono, and they all run normally. So, What is the reason for that error ?
Thanks for being interested in our work. What compiler (and its version) are you using? This is probably due to the poor support of the compiler to modern C++ features, i.e., the "auto [R, T]=" language feature.
I fixed this on Ubuntu 16.04 and ros kinetic by installing a c++17 enabled compiler:
https://askubuntu.com/a/915751
Then export environmental variables so cmake uses the right one:
export CC=gcc-7
export CXX=g++-7
After changing to an up-to-date compiler as proposed by @goldbattle , the cmake cache must be deleted. Otherwise cmake keeps using the old gcc version. For this purpose, deleting all build folders turned out to be very effective.
Thanks for U outstanding work. But , when I was build ROS and g2o via "./build ros g2o" . The terminal will prompt the following error . ######################################################## /home/xx/catkin_ws/src/xivo/common/se3.h:318:9: error: ‘R’ was not declared in this scope auto (R, T) = Compose(R1, T1, R2, T2, ^ /home/xx/catkin_ws/src/xivo/common/se3.h:318:12: error: ‘T’ was not declared in this scope auto (R, T) = Compose(R1, T1, R2, T2, ^ /home/xx/catkin_ws/src/xivo/common/se3.h:318:13: error: invalid use of ‘auto’ auto (R, T) = Compose(R1, T1, R2, T2, ^ /home/xx/catkin_ws/src/xivo/common/se3.h:323:9: error: ‘Ri’ was not declared in this scope auto (Ri, Ti) = InverseOf(R, T, ^ /home/xx/catkin_ws/src/xivo/common/se3.h:323:13: error: ‘Ti’ was not declared in this scope auto (Ri, Ti) = InverseOf(R, T, ^ /home/xx/catkin_ws/src/xivo/common/se3.h:323:15: error: invalid use of ‘auto’ auto (Ri, Ti) = InverseOf(R, T, ########################################################## I have installed eigen3 and performed VIO programs such as VINS-Mono, and they all run normally. So, What is the reason for that error ?