-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Pulling in the rosbag2 events from this PR ros2/rosbag2#1037 and attempting to build with ROS2 Humble fails with the following output:
colcon build --symlink-install --packages-select system_data_recorder
Starting >>> system_data_recorder
--- stderr: system_data_recorder
/home/veesai/ros2_humble/src/system_data_recorder/src/sdr_component.cpp: In member function ‘virtual rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn sdr::SystemDataRecorder::on_configure(const rclcpp_lifecycle::State&)’:
/home/veesai/ros2_humble/src/system_data_recorder/src/sdr_component.cpp:101:6: error: ‘rosbag2_cpp::bag_events::WriteSplitInfo’ has not been declared
101 | (rosbag2_cpp::bag_events::WriteSplitInfo & info) {
| ^~~~~~~~~~~
/home/veesai/ros2_humble/src/system_data_recorder/src/sdr_component.cpp: In lambda function:
/home/veesai/ros2_humble/src/system_data_recorder/src/sdr_component.cpp:104:29: error: request for member ‘opened_file’ in ‘info’, which is of non-class type ‘int’
104 | last_bag_file_ = info.opened_file;
| ^~~~~~~~~~~
/home/veesai/ros2_humble/src/system_data_recorder/src/sdr_component.cpp:106:36: error: request for member ‘closed_file’ in ‘info’, which is of non-class type ‘int’
106 | notify_new_file_to_copy(info.closed_file);
| ^~~~~~~~~~~
/home/veesai/ros2_humble/src/system_data_recorder/src/sdr_component.cpp: In member function ‘virtual rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn sdr::SystemDataRecorder::on_configure(const rclcpp_lifecycle::State&)’:
/home/veesai/ros2_humble/src/system_data_recorder/src/sdr_component.cpp:107:5: error: no match for ‘operator=’ (operand types are ‘rosbag2_cpp::bag_events::BagSplitCallbackType’ {aka ‘std::function<void(rosbag2_cpp::bag_events::BagSplitInfo&)>’} and ‘sdr::SystemDataRecorder::on_configure(const rclcpp_lifecycle::State&)::<lambda(int&)>’)
107 | };
| ^
In file included from /usr/include/c++/9/future:48,
from /home/veesai/ros2_humble/install/rclcpp/include/rclcpp/rclcpp/executors.hpp:18,
from /home/veesai/ros2_humble/install/rclcpp/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/veesai/ros2_humble/src/system_data_recorder/include/sdr/sdr_component.hpp:25,
from /home/veesai/ros2_humble/src/system_data_recorder/src/sdr_component.cpp:15:
/usr/include/c++/9/bits/std_function.h:462:7: note: candidate: ‘std::function<_Res(_ArgTypes ...)>& std::function<_Res(_ArgTypes ...)>::operator=(const std::function<_Res(_ArgTypes ...)>&) [with _Res = void; _ArgTypes = {rosbag2_cpp::bag_events::BagSplitInfo&}]’
462 | operator=(const function& __x)
| ^~~~~~~~
/usr/include/c++/9/bits/std_function.h:462:33: note: no known conversion for argument 1 from ‘sdr::SystemDataRecorder::on_configure(const rclcpp_lifecycle::State&)::<lambda(int&)>’ to ‘const std::function<void(rosbag2_cpp::bag_events::BagSplitInfo&)>&’
462 | operator=(const function& __x)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/std_function.h:480:7: note: candidate: ‘std::function<_Res(_ArgTypes ...)>& std::function<_Res(_ArgTypes ...)>::operator=(std::function<_Res(_ArgTypes ...)>&&) [with _Res = void; _ArgTypes = {rosbag2_cpp::bag_events::BagSplitInfo&}]’
480 | operator=(function&& __x) noexcept
| ^~~~~~~~
/usr/include/c++/9/bits/std_function.h:480:28: note: no known conversion for argument 1 from ‘sdr::SystemDataRecorder::on_configure(const rclcpp_lifecycle::State&)::<lambda(int&)>’ to ‘std::function<void(rosbag2_cpp::bag_events::BagSplitInfo&)>&&’
480 | operator=(function&& __x) noexcept
| ~~~~~~~~~~~^~~
/usr/include/c++/9/bits/std_function.h:494:7: note: candidate: ‘std::function<_Res(_ArgTypes ...)>& std::function<_Res(_ArgTypes ...)>::operator=(std::nullptr_t) [with _Res = void; _ArgTypes = {rosbag2_cpp::bag_events::BagSplitInfo&}; std::nullptr_t = std::nullptr_t]’
494 | operator=(nullptr_t) noexcept
| ^~~~~~~~
/usr/include/c++/9/bits/std_function.h:494:17: note: no known conversion for argument 1 from ‘sdr::SystemDataRecorder::on_configure(const rclcpp_lifecycle::State&)::<lambda(int&)>’ to ‘std::nullptr_t’
494 | operator=(nullptr_t) noexcept
| ^~~~~~~~~
/usr/include/c++/9/bits/std_function.h:523:2: note: candidate: ‘template<class _Functor> std::function<_Res(_ArgTypes ...)>::_Requires<std::function<_Res(_ArgTypes ...)>::_Callable<typename std::decay<_Functor>::type>, std::function<_Res(_ArgTypes ...)>&> std::function<_Res(_ArgTypes ...)>::operator=(_Functor&&) [with _Functor = _Functor; _Res = void; _ArgTypes = {rosbag2_cpp::bag_events::BagSplitInfo&}]’
523 | operator=(_Functor&& __f)
| ^~~~~~~~
/usr/include/c++/9/bits/std_function.h:523:2: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/std_function.h: In substitution of ‘template<class _Res, class ... _ArgTypes> template<class _Cond, class _Tp> using _Requires = typename std::enable_if<_Cond::value, _Tp>::type [with _Cond = std::function<void(rosbag2_cpp::bag_events::BagSplitInfo&)>::_Callable<sdr::SystemDataRecorder::on_configure(const rclcpp_lifecycle::State&)::<lambda(int&)>, std::__invoke_result<sdr::SystemDataRecorder::on_configure(const rclcpp_lifecycle::State&)::<lambda(int&)>&, rosbag2_cpp::bag_events::BagSplitInfo&> >; _Tp = std::function<void(rosbag2_cpp::bag_events::BagSplitInfo&)>&; _Res = void; _ArgTypes = {rosbag2_cpp::bag_events::BagSplitInfo&}]’:
/usr/include/c++/9/bits/std_function.h:523:2: required by substitution of ‘template<class _Functor> std::function<void(rosbag2_cpp::bag_events::BagSplitInfo&)>::_Requires<std::function<void(rosbag2_cpp::bag_events::BagSplitInfo&)>::_Callable<typename std::decay<_Tp>::type, std::__invoke_result<typename std::decay<_Tp>::type&, rosbag2_cpp::bag_events::BagSplitInfo&> >, std::function<void(rosbag2_cpp::bag_events::BagSplitInfo&)>&> std::function<void(rosbag2_cpp::bag_events::BagSplitInfo&)>::operator=<_Functor>(_Functor&&) [with _Functor = sdr::SystemDataRecorder::on_configure(const rclcpp_lifecycle::State&)::<lambda(int&)>]’
/home/veesai/ros2_humble/src/system_data_recorder/src/sdr_component.cpp:107:5: required from here
/usr/include/c++/9/bits/std_function.h:385:8: error: no type named ‘type’ in ‘struct std::enable_if<false, std::function<void(rosbag2_cpp::bag_events::BagSplitInfo&)>&>’
385 | using _Requires = typename enable_if<_Cond::value, _Tp>::type;
| ^~~~~~~~~
/usr/include/c++/9/bits/std_function.h:532:2: note: candidate: ‘template<class _Functor> std::function<_Res(_ArgTypes ...)>& std::function<_Res(_ArgTypes ...)>::operator=(std::reference_wrapper<_Functor>) [with _Functor = _Functor; _Res = void; _ArgTypes = {rosbag2_cpp::bag_events::BagSplitInfo&}]’
532 | operator=(reference_wrapper<_Functor> __f) noexcept
| ^~~~~~~~
/usr/include/c++/9/bits/std_function.h:532:2: note: template argument deduction/substitution failed:
/home/veesai/ros2_humble/src/system_data_recorder/src/sdr_component.cpp:107:5: note: ‘sdr::SystemDataRecorder::on_configure(const rclcpp_lifecycle::State&)::<lambda(int&)>’ is not derived from ‘std::reference_wrapper<_Tp>’
107 | };
| ^
make[2]: *** [CMakeFiles/sdr_component.dir/build.make:63: CMakeFiles/sdr_component.dir/src/sdr_component.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:107: CMakeFiles/sdr_component.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed <<< system_data_recorder [2.82s, exited with code 2]
Summary: 0 packages finished [3.28s]
1 package failed: system_data_recorder
1 package had stderr output: system_data_recorder
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels