This repository has been archived by the owner on Aug 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 104
Add recursive mimic joint #177
Merged
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
6f7cc85
Add recursive mimic joint
alextoind 258de29
Fix crash on 0 free joints, opens empty window (#178)
bmagyar c9d0168
changelogs
wjwwood 7563f00
1.12.7
wjwwood fc71f00
remove divide by 2 when writing boxes to collada format (#133)
jacquelinekay 4d03177
Do a few cleanup tasks in collada_urdf (#183)
clalancette 3c7933b
fix missed mandatory -std=c++11 flag (#181)
4eetah 6218443
add Chris and Shane as maintainers (#184)
wjwwood 3384a0a
Allow supplying NodeHandle for initParam (#168)
piyushk 2755753
Remove old gazebo settings.
clalancette 05b4a41
Fix recursive offset and add infinite loop check
alextoind a88c94e
Fix computation
alextoind 139299d
Merge branch 'patch-1' of https://github.com/alextoind/robot_model in…
sloretz 4c59e35
Added joint_state_publisher tests for mimic_chain and mimic_cycle
sloretz 3e97af7
Make URDF valid
sloretz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi thank you for thew changes,
I think the correct math is:
offset += factor * param.get('offset', 0)
factor *= param.get('factor', 1)
(in that order)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the recursive formula is correct
It should be:
factor = factor_new * factor_old
offset = factor_new * offset_old + offset_new
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your code does not match your math.
Here is your math:
Here is what I think your code does:
I also think you're looking at the mimic chain from the wrong side. (hence the math is wrong).
Let consider the former example again:
Let do the algorithm step by step, with my modification.
At first you have
name == Ja
factor = x'
offset = y'
parent = Jb
parent in self.dependent_joints == True
parent = Jc
offset += factor * y
offset == y' + x'*y
factor *= x
factor == x'*x
parent in self.dependent_joints == False
hence:
offset == y' + x'*y
factor == x'*x
we're back on equation (3).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right I'm sorry, I completely forget about
factor_old
already computed insidefactor_new
when doingfactor_new * offset_old
.