Failed to load joint_state_controller

asked 2019-04-16 10:15:10 -0500

Pablo1996 gravatar image

Hi, Today i tried to do my own controller for my robot. I have found quick tutorial: https://www.youtube.com/watch?v=K09E-... and had modified my robot description package. But when i launch file "spawn.launch" i get error:

... logging to /home/pawel/.ros/log/de09b834-6058-11e9-bf7b-2c337af1ef69/roslaunch-pawel-Lenovo-Y50-70-23523.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: in-order processing became default in ROS Melodic. You can drop the option.
started roslaunch server http://pawel-Lenovo-Y50-70:32895/

SUMMARY
========

PARAMETERS
 * /mrm/mrm/action_monitor_rate: 10
 * /mrm/mrm/arm_controller/joints: -base_link__link_...
 * /mrm/mrm/arm_controller/type: position_controll...
 * /mrm/mrm/constraints/goal_time: 0.6
 * /mrm/mrm/constraints/link_01__link_02/goal: 0.1
 * /mrm/mrm/constraints/link_01__link_02/trajectory: 0.1
 * /mrm/mrm/constraints/link_02__link_03/goal: 0.1
 * /mrm/mrm/constraints/link_02__link_03/trajectory: 0.1
 * /mrm/mrm/constraints/link_03__link_04/goal: 0.1
 * /mrm/mrm/constraints/link_03__link_04/trajectory: 0.1
 * /mrm/mrm/constraints/link_04__link_05/goal: 0.1
 * /mrm/mrm/constraints/link_04__link_05/trajectory: 0.1
 * /mrm/mrm/constraints/link_05__link_06/goal: 0.1
 * /mrm/mrm/constraints/link_05__link_06/trajectory: 0.1
 * /mrm/mrm/constraints/stopped_velocity_tolerance: 0.05
 * /mrm/mrm/joint_state_controller/publish_rate: 50
 * /mrm/mrm/joint_state_controller/type: joint_state_contr...
 * /mrm/mrm/state_publish_rate: 25
 * /mrm/mrm/stop_trajectory_duration: 0.5
 * /mrm/robot_description: <?xml version="1....
 * /rosdistro: melodic
 * /rosversion: 1.14.3

NODES
  /mrm/
    controller_spawner (controller_manager/spawner)
    mybot_spawn (gazebo_ros/spawn_model)

ROS_MASTER_URI=http://localhost:11311

process[mrm/mybot_spawn-1]: started with pid [23548]
process[mrm/controller_spawner-2]: started with pid [23549]
[INFO] [1555427075.136446, 0.000000]: Controller Spawner: Waiting for service /mrm/controller_manager/load_controller
[INFO] [1555427075.593070, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1555427075.602247, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1555427075.605194, 0.000000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1555427075.665617, 32.199000]: Spawn status: SpawnModel: Successfully spawned entity
[mrm/mybot_spawn-1] process has finished cleanly
log file: /home/pawel/.ros/log/de09b834-6058-11e9-bf7b-2c337af1ef69/mrm-mybot_spawn-1*.log
[INFO] [1555427076.042121, 32.231000]: Controller Spawner: Waiting for service /mrm/controller_manager/switch_controller
[INFO] [1555427076.044525, 32.234000]: Controller Spawner: Waiting for service /mrm/controller_manager/unload_controller
[INFO] [1555427076.046657, 32.236000]: Loading controller: joint_state_controller
[ERROR] [1555427077.051834, 33.233000]: Failed to load joint_state_controller
[INFO] [1555427077.053216, 33.235000]: Loading controller: arm_controller
[ERROR] [1555427078.058170, 33.812000]: Failed to load arm_controller
[INFO] [1555427078.059145, 33.812000]: Controller Spawner: Loaded controllers: 
[INFO] [1555427078.063185, 33.815000]: Started controllers:

my launch file:

<?xml version="1.0" encoding="UTF-8"?>
<launch>

    <group ns="/mrm">

        <!-- Robot model -->
        <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find mrm_description)/urdf/mrm.xacro'" />
        <arg name="x" default="0"/>
        <arg name="y" default="0"/>
        <arg name="z" default="0.5"/>

        <!-- Spawn the robot model -->
        <node name="mybot_spawn" pkg="gazebo_ros" type="spawn_model" output="screen"
              args="-urdf -param robot_description -model mrm -x $(arg x) -y $(arg y) -z $(arg z)" />

        <!-- Load controllers -->
        <rosparam command="load" file="$(find mrm_description)/config/trajectory_controller.yaml" />

        <!-- Controllers -->
        <node name="controller_spawner" pkg="controller_manager" type="spawner"
            respawn="false" output="screen" ns="/mrm"
            args="--namespace=/mrm
            joint_state_controller arm_controller
            --timeout 60">

         </node>


        <!-- rqt -->
       <!-- <node name ...
(more)
edit retag flag offensive close merge delete

Comments

I'm not sure whether this is the cause, but your joints list in the arm_controller configuration is not correctly formatted.

A space is missing between the dashes (-) and the strings. It should be - base_link__link_01, not -base_link__link_01.

gvdhoorn gravatar imagegvdhoorn ( 2019-04-16 12:53:44 -0500 )edit