0
$\begingroup$

Rosanswers logo

Hi all, I am trying to add a barrett hand to an abb IRB 120 arm in a gazebo simulation and to run the whole thing using moveit.

I have created a file abb-barrett.xacro that combines the description of both robots (find files at the end).

I am loading the robot into gazebo as follow:

abb_barrett.launch

<Launch>
    <arg name="paused" default="false"/>
  <!-- remap topics to conform to ROS-I specifications -->
  <remap from="/abb_barrett_controller/follow_joint_trajectory" to="/joint_trajectory_action" />
  <remap from="/abb_barrett_controller/state" to="/feedback_states" />
  <remap from="/abb_barrett_controller/command" to="/joint_path_command"/> 
   <!-- startup simulated world -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="worlds/empty.world"/>
    <arg name="gui" value="true"/>
    <arg name="paused" value="$(arg paused)"/>
  </include>
  

    <!-- urdf xml robot description loaded on the Parameter Server, converting the xacro into a proper urdf file-->
      <include file="$(find abb_barrett_gazebo)/launch/load_abb_barrett.launch" />
      <!-- push robot_description to factory and spawn robot in gazebo -->
      <node name="abb_barrett_spawn" pkg="gazebo_ros" type="spawn_model" output="screen" args="-urdf -param robot_description -model abb_barrett" />
        <!-- convert joint states to TF transforms for rviz, etc -->
      <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"
      output="screen">
       </node>
      <!-- init and start Gazebo ros_control interface -->
  <include file="$(find abb_barrett_gazebo)/launch/abb_barrett_control.launch"/>
 </launch>

abb_barrett_control.launch

<launch>

    <!-- load the joint state controller -->
  <rosparam file="$(find abb_barrett_gazebo)/config/joint_state_controller.yaml" command="load" />
  <node name="joint_state_controller_spawner" pkg="controller_manager" type="controller_manager" args="spawn joint_state_controller" />

   
   <!-- load the arm controller -->
  <rosparam file="$(find abb_barrett_gazebo)/config/abb_barrett_controller.yaml" command="load" />
  
  <node name="abb_barrett_controller_spawner" pkg="controller_manager" type="controller_manager" args=" spawn abb_barrett_controller barrett_hand_trajectory_controller"/> 
 
 <!-- <node name="abb_barrett_controller_spawner" pkg="controller_manager" type="controller_manager" args=" spawn barrett_hand_trajectory_controller"/> -->
  
   
</launch>

abb_barrett_controller.yaml

abb_barrett_controller:
  type: position_controllers/JointTrajectoryController
  joints:
     - joint_1
     - joint_2
     - joint_3
     - joint_4
     - joint_5
     - joint_6
  constraints:
      goal_time: 0.6
      stopped_velocity_tolerance: 0.05
      joint_1: {trajectory: 0.1, goal: 0.1}
      joint_2: {trajectory: 0.1, goal: 0.1}
      joint_3: {trajectory: 0.1, goal: 0.1}
      joint_4: {trajectory: 0.1, goal: 0.1}
      joint_5: {trajectory: 0.1, goal: 0.1}
      joint_6: {trajectory: 0.1, goal: 0.1}
  stop_trajectory_duration: 0.5
  state_publish_rate:  25
  action_monitor_rate: 10
  
barrett_hand_trajectory_controller:
     type: position_controllers/JointTrajectoryController
     joints:
       - finger_1_med_joint
       - finger_2_med_joint
       - finger_3_med_joint
       - finger_1_prox_joint
       - finger_2_prox_joint
     state_publish_rate: 100.0
     action_monitor_rate: 50.0
     constraints:
       goal_time: 100.0                   # Override default
       finger_1_med_joint:
         trajectory: 0.01
       finger_2_med_joint:
         trajectory: 0.01
       finger_3_med_joint:
         trajectory: 0.01
       finger_1_prox_joint:
         trajectory: 0.01
       finger_2_prox_joint:
         trajectory: 0.01
  
finger_1_joint1_position_controller:
    type: position_controllers/JointPositionController
    joint: finger_1_med_joint
    pid: {p: 1.0, i: 0.0, d: 0.0}
    
finger_2_joint1_position_controller:
    type: position_controllers/JointPositionController
    joint: finger_2_med_joint
    pid: {p: 1.0, i: 0.0, d: 0.0}
    
finger_3_joint1_position_controller:
    type: position_controllers/JointPositionController
    joint: finger_3_med_joint
    pid: {p: 1.0, i: 0.0, d: 0.0}
    
finger_1_joint2_position_controller:
    type: position_controllers/JointPositionController
    joint: finger_1_prox_joint
    pid: {p: 1.0, i: 0.0, d: 0.0}
    
finger_2_joint2_position_controller:
    type: position_controllers/JointPositionController
    joint: finger_2_prox_joint
    pid: {p: 1.0, i: 0.0, d: 0.0}

Then I am lauching the moveit side of things as follow:

<launch>
  <!-- 
       Must be done prior
       roslaunch abb_barrett_gazebo abb_barrett_gazebo.launch

  -->
  <rosparam command="load" file="$(find abb_barrett_support)/config/abb_barrett_controller_joint_names.yaml" />

  <!-- By default, we do not start a database (it can be large) -->
  <arg name="db" default="false" />
  <!-- Allow user to specify database location -->
  <arg name="db_path" default="$(find abb_barrett_moveit_config)/default_warehouse_mongo_db" />

  <!-- don't let planning_context load description, we've already done it -->
  <include file="$(find abb_barrett_moveit_config)/launch/planning_context.launch">
    <arg name="load_robot_description" value="false" />
  </include>
  
  <!-- Set the param that trajectory_execution_manager needs to find the controller plugin -->
 <arg  name="moveit_controller_manager" default="moveit_simple_controller_manager/MoveItSimpleControllerManager" />
 <param name="moveit_controller_manager" value="$(arg moveit_controller_manager)"/>
 <!-- load controller_list -->
 <rosparam file="$(find abb_barrett_moveit_config)/config/controllers.yaml"/>

  <include file="$(find abb_barrett_moveit_config)/launch/move_group.launch">
    <arg name="publish_monitored_planning_scene" value="true" />
   </include>

  <include file="$(find abb_barrett_moveit_config)/launch/moveit_rviz.launch">
    <arg name="config" value="true"/>
  </include>
  
  <!-- If database loading was enabled, start mongodb as well -->
  <include file="$(find abb_barrett_moveit_config)/launch/default_warehouse_db.launch" if="$(arg db)">
    <arg name="moveit_warehouse_database_path" value="$(arg db_path)"/>
  </include>
</launch>

with

abb_barrett_controller_joint_names.yaml"

controller_joint_names: ['joint_1', 'joint_2', 'joint_3', 'joint_4', 'joint_5', 'joint_6' ,'finger_1_med_joint','finger_1_prox_joint','finger_2_med_joint','finger_2_prox_joint','finger_3_med_joint']

and controllers.yaml:

controller_list:

  - name: abb_barrett_controller
    action_ns: follow_joint_trajectory
    type: FollowJointTrajectory
    default: true
    joints:
     - joint_1
     - joint_2
     - joint_3
     - joint_4
     - joint_5
     - joint_6

  - name: finger_1_joint1_position_controller
    action_ns: follow_joint_trajectory
    type: FollowJointTrajectory
    default: true
    joints:
       - finger_1_med_joint

  - name: finger_1_joint2_position_controller
    action_ns: follow_joint_trajectory
    type: FollowJointTrajectory
    default: true
    joints:
       - finger_1_prox_joint 
         
  - name: finger_2_joint1_position_controller
    action_ns: follow_joint_trajectory
    type: FollowJointTrajectory
    default: true
    joints:
       - finger_2_med_joint
  - name: finger_2_joint2_position_controller
    action_ns: follow_joint_trajectory
    type: FollowJointTrajectory
    default: true
    joints:
      - finger_2_prox_joint
              
  - name: finger_3_joint1_position_controller
    action_ns: follow_joint_trajectory
    type: FollowJointTrajectory
    default: true
    joints:
      - finger_3_med_joint

Everything seems find and I am able to move the arm it self using Rviz. However when trying to control the group corresponding to the hand It get the following error:

[ERROR] [1510133470.606385057, 43.138000000]: Unable to identify any set of controllers that can actuate the specified joints: [ finger_1_med_joint finger_1_prox_joint finger_2_med_joint finger_2_prox_joint finger_3_med_joint ]
[ERROR] [1510133470.606397269, 43.138000000]: Known controllers and their joints:
controller '' controls joints:
  joint_1
  joint_2
  joint_3
  joint_4
  joint_5
  joint_6

[ERROR] [1510133470.606407504, 43.138000000]: Apparently trajectory initialization failed

The controller seem however to be loaded

rosservice call /controller_manager/list_controllers 
controller: 
  - 
    name: joint_state_controller
    state: running
    type: joint_state_controller/JointStateController
    hardware_interface: hardware_interface::JointStateInterface
    resources: []
  - 
    name: abb_barrett_controller
    state: running
    type: position_controllers/JointTrajectoryController
    hardware_interface: hardware_interface::PositionJointInterface
    resources: ['joint_1', 'joint_2', 'joint_3', 'joint_4', 'joint_5', 'joint_6']
  - 
    name: barrett_hand_trajectory_controller
    state: running
    type: position_controllers/JointTrajectoryController
    hardware_interface: hardware_interface::PositionJointInterface
    resources: ['finger_1_med_joint', 'finger_1_prox_joint', 'finger_2_med_joint', 'finger_2_prox_joint', 'finger_3_med_joint']

I have tried for a while to solve this but I cannot figure how. Does anybody have any suggestion?

Thank you ,

Thibault.

END**********

abb_barrett_macro.xacro

    <?xml version="1.0"?>
<robot name="abb_barrett" xmlns:xacro="http://ros.org/wiki/xacro">

<xacro:include filename="$(find abb_barrett_support)/urdf/abb_barrett_macro.xacro"/>
<xacro:macro name="abb_barrett_g" params="prefix">

  <!-- get base ABB IRB120 model -->
  <xacro:abb_barrett prefix="${prefix}" />
  
  <!-- transmission list -->
  <transmission name="${prefix}tran1">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="${prefix}joint_1">
      <hardwareInterface>PositionJointInterface</hardwareInterface>
    </joint>
    <actuator name="${prefix}motor1">
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <transmission name="${prefix}tran2">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="${prefix}joint_2">
      <hardwareInterface>PositionJointInterface</hardwareInterface>
    </joint>
    <actuator name="${prefix}motor2">
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <transmission name="${prefix}tran3">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="${prefix}joint_3">
      <hardwareInterface>PositionJointInterface</hardwareInterface>
    </joint>
    <actuator name="${prefix}motor3">
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <transmission name="${prefix}tran4">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="${prefix}joint_4">
      <hardwareInterface>PositionJointInterface</hardwareInterface>
    </joint>
    <actuator name="${prefix}motor4">
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <transmission name="${prefix}tran5">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="${prefix}joint_5">
      <hardwareInterface>PositionJointInterface</hardwareInterface>
    </joint>
    <actuator name="${prefix}motor5">
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <transmission name="${prefix}tran6">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="${prefix}joint_6">
      <hardwareInterface>PositionJointInterface</hardwareInterface>
    </joint>
    <actuator name="${prefix}motor6">
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <!-- end of transmission list -->

  <!-- Gazebo-specific link properties -->
  <gazebo reference="${prefix}base_link">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="${prefix}link_1">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="${prefix}link_2">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>  
  <gazebo reference="${prefix}link_3">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="${prefix}link_4">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="${prefix}link_5">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="${prefix}link_6">
    <material>Gazebo/Black</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>

  <!-- ros_control plugin -->
  <gazebo>
    <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
      <robotNamespace>/</robotNamespace>
      <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
    </plugin>
  </gazebo>  

  </xacro:macro>
</robot>

barrett.xacro

This code block was moved to the following github gist: https://gist.github.com/answers-se-migration-openrobotics/e8d83de3ecae490d37e939119450ed7b

Originally posted by Thibault_Rouillard on ROS Answers with karma: 26 on 2017-11-08

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I have found this answer to my question thanks to https://answers.ros.org/question/237894/moveit-and-ros-industrial-no-controller_list-specified/

I had:

 <!-- Set the param that trajectory_execution_manager needs to find the controller plugin -->
 <arg  name="moveit_controller_manager" default="moveit_simple_controller_manager/MoveItSimpleControllerManager" />
 <param name="moveit_controller_manager" value="$(arg moveit_controller_manager)"/>
 <!-- load controller_list -->
 <rosparam file="$(find abb_barrett_moveit_config)/config/controllers.yaml"/>

_ In my Moveit launch file but it needs to be placed in the "your_robot_name"_moveit_controller_manager.launch file because it is called under the /move_group name space which is the reason why move_group couldn't find the controllers.


Originally posted by Thibault_Rouillard with karma: 26 on 2017-11-09

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.