How run multiple move_group for different robots in single system
Hello,
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.
Asked by Vishnuprasad176 on 2019-02-28 08:29:13 UTC
Answers
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
Asked by mlautman on 2019-03-05 16:06:22 UTC
Comments
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.
Asked by gvdhoorn on 2019-03-06 02:47:18 UTC
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.
Asked by ccetin on 2019-05-21 19:13:56 UTC
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
Asked by Karthick_CK on 2021-07-14 03:40:07 UTC
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!
Asked by sophvk on 2022-06-24 15:05:32 UTC
An update to this old question:
- Currently, MoveIt does not support executing multiple trajectories via a
MoveGroupInterface
orCommander
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 groupab_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.
Asked by fvd on 2022-06-24 22:24:02 UTC
Comments
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
andasyncExecute
) and that might be it?Asked by aPonza on 2019-03-01 04:05:45 UTC
And it seems like the python alternative would be execute with wait=False if that were the problem.
Asked by aPonza on 2019-03-01 04:08:37 UTC
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
Asked by mkb_10062949 on 2019-09-17 12:02:28 UTC
Has anyone achieved any solution for that problem? I'm facing the same issue as @mkb_100062949
Asked by NourhanKhatab on 2020-04-07 11:20:06 UTC