forked from start-jsk/rtmros_gazebo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request start-jsk#129 from hyaguchijsk/hrp2w_grasp_and_bas…
…e_control Hrp2w grasp and base control
- Loading branch information
Showing
2 changed files
with
85 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
;; stop and start grasp | ||
(defun hrp2w-stop-grasp (limb) | ||
(when (boundp '*hrp2w*) | ||
(case limb | ||
(:larm | ||
(send *hrp2w* :larm :thumb-r :joint-angle -45.0) | ||
) | ||
(:rarm | ||
(send *hrp2w* :rarm :thumb-r :joint-angle 45.0) | ||
)) | ||
(when (boundp '*ri*) | ||
(send *ri* :angle-vector (send *hrp2w* :angle-vector) 1000) | ||
(send *ri* :wait-interpolation) | ||
(send *ri* :stop-grasp limb) | ||
) | ||
) | ||
) | ||
|
||
(defun hrp2w-start-grasp (limb &key | ||
(angle 0.0) | ||
(target-error 0.15) | ||
(gain-percentage 5)) | ||
(when (boundp '*hrp2w*) | ||
(case limb | ||
(:larm | ||
(send *hrp2w* :larm :thumb-r :joint-angle angle) | ||
) | ||
(:rarm | ||
(send *hrp2w* :rarm :thumb-r :joint-angle angle) | ||
)) | ||
(when (boundp '*ri*) | ||
(send *ri* :start-grasp limb | ||
:target-error target-error | ||
:gain-percentage gain-percentage) | ||
(send *ri* :angle-vector (send *hrp2w* :angle-vector) 1000) | ||
(send *ri* :wait-interpolation) | ||
) | ||
) | ||
) |