Skip to content

Commit

Permalink
Always go through updateRobotState function in goal callback (#99)
Browse files Browse the repository at this point in the history
When robot is already in the target mode (safety- and robot mode) and the set_mode
action is called with requesting to start the program afterwards, the program
did not start as the robot already was at the desired state.
However, e.g. after a protective stop that is resolved by hand (e.g. when driving
into joint limits) users expected to call that action to restart the robot
again.

With this change, we do the usual check whether to start the program again.
This way, this action can always be used to make sure the robot is running with
the program correctly.
  • Loading branch information
fmauch authored Feb 5, 2020
1 parent 6936890 commit acfffd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ur_robot_driver/src/ros/robot_state_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ void RobotStateHelper::setModeGoalCallback()
}
else
{
result_.success = true;
result_.message = "Target mode already active. Nothing to do here.";
set_mode_as_.setSucceeded(result_);
// There is no transition to do here, but we have to start the program again, if desired.
// This happens inside updateRobotState()
updateRobotState();
}
break;
case RobotMode::NO_CONTROLLER:
Expand Down

0 comments on commit acfffd4

Please sign in to comment.