compas-dev / compas-dev/compas_fab

Inverse kinematics not giving an accurate result at first after a tool is changed

Open
#385 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
137
Forks
47
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When a tool is removed and a new tool is added, the inverse kinematics component for the same given plane does not give an accurate result at first computing, but only after the inverse kinematics is computed for another plane at least once.

**To Reproduce**
Steps to reproduce the behavior:
1. Context:
compas_fab version 0.28.0 on Rhino 7, Grasshopper
2. Sample script:

tool_frame = Frame(plane.Origin, plane.XAxis, plane.YAxis)
ik_configuration = robot.inverse_kinematics(tool_frame,
start_configuration,
group=group,
options={
'avoid_collisions':avoid_collisions,
'return_full_configuration':True,
})

**Expected behavior**
After removing and adding a new tool, the inverse kinematics computation should give a new and accurate result for the same plane.

**Screenshots**
First computation of inverse kinematics after the tool was changed (probably using a transformation from the previous tool).
![inverse_kinematics_1](https://github.com/compas-dev/compas_fab/assets/57141561/8433e4ba-dcd7-4a05-af87-e115b34f950c)
Second computation of inverse kinematics after the plane was shifted to a new position.
![inverse_kinematics_2](https://github.com/compas-dev/compas_fab/assets/57141561/416814ba-83fc-483b-b8ae-d364d4a9f22b)

**Desktop (please complete the following information):**
- Windows 11
- Python version 3.9.13
- Python package manager conda

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.