ROS学习记录1--UR3修改 ee_link 固定位置

说明:ros仿真中,UR3机械臂末端安装AG95机械爪。为了使TCP定位到机械爪的末端。
参博客:https://blog.csdn.net/zxxxiazai/article/details/108647836

1.正文

  1. 在moveit_setup_assistant的操作
    运行:
 source ./devel/setup.bash 

在这里插入图片描述
在“Planing Groups下添加Chain
在这里插入图片描述
2. 在ur_description/urdf/ur3.urdf.xacro 中

<!-- <joint name="${prefix}ee_fixed_joint" type="fixed">
  <parent link="${prefix}wrist_3_link" />
  <child link = "${prefix}ee_link" />
  <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 ${pi/2.0}" />
</joint> -->
  1. 查找偏移量并修改
    本文所用机器人在末端安装了ag-95机械手,机器人 tcp变为ag-95机械手的指尖端点。因此moveit运动规划的 tip_link应修改。
    由于机械手的urdf文件添加较为麻烦,此处采用简单粗暴的方法,直接修改ee_fixed_joint的坐标。

注意:ur_platform_gazebo.launch:在这个文件将启动Moveit和Gazebo程序,实现对机器人的控制仿真
首先: 启动机器人运行程序,运行roslaunch ur_platform_gazebo ur_platform_gazebo.launch

然后:执行指令rosrun tf tf_echo /wrist_3_link /gripper_finger1_finger_tip_link,可以查看机器人TCP与 ee_link 的坐标系转换关系,以此修改ee_fixed_joint即可。
备注:(师兄说可以运行rosrun tf tf_echo /ee_link /gripper_finger1_finger_tip_link。)

- Translation: [-0.055, 0.226, 0.000]
- Rotation: in Quaternion [-0.000, 0.707, 0.707, 0.000]
            in RPY (radian) [1.571, 0.000, 3.142]
            in RPY (degree) [90.000, 0.000, 180.000]

其中:Translation值便是偏移量
执行指令:rosrun tf tf_echo /wrist_3_link /gripper_finger2_finger_tip_link

-- Translation: [0.055, 0.226, 0.000]
- Rotation: in Quaternion [-0.707, 0.000, 0.000, 0.707]
            in RPY (radian) [-1.571, 0.000, 0.000]
            in RPY (degree) [-90.000, 0.000, 0.000]

修改ur3.urdf.xacro如下:

 <joint name="${prefix}ee_fixed_joint" type="fixed">
  <parent link="${prefix}wrist_3_link" />
  <child link = "${prefix}ee_link" />
  <origin xyz="-0.0 0.226 0.0" rpy="0.0 0.0 ${pi/2.0}"/>
</joint> 

猜你喜欢

转载自blog.csdn.net/qq_45871695/article/details/119718682