Refactor mj_fullM. This change is part of the deprecation of mjData.qM.
PiperOrigin-RevId: 925669464 Change-Id: I4889c66591bc1df4c31135a13776052aad491f7a
This commit is contained in:
committed by
Copybara-Service
parent
49211a05c5
commit
7b9b88060e
@@ -608,13 +608,13 @@ TEST_F(InertiaTest, FullM) {
|
||||
ASSERT_THAT(m, NotNull()) << "Failed to load model: " << error;
|
||||
int nv = m->nv;
|
||||
|
||||
// forward dynamics, populate qM and qLD
|
||||
// forward dynamics, populate M and qLD
|
||||
mjData* d = mj_makeData(m);
|
||||
mj_forward(m, d);
|
||||
|
||||
// get dense mass matrix from M using mju_sym2dense
|
||||
// get dense mass matrix from M using mj_fullM
|
||||
vector<mjtNum> M(nv * nv);
|
||||
mju_sym2dense(M.data(), d->M, nv, m->M_rownnz, m->M_rowadr, m->M_colind);
|
||||
mj_fullM(m, d, M.data());
|
||||
|
||||
// get dense mass matrix from M using mju_sparse2dense
|
||||
vector<mjtNum> M_CSR(nv * nv);
|
||||
|
||||
Reference in New Issue
Block a user