Skip to content
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

Check for duplicated joint names in a trajectory #162

Merged
merged 3 commits into from
Oct 2, 2023
Merged

Check for duplicated joint names in a trajectory #162

merged 3 commits into from
Oct 2, 2023

Conversation

ted-miller
Copy link
Collaborator

@ted-miller
Copy link
Collaborator Author

Tested and working

@gavanderhoorn
Copy link
Collaborator

gavanderhoorn commented Sep 27, 2023

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
Copy link
Collaborator

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

@ted-miller
Copy link
Collaborator Author

ignore that.

@ted-miller
Copy link
Collaborator Author

Ok. Now I think it'll work

@gavanderhoorn
Copy link
Collaborator

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

@gavanderhoorn
Copy link
Collaborator

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

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

@ted-miller
Copy link
Collaborator Author

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.

src/MotionControl.c Outdated Show resolved Hide resolved
src/MotionControl.c Outdated Show resolved Hide resolved
@gavanderhoorn
Copy link
Collaborator

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.

Copy link
Collaborator

@gavanderhoorn gavanderhoorn left a comment

Choose a reason for hiding this comment

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

Updated version looks OK.

If you could test with repeated joint names at indices other than 0, this can be merged.

@ted-miller

This comment was marked as off-topic.

@ted-miller
Copy link
Collaborator Author

ted-miller commented Oct 2, 2023

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.

@ted-miller ted-miller merged commit 62ac8ed into main Oct 2, 2023
14 checks passed
@ted-miller ted-miller deleted the 28 branch October 2, 2023 15:09
@gavanderhoorn
Copy link
Collaborator

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
Copy link
Collaborator Author

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve JTA goal validation to also check for duplicate joint names
2 participants