Gazebo | Ignition | Community
Ask Your Question

Create a Joint between Base_Link and Table object

asked 2015-04-13 02:35:49 -0500

edo_raci gravatar image

updated 2015-04-13 11:28:51 -0500

nkoenig gravatar image

Hello to all respected Gazebo Users,

I am having trouble since last month getting everything to work. I am trying to put the base link of the UR10 robot to a table which is a Gazebo element and make it static so it doesn't move.

I have found out that i need to change the ur10.urdf.xacro and the ur10_joint_limited_robot.urdf.xacro. I added these lines to the last file:

 <link name="world" />

  <joint name="world_joint" type="fixed">
    <parent link="world" />
    <child link = "base_link" />
    <origin xyz="0.0 0.0 1.2" rpy="0.0 0.0 0.0" />

it works fine as you can see the height is 1.2 meters away from the floor but it doesn't matter since I just wanted to see it.

What do i have to change in order for the robot model to spawn fixed to the table, instead of the World!

Thanks in advanced,

Kind Regards

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-12-02 08:55:52 -0500

J_Schaefer gravatar image

When you insert your table inside an own xacro-file you should create it as table.urdf.xacro. Then you need another file (e.g. table.xacro). The table.urdf.xacro is the description itself. And the table.xacro is like:

<?xml version="1.0" ?>
<robot name="table" xmlns:xacro="">
    <xacro:include filename="$(find myworld_description)/urdf/table.urdf.xacro" />
    <xacro:table prefix=""/>

Inside the robot-file you have to refer to the table.xacro:

<xacro:include filename="$(find myworld_description)/urdf/table.xacro" />

<joint name="Table_joint" type="fixed">
    <parent link="world" />
    <child link = "Table_link" />
    <origin xyz="0.0 -.7 0.7085" rpy="0.0 0.0 0.0" />

It should work like this. You now just have to mount the robot like @nkoenig said.

edit flag offensive delete link more

answered 2015-04-13 11:39:59 -0500

nkoenig gravatar image

You have to create a joint between the table and the robot, similar to this:

<joint name="table_joint" type="fixed">
  <parent link="YOUR_TABLES_LINK" />
  <child link = "base_link" />
  <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />

You'll have to mess around with the <origin> value to get the robot in the desired location and orientation.

edit flag offensive delete link more


I'm getting this error: [ERROR] [1429104093.856942772]: Failed to build tree: parent link [link] of joint [tablejoint] not found. This is not valid according to the URDF spec. Every link you refer to from a joint needs to be explicitly defined in the robot description. To fix this problem you can either remove this joint [tablejoint] from your urdf file, or add "<link name="link" />" to your urdf file.

edo_raci gravatar imageedo_raci ( 2015-04-15 07:30:39 -0500 )edit

I get a quite similar error: [ERROR] [1449062411.299238060]: Failed to build tree: child link [Table1] of joint [Table1_joint] not found I tried to include a table into my world in Gazebo. The UR5, I'm using, is mounted to a foot, which is written inside the ur5_robot.urdf.xacro and this works. When the table is written inside there, too, it works quite fine, but not in an own xacro-file.

J_Schaefer gravatar imageJ_Schaefer ( 2015-12-02 07:27:41 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2015-04-13 02:35:49 -0500

Seen: 3,706 times

Last updated: Apr 13 '15