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

Fix calculation of frame offset #71

Merged

Conversation

Naoki-Hiraoka
Copy link
Contributor

Hello. I am Naoki Hiraoka, robot_calibration user.

This pull request fixes the method of applying frame offset in updateURDF and getChainFK.

In the previous code, frames are calculated as following

In updateURDF
[updated frame].x = [original frame].x + [offset frame].x
[updated frame].y = [original frame].y + [offset frame].y
[updated frame].z = [original frame].z + [offset frame].z
[updated frame].roll = [original frame].roll + [offset frame].roll
[updated frame].pitch = [original frame].pitch + [offset frame].pitch
[updated frame].yaw = [original frame].yaw + [offset frame].yaw

In getChainFK
[updated frame] = [offset frame] * [original frame]

There are two problems.
In updateURDF, since rotation is not integrable, output URDF generated by updateURDF is different from the one used by optimizer with getChainFK.
In getChainFK, since [offset frame] is applied from the left, [original frame].xyz is affected by [offset frame].rpy.

To avoid them, in this pull request, frames are calculated as

[updated frame] = [original frame] * [offset frame]

in both updateURDF and getChainFK.

@mikeferguson
Copy link
Owner

Ok, this one is going to take me a bit to look over more closely.

@mikeferguson mikeferguson self-assigned this Aug 20, 2019
@mikeferguson mikeferguson reopened this Nov 20, 2019
@mikeferguson
Copy link
Owner

This has been tested -- I'm pretty sure it breaks some tests, but running CI anyways and then I'll fix up tests later. Thanks!

@mikeferguson mikeferguson merged commit bae0574 into mikeferguson:master Nov 20, 2019
mikeferguson added a commit that referenced this pull request Nov 20, 2019
mikeferguson added a commit that referenced this pull request Nov 20, 2019
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