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

follow_joint_trajectory action client not connected

asked 2018-07-09 01:13:06 -0500

chris annin gravatar image

updated 2018-07-11 21:30:01 -0500

Im attempting to setup a simple controller manager through moveit to eventually connect to my robot node (which I haven't written yet). This is a single are 6DOF robot. I have my robots urdf and moveit config package complete and I can run the demo.launch with no issues.

I am following this document: http://docs.ros.org/kinetic/api/movei...

Ive created a controller.yaml file:

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

Ive created a controller launch file called "ar2_moveit_controller_manager.launch.xml":

<launch>
 <!-- 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 ar2_moveit_config)/config/controllers.yaml"/>
</launch>

I then created a new moveit launch file called "ar2_planning_execution.launch" :

<launch>

  <rosparam command="load" file="$(find ar2_moveit_config)/config/joint_names.yaml"/>

  <include file="$(find ar2_moveit_config)/launch/planning_context.launch" >

     <arg name="load_robot_description" value="true" />

  </include>

  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">

    <param name="/use_gui" value="false"/>

    <rosparam param="/source_list">[/joint_states]</rosparam>

   </node>

  <include file="$(find ar2_moveit_config)/launch/move_group.launch">

     <arg name="publish_monitored_planning_scene" value="true" />

  </include>

   <include file="$(find ar2_moveit_config)/launch/moveit_rviz.launch">

    <arg name="config" value="true"/>

   </include>

 </launch>

after launching rvis seems to open as expected. I then run rostopic list expecting to find the topic:

"/arm_controller/follow_joint_trajectory/goal"

but it is not on the list. when I look back through the launch console I find this error:

[ERROR] [1531100734.213718002]: Action client not connected: arm_controller/follow_joint_trajectory

I'm running Ubuntu 16.04 and kinetic. thank you for your input.

Chris

edit retag flag offensive close merge delete

Comments

Chris,

Hello, I am currently trying to solve the exact same error. Where you able to get this to launch properly?

Kyle

PatFGarrett gravatar image PatFGarrett  ( 2018-07-16 12:37:10 -0500 )edit

not yet. according to the answer provided by BryceWiley moveit is trying to connect to the action server which isnt there yet. Im currently researching SimpleActionServer. my robots controller is an arduino so im not sure if I can run an Action server from the arduino or if I have to create an

chris annin gravatar image chris annin  ( 2018-07-16 13:46:22 -0500 )edit

action server node and pass the values to the arduino. In any case Im assuming once I get a server running first that moveit will be satisfied and function properly. I will report back on this topic once I have something working.

chris annin gravatar image chris annin  ( 2018-07-16 13:47:50 -0500 )edit
1

did you solve it?

Aaron MV gravatar image Aaron MV  ( 2020-01-13 13:19:48 -0500 )edit

2 Answers

Sort by » oldest newest most voted
5

answered 2018-07-11 22:27:57 -0500

If you look back at the tutorial you are following, you'll see this at the beginning:

We will assume that your robot offers a FollowJointTrajectory action service for the arms on your robot and (optionally) a GripperCommand service for your gripper. If your robot does not offer this we recommend the ROS control framework for easily adding this functionality around your hardware communication layer.

The error you're getting means that MoveIt is correctly trying to find the arm_controller/follow_joint_trajectory action client specified by controller.yaml. You should be good at this point to finish writing your controller, and when it's ready, launch it and have it accept actions at arm_controller/follow_joint_trajectory.

edit flag offensive delete link more

Comments

Ahh, so I misunderstood the error in thinking the moveit side wasnt picking up the controller.yaml. thank you. I'll shift gears and work on my controller and then try it again.

chris annin gravatar image chris annin  ( 2018-07-11 22:41:28 -0500 )edit

Hello, I am currently trying to solve the exact same error. Can you start it normally?and I configured the controller file in robot_moveit_controller_manager,the controllers.yaml have been contained,but I still can't start

xioaheqiufeng gravatar image xioaheqiufeng  ( 2019-11-22 01:15:29 -0500 )edit
3

answered 2020-03-06 03:53:59 -0500

Hey,

because I was scratching my head on the same error, here my solution if you use Gazebo and MoveIt:

First you have to load and spawn the controller in your start_robot_in_gazebo.launch when starting gazebo. For example:

<rosparam file="$(find GAZEBO_PKG)/config/gazebo_controllers.yaml" command="load"/>
<node name="arm_controller_spawner" pkg="controller_manager" type="controller_manager" args="spawn arm_controller" respawn="false" output="screen"/>

With the gazebo_controllers.yaml something like:

arm_controller:
  type: position_controllers/JointTrajectoryController
  joints:
    - joint_1
    - joint_2
    - ...

Now first launch gazebo:

$ roslaunch GAZEBO_PKG start_robot_in_gazebo.launch

When using MoveIt with

(two consoles)
$ roslaunch MOVIT_CONFIG_PKG moveit_planning_execution.launch sim:=true
$ roslaunch MOVIT_CONFIG_PKG moveit_rviz.launch config:=true

With the moveit_planning_execution.launch looking like this:

<launch>
    <arg name="sim" default="false" />
    <arg name="debug" default="false" />

    <!-- Remap follow_joint_trajectory -->     
    <remap if="$(arg sim)" from="/follow_joint_trajectory" to="/arm_controller/follow_joint_trajectory"/>
ddfg
    <!-- Launch moveit -->
    <include file="$(find MOVIT_CONFIG_PKG)/launch/move_group.launch">
        <arg name="debug" default="$(arg debug)"/>
    </include>
</launch>

Important: you have to check your auto-generated MOVIT_CONFIG_PKG/config/ros_controllers.yaml-File to have the same controller_list-name (here: arm_controller) as in your gazebo_controllers.yaml:

controller_list:
  - name: arm_controller  
    action_ns: follow_joint_trajectory
    default: True
    type: FollowJointTrajectory
    joints:
      - joint_1
      - joint_2
      - ...

Hope I could help someone

Robert

edit flag offensive delete link more

Question Tools

4 followers

Stats

Asked: 2018-07-09 01:13:06 -0500

Seen: 13,667 times

Last updated: Jan 13 '20