Skip to content

Commit bb6aa1c

Browse files
committed
Allow stopping also when target mode == mode == RUNNING
1 parent 257488d commit bb6aa1c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ur_robot_driver/src/robot_state_helper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,11 @@ void RobotStateHelper::setModeExecute(const std::shared_ptr<RobotStateHelper::Se
283283
case urcl::RobotMode::POWER_OFF:
284284
case urcl::RobotMode::IDLE:
285285
case urcl::RobotMode::RUNNING:
286+
if (goal_->stop_program) {
287+
safeDashboardTrigger(this->stop_program_srv_);
288+
}
286289
if (robot_mode_ != static_cast<urcl::RobotMode>(goal_->target_robot_mode) ||
287290
safety_mode_ > urcl::SafetyMode::REDUCED) {
288-
if (goal_->stop_program) {
289-
safeDashboardTrigger(this->stop_program_srv_);
290-
}
291291
doTransition();
292292
} else {
293293
updateRobotState();

0 commit comments

Comments
 (0)