Reputation: 69
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.
Upvotes: 0
Views: 1433
Reputation: 61
Hopefully this is still relevant to someone now, that I write this. I've been working with this issue for quite some time and I've managed to get two robots working simultaneously, but they are not separated in the TF tree and that is a really important part, as Vik mentioned, which I'm still struggling with.
But for the bare minimum of the robots working simultaneously, what you need is each robot to have a separate move_group and . In my case I do this in the launch file, where I have a version of the following code:
<group ns="robot_1">
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen" />
<include file="$(find directory)/launch/move_group.launch" />
</group>
<group ns="robot_2">
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen" />
<include file="$(find directory)/launch/move_group.launch" />
</group>
Then, when launching some C++ execution code, you need to launch in the robots namespace, for example in the terminal like so:
ROS_NAMESPACE=robot_1 rosrun movegroup_interface robot_one_move
or this can be don in a separate .launch file as well!
Good luck!
Upvotes: 0
Reputation: 730
I am not very familiar with MoveIt. However I do know that you need to be careful when running multiple systems on a single roscore. Here are some things to consider:
Hope this helps...
Upvotes: 1