Display error when loading model.
PiperOrigin-RevId: 830862449 Change-Id: Iab1e8786d79d55db9a15a788ecb37e0b0418111c
This commit is contained in:
committed by
Copybara-Service
parent
b3deb9dd12
commit
4a5a36f3fc
@@ -60,10 +60,17 @@ bool Physics::ProcessPendingLoad() {
|
||||
pending_load_.reset();
|
||||
|
||||
model_ = LoadMujocoModel(model_file, vfs_);
|
||||
if (!model_) mju_error("Error loading model");
|
||||
if (!model_) {
|
||||
error_ = "Error loading model!";
|
||||
paused_ = true;
|
||||
model_ = LoadMujocoModel("", vfs_);
|
||||
}
|
||||
|
||||
data_ = mj_makeData(model_);
|
||||
if (!data_) mju_error("Error making data.");
|
||||
if (!data_) {
|
||||
error_ = "Error making data!";
|
||||
paused_ = true;
|
||||
}
|
||||
|
||||
on_model_loaded_(model_file);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user