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

Add an "SRDF Linter" script. For now, it focuses on disabled collisions #112

Open
wants to merge 1 commit into
base: noetic-devel
Choose a base branch
from

Conversation

AndyZe
Copy link
Member

@AndyZe AndyZe commented Mar 29, 2023

I wrote this script for a project that has a very long list of "disabled collisions" which have been manually added over time. It would have been very difficult to go through manually to find the duplicates and sort them properly. So, here's a simple linter.

I don't intend to put a ton of time into improving this script, so I won't be surprised if it doesn't get approved and the issue sits open. I think it would still be a valuable resource to some people.

The script:

  • Removes duplicate "disabled collisions"
  • Sorts disabled collisions alphabetically.

The output looks like this:

This script will clean up issues and make suggestions for an SRDF.

Original list of disabled collision pairs:

[['ground', 'seg_0_bed', 'Adjacent'], ['ground', 'seg_0_base_link', 'Adjacent'], ...



Removing duplicate entries from the list of allowed collisions
Originally there were 141 entries in the Allowed Collision Matrix.
These entries are duplicated. Removing them:
seg_0_eef seg_0_shoulder_link_1
Now there are 140 entries in the Allowed Collision Matrix.
Checking if there are any duplicates when the order is reversed, e.g. (l1,l2) vs (l2,l1)
These entries are duplicated. Removing them:
Now there are 140 entries in the Allowed Collision Matrix.

Sorting the list of allowed collisions

Output. Please copy/paste this into the SRDF:

<disable_collisions link1="ground" link2="seg_0_base_link" reason="Adjacent"/>
<disable_collisions link1="ground" link2="seg_0_bed" reason="Adjacent"/>
...

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.

None yet

1 participant