Ask Your Question
0

Controller can't be found but are loaded,Moveit

asked 2017-11-08 04:13:33 -0600

Thibault_Rouillard gravatar image

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 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-11-09 00:02:24 -0600

Thibault_Rouillard gravatar image

I have found this answer to my question thanks to https://answers.ros.org/question/2378...

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-11-08 04:13:33 -0600

Seen: 396 times

Last updated: Nov 09 '17