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

[pr2eus_moveit] align the center of primitive cylinder between eus and moveit #497

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion pr2eus_moveit/euslisp/collision-object-publisher.l
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@
(send colobj :primitive_poses
(append pose
(list
(ros::coords->tf-pose (if relative-pose relative-pose (send obj :worldcoords))))))))
(ros::coords->tf-pose (let* ((coords (if relative-pose
relative-pose
(send obj :worldcoords)))
(hv (float-vector 0 0 (/ (height-of-cylinder obj) 2)))
(hv-t (send coords :transform-vector hv)))
;; Adjust the pose in the message to align EusLisp cylinder (origin at base) with MoveIt cylinder (origin at center).
(make-coords :pos hv-t :rot (send coords :rot)))))))))
((and (derivedp obj body) (eq (car (send obj :body-type)) :cube))
(let ((geom (send colobj :primitives))
(pose (send colobj :primitive_poses)))
Expand Down
Loading