How to build rosbag2 repo master branch on foxy?
When recording larger bag files, (multiple lidar + raw camera topics) the bag record utility will subscribe to all topics, but after a minute or so will silently stop recording. While recording a bag, I use 'watch -n1 ls -alh' to monitor the bag file size and when it stops growing, I know it stopped recording. But the program doesn't crash or produce any error messages, and I am able to view the sensor feeds in rviz, so I know they are still publishing.
So, I figure I need to dive into rosbag2 and put some traces in to start debugging. I cloned the repo into my source tree, and received a build failure:
--- stderr: rosbag2_cpp
/module/src/ros2/rosbag2/rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp: In constructor ‘SequentialWriterTest::SequentialWriterTest()’:
/module/src/ros2/rosbag2/rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp:51:20: error: ‘remove_all’ is not a member of ‘rcpputils::fs’; did you mean ‘remove’?
51 | rcpputils::fs::remove_all(dir);
| ^~~~~~~~~~
| remove
I checked the rcpputils repo and sure enough, there's a new function on the master branch so I cloned this into my source tree as well. I performed a clean and build but the same error persists. I confirmed that the remove_all function does indeed exist in the master branch that I pulled from rcpputils, but it doesn't appear to be suing the version in my overlay...
here's my build script:
source /opt/ros/$ROS_DISTRO/setup.bash
colcon build --merge-install
WHY?