VIS4ROB-lab / HyperSLAM

Modular, open-source implementations of continuous-time simultaneous localization and mapping algorithms.
BSD 3-Clause "New" or "Revised" License
237 stars 13 forks source link

Make error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ #6

Closed bhyu0924 closed 1 year ago

bhyu0924 commented 1 year ago

Hello,

I would appreciate your nice work!

But, unfortunately, there is an error during make cmake was successfully done without any problems.

My env is like below

Ubuntu 20.04, ROS Noetic gcc and g++ version are 10 ceres 2.1.0 gflag, glog, googletest, benchmark also had been installed from source.

I found three error lines related to ros/serialization.h as follows:

1. /opt/ros/noetic/include/ros/serialization.h:485:48: error: ‘read’ is not a member of ‘ros::serialization::VectorSerializer<unsigned char, std::allocator, void>’ 485 | VectorSerializer<T, ContainerAllocator>::read(stream, t);

2. /opt/ros/noetic/include/ros/serialization.h:385:82: error: no class template named ‘rebind’ in ‘class std::allocator’ 385 | typedef std::vector<T, typename ContainerAllocator::template rebind::other> VecType; | ^~~ /opt/ros/noetic/include/ros/serialization.h:386:38: error: no class template named ‘rebind’ in ‘class std::allocator’ 386 | typedef typename VecType::iterator IteratorType; | ^~~~ /opt/ros/noetic/include/ros/serialization.h:387:44: error: no class template named ‘rebind’ in ‘class std::allocator’ 387 | typedef typename VecType::const_iterator ConstIteratorType;

  1. /opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:485:48: error: ‘read’ is not a member of ‘ros::serialization::VectorSerializer<unsigned char, std::allocator, void>’ 485 | VectorSerializer<T, ContainerAllocator>::read(stream, t);

Do you have any idea to resolve these issues?

TIA.

P.S. I added full messages in terminal.


[ 0%] Built target HyperSystem [ 0%] Built target HyperSensors [ 1%] Building CXX object _deps/hyperstate-build/CMakeFiles/HyperState.dir/internal/hyper/state/interpolators/basis.cpp.o [ 2%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/main.cpp.o [ 4%] Building CXX object _deps/hyperstate-build/CMakeFiles/HyperState.dir/internal/hyper/state/interpolators/polynomial.cpp.o [ 4%] Building CXX object _deps/hyperstate-build/CMakeFiles/HyperState.dir/internal/hyper/state/abstract.cpp.o [ 5%] Building CXX object _deps/hyperstate-build/CMakeFiles/HyperState.dir/internal/hyper/state/policies/se3.cpp.o [ 6%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/distortions/distortion_tests.cpp.o [ 8%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/groups/se3_tests.cpp.o [ 8%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/metrics/metrics_tests.cpp.o [ 9%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/groups/su2_tests.cpp.o [ 10%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/orthonormality_alignment_tests.cpp.o [ 11%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/intrinsics_tests.cpp.o [ 12%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/plugins/matrix_base_plugin_tests.cpp.o [ 13%] Linking CXX shared library ../../../lib/libHyperState.so [ 13%] Built target HyperState [ 14%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/main.cpp.o [ 16%] Building CXX object _deps/hyperstate-build/apps/tests/CMakeFiles/HyperStateTests.dir/main.cpp.o [ 16%] Building CXX object _deps/hyperstate-build/apps/tests/CMakeFiles/HyperStateTests.dir/__/__/tests/internal/hyper/range_tests.cpp.o [ 17%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/messages/abstract.cpp.o [ 19%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/sensors/imu.cpp.o [ 19%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/main.cpp.o [ 20%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/tests/internal/tests/optimizers/evaluators/bearing.cpp.o [ 22%] Building CXX object _deps/hyperstate-build/apps/tests/CMakeFiles/HyperStateTests.dir/__/__/tests/internal/hyper/state/state_tests.cpp.o [ 22%] Building CXX object _deps/hyperstate-build/apps/tests/CMakeFiles/HyperStateTests.dir/__/__/tests/internal/hyper/state/interpolators/basis_tests.cpp.o [ 23%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/environment/landmarks/abstract.cpp.o [ 25%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/sensors/sensor.cpp.o [ 26%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/messages/measurements/abstract.cpp.o [ 27%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/main.cpp.o [ 28%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/messages/visual.cpp.o [ 29%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/sensors/camera.cpp.o [ 31%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/tests/internal/tests/optimizers/evaluators/inertial.cpp.o [ 31%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/environment/abstract.cpp.o [ 32%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/tests/internal/tests/optimizers/evaluators/manifold.cpp.o [ 33%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/tests/internal/tests/optimizers/evaluators/pixel.cpp.o [ 34%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/environment/abstract.cpp.o [ 35%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/environment/landmarks/abstract.cpp.o [ 36%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/yaml/yaml.cpp.o [ 37%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/environment/observations/landmark.cpp.o [ 38%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/abstract.cpp.o [ 39%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/costs/exteroceptive.cpp.o [ 40%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/camera.cpp.o [ 41%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/imu.cpp.o [ 42%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/environment/observations/landmark.cpp.o [ 43%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/abstract.cpp.o [ 44%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/costs/exteroceptive.cpp.o [ 45%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/camera.cpp.o [ 46%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/imu.cpp.o [ 47%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/sensor.cpp.o [ 48%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/sensor.cpp.o [ 50%] Linking CXX executable ../../../../../bin/HyperVariablesTests [ 50%] Built target HyperVariablesTests [ 51%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/bearing.cpp.o [ 52%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/bearing.cpp.o [ 53%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/se3.cpp.o [ 54%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/se3.cpp.o [ 55%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/su2.cpp.o [ 56%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/optimizer.cpp.o [ 57%] Linking CXX executable ../../../../../bin/HyperStateTests [ 58%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/evaluators/bearing.cpp.o [ 58%] Built target HyperStateTests [ 59%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/evaluators/inertial.cpp.o [ 60%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/su2.cpp.o [ 61%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/optimizer.cpp.o [ 62%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/evaluators/bearing.cpp.o [ 63%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/evaluators/inertial.cpp.o [ 64%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/evaluators/manifold.cpp.o [ 65%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/evaluators/manifold.cpp.o [ 66%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/evaluators/pixel.cpp.o [ 67%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/abstract.cpp.o [ 68%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/backend.cpp.o [ 69%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/evaluators/pixel.cpp.o [ 70%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/abstract.cpp.o [ 71%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/frontends/abstract.cpp.o [ 72%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/backend.cpp.o [ 73%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/frontends/abstract.cpp.o [ 75%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/frontends/inertial/direct.cpp.o [ 76%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/frontends/visual/klt.cpp.o [ 77%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/module.cpp.o [ 78%] Linking CXX executable ../../../../../bin/HyperSensorsTests [ 78%] Built target HyperSensorsTests [ 79%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/system.cpp.o [ 80%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/abstract.cpp.o [ 81%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/measurements/abstract.cpp.o [ 82%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/frontends/inertial/direct.cpp.o [ 83%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/visual.cpp.o [ 84%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/frontends/visual/klt.cpp.o [ 85%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/module.cpp.o [ 86%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/system.cpp.o [ 87%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/abstract.cpp.o [ 88%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/measurements/abstract.cpp.o [ 89%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/visual.cpp.o [ 90%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/camera.cpp.o [ 92%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/camera.cpp.o [ 92%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/imu.cpp.o [ 93%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/imu.cpp.o [ 94%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/sensor.cpp.o [ 95%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/yaml/yaml.cpp.o [ 96%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/sensor.cpp.o [ 97%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/yaml/yaml.cpp.o In file included from /opt/ros/noetic/include/ros/publisher.h:34, from /opt/ros/noetic/include/ros/node_handle.h:32, from /home/yurl20/grad/hyper_ws/src/HyperSLAM/internal/hyper/system/components/module.cpp:7: /opt/ros/noetic/include/ros/serialization.h: In instantiation of ‘struct ros::serialization::VectorSerializer<unsigned char, std::allocator<unsigned char>, void>’: /opt/ros/noetic/include/ros/serialization.h:485:48: required from ‘void ros::serialization::deserialize(Stream&, std::vector<_Tp, _Alloc>&) [with T = unsigned char; ContainerAllocator = std::allocator<unsigned char>; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/serialization.h:719:16: required from ‘void ros::serialization::IStream::next(T&) [with T = std::vector<unsigned char>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:253:18: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::allInOne(Stream&, T) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >&; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:256:5: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::read(Stream&, T&) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/ros/serialization.h:163:22: required from ‘void ros::serialization::deserialize(Stream&, T&) [with T = sensor_msgs::Image_<std::allocator<void> >; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:136:21: required from ‘ros::VoidConstPtr ros::SubscriptionCallbackHelperT<P, Enabled>::deserialize(const ros::SubscriptionCallbackHelperDeserializeParams&) [with P = const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&; Enabled = void; ros::VoidConstPtr = boost::shared_ptr<const void>]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:385:82: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 385 | typedef std::vector<T, typename ContainerAllocator::template rebind<T>::other> VecType; | ^~~~~~~ /opt/ros/noetic/include/ros/serialization.h:386:38: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 386 | typedef typename VecType::iterator IteratorType; | ^~~~~~~~~~~~ /opt/ros/noetic/include/ros/serialization.h:387:44: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 387 | typedef typename VecType::const_iterator ConstIteratorType; | ^~~~~~~~~~~~~~~~~ In file included from /opt/ros/noetic/include/ros/publisher.h:34, from /opt/ros/noetic/include/ros/node_handle.h:32, from /home/yurl20/grad/hyper_ws/src/HyperSLAM/internal/hyper/system/components/module.cpp:7: /opt/ros/noetic/include/ros/serialization.h: In instantiation of ‘void ros::serialization::deserialize(Stream&, std::vector<_Tp, _Alloc>&) [with T = unsigned char; ContainerAllocator = std::allocator<unsigned char>; Stream = ros::serialization::IStream]’: /opt/ros/noetic/include/ros/serialization.h:719:16: required from ‘void ros::serialization::IStream::next(T&) [with T = std::vector<unsigned char>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:253:18: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::allInOne(Stream&, T) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >&; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:256:5: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::read(Stream&, T&) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/ros/serialization.h:163:22: required from ‘void ros::serialization::deserialize(Stream&, T&) [with T = sensor_msgs::Image_<std::allocator<void> >; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:136:21: required from ‘ros::VoidConstPtr ros::SubscriptionCallbackHelperT<P, Enabled>::deserialize(const ros::SubscriptionCallbackHelperDeserializeParams&) [with P = const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&; Enabled = void; ros::VoidConstPtr = boost::shared_ptr<const void>]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:485:48: error: ‘read’ is not a member of ‘ros::serialization::VectorSerializer<unsigned char, std::allocator<unsigned char>, void>’ 485 | VectorSerializer<T, ContainerAllocator>::read(stream, t); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ make[2]: *** [apps/hyperslam/CMakeFiles/HyperSLAM.dir/build.make:384: apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/module.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /opt/ros/noetic/include/ros/publisher.h:34, from /opt/ros/noetic/include/ros/node_handle.h:32, from /home/yurl20/grad/hyper_ws/src/HyperSLAM/internal/hyper/system/components/module.cpp:7: /opt/ros/noetic/include/ros/serialization.h: In instantiation of ‘struct ros::serialization::VectorSerializer<unsigned char, std::allocator<unsigned char>, void>’: /opt/ros/noetic/include/ros/serialization.h:485:48: required from ‘void ros::serialization::deserialize(Stream&, std::vector<_Tp, _Alloc>&) [with T = unsigned char; ContainerAllocator = std::allocator<unsigned char>; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/serialization.h:719:16: required from ‘void ros::serialization::IStream::next(T&) [with T = std::vector<unsigned char>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:253:18: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::allInOne(Stream&, T) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >&; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:256:5: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::read(Stream&, T&) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/ros/serialization.h:163:22: required from ‘void ros::serialization::deserialize(Stream&, T&) [with T = sensor_msgs::Image_<std::allocator<void> >; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:136:21: required from ‘ros::VoidConstPtr ros::SubscriptionCallbackHelperT<P, Enabled>::deserialize(const ros::SubscriptionCallbackHelperDeserializeParams&) [with P = const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&; Enabled = void; ros::VoidConstPtr = boost::shared_ptr<const void>]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:385:82: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 385 | typedef std::vector<T, typename ContainerAllocator::template rebind<T>::other> VecType; | ^~~~~~~ /opt/ros/noetic/include/ros/serialization.h:386:38: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 386 | typedef typename VecType::iterator IteratorType; | ^~~~~~~~~~~~ /opt/ros/noetic/include/ros/serialization.h:387:44: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 387 | typedef typename VecType::const_iterator ConstIteratorType; | ^~~~~~~~~~~~~~~~~ In file included from /opt/ros/noetic/include/ros/publisher.h:34, from /opt/ros/noetic/include/ros/node_handle.h:32, from /home/yurl20/grad/hyper_ws/src/HyperSLAM/internal/hyper/system/components/module.cpp:7: /opt/ros/noetic/include/ros/serialization.h: In instantiation of ‘void ros::serialization::deserialize(Stream&, std::vector<_Tp, _Alloc>&) [with T = unsigned char; ContainerAllocator = std::allocator<unsigned char>; Stream = ros::serialization::IStream]’: /opt/ros/noetic/include/ros/serialization.h:719:16: required from ‘void ros::serialization::IStream::next(T&) [with T = std::vector<unsigned char>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:253:18: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::allInOne(Stream&, T) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >&; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:256:5: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::read(Stream&, T&) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/ros/serialization.h:163:22: required from ‘void ros::serialization::deserialize(Stream&, T&) [with T = sensor_msgs::Image_<std::allocator<void> >; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:136:21: required from ‘ros::VoidConstPtr ros::SubscriptionCallbackHelperT<P, Enabled>::deserialize(const ros::SubscriptionCallbackHelperDeserializeParams&) [with P = const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&; Enabled = void; ros::VoidConstPtr = boost::shared_ptr<const void>]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:485:48: error: ‘read’ is not a member of ‘ros::serialization::VectorSerializer<unsigned char, std::allocator<unsigned char>, void>’ 485 | VectorSerializer<T, ContainerAllocator>::read(stream, t); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ make[2]: *** [apps/tests/CMakeFiles/HyperSystemTests.dir/build.make:440: apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/module.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:1073: apps/hyperslam/CMakeFiles/HyperSLAM.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:1101: apps/tests/CMakeFiles/HyperSystemTests.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

SharineLee commented 1 year ago

Hello,

I would appreciate your nice work!

But, unfortunately, there is an error during make cmake was successfully done without any problems.

My env is like below

Ubuntu 20.04, ROS Noetic gcc and g++ version are 10 ceres 2.1.0 gflag, glog, googletest, benchmark also had been installed from source.

I found three error lines related to ros/serialization.h as follows:

/opt/ros/noetic/include/ros/serialization.h:485:48: error: ‘read’ is not a member of ‘ros::serialization::VectorSerializer<unsigned char, std::allocator, void>’ 485 | VectorSerializer<T, ContainerAllocator>::read(stream, t);

/opt/ros/noetic/include/ros/serialization.h:385:82: error: no class template named ‘rebind’ in ‘class std::allocator’ 385 | typedef std::vector<T, typename ContainerAllocator::template rebind::other> VecType; | ^~~ /opt/ros/noetic/include/ros/serialization.h:386:38: error: no class template named ‘rebind’ in ‘class std::allocator’ 386 | typedef typename VecType::iterator IteratorType; | ^~~~ /opt/ros/noetic/include/ros/serialization.h:387:44: error: no class template named ‘rebind’ in ‘class std::allocator’ 387 | typedef typename VecType::const_iterator ConstIteratorType;

/opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:485:48: error: ‘read’ is not a member of ‘ros::serialization::VectorSerializer<unsigned char, std::allocator, void>’ 485 | VectorSerializer<T, ContainerAllocator>::read(stream, t);

Do you have any idea to resolve these issues?

TIA.

P.S. I added full messages in terminal.

[ 0%] Built target HyperSystem [ 0%] Built target HyperSensors [ 1%] Building CXX object _deps/hyperstate-build/CMakeFiles/HyperState.dir/internal/hyper/state/interpolators/basis.cpp.o [ 2%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/main.cpp.o [ 4%] Building CXX object _deps/hyperstate-build/CMakeFiles/HyperState.dir/internal/hyper/state/interpolators/polynomial.cpp.o [ 4%] Building CXX object _deps/hyperstate-build/CMakeFiles/HyperState.dir/internal/hyper/state/abstract.cpp.o [ 5%] Building CXX object _deps/hyperstate-build/CMakeFiles/HyperState.dir/internal/hyper/state/policies/se3.cpp.o [ 6%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/distortions/distortion_tests.cpp.o [ 8%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/groups/se3_tests.cpp.o [ 8%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/metrics/metrics_tests.cpp.o [ 9%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/groups/su2_tests.cpp.o [ 10%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/orthonormality_alignment_tests.cpp.o [ 11%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/intrinsics_tests.cpp.o [ 12%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/plugins/matrix_base_plugin_tests.cpp.o [ 13%] Linking CXX shared library ../../../lib/libHyperState.so [ 13%] Built target HyperState [ 14%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/main.cpp.o [ 16%] Building CXX object _deps/hyperstate-build/apps/tests/CMakeFiles/HyperStateTests.dir/main.cpp.o [ 16%] Building CXX object _deps/hyperstate-build/apps/tests/CMakeFiles/HyperStateTests.dir/__/__/tests/internal/hyper/range_tests.cpp.o [ 17%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/messages/abstract.cpp.o [ 19%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/sensors/imu.cpp.o [ 19%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/main.cpp.o [ 20%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/tests/internal/tests/optimizers/evaluators/bearing.cpp.o [ 22%] Building CXX object _deps/hyperstate-build/apps/tests/CMakeFiles/HyperStateTests.dir/__/__/tests/internal/hyper/state/state_tests.cpp.o [ 22%] Building CXX object _deps/hyperstate-build/apps/tests/CMakeFiles/HyperStateTests.dir/__/__/tests/internal/hyper/state/interpolators/basis_tests.cpp.o [ 23%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/environment/landmarks/abstract.cpp.o [ 25%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/sensors/sensor.cpp.o [ 26%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/messages/measurements/abstract.cpp.o [ 27%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/main.cpp.o [ 28%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/messages/visual.cpp.o [ 29%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/sensors/camera.cpp.o [ 31%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/tests/internal/tests/optimizers/evaluators/inertial.cpp.o [ 31%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/environment/abstract.cpp.o [ 32%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/tests/internal/tests/optimizers/evaluators/manifold.cpp.o [ 33%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/tests/internal/tests/optimizers/evaluators/pixel.cpp.o [ 34%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/environment/abstract.cpp.o [ 35%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/environment/landmarks/abstract.cpp.o [ 36%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/yaml/yaml.cpp.o [ 37%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/environment/observations/landmark.cpp.o [ 38%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/abstract.cpp.o [ 39%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/costs/exteroceptive.cpp.o [ 40%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/camera.cpp.o [ 41%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/imu.cpp.o [ 42%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/environment/observations/landmark.cpp.o [ 43%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/abstract.cpp.o [ 44%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/costs/exteroceptive.cpp.o [ 45%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/camera.cpp.o [ 46%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/imu.cpp.o [ 47%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/sensor.cpp.o [ 48%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/sensor.cpp.o [ 50%] Linking CXX executable ../../../../../bin/HyperVariablesTests [ 50%] Built target HyperVariablesTests [ 51%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/bearing.cpp.o [ 52%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/bearing.cpp.o [ 53%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/se3.cpp.o [ 54%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/se3.cpp.o [ 55%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/su2.cpp.o [ 56%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/optimizer.cpp.o [ 57%] Linking CXX executable ../../../../../bin/HyperStateTests [ 58%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/evaluators/bearing.cpp.o [ 58%] Built target HyperStateTests [ 59%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/evaluators/inertial.cpp.o [ 60%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/su2.cpp.o [ 61%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/optimizer.cpp.o [ 62%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/evaluators/bearing.cpp.o [ 63%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/evaluators/inertial.cpp.o [ 64%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/evaluators/manifold.cpp.o [ 65%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/evaluators/manifold.cpp.o [ 66%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/evaluators/pixel.cpp.o [ 67%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/abstract.cpp.o [ 68%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/backend.cpp.o [ 69%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/evaluators/pixel.cpp.o [ 70%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/abstract.cpp.o [ 71%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/frontends/abstract.cpp.o [ 72%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/backend.cpp.o [ 73%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/frontends/abstract.cpp.o [ 75%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/frontends/inertial/direct.cpp.o [ 76%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/frontends/visual/klt.cpp.o [ 77%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/module.cpp.o [ 78%] Linking CXX executable ../../../../../bin/HyperSensorsTests [ 78%] Built target HyperSensorsTests [ 79%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/system.cpp.o [ 80%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/abstract.cpp.o [ 81%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/measurements/abstract.cpp.o [ 82%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/frontends/inertial/direct.cpp.o [ 83%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/visual.cpp.o [ 84%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/frontends/visual/klt.cpp.o [ 85%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/module.cpp.o [ 86%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/system.cpp.o [ 87%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/abstract.cpp.o [ 88%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/measurements/abstract.cpp.o [ 89%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/visual.cpp.o [ 90%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/camera.cpp.o [ 92%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/camera.cpp.o [ 92%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/imu.cpp.o [ 93%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/imu.cpp.o [ 94%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/sensor.cpp.o [ 95%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/yaml/yaml.cpp.o [ 96%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/sensor.cpp.o [ 97%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/yaml/yaml.cpp.o In file included from /opt/ros/noetic/include/ros/publisher.h:34, from /opt/ros/noetic/include/ros/node_handle.h:32, from /home/yurl20/grad/hyper_ws/src/HyperSLAM/internal/hyper/system/components/module.cpp:7: /opt/ros/noetic/include/ros/serialization.h: In instantiation of ‘struct ros::serialization::VectorSerializer<unsigned char, std::allocator<unsigned char>, void>’: /opt/ros/noetic/include/ros/serialization.h:485:48: required from ‘void ros::serialization::deserialize(Stream&, std::vector<_Tp, _Alloc>&) [with T = unsigned char; ContainerAllocator = std::allocator<unsigned char>; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/serialization.h:719:16: required from ‘void ros::serialization::IStream::next(T&) [with T = std::vector<unsigned char>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:253:18: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::allInOne(Stream&, T) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >&; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:256:5: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::read(Stream&, T&) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/ros/serialization.h:163:22: required from ‘void ros::serialization::deserialize(Stream&, T&) [with T = sensor_msgs::Image_<std::allocator<void> >; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:136:21: required from ‘ros::VoidConstPtr ros::SubscriptionCallbackHelperT<P, Enabled>::deserialize(const ros::SubscriptionCallbackHelperDeserializeParams&) [with P = const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&; Enabled = void; ros::VoidConstPtr = boost::shared_ptr<const void>]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:385:82: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 385 | typedef std::vector<T, typename ContainerAllocator::template rebind<T>::other> VecType; | ^~~~~~~ /opt/ros/noetic/include/ros/serialization.h:386:38: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 386 | typedef typename VecType::iterator IteratorType; | ^~~~~~~~~~~~ /opt/ros/noetic/include/ros/serialization.h:387:44: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 387 | typedef typename VecType::const_iterator ConstIteratorType; | ^~~~~~~~~~~~~~~~~ In file included from /opt/ros/noetic/include/ros/publisher.h:34, from /opt/ros/noetic/include/ros/node_handle.h:32, from /home/yurl20/grad/hyper_ws/src/HyperSLAM/internal/hyper/system/components/module.cpp:7: /opt/ros/noetic/include/ros/serialization.h: In instantiation of ‘void ros::serialization::deserialize(Stream&, std::vector<_Tp, _Alloc>&) [with T = unsigned char; ContainerAllocator = std::allocator<unsigned char>; Stream = ros::serialization::IStream]’: /opt/ros/noetic/include/ros/serialization.h:719:16: required from ‘void ros::serialization::IStream::next(T&) [with T = std::vector<unsigned char>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:253:18: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::allInOne(Stream&, T) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >&; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:256:5: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::read(Stream&, T&) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/ros/serialization.h:163:22: required from ‘void ros::serialization::deserialize(Stream&, T&) [with T = sensor_msgs::Image_<std::allocator<void> >; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:136:21: required from ‘ros::VoidConstPtr ros::SubscriptionCallbackHelperT<P, Enabled>::deserialize(const ros::SubscriptionCallbackHelperDeserializeParams&) [with P = const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&; Enabled = void; ros::VoidConstPtr = boost::shared_ptr<const void>]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:485:48: error: ‘read’ is not a member of ‘ros::serialization::VectorSerializer<unsigned char, std::allocator<unsigned char>, void>’ 485 | VectorSerializer<T, ContainerAllocator>::read(stream, t); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ make[2]: *** [apps/hyperslam/CMakeFiles/HyperSLAM.dir/build.make:384: apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/module.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /opt/ros/noetic/include/ros/publisher.h:34, from /opt/ros/noetic/include/ros/node_handle.h:32, from /home/yurl20/grad/hyper_ws/src/HyperSLAM/internal/hyper/system/components/module.cpp:7: /opt/ros/noetic/include/ros/serialization.h: In instantiation of ‘struct ros::serialization::VectorSerializer<unsigned char, std::allocator<unsigned char>, void>’: /opt/ros/noetic/include/ros/serialization.h:485:48: required from ‘void ros::serialization::deserialize(Stream&, std::vector<_Tp, _Alloc>&) [with T = unsigned char; ContainerAllocator = std::allocator<unsigned char>; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/serialization.h:719:16: required from ‘void ros::serialization::IStream::next(T&) [with T = std::vector<unsigned char>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:253:18: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::allInOne(Stream&, T) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >&; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:256:5: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::read(Stream&, T&) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/ros/serialization.h:163:22: required from ‘void ros::serialization::deserialize(Stream&, T&) [with T = sensor_msgs::Image_<std::allocator<void> >; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:136:21: required from ‘ros::VoidConstPtr ros::SubscriptionCallbackHelperT<P, Enabled>::deserialize(const ros::SubscriptionCallbackHelperDeserializeParams&) [with P = const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&; Enabled = void; ros::VoidConstPtr = boost::shared_ptr<const void>]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:385:82: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 385 | typedef std::vector<T, typename ContainerAllocator::template rebind<T>::other> VecType; | ^~~~~~~ /opt/ros/noetic/include/ros/serialization.h:386:38: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 386 | typedef typename VecType::iterator IteratorType; | ^~~~~~~~~~~~ /opt/ros/noetic/include/ros/serialization.h:387:44: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 387 | typedef typename VecType::const_iterator ConstIteratorType; | ^~~~~~~~~~~~~~~~~ In file included from /opt/ros/noetic/include/ros/publisher.h:34, from /opt/ros/noetic/include/ros/node_handle.h:32, from /home/yurl20/grad/hyper_ws/src/HyperSLAM/internal/hyper/system/components/module.cpp:7: /opt/ros/noetic/include/ros/serialization.h: In instantiation of ‘void ros::serialization::deserialize(Stream&, std::vector<_Tp, _Alloc>&) [with T = unsigned char; ContainerAllocator = std::allocator<unsigned char>; Stream = ros::serialization::IStream]’: /opt/ros/noetic/include/ros/serialization.h:719:16: required from ‘void ros::serialization::IStream::next(T&) [with T = std::vector<unsigned char>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:253:18: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::allInOne(Stream&, T) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >&; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:256:5: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::read(Stream&, T&) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/ros/serialization.h:163:22: required from ‘void ros::serialization::deserialize(Stream&, T&) [with T = sensor_msgs::Image_<std::allocator<void> >; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:136:21: required from ‘ros::VoidConstPtr ros::SubscriptionCallbackHelperT<P, Enabled>::deserialize(const ros::SubscriptionCallbackHelperDeserializeParams&) [with P = const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&; Enabled = void; ros::VoidConstPtr = boost::shared_ptr<const void>]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:485:48: error: ‘read’ is not a member of ‘ros::serialization::VectorSerializer<unsigned char, std::allocator<unsigned char>, void>’ 485 | VectorSerializer<T, ContainerAllocator>::read(stream, t); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ make[2]: *** [apps/tests/CMakeFiles/HyperSystemTests.dir/build.make:440: apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/module.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:1073: apps/hyperslam/CMakeFiles/HyperSLAM.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:1101: apps/tests/CMakeFiles/HyperSystemTests.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

请问您编译成功了吗,有遇到过这个问题吗?

CMake Error at build/_deps/hypersensors-src/CMakeLists.txt:85 (target_sources): target_sources may only set INTERFACE properties on INTERFACE targets

SharineLee commented 1 year ago

Hello,

I would appreciate your nice work!

But, unfortunately, there is an error during make cmake was successfully done without any problems.

My env is like below

Ubuntu 20.04, ROS Noetic gcc and g++ version are 10 ceres 2.1.0 gflag, glog, googletest, benchmark also had been installed from source.

I found three error lines related to ros/serialization.h as follows:

/opt/ros/noetic/include/ros/serialization.h:485:48: error: ‘read’ is not a member of ‘ros::serialization::VectorSerializer<unsigned char, std::allocator, void>’ 485 | VectorSerializer<T, ContainerAllocator>::read(stream, t);

/opt/ros/noetic/include/ros/serialization.h:385:82: error: no class template named ‘rebind’ in ‘class std::allocator’ 385 | typedef std::vector<T, typename ContainerAllocator::template rebind::other> VecType; | ^~~ /opt/ros/noetic/include/ros/serialization.h:386:38: error: no class template named ‘rebind’ in ‘class std::allocator’ 386 | typedef typename VecType::iterator IteratorType; | ^~~~ /opt/ros/noetic/include/ros/serialization.h:387:44: error: no class template named ‘rebind’ in ‘class std::allocator’ 387 | typedef typename VecType::const_iterator ConstIteratorType;

/opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:485:48: error: ‘read’ is not a member of ‘ros::serialization::VectorSerializer<unsigned char, std::allocator, void>’ 485 | VectorSerializer<T, ContainerAllocator>::read(stream, t);

Do you have any idea to resolve these issues?

TIA.

P.S. I added full messages in terminal.

[ 0%] Built target HyperSystem [ 0%] Built target HyperSensors [ 1%] Building CXX object _deps/hyperstate-build/CMakeFiles/HyperState.dir/internal/hyper/state/interpolators/basis.cpp.o [ 2%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/main.cpp.o [ 4%] Building CXX object _deps/hyperstate-build/CMakeFiles/HyperState.dir/internal/hyper/state/interpolators/polynomial.cpp.o [ 4%] Building CXX object _deps/hyperstate-build/CMakeFiles/HyperState.dir/internal/hyper/state/abstract.cpp.o [ 5%] Building CXX object _deps/hyperstate-build/CMakeFiles/HyperState.dir/internal/hyper/state/policies/se3.cpp.o [ 6%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/distortions/distortion_tests.cpp.o [ 8%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/groups/se3_tests.cpp.o [ 8%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/metrics/metrics_tests.cpp.o [ 9%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/groups/su2_tests.cpp.o [ 10%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/orthonormality_alignment_tests.cpp.o [ 11%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/internal/hyper/variables/intrinsics_tests.cpp.o [ 12%] Building CXX object _deps/hypervariables-build/apps/tests/CMakeFiles/HyperVariablesTests.dir/__/__/tests/plugins/matrix_base_plugin_tests.cpp.o [ 13%] Linking CXX shared library ../../../lib/libHyperState.so [ 13%] Built target HyperState [ 14%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/main.cpp.o [ 16%] Building CXX object _deps/hyperstate-build/apps/tests/CMakeFiles/HyperStateTests.dir/main.cpp.o [ 16%] Building CXX object _deps/hyperstate-build/apps/tests/CMakeFiles/HyperStateTests.dir/__/__/tests/internal/hyper/range_tests.cpp.o [ 17%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/messages/abstract.cpp.o [ 19%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/sensors/imu.cpp.o [ 19%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/main.cpp.o [ 20%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/tests/internal/tests/optimizers/evaluators/bearing.cpp.o [ 22%] Building CXX object _deps/hyperstate-build/apps/tests/CMakeFiles/HyperStateTests.dir/__/__/tests/internal/hyper/state/state_tests.cpp.o [ 22%] Building CXX object _deps/hyperstate-build/apps/tests/CMakeFiles/HyperStateTests.dir/__/__/tests/internal/hyper/state/interpolators/basis_tests.cpp.o [ 23%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/environment/landmarks/abstract.cpp.o [ 25%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/sensors/sensor.cpp.o [ 26%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/messages/measurements/abstract.cpp.o [ 27%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/main.cpp.o [ 28%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/messages/visual.cpp.o [ 29%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/sensors/camera.cpp.o [ 31%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/tests/internal/tests/optimizers/evaluators/inertial.cpp.o [ 31%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/environment/abstract.cpp.o [ 32%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/tests/internal/tests/optimizers/evaluators/manifold.cpp.o [ 33%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/tests/internal/tests/optimizers/evaluators/pixel.cpp.o [ 34%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/environment/abstract.cpp.o [ 35%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/environment/landmarks/abstract.cpp.o [ 36%] Building CXX object _deps/hypersensors-build/apps/tests/CMakeFiles/HyperSensorsTests.dir/__/__/internal/hyper/yaml/yaml.cpp.o [ 37%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/environment/observations/landmark.cpp.o [ 38%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/abstract.cpp.o [ 39%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/costs/exteroceptive.cpp.o [ 40%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/camera.cpp.o [ 41%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/imu.cpp.o [ 42%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/environment/observations/landmark.cpp.o [ 43%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/abstract.cpp.o [ 44%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/costs/exteroceptive.cpp.o [ 45%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/camera.cpp.o [ 46%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/imu.cpp.o [ 47%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/sensor.cpp.o [ 48%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/sensors/sensor.cpp.o [ 50%] Linking CXX executable ../../../../../bin/HyperVariablesTests [ 50%] Built target HyperVariablesTests [ 51%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/bearing.cpp.o [ 52%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/bearing.cpp.o [ 53%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/se3.cpp.o [ 54%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/se3.cpp.o [ 55%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/su2.cpp.o [ 56%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/ceres/optimizer.cpp.o [ 57%] Linking CXX executable ../../../../../bin/HyperStateTests [ 58%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/evaluators/bearing.cpp.o [ 58%] Built target HyperStateTests [ 59%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/evaluators/inertial.cpp.o [ 60%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/manifolds/variables/su2.cpp.o [ 61%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/ceres/optimizer.cpp.o [ 62%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/evaluators/bearing.cpp.o [ 63%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/evaluators/inertial.cpp.o [ 64%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/evaluators/manifold.cpp.o [ 65%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/evaluators/manifold.cpp.o [ 66%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/optimizers/evaluators/pixel.cpp.o [ 67%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/abstract.cpp.o [ 68%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/backend.cpp.o [ 69%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/optimizers/evaluators/pixel.cpp.o [ 70%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/abstract.cpp.o [ 71%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/frontends/abstract.cpp.o [ 72%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/backend.cpp.o [ 73%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/frontends/abstract.cpp.o [ 75%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/frontends/inertial/direct.cpp.o [ 76%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/frontends/visual/klt.cpp.o [ 77%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/module.cpp.o [ 78%] Linking CXX executable ../../../../../bin/HyperSensorsTests [ 78%] Built target HyperSensorsTests [ 79%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/system.cpp.o [ 80%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/abstract.cpp.o [ 81%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/measurements/abstract.cpp.o [ 82%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/frontends/inertial/direct.cpp.o [ 83%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/visual.cpp.o [ 84%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/frontends/visual/klt.cpp.o [ 85%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/module.cpp.o [ 86%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/system.cpp.o [ 87%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/abstract.cpp.o [ 88%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/measurements/abstract.cpp.o [ 89%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/messages/visual.cpp.o [ 90%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/camera.cpp.o [ 92%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/camera.cpp.o [ 92%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/imu.cpp.o [ 93%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/imu.cpp.o [ 94%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/sensor.cpp.o [ 95%] Building CXX object apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/_deps/hypersensors-src/internal/hyper/yaml/yaml.cpp.o [ 96%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/sensors/sensor.cpp.o [ 97%] Building CXX object apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/_deps/hypersensors-src/internal/hyper/yaml/yaml.cpp.o In file included from /opt/ros/noetic/include/ros/publisher.h:34, from /opt/ros/noetic/include/ros/node_handle.h:32, from /home/yurl20/grad/hyper_ws/src/HyperSLAM/internal/hyper/system/components/module.cpp:7: /opt/ros/noetic/include/ros/serialization.h: In instantiation of ‘struct ros::serialization::VectorSerializer<unsigned char, std::allocator<unsigned char>, void>’: /opt/ros/noetic/include/ros/serialization.h:485:48: required from ‘void ros::serialization::deserialize(Stream&, std::vector<_Tp, _Alloc>&) [with T = unsigned char; ContainerAllocator = std::allocator<unsigned char>; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/serialization.h:719:16: required from ‘void ros::serialization::IStream::next(T&) [with T = std::vector<unsigned char>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:253:18: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::allInOne(Stream&, T) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >&; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:256:5: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::read(Stream&, T&) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/ros/serialization.h:163:22: required from ‘void ros::serialization::deserialize(Stream&, T&) [with T = sensor_msgs::Image_<std::allocator<void> >; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:136:21: required from ‘ros::VoidConstPtr ros::SubscriptionCallbackHelperT<P, Enabled>::deserialize(const ros::SubscriptionCallbackHelperDeserializeParams&) [with P = const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&; Enabled = void; ros::VoidConstPtr = boost::shared_ptr<const void>]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:385:82: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 385 | typedef std::vector<T, typename ContainerAllocator::template rebind<T>::other> VecType; | ^~~~~~~ /opt/ros/noetic/include/ros/serialization.h:386:38: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 386 | typedef typename VecType::iterator IteratorType; | ^~~~~~~~~~~~ /opt/ros/noetic/include/ros/serialization.h:387:44: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 387 | typedef typename VecType::const_iterator ConstIteratorType; | ^~~~~~~~~~~~~~~~~ In file included from /opt/ros/noetic/include/ros/publisher.h:34, from /opt/ros/noetic/include/ros/node_handle.h:32, from /home/yurl20/grad/hyper_ws/src/HyperSLAM/internal/hyper/system/components/module.cpp:7: /opt/ros/noetic/include/ros/serialization.h: In instantiation of ‘void ros::serialization::deserialize(Stream&, std::vector<_Tp, _Alloc>&) [with T = unsigned char; ContainerAllocator = std::allocator<unsigned char>; Stream = ros::serialization::IStream]’: /opt/ros/noetic/include/ros/serialization.h:719:16: required from ‘void ros::serialization::IStream::next(T&) [with T = std::vector<unsigned char>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:253:18: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::allInOne(Stream&, T) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >&; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:256:5: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::read(Stream&, T&) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/ros/serialization.h:163:22: required from ‘void ros::serialization::deserialize(Stream&, T&) [with T = sensor_msgs::Image_<std::allocator<void> >; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:136:21: required from ‘ros::VoidConstPtr ros::SubscriptionCallbackHelperT<P, Enabled>::deserialize(const ros::SubscriptionCallbackHelperDeserializeParams&) [with P = const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&; Enabled = void; ros::VoidConstPtr = boost::shared_ptr<const void>]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:485:48: error: ‘read’ is not a member of ‘ros::serialization::VectorSerializer<unsigned char, std::allocator<unsigned char>, void>’ 485 | VectorSerializer<T, ContainerAllocator>::read(stream, t); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ make[2]: *** [apps/hyperslam/CMakeFiles/HyperSLAM.dir/build.make:384: apps/hyperslam/CMakeFiles/HyperSLAM.dir/__/__/internal/hyper/system/components/module.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /opt/ros/noetic/include/ros/publisher.h:34, from /opt/ros/noetic/include/ros/node_handle.h:32, from /home/yurl20/grad/hyper_ws/src/HyperSLAM/internal/hyper/system/components/module.cpp:7: /opt/ros/noetic/include/ros/serialization.h: In instantiation of ‘struct ros::serialization::VectorSerializer<unsigned char, std::allocator<unsigned char>, void>’: /opt/ros/noetic/include/ros/serialization.h:485:48: required from ‘void ros::serialization::deserialize(Stream&, std::vector<_Tp, _Alloc>&) [with T = unsigned char; ContainerAllocator = std::allocator<unsigned char>; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/serialization.h:719:16: required from ‘void ros::serialization::IStream::next(T&) [with T = std::vector<unsigned char>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:253:18: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::allInOne(Stream&, T) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >&; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:256:5: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::read(Stream&, T&) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/ros/serialization.h:163:22: required from ‘void ros::serialization::deserialize(Stream&, T&) [with T = sensor_msgs::Image_<std::allocator<void> >; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:136:21: required from ‘ros::VoidConstPtr ros::SubscriptionCallbackHelperT<P, Enabled>::deserialize(const ros::SubscriptionCallbackHelperDeserializeParams&) [with P = const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&; Enabled = void; ros::VoidConstPtr = boost::shared_ptr<const void>]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:385:82: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 385 | typedef std::vector<T, typename ContainerAllocator::template rebind<T>::other> VecType; | ^~~~~~~ /opt/ros/noetic/include/ros/serialization.h:386:38: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 386 | typedef typename VecType::iterator IteratorType; | ^~~~~~~~~~~~ /opt/ros/noetic/include/ros/serialization.h:387:44: error: no class template named ‘rebind’ in ‘class std::allocator<unsigned char>’ 387 | typedef typename VecType::const_iterator ConstIteratorType; | ^~~~~~~~~~~~~~~~~ In file included from /opt/ros/noetic/include/ros/publisher.h:34, from /opt/ros/noetic/include/ros/node_handle.h:32, from /home/yurl20/grad/hyper_ws/src/HyperSLAM/internal/hyper/system/components/module.cpp:7: /opt/ros/noetic/include/ros/serialization.h: In instantiation of ‘void ros::serialization::deserialize(Stream&, std::vector<_Tp, _Alloc>&) [with T = unsigned char; ContainerAllocator = std::allocator<unsigned char>; Stream = ros::serialization::IStream]’: /opt/ros/noetic/include/ros/serialization.h:719:16: required from ‘void ros::serialization::IStream::next(T&) [with T = std::vector<unsigned char>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:253:18: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::allInOne(Stream&, T) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >&; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/sensor_msgs/Image.h:256:5: required from ‘static void ros::serialization::Serializer<sensor_msgs::Image_<ContainerAllocator> >::read(Stream&, T&) [with Stream = ros::serialization::IStream; T = sensor_msgs::Image_<std::allocator<void> >; ContainerAllocator = std::allocator<void>]’ /opt/ros/noetic/include/ros/serialization.h:163:22: required from ‘void ros::serialization::deserialize(Stream&, T&) [with T = sensor_msgs::Image_<std::allocator<void> >; Stream = ros::serialization::IStream]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:136:21: required from ‘ros::VoidConstPtr ros::SubscriptionCallbackHelperT<P, Enabled>::deserialize(const ros::SubscriptionCallbackHelperDeserializeParams&) [with P = const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&; Enabled = void; ros::VoidConstPtr = boost::shared_ptr<const void>]’ /opt/ros/noetic/include/ros/subscription_callback_helper.h:118:24: required from here /opt/ros/noetic/include/ros/serialization.h:485:48: error: ‘read’ is not a member of ‘ros::serialization::VectorSerializer<unsigned char, std::allocator<unsigned char>, void>’ 485 | VectorSerializer<T, ContainerAllocator>::read(stream, t); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ make[2]: *** [apps/tests/CMakeFiles/HyperSystemTests.dir/build.make:440: apps/tests/CMakeFiles/HyperSystemTests.dir/__/__/internal/hyper/system/components/module.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:1073: apps/hyperslam/CMakeFiles/HyperSLAM.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:1101: apps/tests/CMakeFiles/HyperSystemTests.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

我最近也在研究连续时间SLAM这个方向,可以交个学友吗?(qq:334055096)

McEmzi commented 1 year ago

Thank you for your question, and for the delay in my response. I believe the error: no class template named ‘rebind’ in ‘class std::allocator’ issue arises due to using GCC/G++ 10 (which was chosen in anticipation of Ubuntu 22.04 and ROS 2) instead of GCC/G++ 9. Can you confirm if it works by giving GCC/G++ 9 a higher priority than GCC/G++ 10? See below.

`# Set alternatives. sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 20 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 20 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30`