Yaskawa-Global / motoros2

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

Check for duplicated joint names in a trajectory #162

Closed ted-miller closed 9 months ago

ted-miller commented 9 months ago

Fixes #28 Not yet tested due to https://github.com/Yaskawa-Global/micro_ros_motoplus/issues/132

ted-miller commented 9 months ago

Tested and working

gavanderhoorn commented 9 months ago

msbuild CI is failing due to something I introduced in #158.

I'll add a commit to this PR to fix it.


Edit: I fixed it in #164.

gavanderhoorn commented 9 months ago

Actually: could you try rebasing on main @ted-miller?

ted-miller commented 9 months ago

ignore that.

ted-miller commented 9 months ago

Ok. Now I think it'll work

gavanderhoorn commented 9 months ago

I've rebased this branch to include the fix from #164.

gavanderhoorn commented 9 months ago

I can't test this right now, but you have.

@ted-miller: could you maybe describe how you tested it?

ted-miller commented 9 months ago

Using my FJT script, I duplicated the first axis joint name on the second axis. When I run the script, the robot returns the 214 error code with the error message. The robot did not attempt to move.

gavanderhoorn commented 9 months ago

Using my FJT script, I duplicated the first axis joint name on the second axis. When I run the script, the robot returns the 214 error code with the error message. The robot did not attempt to move.

might want to check also with a joint at index != 0.

ted-miller commented 9 months ago

11 is current preventing me from testing. I will continue debug next week.

ted-miller commented 9 months ago

Tested again:

'group_1/joint_1',
'group_1/joint_2',
'group_1/joint_3',
'group_1/joint_4',
'group_1/joint_5',
'group_1/joint_6',

'group_2/joint_1',
'group_2/joint_2',
**'group_1/joint_3'**,
'group_2/joint_4',
'group_2/joint_5',
'group_2/joint_6',

'group_3/joint_1'

Client:

control_msgs.action.FollowJointTrajectory_Result(error_code=-100214, error_string='The trajectory contains duplicate joint names.')

Debug Log:

[1696258937.30257201] [192.168.1.32:58802]: 2023-10-02 15:02:17.301923 Trajectory contains 61 points
[1696258937.30277658] [192.168.1.32:58802]: 2023-10-02 15:02:17.302123 Joint name [group_1/joint_3] is used for multiple joints in the trajectory (indices: 2 and 8).
[1696258937.30299282] [192.168.1.32:58802]: 2023-10-02 15:02:17.302323 FollowJointTrajectory - Goal request rejected
[1696258937.30308771] [192.168.1.32:58802]: 2023-10-02 15:02:17.302323 The trajectory will be accepted and then immediately aborted
[1696258937.30314612] [192.168.1.32:58802]: 2023-10-02 15:02:17.302323 The trajectory contains duplicate joint names.
gavanderhoorn commented 9 months ago

off-topic, but: what's up with the output of your debug logger?

It's not supposed to look like that any more since #129 and some older PRs.

ted-miller commented 9 months ago

I've got an old copy of the script in my home directory for convenience. I just haven't updated on my ubuntu machine.

gavanderhoorn commented 9 months ago

You could use a symlink and place it in $HOME/bin. That would avoid the copy and always keep it up-to-date.