File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -453,6 +453,8 @@ return_type URPositionHardwareInterface::write()
453453 if (position_interface_in_use_)
454454 {
455455 ur_driver_->writeJointCommand (urcl_position_commands_, urcl::comm::ControlMode::MODE_SERVOJ);
456+ // remember old values
457+ urcl_position_commands_old_ = urcl_position_commands_;
456458 }
457459 else
458460 {
@@ -461,9 +463,6 @@ return_type URPositionHardwareInterface::write()
461463
462464 packet_read_ = false ;
463465
464- // remember old values
465- urcl_position_commands_old_ = urcl_position_commands_;
466-
467466 return return_type::OK;
468467 }
469468 else
@@ -477,7 +476,8 @@ void URPositionHardwareInterface::handleRobotProgramState(bool program_running)
477476{
478477 if (!robot_program_running_ && program_running)
479478 {
480- // TODO how to set controller reset flag
479+ urcl_position_commands_old_ = urcl_position_commands_;
480+ position_interface_in_use_ = false ;
481481 }
482482 robot_program_running_ = program_running;
483483}
You can’t perform that action at this time.
0 commit comments