Disable RK4 integrator in mjd_transitionFD by throwing an error and improve documentation for mjd_transitionFD and mjd_inverseFD.

PiperOrigin-RevId: 659492713
Change-Id: I84ab7ebfba34742f239f60311d8f0a55559995fb
This commit is contained in:
Taylor Howell
2024-08-05 03:17:32 -07:00
committed by Copybara-Service
parent 6a8e28f0e9
commit 20011a2f53
3 changed files with 22 additions and 0 deletions
+4
View File
@@ -548,6 +548,10 @@ void mjd_stepFD(const mjModel* m, mjData* d, mjtNum eps, mjtByte flg_centered,
// D: (nsensordata x nu)
void mjd_transitionFD(const mjModel* m, mjData* d, mjtNum eps, mjtByte flg_centered,
mjtNum* A, mjtNum* B, mjtNum* C, mjtNum* D) {
if (m->opt.integrator == mjINT_RK4) {
mjERROR("RK4 integrator is not supported");
}
int nv = m->nv, na = m->na, nu = m->nu, ns = m->nsensordata;
int ndx = 2*nv+na; // row length of state Jacobians