Rosanswers logo


I’m trying to achieve pick and place in gazebo by sending trajectory from moveit. I noticed in moveit pick and place tutorial that orientation is given as follows:

orientation.setRPY(-M_PI / 2, -M_PI / 4, -M_PI / 2)

This orientation tries to pick the object from x-axis direction ( considering x axis is forward, y axis is pointing to the left and z axis is upwards.) Below image demonstartes how my robot arm positions itself when given above orienatation

image description image description

I want to grasp the object from y axis side i.e parallel to the yellow axis shown in the image. What can be the orientation of the robot??

I have came till this orientation:

orientation.setRPY(-M_PI / 4, -M_PI/2 , -M_PI /4)

below is the image representing robot arm with this orientation. image description image description

if you see then gripper is still inclined and not exactly horizontal. can anyone tell me what can be orientation to grasp the object from y axis direction??

Originally posted by mvish7 on ROS Answers with karma: 104 on 2019-02-25

Post score: 0

Original comments

Comment by gvdhoorn on 2019-03-04:
Could you please not close questions if you've actually answered them?

Please click the checkmark to the left of the / your answer instead.

Comment by mvish7 on 2019-03-04:
sure. My bad as i didn’t know this process. I’ll follow as you suggested.


1 Answer 1


Rosanswers logo

I would report what worked for me:

Due to initial rotation of robot around z axis i was not able to approach the object exactly as i wanted. Below is the orientation which can help you to approach the object in y axis direction if you dont have any initial rotation.

orientation.setRPY(-M_PI / 4, -M_PI/2 , -M_PI /4);

Originally posted by mvish7 with karma: 104 on 2019-03-04

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.