lbr-stack / lbr_fri_ros2_stack

ROS 1/2 integration for KUKA LBR IIWA 7/14 and Med 7/14
https://lbr-stack.readthedocs.io/en/latest/
Apache License 2.0
121 stars 34 forks source link

Missing documentation on multi-robot setups #131

Open TheMipmap opened 8 months ago

TheMipmap commented 8 months ago

Lack of documentation regarding the implementation of multi-robot setups.

mhubii commented 8 months ago

thanks for sharing this issue @TheMipmap .

So in order to do a multi-robot setup, it is necessary to

Once that's done, one can connect the robots and the controlling PC to a switch. When using this stack, launch files can then e.g. be used as follows:

ros2 launch lbr_bringup bringup.launch.py \
    model:=iiwa7 # [iiwa7, iiwa14, med7, med14] \
    sim:=false \
    robot_name:=robot1 \
    port_id:=30200 # assuming port was set to 30200

or (depending what is used)

ros2 launch lbr_fri_ros2 app.launch.py model:=iiwa7 robot_name:=robot1 port_id:=30200

The same launch file can then be re-run with a different robot_name / port_id. The transforms will be pre-fixed, so, in rviz, to display the robot correctly, one has to:

See below:

Screenshot from 2023-11-02 11-47-42

Multi-robot setups with moveit are currently not supported in this stack, but I haven't found a good way to do this through moveit yet. One interesting way to investigate multi-robot setups with moveit is the namespace tag in xacro https://github.com/ros/xacro/issues/305.

mhubii commented 8 months ago

This issue requires:

Moving forward, it might be beneficial to have an lbr_model_zoo repository in https://github.com/lbr-stack/ for the community to share setups.

EliasTDam commented 7 months ago

thanks for sharing this issue @TheMipmap .

So in order to do a multi-robot setup, it is necessary to

  • Configure a unique port id for each robot in the java application
  • Configure a unique IP address for each robot

Once that's done, one can connect the robots and the controlling PC to a switch. When using this stack, launch files can then e.g. be used as follows:

ros2 launch lbr_bringup bringup.launch.py \
    model:=iiwa7 # [iiwa7, iiwa14, med7, med14] \
    sim:=false \
    robot_name:=robot1 \
    port_id:=30200 # assuming port was set to 30200

or (depending what is used)

ros2 launch lbr_fri_ros2 app.launch.py model:=iiwa7 robot_name:=robot1 port_id:=30200

The same launch file can then be re-run with a different robot_name / port_id. The transforms will be pre-fixed, so, in rviz, to display the robot correctly, one has to:

  • Configure the Description Topic to /robot_name/robot_description
  • Set a TF prefix in the RobotModel to robot_name

See below:

Screenshot from 2023-11-02 11-47-42

Multi-robot setups with moveit are currently not supported in this stack, but I haven't found a good way to do this through moveit yet. One interesting way to investigate multi-robot setups with moveit is the namespace tag in xacro ros/xacro#305.

Hey! How/where do we set the port number? I am looking through LBRServer.java, and cannot find anything related to the port number.

mhubii commented 7 months ago

Hi @EliasTDam , in the java application, you can configure the FRI connection.

fri_configuration_ = FRIConfiguration.createRemoteConfiguration(lbr_, client_name_);
fri_configuration_.setSendPeriodMilliSec(send_period_);
fri_configuration_.setPortOnRemote(30201);  // add this line and set desired port ID

ideally there would be a user interaction to set it on the fly. That would need to be added

EliasTDam commented 7 months ago

Thanks @mhubii ! We'll continue to keep you posted on our progress.