|
2572 | 2572 | (if (consp l) (deep-copy-list l) l))
|
2573 | 2573 | lst)))
|
2574 | 2574 | (setq print-args (deep-copy-list args)) ;; generate deep copy list for destructive operation
|
2575 |
| - (dotimes (i (/ (length print-args) 2)) ;; escape list |
2576 |
| - (unless (eq (elt print-args (* 2 i)) :move-target) ;; neglect :move-target because move-target is fixed later |
2577 |
| - (escape-list print-args (+ 1 (* 2 i))))) |
2578 |
| - (dotimes (i (/ (length print-args) 2)) ;; escape list |
2579 |
| - (unless (eq (elt print-args (* 2 i)) :move-target) ;; neglect :move-target because move-target is fixed later |
2580 |
| - (escape-robot-link print-args (+ 1 (* 2 i))))) ;; escape robot link |
2581 |
| - (dotimes (j (count :move-target print-args)) ;; escape move-target |
2582 |
| - (if (setq i (position :move-target print-args :count (1+ j))) |
2583 |
| - (cond ((atom (elt print-args (+ i 1))) |
2584 |
| - (setf (elt print-args (+ i 1)) (get-move-target-transform-list (elt print-args (+ i 1))))) |
2585 |
| - (t |
2586 |
| - (setf (elt print-args (+ i 1)) |
2587 |
| - (append '(list) |
2588 |
| - (mapcar #'(lambda (x) (get-move-target-transform-list x)) (elt print-args (+ i 1))))))))) |
| 2575 | + (dotimes (i (/ (length print-args) 2)) |
| 2576 | + (if (not (eq (elt print-args (* 2 i)) :move-target)) |
| 2577 | + ;; escape args other than :move-target |
| 2578 | + (progn |
| 2579 | + (escape-list print-args (+ 1 (* 2 i))) ;; escape list |
| 2580 | + (escape-robot-link print-args (+ 1 (* 2 i)))) ;; escape robot link |
| 2581 | + ;; escape :move-target |
| 2582 | + (cond ((atom (elt print-args (+ 1 (* 2 i)))) |
| 2583 | + (setf (elt print-args (+ 1 (* 2 i))) (get-move-target-transform-list (elt print-args (+ 1 (* 2 i)))))) |
| 2584 | + (t |
| 2585 | + (setf (elt print-args (+ 1 (* 2 i))) |
| 2586 | + (append '(list) |
| 2587 | + (mapcar #'(lambda (x) (get-move-target-transform-list x)) (elt print-args (+ 1 (* 2 i)))))))))) |
2589 | 2588 | (setq command-init `(instance ,(send (class self) :name) :init)
|
2590 | 2589 | 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))))
|
2591 | 2590 | (setq command-args ;; append target-coords and print-args
|
|
0 commit comments