Two root links found: [arm_base] and [base_link] error even on declaring parent-child relationship
Hello! I got the above two root links error on trying to run this code:
<link name="base_link"></link>
:
<!-- links for arm_base, bicep, , bottom_wrist, elbow, top_wrist are defined here -->
:
<xacro:arm_joint prefix="arm_base" parent="base_link" child="arm_base" originxyz="0.0 0.0 0.1" originrpy="0 0 0"/>
<xacro:arm_joint prefix="shoulder" parent="arm_base" child="bicep" originxyz="-0.05166 0.0 0.20271" originrpy="0 0 1.5708" >
<xacro:arm_joint prefix="bottom_wrist" parent="bicep" child="bottom_wrist" originxyz="0.0 -0.05194 0.269" originrpy="0 0 0" />
<xacro:arm_joint prefix="elbow" parent="bottom_wrist" child="elbow" originxyz="0.0 0 0.13522" originrpy="0 0 0" />
<xacro:arm_joint prefix="top_wrist" parent="elbow" child="top_wrist" originxyz="0.0 0 0.20994" originrpy="0 0 0" />
I tried to execute this code on check_urdf, where i am getting this error. As you can see I have already defined a joint that makes base_link the parent of arm_base. Even trying to run the corresponding launch file also gives me the same error Then why am I getting this error?
I am new to ROS and any help would be appreciated
Hi @Nirhar,
Can you provide more information about your xacro files, maybe link the files you are using? I guess there is something wrong in you
arm_joint
macro but we will need the file to determine this.Thanks for the response!! Follow this link to access the code: file1-robot_arm.urdf.xacro
file2-robot_arm_essentials.xacro, contains arm_joint definition Grateful for your help!
Are you sure that is the repository you are using?
I have cloned it, execute:
check_urdf <(xacro robot_arm.urdf.xacro)
to check the resultant URDF file and the output is:I do not know why you had that error since the
robot_description
is OK.P.D.: Note that in
gazebo_essentials_arm.xacro
file you havebottom_wrist_joint
repeated in thejoint_state_publisher
plugin. However, why using a gazebo plugin if you are already usingros_control
? load ajoint_state_controller
with yourcontroller_spawner
. Have you checked this tutorial?