Skip to content
Snippets Groups Projects
Commit 50c03d82 authored by Florian Walch's avatar Florian Walch
Browse files

Exit control loop if controller was deactivated

parent bd9e9750
No related branches found
No related tags found
No related merge requests found
......@@ -174,7 +174,8 @@ class FrankaHW : public hardware_interface::RobotHW {
const franka::RobotState& robot_state,
franka::Duration time_step) {
robot_state_ = robot_state;
if (ros_callback && !ros_callback(robot_state, time_step) || !controller_active_) {
bool controller_active = controller_active_;
if (ros_callback && !ros_callback(robot_state, time_step) || !controller_active) {
return franka::MotionFinished(command);
}
return command;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment