Universal_Robots_ROS_Driver: Can't simultaneously control multiple robots
Hi, I am testing this driver with a dual-arm UR5e setup in our lab. I can correctly start the driver for one arm at a time but couldn’t find a way to control the two arms at the same time (using a single computer).
I have two launch files (left_arm_bringup.launch
and right_arm_bringup.launch
) that can correctly start the driver for the left/right arm. These launch files are just copies of ur5e_bringup.launch
with IP and calibration file provided.
Here is what I have tried to launch driver for both arms at the same time:
file: both_arm_bringup.launch
<?xml version="1.0"?>
<launch>
<include file="$(find macs_ur_launch)/launch/left_arm_bringup.launch" ns="left_arm"/>
<include file="$(find macs_ur_launch)/launch/right_arm_bringup.launch" ns="right_arm"/>
</launch>
I wanted to prefix the services/topics with different namespaces for each arm, so the message sent will not conflict. However, it seems that this is not going to work. It will produce a runtime error says “Connection setup failed for :50002”. See the log here: log.txt
It seems that the underlying connections can’t be launched multiple times? Is there any other way that I can built the connections for both robots at the same time?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 27 (8 by maintainers)
I’ve created an example package how to control two arms at the same time: https://ur-documentation.readthedocs.io/en/latest/examples/dual_robot/introduction.html
Thanks for reminding me of this thread. We also released a complete example of how to control two arms with Robotiq grippers: https://github.com/o2ac/o2ac-ur
First of all: I don’t think, it is a very good idea to control two arms from one machine, as they will share resources (computation wise and (depending on your network setup) communication wise).
However, if you want to go ahead and do this, you’ll have to adapt the reverse_port 50001 and the script_sender_port 50002 for one of the drivers (They are launch file parameters).
See #57 where this got implemented.
Please try this out and let us know whether this works in your situation.