PyBullet(六)UR5机器人手臂模型

UR5机器人手臂模型

  • 1. urdf文件
  • 2. 效果展示(暂时还没有录像)
  • 3. 总结

申明:停更了一段时间hhhhh,真是不好意思。由于英国疫情比较严重,自20年12月中旬回国之后,在深圳找了6个月的实习,想等到英国疫情好了之后再回去继续完成博士学业。最近公司的项目在搞UR5机器人手臂的控制,打算分步简单的记录一下,方便以后回顾。本篇文章只是简单的记录下UR5机器人的模型结构(urdf文件)。 这次项目直接在win10系统上面跑的,和在虚拟机上下载 "PyBullet"是一样的:

pip3 install pybullet

下载和安装时间会比较长,做好心理准备。

系列文章目录:
上一篇:
PyBullet(五) (循环+优化)将圆柱体看作机器人,推动目标,让目标按照输入的路径在可移动障碍物中移动
下一篇:
PyBullet(七)在PyBullet中使用VR

系统:Windows10
PyBullet:(官方链接)(官方指南)

1. urdf文件

<?xml version="1.0" encoding="utf-8" ?>

<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/base.stl"/>       -->
<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/forearm.stl"/>    -->
<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/shoulder.stl"/>   -->
<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/upperarm.stl"/>   -->
<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/wrist1.stl"/>     -->
<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/wrist2.stl"/>     -->
<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/wrist3.stl"/>     -->

<robot name="ur5">

    <material name="Lake_blue">
        <color rgba="0.8 1 1 1"/>
    </material>

    <material name="Light_grey">
        <color rgba="0.866 0.866 0.866 1"/>
    </material>

    <material name="Dark_grey">
        <color rgba="0.502 0.502 0.502 1"/>
    </material>

    <link name="base_link">
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="D:/Work/Internship/porject/object/meshes/base.stl"/>
            </geometry>
            <material name="Light_grey"/>
        </visual>
    </link>

    <link name="shoulder_link">
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="D:/Work/Internship/porject/object/meshes/shoulder.stl"/>
            </geometry>
            <material name="Dark_grey"/>
        </visual>
    </link>

    <joint name="joint0" type="revolute">
        <!-- 0.089159 -->
        <origin xyz="0 0 0.0862" rpy="0 0 0"></origin>
        <axis xyz="0 0 1"/>
        <parent link="base_link" />
        <child link="shoulder_link"/>
        <!-- -360 - 360 -->
        <limit effort="30" velocity="1.0" lower="-6.28" upper="6.28" />
    </joint>

    <link name="upperarm_link">
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="D:/Work/Internship/porject/object/meshes/upperarm.stl"/>
            </geometry>
            <material name="Lake_blue"/>
        </visual>
    </link>

    <joint name="joint1" type="revolute">
        <!-- 0.089159 -->
        <origin xyz="0 0.136 0" rpy="0 0 0"></origin>
        <axis xyz="0 1 0"/>
        <parent link="shoulder_link" />
        <child link="upperarm_link"/>
        <!-- -360 - 360 -->
        <limit effort="30" velocity="1.0" lower="-6.28" upper="6.28" />
    </joint>

    <link name="forearm_link">
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="D:/Work/Internship/porject/object/meshes/forearm.stl"/>
            </geometry>
            <material name="Lake_blue"/>
        </visual>
    </link>

    <joint name="joint2" type="revolute">
        <!-- 0.089159 -->
        <origin xyz="0 -0.12 0.425" rpy="0 0 0"></origin>
        <axis xyz="0 1 0"/>
        <parent link="upperarm_link" />
        <child link="forearm_link"/>
        <!-- -360 - 360 -->
        <limit effort="30" velocity="1.0" lower="-6.28" upper="6.28" />
    </joint>

    <link name="wrist1_link">
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="D:/Work/Internship/porject/object/meshes/wrist1.stl"/>
            </geometry>
            <material name="Dark_grey"/>
        </visual>
    </link>

    <joint name="joint3" type="revolute">
        <!-- 0.089159 -->
        <origin xyz="0 0 0.3922" rpy="0 0 0"></origin>
        <axis xyz="0 1 0"/>
        <parent link="forearm_link" />
        <child link="wrist1_link"/>
        <!-- -360 - 360 -->
        <limit effort="30" velocity="1.0" lower="-6.28" upper="6.28" />
    </joint>

    <link name="wrist2_link">
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="D:/Work/Internship/porject/object/meshes/wrist2.stl"/>
            </geometry>
            <material name="Dark_grey"/>
        </visual>
    </link>

    <joint name="joint4" type="revolute">
        <!-- 0.089159 -->
        <origin xyz="0 0.093 -0.0015" rpy="0 0 0"></origin>
        <axis xyz="0 0 1"/>
        <parent link="wrist1_link" />
        <child link="wrist2_link"/>
        <!-- -360 - 360 -->
        <limit effort="30" velocity="1.0" lower="-6.28" upper="6.28" />
    </joint>

    <link name="wrist3_link">
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="D:/Work/Internship/porject/object/meshes/wrist3.stl"/>
            </geometry>
            <material name="Light_grey"/>
        </visual>
    </link>

    <joint name="joint5" type="revolute">
        <!-- 0.089159 -->
        <origin xyz="0 0 0.0948" rpy="0 0 0"></origin>
        <axis xyz="0 1 0"/>
        <parent link="wrist2_link" />
        <child link="wrist3_link"/>
        <!-- -360 - 360 -->
        <limit effort="30" velocity="1.0" lower="-6.28" upper="6.28" />
    </joint>

</robot>

如果嫌复制粘贴太麻烦可以直接下载,下载地址:UR5机器人的urdf文件

这其中有7个文件需要下载:

base.stl
shoulder.stl
upperarm.stl
forearm.stl
wrist1.stl
wrist2.stl
wrist3.stl

下载地址:UR5机器人所需”贴图“


记得在这里修改“贴图”的地址哦~

<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/base.stl"/>       -->
<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/forearm.stl"/>    -->
<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/shoulder.stl"/>   -->
<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/upperarm.stl"/>   -->
<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/wrist1.stl"/>     -->
<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/wrist2.stl"/>     -->
<!--            <mesh filename="D:/Work/Internship/porject/object/meshes/wrist3.stl"/>     -->

当然下面的也要修改:

<mesh filename="D:/Work/Internship/porject/object/meshes/base.stl"/>
<mesh filename="D:/Work/Internship/porject/object/meshes/forearm.stl"/>
<mesh filename="D:/Work/Internship/porject/object/meshes/shoulder.stl"/>
<mesh filename="D:/Work/Internship/porject/object/meshes/upperarm.stl"/>
<mesh filename="D:/Work/Internship/porject/object/meshes/wrist1.stl"/>
<mesh filename="D:/Work/Internship/porject/object/meshes/wrist2.stl"/>
<mesh filename="D:/Work/Internship/porject/object/meshes/wrist3.stl"/>

模型图片:
PyBullet(六)UR5机器人手臂模型_第1张图片

2. 效果展示(暂时还没有录像)

视频演示(Bilibili)(假地址)
视频演示(YouTube)(假地址)

3. 总结

本篇文章只是一个简单的UR5机器人的模型,后续会跟进项目进程!!!大家一起进步加油~~

你可能感兴趣的:(PyBullet,python)