1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-10 10:00:48 +02:00

Only do adjustment of position at the very end of the move

This commit is contained in:
Jarek Potiuk
2018-02-04 22:39:07 +01:00
parent 2ace46d824
commit b4718ab4d2

View File

@@ -148,7 +148,6 @@ def driveRobotLowBandwidthTrajectory():
l_current_position[j] = interpolate(l_segment_elapsed_time, l_total_segment_time, l_start_pos[j], l_end_pos[j], l_start_vel[j], l_end_vel[j]) l_current_position[j] = interpolate(l_segment_elapsed_time, l_total_segment_time, l_start_pos[j], l_end_pos[j], l_start_vel[j], l_end_vel[j])
j = j + 1 j = j + 1
end end
servoj(l_current_position,t=SERVOJ_TIME,lookahead_time=SERVOJ_LOOKAHEAD_TIME,gain=SERVOJ_GAIN) servoj(l_current_position,t=SERVOJ_TIME,lookahead_time=SERVOJ_LOOKAHEAD_TIME,gain=SERVOJ_GAIN)
enter_critical enter_critical
g_total_elapsed_time = g_total_elapsed_time + TIME_INTERVAL g_total_elapsed_time = g_total_elapsed_time + TIME_INTERVAL
@@ -156,11 +155,12 @@ def driveRobotLowBandwidthTrajectory():
exit_critical exit_critical
end end
while not is_final_position_reached(l_current_position):
servoj(l_current_position,t=SERVOJ_TIME,lookahead_time=SERVOJ_LOOKAHEAD_TIME,gain=SERVOJ_GAIN)
end
if l_stopping_after_next_interpolation: if l_stopping_after_next_interpolation:
textmsg("Stopping the controlling thread on signal from receiving thread after one interpolation loop.") while not is_final_position_reached(l_end_pos):
textmsg("Catching up on final position not reached first time.")
servoj(l_end_pos,t=SERVOJ_TIME,lookahead_time=SERVOJ_LOOKAHEAD_TIME,gain=SERVOJ_GAIN)
end
textmsg("Finishing the controlling thread. Final position reached.")
break break
end end
end end