Skip to content

Commit c23b907

Browse files
authored
Fix build for ROS2 Humble (#129)
1 parent fc73384 commit c23b907

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/image_streamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void ImageTransportImageStreamer::restreamFrame(double max_age)
5858
if (inactive_ || !initialized_ )
5959
return;
6060
try {
61-
if ( last_frame + rclcpp::Duration(max_age) < nh_->now() ) {
61+
if ( last_frame + rclcpp::Duration::from_seconds(max_age) < nh_->now() ) {
6262
boost::mutex::scoped_lock lock(send_mutex_);
6363
sendImage(output_size_image, nh_->now() ); // don't update last_frame, it may remain an old value.
6464
}

src/ros_compressed_streamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void RosCompressedStreamer::restreamFrame(double max_age)
2727
if (inactive_ || (last_msg == 0))
2828
return;
2929

30-
if ( last_frame + rclcpp::Duration(max_age) < nh_->now() ) {
30+
if ( last_frame + rclcpp::Duration::from_seconds(max_age) < nh_->now() ) {
3131
boost::mutex::scoped_lock lock(send_mutex_);
3232
sendImage(last_msg, nh_->now() ); // don't update last_frame, it may remain an old value.
3333
}

src/web_video_server.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "async_web_server_cpp/http_reply.hpp"
1717

1818
using namespace std::chrono_literals;
19+
using namespace boost::placeholders;
1920

2021
namespace web_video_server
2122
{

0 commit comments

Comments
 (0)