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

Robot's get_link_names throws exception for group with one link #160

Open
beverlylytle opened this issue Jun 4, 2020 · 6 comments · May be fixed by #442
Open

Robot's get_link_names throws exception for group with one link #160

beverlylytle opened this issue Jun 4, 2020 · 6 comments · May be fixed by #442
Assignees

Comments

@beverlylytle
Copy link
Member

beverlylytle commented Jun 4, 2020

Describe the bug
Robot's get_link_names throws exception for group with one link

To Reproduce
Steps to reproduce the behavior:

  1. Load the ur5 demo robot.
  2. Run the following code:
try:
    # If testing with the released versions of compas_fab up to 1.0.2, this code will run
    from compas_fab.robots.ur5 import Robot
    robot = Robot()
except:
    # if testing with the main branch (unreleased), this one will do instead
    from compas_fab.robots import RobotLibrary
    robot = RobotLibrary.ur5()

names = robot.get_link_names(group="endeffector")
print(names)

Expected behavior
names should equal ['ee_link']

Actual behavior
Exception is thrown "Exception: No chain found between the specified element"

@kaniket7209
Copy link

Hey @gonzalocasas I want to start my contribution in this good first issue .

@utam-1
Copy link

utam-1 commented Jun 16, 2024

Hi @gonzalocasas, will you assign this issue to me? I have just began learning about open source.

@gonzalocasas
Copy link
Member

Hi @gonzalocasas, will you assign this issue to me? I have just began learning about open source.

Done! Thanks!!!

@gonzalocasas
Copy link
Member

I will update the example code to the latest version because the one on the description is very old

@gonzalocasas
Copy link
Member

I've updated the snippet of code that will cause this bug to make it easier to reproduce. If you have problems while trying to fix this, feel free to post questions here!

@annapurna-gupta
Copy link

Hi @gonzalocasas ,

I just submitted a PR that addresses an issue with the get_link_names method in the compas_fab library. This fix allows the method to handle groups containing only one link without throwing exceptions.

Could you please take a look when you have a moment? Your feedback would be greatly appreciated!

Thank you!

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

Successfully merging a pull request may close this issue.

5 participants