Skip to content

Commit

Permalink
fix for baxter_interface v1.1.1, which removes limitation on number o…
Browse files Browse the repository at this point in the history
…f points to sent (#635)

from v1.1.1 if num_points is 1, it will use current position to the first element of trajectory point RethinkRobotics/baxter_interface@b38ec25
  • Loading branch information
k-okada authored Jul 19, 2016
1 parent 64619b9 commit 5618b10
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions jsk_baxter_robot/baxtereus/baxter-interface.l
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,10 @@
(:angle-vector-sequence (avs &optional (tms :fast) (ctype controller-type) (start-time 0) &key (scale 2.2) (min-time 0.05))
;; force add current position to the top of avs
(if (atom tms) (setq tms (list tms)))
(push (send self :state :potentio-vector :wait-until-update t) avs)
(push 50 tms)
(when (= (length avs) 2) ;; when input avs is 1
(setq avs (list (elt avs 0) (midpoint 0.5 (elt avs 0) (elt avs 1)) (elt avs 1)))
(cond ((numberp (elt tms 1))
(setq tms (list (elt tms 0) (/ (elt tms 1) 2) (/ (elt tms 1) 2))))
(t
(setq tms (list (elt tms 0) (elt tms 1) (elt tms 1))))))
(when (= (length avs) 3) ;; when input avs is 1 or 2
(setq avs (append avs (list (elt avs 2))))
(setq tms (append tms (list 50))))
;; from v1.1.1 if num_points is 1, it will use current position to the first element of trajectory point https://github.com/RethinkRobotics/baxter_interface/commit/b38ec257fece0711adb260ed6bc161096aa3ecae
(when (>= (length avs) 2)
(push (send self :state :potentio-vector :wait-until-update t) avs)
(push 50 tms))
(setq ctype (or ctype controller-type)) ;; use default if ctype is nil
(send-super :angle-vector-sequence avs tms ctype start-time :scale scale :min-time min-time))

Expand Down

0 comments on commit 5618b10

Please sign in to comment.