Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorials:beginner:failure_handling [2019/07/16 11:34] – cpo | tutorials:beginner:failure_handling [2022/03/15 13:38] – [Recovering from the failure] schimpf | ||
---|---|---|---|
Line 107: | Line 107: | ||
(defparameter *max-bound* 10.5) | (defparameter *max-bound* 10.5) | ||
- | (defun navigate (?v) | + | (defun navigate (&key ((: |
+ | & | ||
+ | (declare (type (or list null) ?target)) | ||
(flet ((out-of-bounds (pose) | (flet ((out-of-bounds (pose) | ||
| | ||
Line 116: | Line 118: | ||
(whenever ((fl-funcall #' | (whenever ((fl-funcall #' | ||
(error ' | (error ' | ||
- | (exe: | + | (exe: |
</ | </ | ||
Line 191: | Line 193: | ||
(defparameter *max-bound* 10.5) | (defparameter *max-bound* 10.5) | ||
- | (defun navigate (?v) | + | (defun navigate (&key ((: |
+ | & | ||
+ | (declare (type (or list null) ?target)) | ||
(flet ((out-of-bounds (pose) | (flet ((out-of-bounds (pose) | ||
| | ||
Line 197: | Line 201: | ||
(not (and (< *min-bound* x *max-bound*) | (not (and (< *min-bound* x *max-bound*) | ||
(< *min-bound* y *max-bound*)))))) | (< *min-bound* y *max-bound*)))))) | ||
- | | + | |
((out-of-bounds-error (e) | ((out-of-bounds-error (e) | ||
| | ||
| | ||
(let ((?corr-v (list | (let ((?corr-v (list | ||
- | (max 0.6 (min 10.4 (car ?v))) | + | (max 0.6 (min 10.4 (car ?target))) |
- | (max 0.6 (min 10.4 (cadr ?v))) | + | (max 0.6 (min 10.4 (cadr ?target))) |
0))) | 0))) | ||
| | ||
Line 212: | Line 216: | ||
(whenever ((fl-funcall #' | (whenever ((fl-funcall #' | ||
(error ' | (error ' | ||
- | (exe: | + | (exe: |
(defun recover-from-oob (& | (defun recover-from-oob (& |