-
Notifications
You must be signed in to change notification settings - Fork 359
Clear via point and obstacle indexes in Scholz2015GeometryPath::extendAddToSystem()
#4240
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
Clear via point and obstacle indexes in Scholz2015GeometryPath::extendAddToSystem()
#4240
Conversation
|
This is WIP, since I am not proposing this as a final solution, but rather a working fix for the sake of discussion. @adamkewley I assume that the (probably temporary) addition of |
|
It would be incredibly not-useful and counter to the point of that API, yes. If you just want to play around with raw vectors the old-fashioned way then I'd recommend using If visualization of which forces are actually applied by an |
|
I had a quick look at why the behavior might be different The EDIT: additionally, it looks like it'll be a bit of faffing around if you want to use |
The somewhat tricky part is that this is not an
"I swear bro, I won't change anything." Joking aside, I think this could be solved by adding a public
If you look at the diff, I already had this solution in place. I just need to add a |
|
Update: the strange results I reported in #4239 may be somehow related to Python via C++ differences. Those results were generated via a Python script related to the model building project I'm working on. For debugging, I replicated the same simulation approach (initial conditions, integrator settings, etc) in C++ and loaded in the same model and, without changing anything, the model free falls as expected (no funny flipping motion). Working on trying to isolate the true root cause. |
07fd7ad to
b6f688d
Compare
|
@adamkewley I found the true issue. We need to clear the via point and obstacle indices inside I'm thinking I still might submit a PR to add |
…xtendAddToSystem() to avoid duplication
b6f688d to
44e8a34
Compare
Scholz2015GeometryPath::produceForces()Scholz2015GeometryPath::extendAddToSystem()
|
Leaving this as WIP until I update the |
Scholz2015GeometryPath::extendAddToSystem()Scholz2015GeometryPath::extendAddToSystem()
|
This is ready for review. I've updated the Simbody commit to include changes that call CableSpan::Impl::realizePosition() inside calls to CableSpan::calcOriginUnitForce(), CableSpan::calcCurveSegmentUnitForce(), etc., to ensure that the path is always valid. |
|
Looks good to me - good work @nickbianco for looking into the root cause, patching it upstream, etc.! |
|
Thanks @adamkewley! |
Fixes issue #4239
Brief summary of changes
Updates
Scholz2015GeometryPath::extendAddToSystem()to clear the indexes stored for via points and obstacles. WhileModel::createMultibodySystem()clears the underlying Simbody system before callingaddToSystem(), any member variables (i.e., via points and obstacle indexes) that are not part of the Simbody system will not be cleared. This change fixes that inconsistency.As an additional "safety" measure, I've also updated the Simbody commit to include changes that call
CableSpan::Impl::realizePosition()inside calls toCableSpan::calcOriginUnitForce(),CableSpan::calcCurveSegmentUnitForce(), etc., to ensure that the path is always valid.Testing I've completed
Ran
testScholz2015GeometryPath.cpp.Looking for feedback on...
CHANGELOG.md (choose one)
This change is