Skip to content

Commit ff5332b

Browse files
committed
Quickfix against move home bug
1 parent 166befd commit ff5332b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ur_robot_driver/src/hardware_interface.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)