Ask Your Question
0

Universal Robot Arms, size changes in the robot description

asked 2020-07-16 04:20:10 -0500

Tahir M. gravatar image

updated 2020-07-16 04:22:28 -0500

I am trying to update warthog description, by attaching three universal robot arms(2 UR5, 1 UR3). I am following the second approach pointed here. I was succesfull in adding all the robot descriptions needed. But UR arm breaks which actually is included later. In the following example:

  <xacro:include filename="$(find mbs_description)/urdf/accessories/arms/right_ur_arm.urdf.xacro" />
  <xacro:if value="$(optenv WARTHOG_RIGHT_ARM 0)">
    <joint name="right_arm_joint" type="fixed">
      <origin xyz="0 0 -0.025" rpy="0 0 0" />
      <parent link="right_arm_mount_link"/>
      <child link="right_arm/base_link" />
    </joint>
  </xacro:if>

  <xacro:include filename="$(find mbs_description)/urdf/accessories/arms/left_ur_arm.urdf.xacro" />
  <xacro:if value="$(optenv WARTHOG_LEFT_ARM 0)">
    <joint name="left_arm_joint" type="fixed">
      <origin xyz="0 0 -0.025" rpy="0 0 0" />
      <parent link="left_arm_mount_link"/>
      <child link="left_arm/base_link" />
    </joint>
  </xacro:if>

  <xacro:include filename="$(find mbs_description)/urdf/accessories/arms/center_ur_arm.urdf.xacro" />
  <xacro:if value="$(optenv WARTHOG_CENTER_ARM 0)">
    <joint name="center_arm_joint" type="fixed">
      <origin xyz="0 0 -0.025" rpy="0 0 3.1415" />
      <parent link="center_arm_mount_link"/>
      <child link="center_arm/base_link" />
    </joint>
  </xacro:if>

Here I have added right and left (both UR5e) and than center(UR3), so the arm in the center breaks its joints and goes to the length of UR5e.

And if I take the center arm at the top like here:

<xacro:include filename="$(find mbs_description)/urdf/accessories/arms/center_ur_arm.urdf.xacro" />
  <xacro:if value="$(optenv WARTHOG_CENTER_ARM 0)">
    <joint name="center_arm_joint" type="fixed">
      <origin xyz="0 0 -0.025" rpy="0 0 3.1415" />
      <parent link="center_arm_mount_link"/>
      <child link="center_arm/base_link" />
    </joint>
  </xacro:if>

  <xacro:include filename="$(find mbs_description)/urdf/accessories/arms/right_ur_arm.urdf.xacro" />
  <xacro:if value="$(optenv WARTHOG_RIGHT_ARM 0)">
    <joint name="right_arm_joint" type="fixed">
      <origin xyz="0 0 -0.025" rpy="0 0 0" />
      <parent link="right_arm_mount_link"/>
      <child link="right_arm/base_link" />
    </joint>
  </xacro:if>

  <xacro:include filename="$(find mbs_description)/urdf/accessories/arms/left_ur_arm.urdf.xacro" />
  <xacro:if value="$(optenv WARTHOG_LEFT_ARM 0)">
    <joint name="left_arm_joint" type="fixed">
      <origin xyz="0 0 -0.025" rpy="0 0 0" />
      <parent link="left_arm_mount_link"/>
      <child link="left_arm/base_link" />
    </joint>
  </xacro:if>

Now center arm will be fine but both right and left will shrink to the length of center arm i.e. UR3.

I am not able to sort out this issue, can anyone have an insight on the problem.

Note:

The robot descriptions UR5e and UR3 are the same as on the official supported repo

Note: The same issue is raised on Warthog's github and Universal Robot's repo repo as currently I don't know where the problem could be.

UR3 affected

UR5e affected

edit retag flag offensive close merge delete

Comments

Finally: please refrain from cross-posting to three different places at the same time.

As evidenced by your post on the CP tracker, this leads to split discussions and potentially wasted effort.

gvdhoorn gravatar image gvdhoorn  ( 2020-08-05 02:46:47 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-08-05 02:25:02 -0500

Tahir M. gravatar image

I was including macros in top level xacro and than include them in another file. Due to this essentially the last one was overwriting the values. So at the end changing variables for xacro:include solved the issue.

The issue can be recreated by the steps described here.

Note: I was able to solve the issue by a discussion here.

edit flag offensive delete link more

Comments

I was including macros in top level xacro and than include them in another file.

to be more precise: you included top-level files in other top-level files. This essentially leads to a situation where you have multiple definitions of the same content, which results in the last one to 'overwrite' the previous two.

That was why the last arm 'included' was the one which configured things like link-lengths.

gvdhoorn gravatar image gvdhoorn  ( 2020-08-05 02:43:09 -0500 )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-16 04:20:10 -0500

Seen: 60 times

Last updated: Aug 05 '20