Skip to content

Humble #11

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

Merged
merged 17 commits into from
Mar 19, 2025
Merged

Humble #11

merged 17 commits into from
Mar 19, 2025

Conversation

maditavomstein
Copy link

@maditavomstein maditavomstein commented Jan 27, 2025

Hi!
I edited the ur_tutorial package to make it usable for ROS Humble (ROS Humble, UR_Driver and UR_description installed via apt).
Maybe you can use this for a humble branch?
Madita

@urfeex
Copy link
Member

urfeex commented Feb 5, 2025

Thank you very much for contributing this @maditavomstein I'll have a look at this.

@urfeex urfeex self-requested a review February 5, 2025 09:34
@urfeex urfeex added the Humble label Feb 5, 2025
Copy link
Member

@urfeex urfeex left a comment

Choose a reason for hiding this comment

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

We would need to update a lot of the documentation to match, but this doesn't necessarily have to happen in this PR. @maditavomstein could you please address my comments? Many of them are questions, rather than change requests. I would, however, prefer having this to diverge from the rolling branch as little as possible.

<xacro:arg name="use_fake_hardware" default="false" />
<xacro:arg name="fake_sensor_commands" default="false" />
<!--find hash_kinematics in calibration yaml-->
<xacro:arg name="hash_kinematics" default="calib_4890363623803256388" />
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@urfeex urfeex Feb 6, 2025

Choose a reason for hiding this comment

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

@maditavomstein Would you mind updating this?

Copy link
Author

Choose a reason for hiding this comment

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

I tried to but I haven't gotten it working yet.
Is it possible that xacro.load_yaml is not available in ROS Humble (installed via apt)? This might also be the reason for the different approach in ur.ros2_control.xacro where hash_kinematics needs to be provided directly. I found that in ur_macro.xacro this parameter is loaded by using the xacro: read_model_data which is defined in /ur_description/urdf/inc/ur_common.xacro. Do you want that file to be included in my_robot_cell_control/urdf/inc ? Then I could try to use the xacro read model data to get the hash out of the kinematics_params within the my_robot_cell_controlled.urdf.xacro to hand it over to ur_ros2_control.
But it is not really clear to me why it wouldn't work if I copy the relevant lines from ur_common to my urdf.xacro directly. I get the error, that 'kinematics_params' isn't defined (probably bc it's defined as a xacro:arg ?).
I tried to refer to it as an arg or to define it as a property, too.
error for the kinematics file, defined as a property from the arg:

Captured stderr output: error: invalid expression: ${kin_file
when evaluating expression 'xacro.load_yaml('${kin_file'
when evaluating expression 'config_kinematics_parameters['kinematics']'
when evaluating expression 'sec_kinematics['hash']'
when processing file: /home/madita/develop_ws/install/my_robot_cell_control/share/my_robot_cell_control/urdf/my_robot_cell_controlled.urdf.xacro

error for refering to the file as an arg:
Captured stderr output: error: 'dict' object has no attribute '_setitem'
when processing file: /home/madita/develop_ws/install/my_robot_cell_control/share/my_robot_cell_control/urdf/my_robot_cell_controlled.urdf.xacro

Copy link
Member

@urfeex urfeex Feb 7, 2025

Choose a reason for hiding this comment

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

I guess, you copied it completely from the ur_common? I think the scope="parent" throws the error when used in the top-most scope.

The following works for me:

  <xacro:property name="kinematics_params_file" value="$(arg kinematics_params)"/>
  <xacro:property name="kinematics_hash" value="${xacro.load_yaml(kinematics_params_file)['kinematics']['hash']}"/>
 
  <!--Create the control tag for the UR robot-->
  <xacro:ur_ros2_control
    name="$(arg ur_type)"
    tf_prefix="$(arg ur_type)_"
    hash_kinematics="${kinematics_hash}"
    robot_ip="$(arg robot_ip)"
    script_filename="$(arg ur_script_filename)"
    output_recipe_filename="$(arg ur_output_recipe_filename)"
    input_recipe_filename="$(arg ur_input_recipe_filename)"
    use_fake_hardware="$(arg use_fake_hardware)"
    fake_sensor_commands="$(arg fake_sensor_commands)"
    headless_mode="$(arg headless_mode)"
  />

maditavomstein and others added 5 commits February 5, 2025 17:07
…ual_params to make it match the arguments handed over by ur_control.launch.py // otherwise default values were used
Otherwise the xacro-specific !degrees tag will not be accepted.
@urfeex urfeex changed the base branch from main to humble February 10, 2025 09:54
@urfeex
Copy link
Member

urfeex commented Feb 10, 2025

@maditavomstein I've updated the foramtting and yaml checks and created a humble base branch. I think we are ready to merge this code-wise, but the documentation would have to be updated, as well. Would you be up to work on that, as well?

@maditavomstein
Copy link
Author

@maditavomstein I've updated the foramtting and yaml checks and created a humble base branch. I think we are ready to merge this code-wise, but the documentation would have to be updated, as well. Would you be up to work on that, as well?

What would you need for the documentation? Or what documentation needs to be changed?
I'm not really familiar with the guidelines as this is the first time I've contributed to GitHub.

@urfeex
Copy link
Member

urfeex commented Feb 11, 2025

What would you need for the documentation? Or what documentation needs to be changed? I'm not really familiar with the guidelines as this is the first time I've contributed to GitHub.

Are you familiar with sphinx documentation? As you can see in the CI run building the documentation fails for this branch, mainly because some source file references aren't correct anymore.

Since you modified the source files, those references would need to be updated and maybe some of the explanatory text around them would need to be updated, as well? Ideally, this would be part of this PR, as then the change would be complete (source files and documentation). If you don't feel comfortable updating the documentation I can also have a look at that. As you basically sticked to the concept that we have for the rolling branch, I expect the necessary changes to be quite minimal.

@maditavomstein
Copy link
Author

Are you familiar with sphinx documentation? As you can see in the CI run building the documentation fails for this branch, mainly because some source file references aren't correct anymore.

Since you modified the source files, those references would need to be updated and maybe some of the explanatory text around them would need to be updated, as well? Ideally, this would be part of this PR, as then the change would be complete (source files and documentation). If you don't feel comfortable updating the documentation I can also have a look at that. As you basically sticked to the concept that we have for the rolling branch, I expect the necessary changes to be quite minimal.

No, I had never heard of sphinx documentation before. I'd be happy to have a look at it and try to create / adapt the documentation. I probably wouldn't be able to get to this before the beginning of March though. So depending on how urgent you want it, let me know if you want me to do it.

@urfeex
Copy link
Member

urfeex commented Feb 12, 2025

No, I had never heard of sphinx documentation before. I'd be happy to have a look at it and try to create / adapt the documentation. I probably wouldn't be able to get to this before the beginning of March though. So depending on how urgent you want it, let me know if you want me to do it.

I'll have a quick look later this week and then decide whether I can squeeze it in.

@maditavomstein
Copy link
Author

sphinx documentation

Do you still need this from me?

@urfeex
Copy link
Member

urfeex commented Mar 17, 2025

sphinx documentation

Do you still need this from me?

If you find the time, that's always welcome. As you may have guessed, I was not able to squeeze it in.


Edit: I'm on it right now.

@urfeex
Copy link
Member

urfeex commented Mar 17, 2025

I would be OK with this, but I'll have it checked by someone not involved, yet.

@URJala
Copy link

URJala commented Mar 18, 2025

I noticed a couple of the captions point to the wrong source files.
All three captions are in the Universal_Robots_ROS2_Tutorials/my_robot_cell/doc/assemble_urdf.rst file:
Line 60, 75 and 84 should be:
:caption: my_robot_cell_description/urdf/my_robot_cell_macro.xacro

Otherwise I would say this is easy to follow, and works well to bring someone up to speed.

@urfeex
Copy link
Member

urfeex commented Mar 19, 2025

Thank you @URJala for reviewing this, a special thank you to @maditavomstein for lifting the majority of the work! I'll merge this once the CI is happy.

@urfeex urfeex merged commit 07ce1fc into UniversalRobots:humble Mar 19, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants