MCPcopy Create free account
hub / github.com/TeleHuman/TextOp / Load

Method Load

TextOpDeploy/src/unitree_mujoco/simulate/src/mujoco/simulate.cc:2433–2449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2431 }
2432
2433 void Simulate::Load(mjModel *m, mjData *d, const char *displayed_filename)
2434 {
2435 this->mnew_ = m;
2436 this->dnew_ = d;
2437 mju::strcpy_arr(this->filename, displayed_filename);
2438
2439 {
2440 MutexLock lock(mtx);
2441 this->loadrequest = 2;
2442
2443 // Wait for the render thread to be done loading
2444 // so that we know the old model and data's memory can
2445 // be free'd by the other thread (sometimes python)
2446 cond_loadrequest.wait(lock, [this]()
2447 { return this->loadrequest == 0; });
2448 }
2449 }
2450
2451 void Simulate::LoadMessageClear(void)
2452 {

Callers 2

PhysicsLoopFunction · 0.80
PhysicsThreadFunction · 0.80

Calls 1

strcpy_arrFunction · 0.85

Tested by

no test coverage detected