Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix init-ending overwrite #509

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions hrpsys_ros_bridge_tutorials/euslisp/hrp2jsknt-utils.l
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@

(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)))

(defmethod hrp2jsknt-robot
(: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 @@
))
)))
)
)
)
6 changes: 4 additions & 2 deletions 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
7 changes: 5 additions & 2 deletions 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
6 changes: 4 additions & 2 deletions 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