|
2577 | 2577 | (if (consp l) (deep-copy-list l) l))
|
2578 | 2578 | lst)))
|
2579 | 2579 | (setq print-args (deep-copy-list args)) ;; generate deep copy list for destructive operation
|
2580 |
| - (dotimes (i (/ (length print-args) 2)) ;; escape list |
2581 |
| - (unless (eq (elt print-args (* 2 i)) :move-target) ;; neglect :move-target because move-target is fixed later |
2582 |
| - (escape-list print-args (+ 1 (* 2 i))))) |
2583 |
| - (dotimes (i (length print-args)) (escape-robot-link print-args i)) ;; escape robot link |
2584 |
| - (dotimes (j (count :move-target print-args)) ;; escape move-target |
2585 |
| - (if (setq i (position :move-target print-args :count (1+ j))) |
2586 |
| - (cond ((atom (elt print-args (+ i 1))) |
2587 |
| - (setf (elt print-args (+ i 1)) (get-move-target-transform-list (elt print-args (+ i 1))))) |
2588 |
| - (t |
2589 |
| - (setf (elt print-args (+ i 1)) |
2590 |
| - (append '(list) |
2591 |
| - (mapcar #'(lambda (x) (get-move-target-transform-list x)) (elt print-args (+ i 1))))))))) |
| 2580 | + (dotimes (i (/ (length print-args) 2)) |
| 2581 | + (if (not (eq (elt print-args (* 2 i)) :move-target)) |
| 2582 | + ;; escape args other than :move-target |
| 2583 | + (progn |
| 2584 | + (escape-list print-args (+ 1 (* 2 i))) ;; escape list |
| 2585 | + (escape-robot-link print-args (+ 1 (* 2 i)))) ;; escape robot link |
| 2586 | + ;; escape :move-target |
| 2587 | + (cond ((atom (elt print-args (+ 1 (* 2 i)))) |
| 2588 | + (setf (elt print-args (+ 1 (* 2 i))) (get-move-target-transform-list (elt print-args (+ 1 (* 2 i)))))) |
| 2589 | + (t |
| 2590 | + (setf (elt print-args (+ 1 (* 2 i))) |
| 2591 | + (append '(list) |
| 2592 | + (mapcar #'(lambda (x) (get-move-target-transform-list x)) (elt print-args (+ 1 (* 2 i)))))))))) |
2592 | 2593 | (setq command-init `(instance ,(send (class self) :name) :init)
|
2593 | 2594 | command-setup `(progn (send r :newcoords (make-coords :4x4 ,(send self :4x4))) (mapc #'(lambda (j a) (send* j :joint-angle a ,joint-args)) (list . ,(mapcar #'(lambda (x) `(send r ,(intern (string-upcase x) *keyword-package*))) (send-all (remove-duplicates (append (send-all union-link-list :joint) joint-list)) :name))) ,(list 'quote av0)) (objects (list r))))
|
2594 | 2595 | (setq command-args ;; append target-coords and print-args
|
|
0 commit comments