-
Notifications
You must be signed in to change notification settings - Fork 5
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
base: main
Are you sure you want to change the base?
Dual arm tutorial for ROS2 #3
Conversation
- 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
…Universal_Robots_ROS2_Tutorials into dual_arm_tutorials
First, Thank you for your contribution. |
@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. |
@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. |
@fmauch Can you suggest how I can write the docs (reST documentation). Do you have a Sphinx workflow for the same? |
There was a problem hiding this 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.
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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}" /> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second round of reviewing, this time the control package.
alice_joint_state_broadcaster: | ||
type: joint_state_broadcaster/JointStateBroadcaster | ||
|
||
bob_joint_state_broadcaster: | ||
type: joint_state_broadcaster/JointStateBroadcaster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one joint_state_broadcaster should be sufficient.
alice_joint_state_broadcaster: | |
type: joint_state_broadcaster/JointStateBroadcaster | |
bob_joint_state_broadcaster: | |
type: joint_state_broadcaster/JointStateBroadcaster | |
joint_state_broadcaster: | |
type: joint_state_broadcaster/JointStateBroadcaster |
@@ -0,0 +1,3 @@ | |||
controller_manager: | |||
ros__parameters: | |||
update_rate: 125 # Hz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we please default to an e-series robot?
update_rate: 125 # Hz | |
update_rate: 500 # Hz |
"ur20", | ||
"ur30", | ||
], | ||
default_value="ur3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default_value="ur3", | |
default_value="ur3e", |
"ur20", | ||
"ur30", | ||
], | ||
default_value="ur3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default_value="ur3", | |
default_value="ur3e", |
DeclareLaunchArgument( | ||
"alice_robot_ip", | ||
default_value="192.168.0.101", | ||
description="IP address by which the robot can be reached.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description="IP address by which the robot can be reached.", | |
description="IP address by which alice can be reached.", |
DeclareLaunchArgument( | ||
"bob_mock_sensor_commands", | ||
default_value="false", | ||
description="Enable mock command interfaces for sensors used for simple simulations. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description="Enable mock command interfaces for sensors used for simple simulations. " | |
description="Enable mock command interfaces for bob's sensors used for simple simulations. " |
condition=UnlessCondition(bob_use_mock_hardware), | ||
) | ||
|
||
alice_controller_stopper_node = Node( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably contain all controllers from the other robot, well?
"alice_joint_state_broadcaster", | ||
"bob_joint_state_broadcaster", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"alice_joint_state_broadcaster", | |
"bob_joint_state_broadcaster", | |
"joint_state_broadcaster", |
return nodes_to_start | ||
|
||
|
||
def generate_launch_description(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see rsp.launch.py for comments on launch arguments.
<name>my_dual_robot_cell_control</name> | ||
<version>1.0.0</version> | ||
<description>ros2_control setup</description> | ||
<maintainer email="[email protected]">Felix Durchdewald</maintainer> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add yourself as an author and use me as a maintainer.
This draft PR addresses issue #1 regarding a dual arm example setup. It introduces three packages that perform the following functions:
This has been tested successfully on two UR3 arms. Here's the ROS graph for the same:
I need to clean up the packages and write tutorial documentation before it is ready to merge.