这一块自己参照以下网址配置 https://industrial-training-master.readthedocs.io/en/kinetic/_source/session3/Build-a-Moveit!-Package.html 按照流程配置完后,配置文件放在atur5_moveit_config文件夹下。 然后在apriltags2_client节点下添加moveit  
 move_target = srv.response.pose;
 moveit::planning_interface::MoveGroupInterface move_group("manipulator");
 // Plan for robot to move to part
 //使用move_group对象的setPoseTarget功能设置所需的笛卡尔目标位置
 move_group.setPoseReferenceFrame(base_frame);
 move_group.setPoseTarget(move_target); 
 move_group.move();
  运行以下程序,实现单个位姿机械手的移动  
roslaunch apriltags2_ros continuous_detection.launch
roslaunch atur5_moveit_config myworkcell_planning_execution.launch
roslaunch apriltags2_launch apriltags2_client.launch
  tag相对于world坐标系下的位姿   微信图片_20210117162723   最后机械手运动效果图   微信图片_20210117162739   可以看到ur5的位姿和tag的位姿是一致的,但我想要的效果是UR5朝向tag,所以  
//交换了y,z轴,实现了机械手朝下
    move_target = srv.response.pose;
    move_target1=srv.response.pose;
    move_target.orientation.y=move_target1.orientation.z;
    move_target.orientation.z=move_target1.orientation.y;
  上面只是关键代码的叙述,要查看完成程序请看github上的代码。 在rviz上的演示gif:   微信图片_20210117162801