Commit 6f7cbfb3 authored by Sebastien Timmermans's avatar Sebastien Timmermans 🎹

Merge branch '211-error-argument-shift-in-initialization-of-mbs_invdyn' into 'dev'

Resolve "Error (Argument shift) in initialization of mbs_invdyn"

Closes #211

See merge request robotran/mbsysc!331
parents e221cefd 23238a41
......@@ -178,9 +178,9 @@ void mbs_invdyn_init(MbsInvdyn* invd, MbsData* mbs_data)
// Locked joint cannont be actuated
for (i = 1; i <= mbs_data->nqc; i++) {
if (find_ivec_1(mbs_data->qa, mbs_data->qc[i], mbs_data->nqa) != -1) {
if (find_ivec_1(mbs_data->qa, mbs_data->nqa, mbs_data->qc[i]) != -1) {
mbs_msg(">>INVDYN>> Inchoherence detected during module initialization!\n");
mbs_msg(" >> The actuated joint %d is also driven.\n", mbs_data->qlocked[i]);
mbs_msg(" >> The actuated joint %d is also driven.\n", mbs_data->qc[i]);
mbs_msg(" >> This is not allowed when some joints are independent.\n");
mbs_error_msg("[%d] in mbs_invdyn_init !! \n", -600);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment