ethz-asl/dynablox

voxel_map[voxel_index].push_back(i);

nivand opened this issue · 5 comments

Hi , I tried to build the pkg but i get this error
Errors << catkin_lidar/logs/dynablox_ros/build.make.001.log
catkin_lidar/src/dynablox/dynablox_ros/src/motion_detector.cpp: In member function ‘void dynablox::MotionDetector::blockwiseBuildPointMap(const Cloud&, const BlockIndex&, voxblox::AlignedVector&, dynablox::VoxelToPointMap&, std::vector<std::pair<Eigen::Matrix<int, 3, 1>, Eigen::Matrix<int, 3, 1> > >&, dynablox::CloudInfo&) const’:
/home/ideajoyan/catkin_lidar/src/dynablox/dynablox_ros/src/motion_detector.cpp:310:39: error: no matching function for call to ‘std::vector<Eigen::Matrix<int, 3, 1>, Eigen::aligned_allocator<Eigen::Matrix<int, 3, 1> > >::push_back(size_t&)’
310 | voxel_map[voxel_index].push_back(i);
| ^
In file included from /usr/include/c++/9/vector:67,
from /home/catkin_lidar/src/dynablox/dynablox_ros/include/dynablox_ros/motion_detector.h:9,
from /home/catkin_lidar/src/dynablox/dynablox_ros/src/motion_detector.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1184:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = Eigen::Matrix<int, 3, 1>; _Alloc = Eigen::aligned_allocator<Eigen::Matrix<int, 3, 1> >; std::vector<_Tp, _Alloc>::value_type = Eigen::Matrix<int, 3, 1>]’
1184 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1184:35: note: no known conversion for argument 1 from ‘size_t’ {aka ‘long unsigned int’} to ‘const value_type&’ {aka ‘const Eigen::Matrix<int, 3, 1>&’}
1184 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_vector.h:1200:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = Eigen::Matrix<int, 3, 1>; _Alloc = Eigen::aligned_allocator<Eigen::Matrix<int, 3, 1> >; std::vector<_Tp, _Alloc>::value_type = Eigen::Matrix<int, 3, 1>]’
1200 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1200:30: note: no known conversion for argument 1 from ‘size_t’ {aka ‘long unsigned int’} to ‘std::vector<Eigen::Matrix<int, 3, 1>, Eigen::aligned_allocator<Eigen::Matrix<int, 3, 1> > >::value_type&&’ {aka ‘Eigen::Matrix<int, 3, 1>&&’}
1200 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
make[2]: *** [CMakeFiles/dynablox_ros.dir/build.make:89: CMakeFiles/dynablox_ros.dir/src/motion_detector.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1252: CMakeFiles/dynablox_ros.dir/all] Error 2
make: *** [Makefile:141: all] Error 2>

Hmmm have never seen this before. Are you sure you checked out the right branch of voxblox and have you tried a clean rebuild of your workspace?

Hmmm have never seen this before. Are you sure you checked out the right branch of voxblox and have you tried a clean rebuild of your workspace?

Hi,
Thank you for responding.
Yes, I have followed your suggestions and ensured that I have checked out the correct branch of voxblox (dynablox/release). I also performed a clean rebuild of the workspace. I still get the same error while building the dynolbox,

Hi @nivand ,

Unfortunately we are not able to reproduce your problem on a clean install. Are you sure you use dynablox/main without any additional changes and your compiler supports C++17? Alternatively, you can try to make sure Eigen is found correctly by adding eigen_catkin to the package.xml of dynablox/dynablox_ros.

Hi @nivand ,

Unfortunately we are not able to reproduce your problem on a clean install. Are you sure you use dynablox/main without any additional changes and your compiler supports C++17? Alternatively, you can try to make sure Eigen is found correctly by adding eigen_catkin to the package.xml of dynablox/dynablox_ros.

Hi, Thank you for your response. Upon further investigation, I discovered that the issue was indeed related to the compiler not supporting C++17. After reinstalling the compiler with C++17 support, everything is now functioning correctly. I appreciate your assistance and suggestions.

Great to hear that your issues were resolved!