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

SceneGraphCollisionChecker refers to removed joint index after RemoveJoint() function has been called on the plant #21860

Closed
agarwal-abhinav opened this issue Aug 29, 2024 · 1 comment · Fixed by #21867
Assignees
Labels
component: planning and control Optimization-based planning and control, and search- and sampling-based planning type: bug

Comments

@agarwal-abhinav
Copy link
Contributor

What happened?

When working with MultibodyPlant, after calling plant.RemoveJoint() method, the joint index is removed and not replaced (as expected). Thus, there would be a skip of integer number at the point where the removed joint's index was numerically assigned. When this plant (via its RobotDiagram) is then passed to the SceneGraphCollisionChecker, the following error is given: RuntimeError: The JointIndex(26) has been removed. Essentially, SceneGraphCollisionChecker is not working on a plant for which joints have been removed and new joints/ welds have been added at the end, creating a discontinuity in the integer index of joints.

Version

1.32.0

What operating system are you using?

Ubuntu 22.04

What installation option are you using?

pip install drake

Relevant log output

No response

@cohnt
Copy link
Contributor

cohnt commented Aug 29, 2024

Per our in-person discussion, looks like the bug is caused by how the joints are iterated over in linear_distance_and_interpolation_provider.cc.

Abhinav and I will fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: planning and control Optimization-based planning and control, and search- and sampling-based planning type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants