Fixing save_skel_state to actually save skel_state. #179
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.
Summary:
In this function, there was some really suspicious-looking code, namely this:
const Eigen::Quaternionf localRotation{
joint_params[iFrame].coeff(iJoint, 3),
joint_params[iFrame].coeff(iJoint, 4),
joint_params[iFrame].coeff(iJoint, 5),
joint_params[iFrame].coeff(iJoint, 6),
};
Digging into why this function worked at all given how wrong the above code is revealed that we were actually completely ignoring the skeleton state passed into this function and just constructing a brand new skeleton state from the joint parameters.
This seems non-ideal to me since it violates the contract: if you pass in skel_states that don't match the joint parameters you won't get what you expect. Therefore let's rewrite this function to work directly from the skel_state, which means we can toss out the joint parameters altogether. This lets us delete a bunch of skel_state_to_joint_params calls.
Also fixing the API to be less annoying (use buffers instead of lists of buffers), since this appears to be what everyone wants anyways.
Reviewed By: yutingye
Differential Revision: D67655918