如何设置机器人的orientation

我有一台六轴机器人,想让他到达指定地点,具有固定的位姿,然而我只能到到达固定的三维坐标点(position),不能设置它的位姿坐标(orientation)。请问该如何设置它的位姿坐标?下面是我的程序:
#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.5
target_pose.position.y = 0.5
target_pose.position.z = 0.5  
target_pose.orientation.x = 0.5;  
target_pose.orientation.y = 0.4;  
target_pose.orientation.z = 0.3;  
target_pose.orientation.w = 0.0;
;
moveit::planning_interface::MoveGroup group("manipulator");  
group.setPoseTarget(target_pose);
 group.move();
}

dreamluo 完美型 沙发

2016-03-21 21:08

move_it只能围观了:)没弄过
游客
登录后才可以回帖,登录 或者 注册