Skip to content

Commit

Permalink
[hrpsys_ros_bridge_tutorials/euslisp] Call pre-defined :init-ending i…
Browse files Browse the repository at this point in the history
…n overwritten :init-ending (start-jsk#508).
  • Loading branch information
snozawa committed Apr 18, 2017
1 parent cfd0b27 commit 5589cd5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
5 changes: 3 additions & 2 deletions hrpsys_ros_bridge_tutorials/euslisp/hrp2jsknt-utils.l
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

(unless (assoc :init-org (send hrp2jsknt-robot :methods))
(rplaca (assoc :init (send hrp2jsknt-robot :methods)) :init-org))
(unless (assoc :init-ending-org (send hrp2jsknt-robot :methods))
(rplaca (assoc :init-ending (send hrp2jsknt-robot :methods)) :init-ending-org))
(eval
`(defmethod hrp2jsknt-robot
,@(get-hrp2-with-hand-class-methods)))
Expand All @@ -11,9 +13,8 @@
(:init-ending
(&rest args)
(prog1
(send-super* :init-ending args)
(send self :init-ending-org)
(send self :set-additional-end-coords)
(send self :define-min-max-table)
))
(:inverse-kinematics
(target-coords
Expand Down
5 changes: 4 additions & 1 deletion hrpsys_ros_bridge_tutorials/euslisp/hrp4r-utils.l
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
(require :hrp4r "package://hrpsys_ros_bridge_tutorials/models/hrp4r.l")

;; If you overwrite :init-ending in hrp4r.l, comment in the following:
;; (unless (assoc :init-ending-org (send hrp4r-robot :methods))
;; (rplaca (assoc :init-ending (send hrp4r-robot :methods)) :init-ending-org))
(defmethod hrp4r-robot
(:init-ending
()
Expand Down Expand Up @@ -39,4 +42,4 @@
))
)))
)
)
)
4 changes: 3 additions & 1 deletion hrpsys_ros_bridge_tutorials/euslisp/jaxon-utils.l
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
(require :jaxon "package://hrpsys_ros_bridge_tutorials/models/jaxon.l")
(require :thkhand-utils "package://hrpsys_ros_bridge_tutorials/euslisp/thkhand-utils.l")

(unless (assoc :init-ending-org (send JAXON-robot :methods))
(rplaca (assoc :init-ending (send JAXON-robot :methods)) :init-ending-org))
(defmethod JAXON-robot
(:init-ending
(&rest args)
(prog1
(send-super* :init-ending args)
(send self :init-ending-org)
(send self :add-hoist-point-coords)
(send self :add-shin-cushion-parts)
(send self :add-shin-contact-coords)
Expand Down
5 changes: 4 additions & 1 deletion hrpsys_ros_bridge_tutorials/euslisp/jaxon_red-utils.l
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
(require :jaxon "package://hrpsys_ros_bridge_tutorials/models/jaxon_red.l")
(require :thkhand-utils "package://hrpsys_ros_bridge_tutorials/euslisp/thkhand-utils.l")

(unless (assoc :init-ending-org (send JAXON_RED-robot :methods))
(rplaca (assoc :init-ending (send JAXON_RED-robot :methods)) :init-ending-org))

(defmethod JAXON_RED-robot
(:init-ending
(&rest args)
(prog1
(send-super* :init-ending args)
(send self :init-ending-org)
(send self :add-hoist-point-coords)
(send self :add-shin-cushion-parts)
(send self :add-shin-contact-coords)
Expand Down
4 changes: 3 additions & 1 deletion hrpsys_ros_bridge_tutorials/euslisp/staro-utils.l
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@
)
)

(unless (assoc :init-ending-org (send STARO-robot :methods))
(rplaca (assoc :init-ending (send STARO-robot :methods)) :init-ending-org))
(defmethod STARO-robot
(:init-ending
(&rest args)
(prog1
(send-super* :init-ending args)
(send self :init-ending-org)
(send self :add-additional-body-parts)

;; add contact-end-coords to arms
Expand Down

0 comments on commit 5589cd5

Please sign in to comment.