HOW to set orientation for my robot?

2,085 views
Skip to first unread message

9492...@qq.com

unread,
Mar 3, 2016, 2:53:40 AM3/3/16
to MoveIt! Users
I want to move my robot to a position,but i can't understand the orientation ,what's it mean and how to set it?How can i set a pose? The follow is my core:
#include <ros/ros.h>
#include <moveit/move_group_interface/move_group.h>
int main(int argc, char **argv)
{
  ros::init(argc, argv, "lesson_move_group");
  // start a background "spinner", so our node can process ROS messages  
//  - this lets us know when the move is completed 
 ros::AsyncSpinner spinner(1);  
spinner.start();  
geometry_msgs::Pose target_pose;  
 target_pose.position.x = 0.374;
   target_pose.position.y = 0.2;
   target_pose.position.z = 0.63;

 target_pose.orientation.x = 0.5; 
 target_pose.orientation.y = 0.5; 
 target_pose.orientation.z = 0.70710678;  
 target_pose.orientation.w = 0.0;  
moveit::planning_interface::MoveGroup group("manipulator");  
group.setPoseTarget(target_pose); 
 group.move();
}
   

Qiang Qiu

unread,
Mar 4, 2016, 3:30:36 AM3/4/16
to MoveIt! Users
Hi, the orientation is defined by quaternion, you can refer to 

      Quaternions and spatial rotation (https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation)

or these Blogs in Chinese (you use the qq.com, so I think you are Chinese):


Any questions you have (after reading these materials), can be post here.

9492...@qq.com

unread,
Mar 10, 2016, 9:48:09 PM3/10/16
to MoveIt! Users
Thank you , I learn a lot, but I want get a group of orientation as soon as possible, not calculating by a series of formula.I want to grab a object by a gripper,which has driffent poses.So,the pose of robot tool0 must be determined.what's more , the position affects the values of the orientation.I set some poses but it can't get it.  

在 2016年3月3日星期四 UTC+8下午3:53:40,9492...@qq.com写道:

Qiang Qiu

unread,
Mar 12, 2016, 12:49:58 AM3/12/16
to MoveIt! Users
Hi, as illustrated in figure1, your object recognition program can determine the poseture of object {O} in the base frame of the robot {W}. Besides, the grasp frame {H} is defined in {O} frame. and then ,you can calculate the grasp poseture (position and orientation) in the base frame {W}, which is what you want.
Best Regards!

Qiang Qiu

unread,
Mar 13, 2016, 9:19:32 PM3/13/16
to MoveIt! Users
    Figure 1, re-attached.



On Thursday, March 3, 2016 at 3:53:40 PM UTC+8, 9492...@qq.com wrote:

9492...@qq.com

unread,
Mar 14, 2016, 12:21:20 AM3/14/16
to MoveIt! Users
Thank you very much

在 2016年3月14日星期一 UTC+8上午9:19:32,Qiang Qiu写道:

9492...@qq.com

unread,
Mar 31, 2016, 2:08:22 AM3/31/16
to MoveIt! Users
Are there some books or doc. about MOVEIT ? I can't understand MOVEIT totally, I just change other program or learnning from ROS-I tutorial.


在 2016年3月14日星期一 UTC+8上午9:19:32,Qiang Qiu写道:
    Figure 1, re-attached.

Qiang Qiu

unread,
Apr 6, 2016, 5:19:22 AM4/6/16
to MoveIt! Users
Sorry for my late reply.

There is not too many documents about MoveIt, but you can go through the tutorials (http://moveit.ros.org/documentation/tutorials/) first. After that, the code API (http://moveit.ros.org/code-api/) can be very helpful. What's more, this google group is a good place to ask for help.
Reply all
Reply to author
Forward
0 new messages