Skip to content

Commit

Permalink
Merge pull request #25 from tkmtnt7000/unitree-bodypose
Browse files Browse the repository at this point in the history
[unitreeeus] Return coords in (send *go1* :body-pose)
  • Loading branch information
k-okada authored May 23, 2022
2 parents 8b0c8ef + 60ae123 commit 41565ff
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions jsk_unitree_robot/unitreeeus/go1-utils.l
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,23 @@
))
;;
(:body-pose
(pose &rest args)
(let (target-coords)
(setq target-coords (send self :copy-worldcoords))
(if (or (vectorp pose) (listp pose))
(progn
(ros::ros-debug "Got r p y float-vector or list as args.")
(setq pose (instance coordinates :init :rpy (list (elt pose 2) (elt pose 1) (elt pose 0)))))
(ros::ros-debug "Got coords variable as args."))
(send target-coords :transform pose)
(send* self :fullbody-inverse-kinematics
target-coords (send self :base_lk)
:rotation-axis t
:translation-axis t
:debug-view nil
args)
))
(&optional pose &rest args)
(when pose
(let (target-coords)
(setq target-coords (send self :copy-worldcoords))
(if (or (vectorp pose) (listp pose))
(progn
(ros::ros-debug "Got r p y float-vector or list as args.")
(setq pose (instance coordinates :init :rpy (list (elt pose 2) (elt pose 1) (elt pose 0)))))
(ros::ros-debug "Got coords variable as args."))
(send target-coords :transform pose)
(send* self :fullbody-inverse-kinematics
target-coords (send self :base_lk)
:rotation-axis t
:translation-axis t
:debug-view nil
args)))
(send self :coords))
;;
(:look-at
(pos &rest args)
Expand Down

0 comments on commit 41565ff

Please sign in to comment.