Robotics StackExchange | Archived questions

problem creating a custom urdf of workcell based on ur5 urdf

Hi,

I recently installed the new driver for universal robots, i.e., ur_robot_driver. It was successfully installed, and I am able to test the motion commands using the following different ways:

roslaunch ur_robot_driver ur5_bringup.launch robot_ip:=192.168.0.20 kinematics_config:="/home/zahid/ur_driver_catkin_ws/ur5_robot_calibration.yaml"
rosrun rqt_joint_trajectory_controller rqt_joint_trajectory_controller
roslaunch ur5_moveit_config moveit_planning_execution.launch
roslaunch ur5_moveit_config moveit_rviz.launch config:=true

Now, I am interested to make a custom urdf model for our workcell. Basically, I wanted to add a flat surface below the robotic arm. Here is my workspace.xacro

<?xml version="1.0" ?>
<robot name="myworkcell" xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:include filename="$(find ur_description)/urdf/inc/ur5_macro.xacro" />
<!--
<xacro:ur5_robot prefix="" joint_limited="true"/>
-->
<link name="world"/>
<link name="table">
  <visual>
    <geometry>
      <box size="1.0 1.0 0.05"/>
    </geometry>
  </visual>
  <collision>
    <geometry>
      <box size="1.0 1.0 0.05"/>
    </geometry>
  </collision>
</link>
<joint name="world_to_table" type="fixed">
  <parent link="world"/>
  <child link="table"/>
  <origin xyz="0 0 0.5" rpy="0 0 0"/>
</joint>

<joint name="table_to_robot" type="fixed">
  <parent link="table"/>
  <child link="base_link"/>
  <origin xyz="0 0 0.025" rpy="0 0 0"/>
</joint>
</robot>

This gives me an error upon loading in MoveIt Setup Assistant.

[`ERROR] [1679587815.070945497]: Failed to build tree: child link [base_link] of joint [table_to_robot] not found`

EDIT 1

When using ur5_macro.xacro, what is the value for the parameter prefix. I see this parameter being used in ur_macro.xacro which actually defines the links and joints. My thinking is that fixing this could solve the error which I am getting.

EDIT 2

so the following fix, solved the error I was receiving.

<xacro:ur5_robot prefix="" />

thanks,

Zahid

Asked by zahid990170 on 2023-03-23 11:34:20 UTC

Comments

Answers