-
Notifications
You must be signed in to change notification settings - Fork 14
Sigma inverse edits #430
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
Open
kshaji3
wants to merge
13
commits into
master
Choose a base branch
from
sigma_inverse_edits
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sigma inverse edits #430
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c9da1be
test of workflow
kshaji3 7f45a86
another attempt
kshaji3 f299e72
attempt 2
kshaji3 febfe38
cron update
kshaji3 2042bb4
attempt 3
kshaji3 c19792f
attempt 4
kshaji3 8dcaa22
re-added manual dispatch
kshaji3 0be9c57
Merge branch 'master' of https://github.com/borglab/GTDynamics
kshaji3 44031e0
made joint sigmas directly adjustable
kshaji3 00166f2
fixed c++ tests
kshaji3 7282f33
added python unit test
kshaji3 3e584e6
removed old stuff that shouldn't be here
kshaji3 50a96ca
added way to override joint limits
kshaji3 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -302,11 +302,15 @@ NonlinearFactorGraph Kinematics::jointAngleObjectives<Slice>( | |
| const Slice& slice, const Robot& robot, const Values& mean) const { | ||
| NonlinearFactorGraph graph; | ||
|
|
||
| // Minimize the joint angles. | ||
| // Per-joint override from p_.joint_prior_overrides, else prior_q_cost_model. | ||
| for (auto&& joint : robot.joints()) { | ||
| const gtsam::Key key = JointAngleKey(joint->id(), slice.k); | ||
| auto it = p_.joint_prior_overrides.find(joint->name()); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have the key: string is slow
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair, I'll clean it up. I'll use the jid instead. |
||
| const gtsam::SharedNoiseModel cost_model = | ||
| (it != p_.joint_prior_overrides.end()) ? it->second | ||
| : p_.prior_q_cost_model; | ||
| graph.addPrior<double>(key, (mean.exists(key) ? mean.at<double>(key) : 0.0), | ||
| p_.prior_q_cost_model); | ||
| cost_model); | ||
| } | ||
|
|
||
| return graph; | ||
|
|
@@ -317,12 +321,18 @@ NonlinearFactorGraph Kinematics::jointAngleLimits<Slice>( | |
| const Slice& slice, const Robot& robot) const { | ||
| NonlinearFactorGraph graph; | ||
| for (auto&& joint : robot.joints()) { | ||
| graph.add(JointLimitFactor( | ||
| JointAngleKey(joint->id(), slice.k), | ||
| gtsam::noiseModel::Isotropic::Sigma(1, 0.001), | ||
| joint->parameters().scalar_limits.value_lower_limit, | ||
| joint->parameters().scalar_limits.value_upper_limit, | ||
| 0.04)); // joint->parameters().scalar_limits.value_limit_threshold)); | ||
| // Override URDF limits for joints listed in p_.joint_limit_overrides. | ||
| auto it = p_.joint_limit_overrides.find(joint->name()); | ||
| const auto& limits = joint->parameters().scalar_limits; | ||
| const double lower = | ||
| (it != p_.joint_limit_overrides.end()) ? it->second.first | ||
| : limits.value_lower_limit; | ||
| const double upper = | ||
| (it != p_.joint_limit_overrides.end()) ? it->second.second | ||
| : limits.value_upper_limit; | ||
| graph.add(JointLimitFactor(JointAngleKey(joint->id(), slice.k), | ||
| gtsam::noiseModel::Isotropic::Sigma(1, 0.001), | ||
| lower, upper, 0.04)); | ||
| } | ||
| return graph; | ||
| } | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Sus: why string? Joint key not known?