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

Merge pull request #80 in SWDEV/franka_ros from controller-switch-fix to develop

* commit '9fecd084':
  Don't run ROS callback before exiting loop
  Exit control loop if controller was deactivated
parents bd9e9750 9fecd084
No related branches found
No related tags found
No related merge requests found
...@@ -174,7 +174,7 @@ class FrankaHW : public hardware_interface::RobotHW { ...@@ -174,7 +174,7 @@ class FrankaHW : public hardware_interface::RobotHW {
const franka::RobotState& robot_state, const franka::RobotState& robot_state,
franka::Duration time_step) { franka::Duration time_step) {
robot_state_ = robot_state; robot_state_ = robot_state;
if (ros_callback && !ros_callback(robot_state, time_step) || !controller_active_) { if (!controller_active_ || ros_callback && !ros_callback(robot_state, time_step)) {
return franka::MotionFinished(command); return franka::MotionFinished(command);
} }
return command; return command;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment