Add ctrl to attached keyframes.
PiperOrigin-RevId: 662878508 Change-Id: Ie273fae0220c8b257766cbbd90a880d44b901725
This commit is contained in:
committed by
Copybara-Service
parent
afd7c73f44
commit
7be4df7e03
@@ -5394,6 +5394,7 @@ mjCActuator& mjCActuator::operator=(const mjCActuator& other) {
|
||||
|
||||
void mjCActuator::ForgetKeyframes() {
|
||||
act_.clear();
|
||||
ctrl_.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -5413,6 +5414,15 @@ std::vector<mjtNum>& mjCActuator::act() {
|
||||
|
||||
|
||||
|
||||
mjtNum& mjCActuator::ctrl() {
|
||||
if (ctrl_.find(model->state_name_) == ctrl_.end()) {
|
||||
ctrl_[model->state_name_] = mjNAN;
|
||||
}
|
||||
return ctrl_.at(model->state_name_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void mjCActuator::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
|
||||
Reference in New Issue
Block a user