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

Adding the Interplolation of the Orientation #51

Merged
merged 10 commits into from
Oct 9, 2023

Conversation

philipp1604
Copy link
Collaborator

@philipp1604 philipp1604 commented Aug 20, 2023

Description

In this pull request the interpolation of the orientation was added to the interpolation class. If the user adds a start and end orientation to the interpolation command, the orientation will be interpolated in the output tool path. Additionally a interpolation demonstration class was created

Motivation and Context

https://github.com//issues/47

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

- change of the orientation of the the interpolation
- The same convention as for linear point interpolation was implemented for the interpolation of the orientations
- Implementation of the different interpolation paths
-Demonstration of the interpolation class
-uppdate of the new interpolation_dem
- new update interpolation demo
- new implementation of the interpolation demonstration
- point are converted into euler before the orientations are interpolated
Adjustments Interpolation Class:

- Linear-, circular-, spline interpolation adapted to run interpolated orientations

interpolation_dem:
- demonstration of all the possible interpolations
@codecov
Copy link

codecov bot commented Aug 20, 2023

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (7eb0a87) 86.66% compared to head (9e09485) 85.27%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
- Coverage   86.66%   85.27%   -1.39%     
==========================================
  Files          15       15              
  Lines         930      951      +21     
==========================================
+ Hits          806      811       +5     
- Misses        124      140      +16     
Files Coverage Δ
src/pybullet_industrial/interpolation.py 62.50% <42.85%> (-15.94%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@liquidcronos liquidcronos left a comment

Choose a reason for hiding this comment

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

Looks good, however the spline interpolation does not quite behave as expected. We should also add a test to check that behavior is as expected when we are jumping between the angle gap

"""
start_orientation = p.getEulerFromQuaternion(start_orientation)
end_orientation = p.getEulerFromQuaternion(end_orientation)
euler_orientations = np.linspace(start_orientation,
Copy link
Member

Choose a reason for hiding this comment

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

What happens if the Euler angles cross over from -2pi to 0. It should be checked that this behaves as expected

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@liquidcronos @MaHajo in the new push of my code the spline interpolation was reset to the default code. There are issues that have been encountered using this method. For verification you can check the open issue: #50


final_path = ToolPath(positions=positions)

if start_orientation is not None and end_orientation is not None:
Copy link
Member

Choose a reason for hiding this comment

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

This is unexpected behavior. If the positions are interpolated as splines so should the orientations.

This requires splines that can deal with the jump from 0 to -2pi!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@liquidcronos @MaHajo in the new push of my code the spline interpolation was reset to the default code. There are issues that have been encountered using this method. For verification you can check the open issue: #50

- The spline Interopolation was reset to the default method
- Interpolating through orientations works by converting from quaternion to euler and back
@liquidcronos liquidcronos merged commit 0a9b02d into main Oct 9, 2023
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.

2 participants