justagist / panda_robot

A ROS python interface for using the franka robot (requires franka_ros_interface). Simplified control and management API.
https://justagist.github.io/panda_robot
Apache License 2.0
85 stars 17 forks source link

Controlling two robots #7

Closed ma-rv closed 3 years ago

ma-rv commented 3 years ago

Hey @justagist,

First of all, thank you for your effort in providing a ROS / Python interface for the panda robot!

I would like to control two pandas at the same time. What do you think is the easiest way to accomplish the task? Could I e.g. just create a second franka.sh with a different config and run the franka_interface? But how could I connect to a specific robot arm with PandaArm() if two franka_interface are running? Or would I even need to make some adjustments in libfranka or franka-ros?

I would be very thankful for any hints and comments!

justagist commented 3 years ago

Hi @ma-rv, Glad to hear you found the packages useful! Unfortunately, I have never tried the interface packages with 2 robots, so it would be difficult for me to advise you regarding this topic. It may be possible that you can control two robots using two separate instances of franka_ros_interface's interface.launch running as you said, but you will have to change many parts of the packages such as topic and service names, ROS parameter names, even many parts of the driver code which have hardcoded topic names, joint names, robot names, etc. to make them unique for each robot. This might also cause other complications within the franka_ros_interface API as most of the code is written with the assumption that only one robot is being controlled.

However, franka-ros seems to have provided a way for controlling multiple robots using combined_robot_hw::CombinedRobotHW. So the best option for you might be to start by using their franka_combined_control_node (link to doc -- there's a brief description here, but you might have to go through their code to fully understand what is happening), and then make changes or write the required interface code depending on what you are trying to achieve.

Sorry for not being of more help. -- Saif

ma-rv commented 3 years ago

Hi @justagist,

Your comment already helped me a lot. As combined_robot_hw::CombinedRobotHW does not expose all necessary parameters I ended up using a ROS multimaster setup. That way no major code changes were needed and I could just use the franka_ros_interface twice.

Thanks, for having taken your time!

justagist commented 3 years ago

That's great! Glad you found a way to do it. And thank you for sharing how you managed it.