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

How to move two movegroup simultaneously with moveit ?

asked 2020-04-20 14:32:27 -0500

rdilare gravatar image

I have two move group in my robot that I want to move simultaneously. With code given below the second move group start moving after first one stop moving.

Is there a way in moveit to move two(or more than two) move group simultaneously ?

def get_plan(group,values):

    joint_goal = group.get_current_joint_values()
    for i,v in enumerate(values):
        joint_goal[i] = v;
    return group.plan(joint_goal)

plan_1 = get_plan(group_1,[0.6, -0.1])
plan_2 = get_plan(group_2,[0.5, 0.0])

group_1.execute(plan_1,wait=True)
group_2.execute(plan_2,wait=True)

I have also tried with wait=False in execute method, but sometime this makes joints in the first move group not move and only moves the joints in the second move group.

Note: I am using kinetic on ubuntu 16.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-23 04:41:46 -0500

Are two different trajectory execution services created and published to?

edit flag offensive delete link more

Comments

these are the execution sevices running:

/move_group/plan_execution/set_parameters
/move_group/trajectory_execution/set_parameters

I am new to Moveit, i have just setup my robot with Setup Assistant and launching the demo.launch. can you please explain why to have two trajectory_execution services. And how can I setup them?

rdilare gravatar image rdilare  ( 2020-04-23 09:37:02 -0500 )edit

As asked if one service exists there can be only one active request that is there can only one goal to the action server(in our case it is .execute()). Even u have two move_group you have only one action server so you ll end up preempting the 1st goal sentgroup_1.execute(plan_1,wait=False) to server or executing two goals one after the other. To move the two robots simultaneously you can either send goal to the controller directly or use different moveit config to consider two robots as one so that you can use a single move_group to move two robtos

Karthick_CK gravatar image Karthick_CK  ( 2021-07-14 03:13:43 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-04-20 14:32:27 -0500

Seen: 605 times

Last updated: Apr 20 '20