Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dual arm tutorial for ROS2 #3

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

ShahhhVihaan
Copy link

This draft PR addresses issue #1 regarding a dual arm example setup. It introduces three packages that perform the following functions:

  1. my_dual_robot_cell_description : Creates a custom workcell with two UR3 arms named alice and bob.
  2. my_dual_robot_cell_control: Contains launchfiles to start the communication and control of the robots. Uses one control manager handling controllers for both the arms.
  3. my_dual_robot_moveit_config: Sets up the moveit configuration with the help of MoveItSetupAssistant and MoveItConfigsBuilder.

This has been tested successfully on two UR3 arms. Here's the ROS graph for the same:
Dual arm with real hardware and moveit

I need to clean up the packages and write tutorial documentation before it is ready to merge.

ShahhhVihaan and others added 16 commits June 24, 2024 12:49
- Add ros2 control tags/parameters for each robot arm
- Some parameters are specific to each arm and some common to both
- Ports and IP different for each arm
- RTDE scripts, mock hardware, headless mode common to the arms
- Instantiates one controller manager for both arms and passes the controller configs and update rate
- Receives the robot_description param from the robot_description_topic (robot_state_publisher)
- Does not yet implement io_and_status_controller and forward_velocity_controller
- Has functionality to spawn and stop controllers for both arms
- Only works in simulation and not with real hardware
- Limited number of launch parameters as of now
@fmauch fmauch linked an issue Jul 4, 2024 that may be closed by this pull request
@eladpar
Copy link

eladpar commented Jul 4, 2024

First, Thank you for your contribution.
can you please share your setup? ( what ubuntu, ros2 , UR_driver & Description commits etc...)
iv'e been trying to deploy this on humble with a few adaptations with out much luck
(ur.ros2_control take from ur_description instead of ur_driver, change mock to fake, and take car of kinematics paramters_file)

@ShahhhVihaan
Copy link
Author

@eladpar I am working on a local Ubuntu 22.04 system, using ROS2 Rolling. I have installed the Universal Robots (UR) driver via source installation following the instructions provided here.

@ShahhhVihaan
Copy link
Author

@eladpar, I recommend ensuring you pass all the parameters for ros2_control for both arms in your description. In the Humble version of ur_description, the ur_macro.xacro contains the ros2_control tags, unlike in Rolling. Once you have configured these parameters, you can refer to the my_dual_robot_cell/my_dual_robot_cell_control/config/combined_controllers.yaml file, which defines controllers for both arms. In your driver launch file, try spawning the controllers using only the ros2_control_node (comment out everything else). Once that works, you can continue testing and gradually add all the other nodes and functions.

@ShahhhVihaan
Copy link
Author

@fmauch Once this PR has been merged do you think we can make a branch for humble? I'd be willing to make the tutorials.

@eladpar
Copy link

eladpar commented Jul 9, 2024

Tried today operating the 2 robots with ros2 rolling ubuntu 24.
seems like there might be an issue maybe because it e-series..

  1. I ran
ros2 launch my_dual_robot_cell_control  start_robots.launch.py  alice_ur_type:=ur16e bob_ur_type:=ur16e alice_robot_ip:=192.168.1.102 bob_robot_ip:=192.168.1.103 

but seems like when I try to run the program on the UR pendent It gets stuck at starting program, and this is the messege I get on pc:
Screenshot from 2024-07-09 12-57-24
Screenshot from 2024-07-09 12-57-34

  1. I ran with headless mode and one of the robot starts to move suddenly ( and the moveit isn't really executing trajectories..)
ros2 launch my_dual_robot_cell_control  start_robots.launch.py  alice_ur_type:=ur16e bob_ur_type:=ur16e alice_robot_ip:=192.168.1.102 bob_robot_ip:=192.168.1.103 headless_mode:=true

@ShahhhVihaan
Copy link
Author

ShahhhVihaan commented Jul 10, 2024

@eladpar Do the external control custom ports match the script sender ports in here?

On a side note for my curiosity: did the controllers launch correctly? You can look at my rqt_graph above to compare.

@ShahhhVihaan
Copy link
Author

@fmauch Can you suggest how I can write the docs (reST documentation). Do you have a Sphinx workflow for the same?

Copy link
Collaborator

@fmauch fmauch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for not coming back on this earlier. I appreciate your efforts very much @ShahhhVihaan. I'll review this bit by bit in order to make it easier to find time slots for reviewing.

So far, I have been looking a the description which looks very good, overall. Please see my comments on suggestions for improvements.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be good, to re-use the files from the custom_workcell. Simply add a dependency on my_custom_workcell and reference the files from there.

<!-- The UR background wall (meshes/ur_background.jpg)constitutes “Graphical Documentation” the use of which is subject to and governed by our “Terms and Conditions for use of Graphical Documentation”, which can be found here: https://www.universal-robots.com/legal/terms-and-conditions/terms_and_conditions_for_use_of_graphical_documentation.txt -->
<license file="UR_LICENSE.txt">Universal Robots A/S’ Terms and Conditions for Use of Graphical Documentation</license>

<author email="[email protected]">Felix Durchdewald</author>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you would like to add yourself there, instead of Felix Durchdewald ;-)

<joint name="base_to_alice_robot_mount" type="fixed">
<parent link="table"/>
<child link="alice_robot_mount"/>
<origin xyz="0.3 0.85 0" rpy="0 0 ${pi}" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the placement isn't ideal since it is right behind the computer screen on the table.

@fmauch
Copy link
Collaborator

fmauch commented Sep 18, 2024

@fmauch Can you suggest how I can write the docs (reST documentation). Do you have a Sphinx workflow for the same?

Basically, I think you can do things similar to the my_robot_cell package. I'll try to fix building the doc in this package, also for CI so you can use that.


Edit: See #7

@fmauch fmauch self-requested a review September 25, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write multi (dual) arm tutorial for ROS 2
3 participants