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

How run multiple move_group for different robots in single system

asked 2019-02-28 07:29:13 -0600

Vishnuprasad176 gravatar image

updated 2021-10-26 09:30:43 -0600

lucasw gravatar image


I am trying to simulate in Gazebo multiple robots(KUKA, UR5 and Franka Panda). In a URDF file included all the robot for simulation and using the Moveit made separate arm group of all three robots. Using the Moveit commander, I can control the robot, and it is working fine. Problem is when I am trying to control all the robot at the same time using the Moveit commander. If one robot is working, then another robot will not work even if I command to it. Is there any way I can work all three robots simultaneously.

edit retag flag offensive close merge delete


Could it be the calls you're giving to the commander are blocking (you have to wait until they're done before processing the next line)? I know roscpp offers asynchronous commands (look at MoveGroup::asyncMove and asyncExecute) and that might be it?

aPonza gravatar image aPonza  ( 2019-03-01 03:05:45 -0600 )edit

And it seems like the python alternative would be execute with wait=False if that were the problem.

aPonza gravatar image aPonza  ( 2019-03-01 03:08:37 -0600 )edit

Hey so did you manage to solve the problem because I am facing a similar problem in controlling two UR5 with moveit python interface for a pick and place task

mkb_10062949 gravatar image mkb_10062949  ( 2019-09-17 12:02:28 -0600 )edit

Has anyone achieved any solution for that problem? I'm facing the same issue as @mkb_100062949

NourhanKhatab gravatar image NourhanKhatab  ( 2020-04-07 11:20:06 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2019-03-05 15:06:22 -0600

mlautman gravatar image

MoveGroup is not intended to be used that way. You can do one of a few things: 1) Generate a combined RobotTrajectory with all of the joints across your multiple robots included or 2) You can always publish the trajectories directly to the controllers

edit flag offensive delete link more


Is the problem move_group here or the commander? Running multiple instances of move_group can definitely be done, but a MoveIt Commander instance only connects to one of those.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 01:47:18 -0600 )edit

I am using the C++ API for the move_group and I came across the same problem. Running the asyncMove() command results in preempted cancellation of the first move request. Can you guys confirm that this is indeed not doable with move_group ?

A more detailed info on what I am trying to do: I have two planning groups and I want to execute a motion for both of them at the same time. Each planning group has its own instance of move_group however they get piped into the same action server causing the aforementioned problem.

ccetin gravatar image ccetin  ( 2019-05-21 19:13:56 -0600 )edit

Instead of having two planning groups for two robots, you can have 3 planning groups- third for controlling two robots. In this case two robots are considered as a single robot and you can use one move_group to move two robots in coordinated motion

Karthick_CK gravatar image Karthick_CK  ( 2021-07-14 03:40:07 -0600 )edit

Hello, @mlautman: how do you generate a combined trajectory? @Karthick_CK do you create these planning groups in the moveit setup assistant? And command only the third group? Thanks!

sophvk gravatar image sophvk  ( 2022-06-24 15:05:32 -0600 )edit

answered 2022-06-24 22:24:02 -0600

fvd gravatar image

An update to this old question:

  • _Currently_, MoveIt does not support executing multiple trajectories via a MoveGroupInterface or Commander interface.
  • Sending planned trajectories directly to the robot controllers is possible, but MoveIt will not ensure that there are no collisions between the trajectories. This is dangerous and should be done at your own risk.
  • It is possible to move multiple arms at the same time, but they both need to be part of one planning group and trajectory. They cannot start and stop their motion independently of the other. When planning, you need to set a goal for each arm (or group of joints). This project has some examples (check the lines in the o2ac_routines package that use the planning group ab_bot).
  • In the same project, we also forked MoveIt to make a single move_group move multiple PlanningGroups independently. This is the functionality requested in the original question.
  • This open PR should bring the changes into upstream MoveIt and enable multiple trajectory execution. Finishing this big PR is the subject of a Google Summer of Code project, tracked here. It is a big change, so you can support it by reviewing and following the issue and PR.
edit flag offensive delete link more

Question Tools



Asked: 2019-02-28 07:29:13 -0600

Seen: 1,512 times

Last updated: Jun 24 '22