Commit 4dda6d5
authored
Make sure motion control returns to main thread before stopping (UniversalRobots#490)
When the watchdog times out, we halt in the external_control script and
call stopj() just before that. However, ongoing motion will never happen
in the main thread, but we always use a motion thread. Thus, calling
stopj() here will result in an error that currently another thread is
controlling the robot's motion.
Since we still want to stop the robot using the predefined deceleration,
we have to stop all motion beforehand. Effectively returning motion
control to the main thread before calling stopj().
Alternatively, we could remove the `stopj()` command (it is effectively
not doing anything right now, anyway), but that would result in a very
sudden stop of the robot.1 parent 40bc3c8 commit 4dda6d5
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1083 | 1083 | | |
1084 | 1084 | | |
1085 | 1085 | | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
1086 | 1093 | | |
1087 | 1094 | | |
1088 | 1095 | | |
| |||
0 commit comments