ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

Add flange / gripper to existing robot model (ur3)

asked 2020-07-23 12:18:06 -0600

anton_ros gravatar image

updated 2020-07-24 08:40:10 -0600

gvdhoorn gravatar image

Hello everybody,

I am using the following model description of 6-DOF UR3 robot in this repo: urdf

I have read that it is not recommended to change the original xacro file (ur3.urdf.xacro). Now my goal is to add a simple cylindrical flange to the end of the kinematic chain by creating an own urdf.

flange.urdf.xacro looks like this:

<?xml version="1.0"?>

<!-- xacro flange for rg6 -->

<robot name="flange" xmlns:xacro="http://wiki.ros.org/xacro">
  <xacro:macro name="flange" params="prefix">

    <!-- flange joint and link -->
    <joint name="${prefix}flange_joint" type="fixed">
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <parent link="${prefix}ee_link"/>
      <child link="${prefix}flange_link"/>
    </joint>

    <link name="${prefix}flange_link">
      <visual>
        <origin rpy="0 0 0" xyz="0 0 0.05"/>
        <geometry>
          <mesh filename="package://ur_description/meshes/ur3/visual/flange.stl" scale="0.001 0.001 0.001"/>
        </geometry>
        <material name="White">
          <color rgba="1.0 1.0 1.0 1.0"/>
        </material>
      </visual>
      <collision>
        <origin rpy="0 0 0" xyz="0 0 0.05"/>
        <geometry>
          <mesh filename="package://ur_description/meshes/ur3/visual/flange.stl" scale="0.001 0.001 0.001"/>
        </geometry>
      </collision>
      <inertial>
        <mass value="0.2"/>
        <inertia ixx="1" ixy="0.0" ixz="0.0" iyy="1" iyz="0.0" izz="1"/>
      </inertial>
    </link>

  </xacro:macro>
</robot>

I have included the corresponding joint for the extended move_group in ur3.srdf and added the tag to ur3_robot.urdf.xacro:

<xacro:include filename="$(find ur_description)/urdf/flange.urdf.xacro" />

Launching the config of ur3 in Rviz does not show the flange and brings up following messages in the terminal:

[ERROR] Joint 'flange_joint' declared as part of group state 'home' is not known to the URDF
[WARN] Skipping virtual joint 'fixed_base' because its child frame 'base_link' does not match the URDF frame 'world'
[INFO] No root/virtual joint specified in SRDF. Assuming fixed joint
[WARN] Kinematics solver doesn't support #attempts anymore, but only a timeout.

Can anybody give me a detailled instruction of how to handle this issue. I think my way of thinking is not correct at this point or something significant is missing. I have found Example: adding an end-effector to a robot, but it could not help me.

edit retag flag offensive close merge delete

Comments

I have read that it is not recommended to change the original xacro file

indeed.

But the same best-practice applies to the package itself. You appear to have copied your new mesh into the ur_description package.

That's essentially the same as editing "the original xacro file".

gvdhoorn gravatar image gvdhoorn  ( 2020-07-25 06:22:39 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-07-25 00:53:09 -0600

Ozan Mert Duran gravatar image

I don't see a good reason to not modify the original urdf, it makes sense to have all the joint and link information in one central location. Backup your original urdf, modify it, and see if the problem clears up.

edit flag offensive delete link more

Comments

I don't see a good reason to not modify the original urdf

I do: it's against best-practices to edit files which are not under your direct control, unless you intend to diverge from upstream and maintain your own copies -- indefinitely.

In most other cases it's likely better to integrate by composition, such that upstream remains responsible for keeping their parts up-to-date and in working order, and you can 'simply' update to newer versions by updating your local copy of your dependencies.

Your proposed workflow would mean make @anton_ros responsible for keeping track of what upstream changes, integrate those updates into his modified version and making sure everything still works.

That's a lot of unnecessary work, and also violates separation of concerns, locality of changes and reduces reusability.

gvdhoorn gravatar image gvdhoorn  ( 2020-07-25 06:21:30 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-07-23 12:18:06 -0600

Seen: 498 times

Last updated: Jul 25 '20