UniversalRobots / Universal_Robots_ROS2_Tutorials

Tutorials around the Universal Robots ROS 2 ecosystem
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

Write multi (dual) arm tutorial for ROS 2 #1

Open fmauch opened 6 months ago

fmauch commented 6 months ago

We had one for ROS 1, but things have changed quite significantly. This was requested in

A base could be https://github.com/UniversalRobots/Universal_Robots_ROS2_Description/pull/70

ShahhhVihaan commented 5 months ago

@fmauch, I'd love to contribute to these tutorials. I'm currently working on a similar setup with two UR3 arms and am close to getting it to work using the main branch of the driver.

Based on the discourse and issues related to dual-arm setups, it seems many people are trying to achieve this configuration. To streamline the process, I propose the following project structure: my_dual_robot_cell ├── doc ├── my_dual_robot_cell_control ├── my_dual_robot_cell_description └── my_dual_robot_cell_moveit_config my_robot_cell ├── doc ├── my_robot_cell_control ├── my_robot_cell_description └── my_robot_cell_moveit_config

Would it be possible for me to contribute to the project? I'd appreciate any feedback or suggestions you might have on this approach.

fmauch commented 5 months ago

Hi @ShahhhVihaan Yes, that would be more than welcome! The project structure you suggested is exactly what I had in mind. My idea was to re-use the description from my_robot_cell (Basically copy https://github.com/UniversalRobots/Universal_Robots_ROS2_Tutorials/blob/main/my_robot_cell/my_robot_cell_description/urdf/my_robot_cell_macro.xacro and add two robots in there).

Then I'll assign this issue to you, if you like. Please let me know if there is anything I can help you with.

fmauch commented 5 months ago

@ShahhhVihaan just for clarity: The tutorial should be targeting Rolling / Jazzy similar to the custom workcell tutorial.

fmauch commented 5 months ago

@ShahhhVihaan, how are you getting along with this? Is there anything we can support you with?

ShahhhVihaan commented 5 months ago

@ShahhhVihaan, how are you getting along with this? Is there anything we can support you with?

Hi,

Apologies for my delayed response—I've been tied up with some other deadlines. So far, I've made good progress with the dual-arm setup. Currently, I have a dual-arm description and a dual-arm driver running with a single controller manager in simulation. I'm still working on implementing functionalities like the urscript_interace, dashboard_client, etc to control both arms in reality.

Additionally, I've generated a dual-arm MoveIt configuration using the setup assistant, though I'm ironing out a few issues there. Below is the node graph for our current setup (minus the io_and_status_controller): dual_arm_sim

I'm aiming to wrap this up by the end of the week and might need your advice on structuring the launch file/files once everything is operational.

I have one specific question for now: For the update_rate parameter passed to the controller_manager, should I use the lower of the two rates if I'm dealing with two different UR arms?

fmauch commented 5 months ago

@ShahhhVihaan that's good news, thanks for the heads up.

I have one specific question for now: For the update_rate parameter passed to the controller_manager, should I use the lower of the two rates if I'm dealing with two different UR arms?

That is currently being changed upstream, see https://github.com/ros-controls/ros2_control/pull/1570. For the time being I would suggest to use two robots with the same update rate.

eladpar commented 4 months ago

@ShahhhVihaan Any chance you can share your work so I can help in testing it?

fmauch commented 4 months ago

@ShahhhVihaan opening a draft PR would be the perfect way of sharing your progress, if you like.

ShahhhVihaan commented 4 months ago

@fmauch @eladpar

I have opened a draft PR. This implementation now works with two UR3 arms. I need to clean up the code and add tutorial documentation before it is ready to merge.

If you're setting this up on your machine, please double-check the port settings in the configuration and on the pendant for the ExternalControl URCap.

In my xacro file, I had set two different script sender ports but forgot to change it on the pendant. When I played the ExternalControl program, one of the robots moved suddenly and dangerously because it was communicating over the same port. Fortunately, no damage occurred, but please be cautious to avoid any potential accidents.

ttmg1998 commented 1 day ago

Hello everyone,

first of all thank you for your work. At the moment I try this out on my two robots but unfortunatly it didn't work. I can send urscript code and this works but when I try to pub something on the joint_tractory topic it doesn't work. When I echo this topic I get the response that soething was heard but not executed. Any suggestions? I am thankful for every help!

Best regards, Tobias