Add mjs_findElement() to find any element in a spec by name.
Also, remove mjs_findMesh() and mjs_findKeyframe(). PiperOrigin-RevId: 670978980 Change-Id: Id88b800eb8a4c5efc40866f72a4442bf1d1437d0
This commit is contained in:
committed by
Copybara-Service
parent
0e8c0b80eb
commit
d3dfa6f970
@@ -1408,8 +1408,8 @@ void mjCBody::ForgetKeyframes() const {
|
||||
joint->qpos_.clear();
|
||||
joint->qvel_.clear();
|
||||
}
|
||||
model->FindBody((mjCBody*)this, name)->mpos_.clear(); // this is a hack to avoid const
|
||||
model->FindBody((mjCBody*)this, name)->mquat_.clear(); // this is a hack to avoid const
|
||||
((mjCBody*)this)->mpos_.clear();
|
||||
((mjCBody*)this)->mquat_.clear();
|
||||
for (auto body : bodies) {
|
||||
body->ForgetKeyframes();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user