Open YangHanj opened 3 years ago
ubuntu18.04
Meet the same problem, but don't know how to sovle
My dependency fix here (check the most recent commit): https://github.com/zhezhou1993/cube_slam/
I wrote a tutorial on how to install cube-slam on Ubuntu 18.04, but in Chinese. If you have any questions, please contact me via the email on the tutorial. https://blog.csdn.net/qq_44847636/article/details/125899174
[ 40%] Building CXX object cube_slam/line_lbd/CMakeFiles/linelbd_detect_node.dir/src/detect_lines.cpp.o /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/object_3d_util.cpp: In function ‘void fuse_normalize_scores_v2(const VectorXd&, const VectorXd&, Eigen::VectorXd&, std::vector&, double, bool)’:
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/object_3d_util.cpp:503:14: error: ‘iota’ is not a member of ‘std’
std::iota(dist_sorted_inds.begin(), dist_sorted_inds.end(), 0);
^~~~
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/object_3d_util.cpp:503:14: note: suggested alternative: ‘not2’
std::iota(dist_sorted_inds.begin(), dist_sorted_inds.end(), 0);
^~~~
not2
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/object_3d_util.cpp:529:14: error: ‘iota’ is not a member of ‘std’
std::iota(final_keep_inds.begin(), final_keep_inds.end(), 0);
^~~~
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/object_3d_util.cpp:529:14: note: suggested alternative: ‘not2’
std::iota(final_keep_inds.begin(), final_keep_inds.end(), 0);
^~~~
not2
In file included from /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:1:0:
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/include/detect_3d_cuboid/matrix_utils.h:47:101: error: ‘std::vector’ has not been declared
bool read_obj_detection_txt(const std::string txt_file_name, Eigen::MatrixXd &read_number_mat, std::vector &strings);
^ &strings);
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/include/detect_3d_cuboid/matrix_utils.h:49:102: error: ‘std::vector’ has not been declared
bool read_obj_detection2_txt(const std::string txt_file_name, Eigen::MatrixXd &read_number_mat, std::vector &strings);
^ &strings);
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/include/detect_3d_cuboid/matrix_utils.h:52:52: error: ‘std::vector’ has not been declared
void sort_indexes(const Eigen::VectorXd &vec, std::vector &idx, int top_k);
^ &idx, int top_k);
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/include/detect_3d_cuboid/matrix_utils.h:53:52: error: ‘std::vector’ has not been declared
void sort_indexes(const Eigen::VectorXd &vec, std::vector &idx);
^ &idx);
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/include/detect_3d_cuboid/matrix_utils.h:60:30: error: ‘vector’ in namespace ‘std’ does not name a template type
void print_vector(const std::vector &vec);
^ &vec);
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/include/detect_3d_cuboid/matrix_utils.h:64:51: error: ‘std::vector’ has not been declared
void linespace(T starting, T ending, T step, std::vector &res);
^ &res);
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:236:101: error: ‘std::vector’ has not been declared
bool read_obj_detection_txt(const std::string txt_file_name, Eigen::MatrixXd &read_number_mat, std::vector &all_strings)
^ &all_strings)
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp: In function ‘bool read_obj_detection_txt(std::cxx11::string, Eigen::MatrixXd&, int)’:
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:243:5: error: ‘all_strings’ was not declared in this scope
all_strings.clear();
^ &all_strings)
^ &all_strings)
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp: In function ‘bool read_obj_detection2_txt(std:: cxx11::string, Eigen::MatrixXd&, int)’:
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:281:5: error: ‘all_strings’ was not declared in this scope
all_strings.clear();
^ &idx, int top_k)
^ &idx, int top_k)
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp: In function ‘void sort_indexes(const VectorXd&, int)’:
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:318:23: error: ‘idx’ was not declared in this scope
std::partial_sort(idx.begin(), idx.begin() + top_k, idx.end(), [&vec](int i1, int i2) { return vec(i1) < vec(i2); });
^~~
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:318:23: note: suggested alternative: ‘index’
std::partial_sort(idx.begin(), idx.begin() + top_k, idx.end(), [&vec](int i1, int i2) { return vec(i1) < vec(i2); });
^~~
index
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:318:50: error: ‘top_k’ was not declared in this scope
std::partial_sort(idx.begin(), idx.begin() + top_k, idx.end(), [&vec](int i1, int i2) { return vec(i1) < vec(i2); });
^~~~~
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp: At global scope:
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:321:52: error: ‘std::vector’ has not been declared
void sort_indexes(const Eigen::VectorXd &vec, std::vector &idx)
^ &idx)
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp: In function ‘void sort_indexes(const VectorXd&, int)’:
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:321:6: error: redefinition of ‘void sort_indexes(const VectorXd&, int)’
void sort_indexes(const Eigen::VectorXd &vec, std::vector &idx)
^ &idx, int top_k)
^ &vec)
^ &vec)
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp: In function ‘void print_vector(int)’:
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:341:28: error: ‘vec’ was not declared in this scope
for (size_t i = 0; i < vec.size(); i++)
^~~
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:341:28: note: suggested alternative: ‘getc’
for (size_t i = 0; i < vec.size(); i++)
^~~
getc
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp: At global scope:
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:345:39: error: ‘vector’ in namespace ‘std’ does not name a template type
template void print_vector(const std::vector &);
^ &);
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:345:15: error: template-id ‘print_vector<>’ for ‘void print_vector(int)’ does not match any template declaration
template void print_vector(const std::vector &);
^ void print_vector(int)
void print_vector(const std::vector &vec)
^ &);
^ &);
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:346:15: error: template-id ‘print_vector<>’ for ‘void print_vector(int)’ does not match any template declaration
template void print_vector(const std::vector &);
^ void print_vector(int)
void print_vector(const std::vector &vec)
^ &);
^ &);
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:347:15: error: template-id ‘print_vector<>’ for ‘void print_vector(int)’ does not match any template declaration
template void print_vector(const std::vector &);
^ void print_vector(int)
void print_vector(const std::vector &vec)
^ &res)
^ &res)
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp: In function ‘void linespace(T, T, T, int)’:
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:352:5: error: ‘res’ was not declared in this scope
res.reserve((ending - starting) / step + 2);
^~~
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp: At global scope:
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:364:45: error: ‘std::vector’ has not been declared
template void linespace(int, int, int, std::vector &);
^ &);
^
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:365:54: error: ‘std::vector’ has not been declared
template void linespace(double, double, double, std::vector &);
^ &);
^
cube_slam/detect_3d_cuboid/CMakeFiles/detect_3d_cuboid.dir/build.make:88: recipe for target 'cube_slam/detect_3d_cuboid/CMakeFiles/detect_3d_cuboid.dir/src/matrix_utils.cpp.o' failed
make[2]: [cube_slam/detect_3d_cuboid/CMakeFiles/detect_3d_cuboid.dir/src/matrix_utils.cpp.o] Error 1
make[2]: 正在等待未完成的任务....
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/box_proposal_detail.cpp: In member function ‘void detect_3d_cuboid::detect_cuboid(const cv::Mat&, const Matrix4d&, const MatrixXd&, Eigen::MatrixXd, std::vector<std::vector<cuboid*> >&)’:
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/box_proposal_detail.cpp:531:3: error: ‘iota’ was not declared in this scope
iota(sort_idx_small.begin(), sort_idx_small.end(), 0);
^~~~
/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/box_proposal_detail.cpp:531:3: note: suggested alternative: ‘int’
iota(sort_idx_small.begin(), sort_idx_small.end(), 0);
^~~~
int
[ 42%] Linking CXX executable /home/a-y-x/cubeslam_ws/devel/lib/line_lbd/linelbd_detect_node
[ 42%] Built target linelbd_detect_node
cube_slam/detect_3d_cuboid/CMakeFiles/detect_3d_cuboid.dir/build.make:62: recipe for target 'cube_slam/detect_3d_cuboid/CMakeFiles/detect_3d_cuboid.dir/src/box_proposal_detail.cpp.o' failed
make[2]: [cube_slam/detect_3d_cuboid/CMakeFiles/detect_3d_cuboid.dir/src/box_proposal_detail.cpp.o] Error 1
cube_slam/detect_3d_cuboid/CMakeFiles/detect_3d_cuboid.dir/build.make:75: recipe for target 'cube_slam/detect_3d_cuboid/CMakeFiles/detect_3d_cuboid.dir/src/object_3d_util.cpp.o' failed
make[2]: [cube_slam/detect_3d_cuboid/CMakeFiles/detect_3d_cuboid.dir/src/object_3d_util.cpp.o] Error 1
CMakeFiles/Makefile2:1531: recipe for target 'cube_slam/detect_3d_cuboid/CMakeFiles/detect_3d_cuboid.dir/all' failed
make[1]: [cube_slam/detect_3d_cuboid/CMakeFiles/detect_3d_cuboid.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: [all] Error 2
Invoking "make -j4 -l4" failed
~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/include/detect_3d_cuboid/matrix_utils.h:47:107: error: expected ‘,’ or ‘...’ before ‘<’ token bool read_obj_detection_txt(const std::string txt_file_name, Eigen::MatrixXd &read_number_mat, std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/include/detect_3d_cuboid/matrix_utils.h:49:108: error: expected ‘,’ or ‘...’ before ‘<’ token bool read_obj_detection2_txt(const std::string txt_file_name, Eigen::MatrixXd &read_number_mat, std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/include/detect_3d_cuboid/matrix_utils.h:52:58: error: expected ‘,’ or ‘...’ before ‘<’ token void sort_indexes(const Eigen::VectorXd &vec, std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/include/detect_3d_cuboid/matrix_utils.h:53:58: error: expected ‘,’ or ‘...’ before ‘<’ token void sort_indexes(const Eigen::VectorXd &vec, std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/include/detect_3d_cuboid/matrix_utils.h:60:36: error: expected ‘,’ or ‘...’ before ‘<’ token void print_vector(const std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/include/detect_3d_cuboid/matrix_utils.h:64:57: error: expected ‘,’ or ‘...’ before ‘<’ token void linespace(T starting, T ending, T step, std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:236:107: error: expected ‘,’ or ‘...’ before ‘<’ token bool read_obj_detection_txt(const std::string txt_file_name, Eigen::MatrixXd &read_number_mat, std::vector~~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp: At global scope: /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:274:102: error: ‘std::vector’ has not been declared bool read_obj_detection2_txt(const std::string txt_file_name, Eigen::MatrixXd &read_number_mat, std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:274:108: error: expected ‘,’ or ‘...’ before ‘<’ token bool read_obj_detection2_txt(const std::string txt_file_name, Eigen::MatrixXd &read_number_mat, std::vector~~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp: At global scope: /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:316:52: error: ‘std::vector’ has not been declared void sort_indexes(const Eigen::VectorXd &vec, std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:316:58: error: expected ‘,’ or ‘...’ before ‘<’ token void sort_indexes(const Eigen::VectorXd &vec, std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:321:58: error: expected ‘,’ or ‘...’ before ‘<’ token void sort_indexes(const Eigen::VectorXd &vec, std::vector~~~ /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:316:6: note: ‘void sort_indexes(const VectorXd&, int)’ previously defined here void sort_indexes(const Eigen::VectorXd &vec, std::vector~~~ /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:323:10: error: ‘idx’ was not declared in this scope sort(idx.begin(), idx.end(), [&vec](int i1, int i2) { return vec(i1) < vec(i2); }); ^~~ /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:323:10: note: suggested alternative: ‘index’ sort(idx.begin(), idx.end(), [&vec](int i1, int i2) { return vec(i1) < vec(i2); }); ^~~ index /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:323:5: error: ‘sort’ was not declared in this scope sort(idx.begin(), idx.end(), [&vec](int i1, int i2) { return vec(i1) < vec(i2); }); ^~~~ /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:323:5: note: suggested alternative: In file included from /usr/include/c++/7/algorithm:62:0, from /usr/include/eigen3/Eigen/Core:269, from /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/include/detect_3d_cuboid/matrix_utils.h:4, from /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:1: /usr/include/c++/7/bits/stl_algo.h:4856:5: note: ‘std::sort’ sort(_RandomAccessIterator __first, _RandomAccessIterator __last, ^~~~ /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp: At global scope: /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:339:30: error: ‘vector’ in namespace ‘std’ does not name a template type void print_vector(const std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:339:36: error: expected ‘,’ or ‘...’ before ‘<’ token void print_vector(const std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:345:45: error: expected ‘,’ or ‘...’ before ‘<’ token template void print_vector(const std::vector~~~ /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:339:6: note: candidate is: template~~~ /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:346:39: error: ‘vector’ in namespace ‘std’ does not name a template type template void print_vector(const std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:346:45: error: expected ‘,’ or ‘...’ before ‘<’ token template void print_vector(const std::vector~~~ /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:339:6: note: candidate is: template~~~ /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:347:39: error: ‘vector’ in namespace ‘std’ does not name a template type template void print_vector(const std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:347:45: error: expected ‘,’ or ‘...’ before ‘<’ token template void print_vector(const std::vector~~~ /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:339:6: note: candidate is: template~~~ /home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:350:51: error: ‘std::vector’ has not been declared void linespace(T starting, T ending, T step, std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:350:57: error: expected ‘,’ or ‘...’ before ‘<’ token void linespace(T starting, T ending, T step, std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:364:51: error: expected ‘,’ or ‘...’ before ‘<’ token template void linespace(int, int, int, std::vector~/home/a-y-x/cubeslam_ws/src/cube_slam/detect_3d_cuboid/src/matrix_utils.cpp:365:60: error: expected ‘,’ or ‘...’ before ‘<’ token template void linespace(double, double, double, std::vector