Remove Newton Cholesky factor from mjData arena, rollback of b66da3d369.
PiperOrigin-RevId: 685726867 Change-Id: Ic2afd0dd35e38f403164d2cbe4618286abfa51ab
This commit is contained in:
committed by
Copybara-Service
parent
7ec94f46d4
commit
ee7b994021
@@ -1362,7 +1362,7 @@ Euler integrator, semi-implicit in velocity.
|
||||
|
||||
def test_pickle_mjdata_clean(self):
|
||||
data2 = pickle.loads(pickle.dumps(self.data))
|
||||
attr_to_compare = ('time', 'qpos', 'qvel', 'mocap_pos', 'L')
|
||||
attr_to_compare = ('time', 'qpos', 'qvel', 'mocap_pos')
|
||||
self._assert_attributes_equal(data2, self.data, attr_to_compare)
|
||||
|
||||
def test_pickle_mjdata(self):
|
||||
@@ -1370,7 +1370,7 @@ Euler integrator, semi-implicit in velocity.
|
||||
data2 = pickle.loads(pickle.dumps(self.data))
|
||||
attr_to_compare = (
|
||||
'time', 'qpos', 'qvel', 'qacc', 'xpos', 'mocap_pos',
|
||||
'warning', 'energy', 'contact', 'efc_J', 'L'
|
||||
'warning', 'energy', 'contact', 'efc_J'
|
||||
)
|
||||
self._assert_attributes_equal(data2, self.data, attr_to_compare)
|
||||
for _ in range(10):
|
||||
@@ -1384,7 +1384,7 @@ Euler integrator, semi-implicit in velocity.
|
||||
data2 = pickle.loads(pickle.dumps(self.data))
|
||||
attr_to_compare = (
|
||||
'time', 'qpos', 'qvel', 'qacc', 'xpos', 'mocap_pos',
|
||||
'warning', 'energy', 'contact', 'efc_J', 'L'
|
||||
'warning', 'energy', 'contact', 'efc_J'
|
||||
)
|
||||
self._assert_attributes_equal(data2, self.data, attr_to_compare)
|
||||
for _ in range(10):
|
||||
|
||||
@@ -748,7 +748,6 @@ void MjDataWrapper::Serialize(std::ostream& output) const {
|
||||
X(ne);
|
||||
X(nf);
|
||||
X(nnzJ);
|
||||
X(nnzL);
|
||||
X(nefc);
|
||||
X(nisland);
|
||||
X(time);
|
||||
@@ -764,9 +763,6 @@ void MjDataWrapper::Serialize(std::ostream& output) const {
|
||||
MJDATA_POINTERS
|
||||
#undef X
|
||||
|
||||
bool is_sparse_newton = this->model_->get()->opt.solver == mjSOL_NEWTON &&
|
||||
mj_isSparse(this->model_->get());
|
||||
|
||||
#undef MJ_M
|
||||
#define MJ_M(x) this->model_->get()->x
|
||||
#undef MJ_D
|
||||
@@ -779,9 +775,6 @@ void MjDataWrapper::Serialize(std::ostream& output) const {
|
||||
|
||||
MJDATA_ARENA_POINTERS_CONTACT
|
||||
MJDATA_ARENA_POINTERS_SOLVER
|
||||
if (is_sparse_newton) {
|
||||
MJDATA_ARENA_POINTERS_NEWTON
|
||||
}
|
||||
if (mj_isDual(this->model_->get())) {
|
||||
MJDATA_ARENA_POINTERS_DUAL
|
||||
}
|
||||
@@ -811,8 +804,6 @@ MjDataWrapper MjDataWrapper::Deserialize(std::istream& input) {
|
||||
|
||||
bool is_dual = mj_isDual(&m);
|
||||
|
||||
bool is_sparse_newton = m.opt.solver == mjSOL_NEWTON && mj_isSparse(&m);
|
||||
|
||||
raw::MjData* d = mj_makeData(&m);
|
||||
if (!d) {
|
||||
throw py::value_error("Failed to create mjData.");
|
||||
@@ -834,7 +825,6 @@ MjDataWrapper MjDataWrapper::Deserialize(std::istream& input) {
|
||||
X(ne);
|
||||
X(nf);
|
||||
X(nnzJ);
|
||||
X(nnzL);
|
||||
X(nefc);
|
||||
X(nisland);
|
||||
X(time);
|
||||
@@ -873,9 +863,6 @@ MjDataWrapper MjDataWrapper::Deserialize(std::istream& input) {
|
||||
|
||||
MJDATA_ARENA_POINTERS_CONTACT
|
||||
MJDATA_ARENA_POINTERS_SOLVER
|
||||
if (is_sparse_newton) {
|
||||
MJDATA_ARENA_POINTERS_NEWTON
|
||||
}
|
||||
if (is_dual) {
|
||||
MJDATA_ARENA_POINTERS_DUAL
|
||||
}
|
||||
@@ -2035,7 +2022,6 @@ This is useful for example when the MJB is not available as a file on disk.)"));
|
||||
});
|
||||
|
||||
MJDATA_ARENA_POINTERS_SOLVER
|
||||
MJDATA_ARENA_POINTERS_NEWTON
|
||||
MJDATA_ARENA_POINTERS_DUAL
|
||||
MJDATA_ARENA_POINTERS_ISLAND
|
||||
|
||||
|
||||
Reference in New Issue
Block a user