-
Notifications
You must be signed in to change notification settings - Fork 98
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
Added Root::Clone function #843
Conversation
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
src/Root.cc
Outdated
|
||
this->dataPtr->worldFrameAttachedToGraphs = | ||
_root.dataPtr->worldFrameAttachedToGraphs ; | ||
|
||
this->dataPtr->modelFrameAttachedToGraph = | ||
_root.dataPtr->modelFrameAttachedToGraph ; | ||
|
||
this->dataPtr->worldPoseRelativeToGraphs = | ||
_root.dataPtr->worldPoseRelativeToGraphs; | ||
|
||
this->dataPtr->modelPoseRelativeToGraph = | ||
_root.dataPtr->modelPoseRelativeToGraph; |
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.
The ScopedGraph
holds a pointer to heap allocated data. Simply assigning the values here will have both Root
objects pointing to the same data, which is probably not what we want, especially when we're adding mutation capabilities.
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.
I removed these copies, and replaced with a Root::UpdateGraphs
function in 9c16a72.
Signed-off-by: Nate Koenig <[email protected]>
Codecov Report
@@ Coverage Diff @@
## sdf12 #843 +/- ##
==========================================
+ Coverage 90.76% 90.78% +0.01%
==========================================
Files 78 78
Lines 12535 12555 +20
==========================================
+ Hits 11378 11398 +20
Misses 1157 1157
Continue to review full report at Codecov.
|
I'm combining this PR with #841 due to testing overlap |
Signed-off-by: Nate Koenig [email protected]
🎉 New feature
Summary
Adds a
Root::Clone
function so that onesdf::Root
can copy anothersdf::Root
This is just a Fortress fix. Here is a fix for Garden: #844
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.