Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ROS-O] required patches on current systems #2297

Open
wants to merge 12 commits into
base: noetic-devel
Choose a base branch
from
Prev Previous commit
Next Next commit
Update header for Boost 1.83
  • Loading branch information
jspricke authored and v4hn committed Oct 14, 2024
commit faa0422242f3b465cf932f0de97c5bd1bec9153a
12 changes: 12 additions & 0 deletions tools/rosbag/src/encrypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@

#include <boost/scoped_ptr.hpp>
#include <boost/program_options.hpp>
#if BOOST_VERSION < 107200
#include <boost/progress.hpp>
#else
#include <boost/timer/progress_display.hpp>
#endif
#include <boost/regex.hpp>

#include <ros/ros.h>
Expand Down Expand Up @@ -161,9 +165,17 @@ int encrypt(EncryptorOptions const& options)
outbag.setEncryptorPlugin(options.plugin, options.param);
outbag.setCompression(options.compression);
rosbag::View view(inbag);
#if BOOST_VERSION < 107200
boost::scoped_ptr<boost::progress_display> progress;
#else
boost::scoped_ptr<boost::timer::progress_display> progress;
#endif
if (!options.quiet)
#if BOOST_VERSION < 107200
progress.reset(new boost::progress_display(view.size(), std::cout, "Progress:\n ", " ", " "));
#else
progress.reset(new boost::timer::progress_display(view.size(), std::cout, "Progress:\n ", " ", " "));
#endif
for (rosbag::View::const_iterator it = view.begin(); it != view.end(); ++it)
{
outbag.write(it->getTopic(), it->getTime(), *it, it->getConnectionHeader());
Expand Down