Yaskawa-Global / motoros2

ROS 2 (rcl, rclc & micro-ROS) node for MotoPlus-compatible Yaskawa Motoman robot controllers
96 stars 20 forks source link

Initial implementation of HC10 F/T and ext torque publisher #188

Open iydv opened 11 months ago

iydv commented 11 months ago

Based on discussion #184 I have implemented the first version of the force torque monitor. I have tested the code on HC10 and the data is published correctly on both topics.

However, there are several issues which require clarification:

1) No multi-group support. Based on my information, the collaborative robots work only on YRC1000/ YRC1000u controllers which do not support multi-groups. Can @ted-miller please clarify this? 2) Register addresses for TCP/ joint torque values should be obtained from parameters in ctrlGroup similar to Ros_CtrlGroup_GetFBServoSpeed function. However, I have not found where I can define register addresses. Are they defined in ParameterExtraction.yrcLib ? How can I edit it?

gavanderhoorn commented 11 months ago

Nice. Thanks for the PR.

I'll try to go over it in the next couple days.

Could you perhaps post some example/representative ros2 topic echo output?

gavanderhoorn commented 11 months ago

High-level comment: please avoid merging in main. I'd suggest to rebase instead. Keeps history clean, and as long as we don't have any related, concurrent development in main or other branches, does not seem like it violates any consistency / coherency on the Git history side.

iydv commented 11 months ago

yes, sorry. I have deleted the merge.

iydv commented 11 months ago

Could you perhaps post some example/representative ros2 topic echo output?

here are examples of topic outputs (I will change later joint_external_torque to output empty position and velocity) :

ros2 topic echo /tcp_force_torque:

Click to expand ```yaml header: stamp: sec: 1699449961 nanosec: 592319543 frame_id: motoros2_r1/base wrench: force: x: -22.6 y: 4.6000000000000005 z: 23.1 torque: x: -2.2 y: -9.1 z: -0.4 ```

ros2 topic echo /joint_external_torque:

Click to expand ```yaml header: stamp: sec: 1699450224 nanosec: 656734054 frame_id: '' name: - joint_1_s - joint_2_l - joint_3_u - joint_4_r - joint_5_b - joint_6_t position: - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 velocity: - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 effort: - -1.5 - -20.5 - 11.4 - -2.5 - 0.1 - -0.30000000000000004 ```

To verify the values you can use teach pad: Safety Func. -> ForceMonitor IMG_20231108_142709413

Unfortunately, the F/T values oscillates a lot, so you might not see exact values on teach pad

gavanderhoorn commented 11 months ago

Those are some serious nrs, are you pushing on the robot?

Unfortunately, the F/T values oscillates a lot, so you might not see exact values on teach pad

yes. I expect some filtering to be beneficial/necessary on the ROS side in actual applications.

iydv commented 11 months ago

Those are some serious nrs, are you pushing on the robot?

I did not select correct tool in settings with proper weight, so the values are off since it uses tool weight for calculation

ted-miller commented 11 months ago

No multi-group support. Based on my information, the collaborative robots work only on YRC1000/ YRC1000u controllers which do not support multi-groups. Can @ted-miller please clarify this?

The YRC1000 does support multi-group. But we don't do multi-HC configurations.

Register addresses for TCP/ joint torque values should be obtained from parameters in ctrlGroup similar to Ros_CtrlGroup_GetFBServoSpeed function. However, I have not found where I can define register addresses. Are they defined in ParameterExtraction.yrcLib ? How can I edit it?

The registers are hardcoded. There is now way to change them. register list.pdf

I would suggest defining these as contants/defines in a header file

gavanderhoorn commented 10 months ago

@iydv: have you had any chance to look at some of things commented on above?

Just a friendly ping again.

iydv commented 10 months ago

@iydv: have you had any chance to look at some of things commented on above?

I was waiting for full review, in case a major code rework is required.

If general code structure is fine, I can integrate changes from above.

iydv commented 10 months ago

If general code structure is fine, I can integrate changes from above.

done

iydv commented 10 months ago

@gavanderhoorn did you had any time to review the current implementation?

iydv commented 10 months ago

@ted-miller thank you for feedback, I will try to integrate all changes.

destogl commented 1 month ago

@gavanderhoorn or @iydv is it possible to get a compiled version for YRC1000m for testing this?

I have a compilation issue, as VS 2017 is hard to get and then end up in the dependencies hell already for more then a day...

gavanderhoorn commented 1 month ago

VS 2017 isn't a requirement: I use VS 2022 myself. Do you have the MotoPlus SDK?


Edit: I'll see if I can build a (rebased) version of this later.


Edit 2: @destogl: see 20240820_mr2_yrc1m_h_pr188-alpha2.zip. It's a version of this PR rebased on-top of current main. I can't test it myself right now, so use caution. The .zip only contains the binary, none of the other files that would typically be part of a release, but you can get those from the regular 0.1.3 release .zip.

destogl commented 1 month ago

@gavanderhoorn thank you for this! It works great on our HC20SDTP model and directly out of the box. Thank you for this!

I have managed to set up the VS for the compilation, but the key needs a few more days to come so we can also compile this.

We will report our experiences, so you guys have more feedback, and let's hope this lands soon into release.