Open cgarry-vs opened 2 years ago
@gbiggs Can you please take a look on build failure from this report?
I tried building SDR in ros2 rolling and have issues with bag events not being implemented.
I have run apt-update and apt-upgrade before updating ros2bag using
sudo apt-get install ros-$CHOOSE_ROS_DISTRO-ros2bag ros-$CHOOSE_ROS_DISTRO-rosbag2*
after setting the ROS distro version to rolling.
My build fails with the following:
veesai@dev ~/simulator $ colcon build --symlink-install --packages-select system_data_recorder
Starting >>> system_data_recorder
--- stderr: system_data_recorder
/home/veesai/simulator/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/simulator/src/system_data_recorder/src/sdr_component.cpp:98:16: error: ‘rosbag2_cpp::bag_events’ has not been declared
98 | rosbag2_cpp::bag_events::WriterEventCallbacks callbacks;
| ^~~~~~~~~~
/home/veesai/simulator/src/system_data_recorder/src/sdr_component.cpp:99:3: error: ‘callbacks’ was not declared in this scope
99 | callbacks.write_split_callback =
| ^~~~~~~~~
/home/veesai/simulator/src/system_data_recorder/src/sdr_component.cpp:101:19: error: ‘rosbag2_cpp::bag_events’ has not been declared
101 | (rosbag2_cpp::bag_events::WriteSplitInfo & info) {
| ^~~~~~~~~~
/home/veesai/simulator/src/system_data_recorder/src/sdr_component.cpp: In lambda function:
/home/veesai/simulator/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/simulator/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/simulator/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/simulator/src/system_data_recorder/src/sdr_component.cpp:108:12: error: ‘using element_type = class rosbag2_cpp::Writer’ {aka ‘class rosbag2_cpp::Writer’} has no member named ‘add_event_callbacks’
108 | writer_->add_event_callbacks(callbacks);
| ^~~~~~~~~~~~~~~~~~~
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 [3.27s, exited with code 2]
Summary: 0 packages finished [3.42s]
1 package failed: system_data_recorder
1 package had stderr output: system_data_recorder
@fyu-vs bag events
feature not yet present in rolling release. You will need to build rosbag2 from source.
Pulling in the rosbag2 events from this PR https://github.com/ros2/rosbag2/pull/1037 and attempting to build with ROS2 Humble fails with the following output: