Exception thrown while initializing controller - Could not find resource '' in 'hardware_interface::EffortJointInterface'
Hello, I'm still struggling with adding a simple gripper to my kuka-lwr robot. I made a really simple gripper which works standalone. Here is the urdf.xacro file of the kuka-robot with gripper:
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="single_lwr_robot">
<!-- Include all models -->
<xacro:include filename="$(find lwr_description)/model/kuka_lwr.urdf.xacro"/>
<xacro:include filename="$(find kuka-lwr-gripper)/robot/my_camera.urdf.xacro"/>
<xacro:include filename="$(find kuka-lwr-gripper)/robot/simple_gripper/simple_gripper.urdf.xacro" />
<xacro:kuka_lwr name="lwr">
<origin xyz="0 0 0" rpy="0 0 0"/>
</xacro:kuka_lwr>
<xacro:simple_gripper/>
<xacro:kuka_lwr_gazebo name="lwr"/>
<xacro:kuka_lwr_transmission name="lwr"/>
<!-- transmission -->
<transmission name="base_to_left_finger_trans">
<type>transmission_interface/SimpleTransmission</type>
<actuator name="motor_left_finger">
<mechanicalReduction>1</mechanicalReduction>
</actuator>
<joint name="base_to_left_finger">
<hardwareInterface>EffortJointInterface</hardwareInterface>
</joint>
</transmission>
<transmission name="base_to_right_finger_trans">
<type>transmission_interface/SimpleTransmission</type>
<actuator name="motor_right_finger">
<mechanicalReduction>1</mechanicalReduction>
</actuator>
<joint name="base_to_right_finger">
<hardwareInterface>EffortJointInterface</hardwareInterface>
</joint>
</transmission>
</robot>
And here is my launch file:
<?xml version="1.0" ?>
<launch>
<!-- LAUNCH INTERFACE -->
<!-- The robot name is required for gazebo to spawn a model. -->
<arg name="robot_name" default="kuka-lwr-gripper"/>
<!-- The recommended way of specifying the URDF file is to pass it in
directly. -->
<arg name="robot_path" default="$(find kuka-lwr-gripper)/robot"/>
<arg name="robot_urdf_file" default="$(arg robot_path)/$(arg robot_name).urdf.xacro" />
<arg name="controllers" default="joint_controllers"/>
<arg name="t1_limits" default="false"/>
<arg name="rviz_config" default="$(find lwr_launch)/launch/rviz/rviz_config.rviz"/>
<arg name="rviz_bringup" default="true"/> <!--If false, do not launch rviz-->
<arg name="hw_interface_file" default="$(find kuka-lwr-gripper)/config/hw_interface.yaml"/>
<arg name="controller_config_file" default="$(find kuka-lwr-gripper)/config/controllers.yaml"/>
<arg name="gazebo_world_file" default="$(find kuka-lwr-gripper)/worlds/simple_environment.world"/>
<arg name="t1_limits_file" default="$(find kuka-lwr-gripper)/config/t1_joint_limits.yaml"/>
<arg name="GAZEBO_GUI" default="true"/>
<!-- gripper parameters -->
<arg name="gripper_controller_config_file" default="$(find kuka-lwr-gripper)/config/gripper_control.yaml"/>
<!-- ROBOT -->
<group ns="lwr">
<param name="robot_description" command="$(find xacro)/xacro.py $(arg robot_urdf_file)"/>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>
</group>
<!-- GAZEBO -->
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-param /lwr/robot_description -urdf -model $(arg robot_name)" respawn="false" output="screen" />
<!-- enable/disable gui at will, the rviz listens to the simulation -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(arg gazebo_world_file)"/>
<arg name="paused" value="false"/>
<arg name="use_sim_time" value="true"/>
<arg name="gui" value="$(arg GAZEBO_GUI)"/>
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
</include>
<!-- Load updated joint limits (override information from single_lwr_moveit) to respect T1 mode limits -->
<group if="$(arg t1_limits)" ns="robot_description_planning">
<rosparam command="load" file="$(arg t1_limits_file)"/>
</group>
<!-- load robotHW configurations to rosparam server -->
<rosparam command="load" file="$(arg hw_interface_file)"/>
<!-- load all controller configurations to rosparam server -->
<rosparam command="load" file="$(arg controller_config_file)"/>
<!-- real robot and controllers -->
<group ns="lwr">
<!-- spawn only desired controllers in current namespace -->
<node name="controller_spawner_js" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="kuka_joint_state_controller"/>
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="$(arg controllers) left_finger_joint_position_controller right_finger_joint_position_controller joint_state_controller"/>
</group>
<!-- LAUNCH RVIZ -->
<node name="lwr_rviz" pkg="rviz" type="rviz" respawn="false" args="-d $(arg rviz_config)"
output="screen ...