-
Notifications
You must be signed in to change notification settings - Fork 12
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
Humble #11
Conversation
…k for those in runtime_config_package and description_package which is my_robot_cell_control in our case; more ur_types could be added
…humble (all installed via apt)
Thank you very much for contributing this @maditavomstein I'll have a look at this. |
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.
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" /> |
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 it would be good to rely on reading the has from the config file as in https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/d7f3ea75aa3e11b17817507cc5fb06caa7ae584b/ur_robot_driver/urdf/ur.ros2_control.xacro#L31-L33
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.
@maditavomstein Would you mind updating this?
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 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
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 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)"
/>
my_robot_cell/my_robot_cell_control/urdf/my_robot_cell_controlled.urdf.xacro
Outdated
Show resolved
Hide resolved
my_robot_cell/my_robot_cell_control/config/ur20/joint_limits.yaml
Outdated
Show resolved
Hide resolved
…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.
@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? |
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. |
I'll have a quick look later this week and then decide whether I can squeeze it in. |
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. |
I would be OK with this, but I'll have it checked by someone not involved, yet. |
I noticed a couple of the captions point to the wrong source files. Otherwise I would say this is easy to follow, and works well to bring someone up to speed. |
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. |
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