Not able to simulate multiple joints
I've been trying to simulate a robotic arm in gazebo and my code works for the first 2 joints but somehow does not work when I add a third. I've tried copying the code for my first joint and just modifying values but it still does not work. Any idea why this is happening? This is the error that i get:
Error: unnamed joint found at line 345 in /build/urdfdom-YMMa9X/urdfdom-1.0.0/urdf_parser/src/joint.cpp Error: joint xml is not initialized correctly at line 206 in /build/urdfdom-YMMa9X/urdfdom-1.0.0/urdf_parser/src/model.cpp
Here is my code (works if arm_link_2 and arm_joint_2 are removed):
<?xml version='1.0'?>
<robot name='arm' xmlns:xacro='http://www.ros.org/wiki/xacro'>
<xacro:property name="base_l" value="1"/>
<xacro:property name="base_b" value="1"/>
<xacro:property name="base_h" value="0.1"/>
<xacro:property name="blink_l" value="0.1"/>
<xacro:property name="blink_b" value="0.1"/>
<xacro:property name="blink_h" value="0.5"/>
<xacro:property name="link_l" value="0.5"/>
<xacro:property name="link_b" value="0.1"/>
<xacro:property name="link_h" value="0.1"/>
<xacro:property name="joint_thickness" value="0.1"/>
<!--arm_link_1-->
<link name="arm_link_1">
<pose>0 0 0 0 0 0</pose>
<inertial>
<mass value="1.1"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<inertia
ixx = '0.011'
ixy = '0'
ixz = '0'
iyy = '0.0225'
iyz = '0'
izz = '0.0135'
/>
</inertial>
<visual name='arm_link_1_visual'>
<origin rpy="0 0 0" xyz="${link_l/2-joint_thickness*0.5} 0 0"/>
<geometry>
<box size="${link_l} ${link_b} ${link_h}"/>
</geometry>
</visual>
<collision name='arm_link_1_collision'>
<origin rpy="0 0 0" xyz="${link_l+link_l/2} 0 0"/>
<geometry>
<box size="${link_l-joint_thickness} ${link_b-joint_thickness} ${link_h}"/>
</geometry>
</collision>
</link>
<joint name="arm_joint_1" type="revolute">
<origin xyz="0 0 ${base_h+blink_h-1.5*link_h}"/>
<axis xyz="0 -1 0"/>
<parent link="blink"/>
<child link="arm_link_1"/>
<dynamics damping="0.7"/>
<limit effort="10" velocity="1.0" lower="0" upper="100" />
</joint>
<!--arm_link_2-->
<link name="arm_link_2">
<pose>0 0 0 0 0 0</pose>
<inertial>
<mass value="1.1"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<inertia
ixx = '0.011'
ixy = '0'
ixz = '0'
iyy = '0.0225'
iyz = '0'
izz = '0.0135'
/>
</inertial>
<visual name='arm_link_2_visual'>
<origin rpy="0 0 0" xyz="${link_l/2-joint_thickness*0.5} 0 0"/>
<geometry>
<box size="${link_l} ${link_b} ${link_h}"/>
</geometry>
</visual>
<collision name='arm_link_2_collision'>
<origin rpy="0 0 0" xyz="${link_l+link_l/2} 0 0"/>
<geometry>
<box size="${link_l-joint_thickness} ${link_b-joint_thickness} ${link_h}"/>
</geometry>
</collision>
</link>
<joint name="arm_joint_2" type="revolute">
<origin xyz="${link_l} 0 ${base_h+blink_h-1.5*link_h}"/>
<axis xyz="0 -1 0"/>
<parent link="arm_link_1"/>
<child link="arm_link_2"/>
<dynamics damping="0.7"/>
<limit effort ...