Ask Your Question

Revision history [back]

MoveGroupCommander unable to connect


So, my setup is based on:

  • and on package, which I generated with the moveit wizard.

The wizard gives me a demo.launch file, which is okay, I can run it. But as soon as I run my node, based on the code above on a different namespace with a launch file I am getting this error:

RuntimeError: Unable to connect to move_group action server 'move_group' within allotted time (5s).

Starting my node in the launch file looks like this:

<launch> <arg name="robot_name" default="move_it_robot"/>

<node ns="$(arg robot_name)" pkg="rosweld_drivers" name="move_it_robot" type="" output="screen" >
    <param name="robot_name" value="$(arg robot_name)"/>


My python file:

name = rospy.get_param("robot_name", "move_it_robot")
rospy.init_node(name, anonymous=True)

    rospy.wait_for_service('/move_group/load_map', 1)
except ROSException:
    rospy.logerr("Please start MoveIt first")

global group
group_name = rospy.get_param("move_group_name", "welding")
group = moveit_commander.MoveGroupCommander(group_name)

What am I missing here?

Please note: I can run my node on the global namespace (removing ns from the launch file), then it is working fine, but moving it to a specified namespace makes it crash.

Thanks in advance!