ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to build rosbag2 repo master branch on foxy?

asked 2020-08-07 14:12:43 -0500

dawonn_haval gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-08-07 18:38:32 -0500

dawonn_haval gravatar image

I upgraded the binary version of rcpputils from 1.1 to 1.3 and now rosbag2 master builds fine.

I would still like to know what I was doing wrong, since I had 1.3 installed in my workspace and ros2 pkg prefix rcpputils showed the correct install path...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-08-07 14:12:43 -0500

Seen: 151 times

Last updated: Aug 07 '20