Modify SimulationState proto to correspond to mj_getState.
PiperOrigin-RevId: 823494487 Change-Id: Ib284e3165ca691f5b690a376f7b28e51122e1bc4
This commit is contained in:
committed by
Copybara-Service
parent
ec8ad21cb5
commit
49a3caf84c
@@ -49,9 +49,9 @@ void Physics::LoadModel(std::string model_file, const mjVFS* vfs) {
|
||||
vfs_ = vfs;
|
||||
}
|
||||
|
||||
void Physics::ProcessPendingLoad() {
|
||||
bool Physics::ProcessPendingLoad() {
|
||||
if (!pending_load_.has_value()) {
|
||||
return;
|
||||
return model_ && data_;
|
||||
}
|
||||
|
||||
Clear();
|
||||
@@ -68,6 +68,8 @@ void Physics::ProcessPendingLoad() {
|
||||
on_model_loaded_(model_file);
|
||||
|
||||
InitHistory();
|
||||
|
||||
return model_ && data_;
|
||||
}
|
||||
|
||||
void Physics::Clear() {
|
||||
|
||||
@@ -93,8 +93,9 @@ class Physics {
|
||||
// Returns the error message from the simulation.
|
||||
std::string_view GetError() const { return error_; }
|
||||
|
||||
bool ProcessPendingLoad();
|
||||
|
||||
private:
|
||||
void ProcessPendingLoad();
|
||||
void InitHistory();
|
||||
void AddToHistory();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user