From 6337d4a374cd48c10d0999af36472e50a80a85d8 Mon Sep 17 00:00:00 2001 From: Tristan Schnell Date: Tue, 11 Jun 2019 13:59:03 +0200 Subject: [PATCH] added ros controller reset when robot program isn't running --- ur_rtde_driver/src/ros/hardware_interface_node.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ur_rtde_driver/src/ros/hardware_interface_node.cpp b/ur_rtde_driver/src/ros/hardware_interface_node.cpp index af6d0a1..027a918 100644 --- a/ur_rtde_driver/src/ros/hardware_interface_node.cpp +++ b/ur_rtde_driver/src/ros/hardware_interface_node.cpp @@ -139,6 +139,7 @@ int main(int argc, char** argv) double expected_cycle_time = 1.0 / (static_cast(g_hw_interface->getControlFrequency())); + ROS_INFO("Starting control loop"); // Run as fast as possible while (ros::ok()) { @@ -151,7 +152,7 @@ int main(int argc, char** argv) period.fromSec(std::chrono::duration_cast>(stopwatch_now - stopwatch_last).count()); stopwatch_last = stopwatch_now; - cm.update(timestamp, period); + cm.update(timestamp, period, !g_hw_interface->isRobotProgramRunning()); g_hw_interface->write(timestamp, period); // if (!control_rate.sleep())