Skip to content

Commit

Permalink
topic_tools/relay: fixed boost::lock exception (#1696)
Browse files Browse the repository at this point in the history
* topic_tools/relay: fixed boost::lock exception

* topic_tools/relay: better name for timer
  • Loading branch information
cwecht authored and dirk-thomas committed Aug 12, 2019
1 parent 6f39ebd commit ab67be5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/topic_tools/src/relay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ string g_output_topic;
string g_monitor_topic;
ros::Publisher g_pub;
ros::Subscriber* g_sub;
ros::Timer g_timer;
bool g_lazy;
bool g_stealth;
ros::TransportHints g_th;
Expand Down Expand Up @@ -172,12 +171,13 @@ int main(int argc, char **argv)
g_th.unreliable().reliable(); // Prefers unreliable, but will accept reliable.

pnh.param<bool>("stealth", g_stealth, false);
ros::Timer monitor_timer;
if (g_stealth)
{
double monitor_rate;
pnh.param<string>("monitor_topic", g_monitor_topic, g_input_topic);
pnh.param<double>("monitor_rate", monitor_rate, 1.0);
g_timer = n.createTimer(ros::Duration(monitor_rate), &timer_cb);
monitor_timer = n.createTimer(ros::Duration(monitor_rate), &timer_cb);
}

subscribe();
Expand Down

0 comments on commit ab67be5

Please sign in to comment.