problem creating a custom urdf of workcell based on ur5 urdf

asked 2023-03-23 11:34:20 -0500

zahid990170 gravatar image

updated 2023-03-23 12:30:37 -0500


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:= 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="">
<xacro:include filename="$(find ur_description)/urdf/inc/ur5_macro.xacro" />
<xacro:ur5_robot prefix="" joint_limited="true"/>
<link name="world"/>
<link name="table">
      <box size="1.0 1.0 0.05"/>
      <box size="1.0 1.0 0.05"/>
<joint name="world_to_table" type="fixed">
  <parent link="world"/>
  <child link="table"/>
  <origin xyz="0 0 0.5" rpy="0 0 0"/>

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

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`


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.


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

<xacro:ur5_robot prefix="" />



edit retag flag offensive close merge delete