ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Failed to load Joint Controller - Ros Melodic

asked 2020-12-16 10:48:12 -0500

patrchri gravatar image

updated 2022-05-28 10:48:33 -0500

lucasw gravatar image

Hello,

I am running ROS melodic on a NVIDIA Jetson Nano and I am at the stage of simulation of a rover. To be more specific I have created the following rover (see XML code below) and I am trying to move its two continuous joints (essentially the two wheels) with a certain velocity. For this reason I am trying to use ros_control and more specifically effort_controllers/JointVelocityController. Below I have attached my config.yaml file as well as the spawn launch file I use to spawn the model in gazebo. My issue is that I get the following error in the command window when I try to run this:

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.10
 * /rover/joint_left_wheel_velocity_controller/joint: joint_left_wheel
 * /rover/joint_left_wheel_velocity_controller/pid/d: 50
 * /rover/joint_left_wheel_velocity_controller/pid/i: 10
 * /rover/joint_left_wheel_velocity_controller/pid/p: 1000
 * /rover/joint_left_wheel_velocity_controller/type: effort_controller...
 * /rover/joint_right_wheel_velocity_controller/joint: joint_right_wheel
 * /rover/joint_right_wheel_velocity_controller/pid/d: 50
 * /rover/joint_right_wheel_velocity_controller/pid/i: 10
 * /rover/joint_right_wheel_velocity_controller/pid/p: 1000
 * /rover/joint_right_wheel_velocity_controller/type: effort_controller...
 * /rover/joint_state_controller/publish_rate: 60
 * /rover/joint_state_controller/type: joint_state_contr...
 * /rover/robot_description: <?xml version="1....

NODES
  /rover/
    controller_spawner (controller_manager/spawner)
    m2wr_spawn (gazebo_ros/spawn_model)

ROS_MASTER_URI=http://localhost:11311

process[rover/m2wr_spawn-1]: started with pid [22037]
process[rover/controller_spawner-2]: started with pid [22038]
[INFO] [1608147460.849910, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [1608147460.881118, 0.000000]: Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [1608147460.905153, 11720.939000]: Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [1608147460.919619, 11720.944000]: Loading controller: joint_state_controller
[INFO] [1608147460.951871, 11720.959000]: Loading controller: joint_left_wheel_velocity_controller
[ERROR] [1608147461.983806, 11721.560000]: Failed to load joint_left_wheel_velocity_controller
[INFO] [1608147461.988456, 11721.566000]: Loading controller: joint_right_wheel_velocity_controller
[ERROR] [1608147463.008570, 11722.090000]: Failed to load joint_right_wheel_velocity_controller
[INFO] [1608147463.013640, 11722.093000]: Controller Spawner: Loaded controllers: joint_state_controller
[INFO] [1608147463.036750, 11722.102000]: Started controllers: joint_state_controller
[INFO] [1608147464.088454, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1608147464.170536, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1608147464.197719, 11722.766000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1608147464.229827, 11722.781000]: Spawn status: SpawnModel: Failure - entity already exists.

Ros control is installed, thus I am bit confused on why I get this error. Could you please help?

URDF file:

<?xml version="1.0" ?>
<robot name="rover" xmlns:xacro="http://www.ros.org/wiki/xacro">
  <material name="black">
    <color rgba="0.0 0.0 0.0 1.0"/>
  </material>
  <material name="blue">
    <color rgba="0.203125 0.23828125 0.28515625 1.0"/>
  </material>
  <material name="green">
    <color rgba="0.0 0.8 0.0 1.0"/>
  </material>
  <material name="grey">
    <color rgba="0.2 0.2 0.2 1.0"/>
  </material>
  <material name="orange">
    <color rgba="1.0 0.423529411765 0.0392156862745 1.0"/>
  </material>
  <material name="brown">
    <color rgba="0.870588235294 0.811764705882 0.764705882353 1.0"/>
  </material>
  <material name="red">
    <color rgba="0.80078125 0.12890625 0.1328125 1.0"/>
  < ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-12-16 15:44:44 -0500

patrchri gravatar image

I figured the error. The error has to do with a syntax error in the xacro file. It should be:

  <transmission name = "joint_left_wheel_trans">
    <type> transmission_interface/SimpleTransmission </type>
        <joint name = "joint_left_wheel">
            <hardwareInterface> hardware_interface/EffortJointInterface </hardwareInterface>
        </joint>
        <actuator name = "joint_left_wheel_motor">
                <hardwareInterface> hardware_interface/EffortJointInterface </hardwareInterface>
        <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-12-16 10:48:12 -0500

Seen: 398 times

Last updated: Dec 16 '20