From 0256b82a197e29c359fb538353e8efb9d3acfa03 Mon Sep 17 00:00:00 2001 From: fengjingchao-cn Date: Sat, 30 Dec 2017 12:04:14 -0800 Subject: [PATCH 1/2] fix the problem of deadlock when recording the message --- .../roscpp/src/libros/subscription.cpp | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ros/ros_comm/roscpp/src/libros/subscription.cpp b/ros/ros_comm/roscpp/src/libros/subscription.cpp index 169c8b4..dfbe4ca 100644 --- a/ros/ros_comm/roscpp/src/libros/subscription.cpp +++ b/ros/ros_comm/roscpp/src/libros/subscription.cpp @@ -680,6 +680,27 @@ uint32_t Subscription::handleMessage(const SerializedMessage& m, bool ser, bool } } + if (name_ == "/rosout" || name_ == "/rosout_agg" || name_ == "/tf") + { + if (link) + { + // measure statistics + statistics_.callback(connection_header, name_, link->getCallerID(), + m, link->getStats().bytes_received_, receipt_time, drops > 0); + // If this link is latched, store off the message so we can immediately + // pass it to new subscribers later + if (link->isLatched()) + { + LatchInfo li; + li.connection_header = connection_header; + li.link = link; + li.message = m; + li.receipt_time = receipt_time; + latched_messages_[link] = li; + } + } + } + else { boost::mutex::scoped_lock lock(publisher_links_mutex_); for (V_PublisherLink::iterator it = publisher_links_.begin(); it != publisher_links_.end(); ++it) From d2b82ee55591382d623217e288dca9e654b20cf6 Mon Sep 17 00:00:00 2001 From: fengjingchao-cn Date: Mon, 22 Jan 2018 20:21:11 +0800 Subject: [PATCH 2/2] increase the start and stop timeouts for rosmaste --- ros/ros_comm/roslaunch/src/roslaunch/launch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ros/ros_comm/roslaunch/src/roslaunch/launch.py b/ros/ros_comm/roslaunch/src/roslaunch/launch.py index 758d6fe..25b4053 100644 --- a/ros/ros_comm/roslaunch/src/roslaunch/launch.py +++ b/ros/ros_comm/roslaunch/src/roslaunch/launch.py @@ -59,8 +59,8 @@ from rosmaster.master_api import NUM_WORKERS -_TIMEOUT_MASTER_START = 10.0 #seconds -_TIMEOUT_MASTER_STOP = 10.0 #seconds +_TIMEOUT_MASTER_START = 60.0 #seconds +_TIMEOUT_MASTER_STOP = 60.0 #seconds _ID = '/roslaunch'