|
257 | 257 | ;; setjointangles |
258 | 258 | (let ((av-rad-list (map cons #'deg2rad av))) |
259 | 259 | (case hand |
260 | | - (:hands (send self :call-operation-return :servocontrollerservice_setjointangles |
| 260 | + (:hands |
| 261 | + (when (= (length av) 4) (setq av-rad-list (concatenate float-vector av-rad-list av-rad-list))) |
| 262 | + (send self :call-operation-return :servocontrollerservice_setjointangles |
261 | 263 | :jvs av-rad-list :tm (/ tm 1000.0))) |
262 | 264 | ((:rhand :lhand) |
263 | 265 | (send self :call-operation-return :servocontrollerservice_setjointanglesofgroup |
|
316 | 318 | (multiple-value-bind (a1 a2 b1 b2) (map cons #'deg2rad vec) |
317 | 319 | (+ (get-width a1 a2) |
318 | 320 | (get-width (- b1) (- b2))))))) |
319 | | - (:hand-width (hand &optional width &key (tm 1000) effort) |
| 321 | + (:hand-width (hand &optional width &key (time 1000) effort) |
320 | 322 | (if width |
321 | 323 | ;; set hand width |
322 | 324 | (progn |
323 | 325 | (when effort (send self :hand-effort hand effort)) |
324 | | - (send self :hand-angle-vector hand (send self :hand-width2angles width) tm)) |
| 326 | + (send self :hand-angle-vector hand (send self :hand-width2angles width) time)) |
325 | 327 | ;; get hand width |
326 | 328 | (send self :hand-angles2width (send self :hand-angle-vector hand)))) |
327 | | - (:start-grasp (&optional (arm :arms) &key effort) |
328 | | - (cond ((eq arm :rarm) |
329 | | - (send self :hand-width :rhand 0 :effort effort)) |
330 | | - ((eq arm :larm) |
331 | | - (send self :hand-width :lhand 0 :effort effort)) |
332 | | - ((eq arm :arms) |
333 | | - (send self :hand-width :rhand 0 :effort effort) |
334 | | - (send self :hand-width :lhand 0 :effort effort)) |
335 | | - (t (error ";; No such arm: ~A~%." arm)))) |
| 329 | + (:start-grasp (&optional (arm :arms) &key (time 1000) effort) |
| 330 | + (case arm |
| 331 | + (:arms (setq arm :hands)) |
| 332 | + (:rarm (setq arm :rhand)) |
| 333 | + (:larm (setq arm :lhand))) |
| 334 | + (send self :hand-width arm 0 :time time :effort effort)) |
336 | 335 | (:stop-grasp (&optional (arm :arms) &key effort) |
337 | 336 | (cond ((eq arm :rarm) |
338 | 337 | (send self :hand-width :rhand 100 :effort effort)) |
|
0 commit comments