Unable to connect to move_group action server 'move_group' within allotted time

asked 2020-09-16 11:51:22 -0500

Matt Gibbon gravatar image

I am currently attempting to run a python script on a real kuka kr150 that I have previously tested in moveit/Rviz with no errors, using the kuka_rsi_hw_interface. I have confirmed that I am connected to the robot by sucessfully using the rqt_joint_trajectory_controller. I edited the test_hardware_interface.launch file to include the 'move_group' node and changed "fake_execution = true" to "false", as running it without allows a movement plan to be calculated, but then undergoes only a fake execution. When running my script in this way I get the error: RuntimeError: Unable to connect to move_group action server 'move_group' within allotted time (5s)

The full error is:

enter code here [ INFO] [1600270521.416501000]: Loading robot model 'kuka_kr150_2'... Traceback (most recent call last): File "/home/ubuntu/ws_moveit/src/kr150_moveit_config/scripts/movement.py", line 303, in <module> main() File "/home/ubuntu/ws_moveit/src/kr150_moveit_config/scripts/movement.py", line 253, in main tutorial = movement() File "/home/ubuntu/ws_moveit/src/kr150_moveit_config/scripts/movement.py", line 59, in __init__ move_group = moveit_commander.MoveGroupCommander(group_name) File "/opt/ros/melodic/lib/python2.7/dist-packages/moveit_commander/move_group.py", line 52, in __init__ self._g = _moveit_move_group_interface.MoveGroupInterface(name, robot_description, ns) RuntimeError: Unable to connect to move_group action server 'move_group' within allotted time (5s)

The launch file used is: <launch> <arg name="pipeline" default="ompl"/>

<!-- 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 kr150_moveit_config)/default_warehouse_mongo_db" />

<!-- By default, we are not in debug mode -->
<arg name="debug" default="false" />
<arg name="sim" default="true" />

<rosparam file="$(find kuka_rsi_hw_interface)/test/test_params_sim.yaml" command="load" if="$(arg sim)"/>
<rosparam file="$(find kuka_rsi_hw_interface)/test/test_params.yaml" command="load" unless="$(arg sim)"/>

<param name="robot_description" command="$(find xacro)/xacro.py '$(find kuka_kr150_support)/urdf/kr150_2.xacro'"/>
<!-- Start node without FT sensor -->
<node name="kuka_hardware_interface" pkg="kuka_rsi_hw_interface"
  type="kuka_hardware_interface_node" respawn="false"

<!-- Load joint controller configurations from YAML file to parameter server -->
<rosparam file="$(find kuka_rsi_hw_interface)/config/hardware_controllers.yaml" command="load"/>
<!-- Load standard kuka controller joint names from YAML file to parameter server -->
<rosparam file="$(find kuka_rsi_hw_interface)/config/controller_joint_names.yaml" command="load"/>

<!-- Load controllers -->
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen"
    args="position_trajectory_controller joint_state_controller --shutdown-timeout 1"/>
<!-- Load robot state publisher -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />

<!-- Load RSI simulation node -->
<node name='kuka_rsi_simulator' pkg='kuka_rsi_simulator' type="kuka_rsi_simulator" args=" 49152" if="$(arg sim)" />

<include file="$(find kr150_moveit_config)/launch/move_group.launch">
  <arg name="allow_trajectory_execution" value="true"/>
  <!-- arg name="fake_execution" value="true"-->
  <arg name="info" value="true"/>
  <arg name="debug" value="$(arg debug)"/>
  <arg name="pipeline" value="$(arg pipeline)"/>


And the section of code that it's attempting to execute when this error occurs is:

def __init__ ...
edit retag flag offensive close merge delete