Failure to load controllers
Hello everyone, I have been working on joint rotation for a 4 DOF robotic arm. I have created my own URDF file for this with a launch and config file. However, there seems to be an error which prevents the controllers from being loaded properly. From what I've seen online this seems to be due to an error in the code. However, I have been unable to spot the error and thus need some help in doing so.
ROS_MASTER_URI=http://localhost:11311
process[arm_spawn-1]: started with pid [6392]
process[arm/controller_spawner-2]: started with pid [6393]
process[robot_state_publisher-3]: started with pid [6394]
[ERROR] [1644759931.868350017]: Could not find parameter robot_description on parameter server
[robot_state_publisher-3] process has died [pid 6394, exit code 1, cmd /opt/ros/melodic/lib/robot_state_publisher/robot_state_publisher /joint_states:=/arm/joint_states __name:=robot_state_publisher __log:=/home/gerald/.ros/log/7e2d6af2-8cd1-11ec-a4d5-08002702a3ad/robot_state_publisher-3.log].
log file: /home/gerald/.ros/log/7e2d6af2-8cd1-11ec-a4d5-08002702a3ad/robot_state_publisher-3*.log
Here is my urdf code:
<?xml version='1.0'?>
<robot name='arm' xmlns:xacro='http://www.ros.org/wiki/xacro'>
<!--Dimensions (blink = base link, link = arm link)-->
<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"/>
<!--Defining link macro-->
<xacro:macro name="link_properties" params="linknum">
<link name="arm_link_${linknum}">
<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_${linknum}_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_${linknum}_collision'>
<origin rpy="0 0 0" xyz="${link_l/2} 0 0"/>
<geometry>
<box size="${link_l-joint_thickness} ${link_b-joint_thickness} ${link_h}"/>
</geometry>
</collision>
</link>
</xacro:macro>
<!--Defining transmission macro-->
<xacro:macro name="arm_trans" params="trans_linknum">
<transmission name="arm_trans">
<type>transmission_interface/SimpleTransmission</type>
<joint name="arm_joint_${trans_linknum}">
<hardwareInterface>EffortJointInterface</hardwareInterface>
</joint>
<actuator name="arm_motor_1">
<mechanicalReduction>1</mechanicalReduction>
<hardwareInterface>EffortJointInterface</hardwareInterface>
</actuator>
</transmission>
</xacro:macro>
<!--Code for everything-->
<link name='arm_base'>
<pose>0 0 0 0 0 0</pose>
<inertial>
<mass value="1001"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<inertia
ixx = '166.11'
ixy = '0'
ixz = '0'
iyy = '166.11'
iyz = '0'
izz = '166.01'
/>
</inertial>
<visual name='base_visual'>
<origin rpy="0 0 0" xyz="0 0 ${base_h/2}"/>
<geometry>
<box size="${base_l} ${base_b} ${base_h}"/>
</geometry>
</visual>
<collision ...